All Projects → transpect → mathtype-extension

transpect / mathtype-extension

Licence: other
Calabash extension step to convert MathType OLE objects to MathML

Programming Languages

ruby
36898 projects - #4 most used programming language
java
68154 projects - #9 most used programming language
c
50402 projects - #5 most used programming language
XSLT
1337 projects
HTML
75241 projects
XProc
15 projects

Projects that are alternatives of or similar to mathtype-extension

Phpstamp
The XSL-way templating library for MS Office Word DOCX documents.
Stars: ✭ 150 (+900%)
Mutual labels:  docx
mathconverter
Converts from AsciiMath, LaTeX, MathML to LaTeX, MathML
Stars: ✭ 35 (+133.33%)
Mutual labels:  mathml
Mathjax
Beautiful and accessible math in all browsers
Stars: ✭ 8,551 (+56906.67%)
Mutual labels:  mathml
Documentserver
ONLYOFFICE Document Server is an online office suite comprising viewers and editors for texts, spreadsheets and presentations, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
Stars: ✭ 2,335 (+15466.67%)
Mutual labels:  docx
Gotenberg
A Docker-powered stateless API for PDF files.
Stars: ✭ 3,272 (+21713.33%)
Mutual labels:  docx
react-mathjax-preview
The MathJax React component you were looking for.
Stars: ✭ 46 (+206.67%)
Mutual labels:  mathml
Docxtemplater
Generate docx pptx and xlsx (Microsoft Word, Powerpoint, Excel documents) from templates, from Node.js, the Browser and the command line / Demo: https://www.docxtemplater.com/demo
Stars: ✭ 1,990 (+13166.67%)
Mutual labels:  docx
docx-to-pdf-on-AWS-Lambda
Microsoft Word doc/docx to PDF conversion on AWS Lambda using Node.js
Stars: ✭ 42 (+180%)
Mutual labels:  docx
Open Xml Sdk
Open XML SDK by Microsoft
Stars: ✭ 3,005 (+19933.33%)
Mutual labels:  docx
Dompurify
DOMPurify - a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. DOMPurify works with a secure default, but offers a lot of configurability and hooks. Demo:
Stars: ✭ 8,177 (+54413.33%)
Mutual labels:  mathml
Pswriteword
PSWriteWord is powershell module to create Microsoft Word documents without Microsoft Word installed...
Stars: ✭ 180 (+1100%)
Mutual labels:  docx
Duckx
C++ library for creating and updating Microsoft Word (.docx) files.
Stars: ✭ 214 (+1326.67%)
Mutual labels:  docx
texmlbus
Texmlbus (Tex to XML BUild System) supports the conversion process of documents written in LaTeX to pdf, html, xhtml or jats.
Stars: ✭ 16 (+6.67%)
Mutual labels:  mathml
Poi Tl
Generate awesome word(docx) with template
Stars: ✭ 2,306 (+15273.33%)
Mutual labels:  docx
Asciidocfx
Asciidoc Editor and Toolchain written with JavaFX 16 (Build PDF, Epub, Mobi and HTML books, documents and slides)
Stars: ✭ 1,533 (+10120%)
Mutual labels:  mathml
Plagiarism Checker
A utility to check if a document's contents are plagiarised
Stars: ✭ 149 (+893.33%)
Mutual labels:  docx
MathJax-dev
Build and release tools for the MathJax project
Stars: ✭ 34 (+126.67%)
Mutual labels:  mathml
react-native-math-view
Math view for react native! No WebView!
Stars: ✭ 49 (+226.67%)
Mutual labels:  mathml
ilovepdf
Telegram Bot that helps you to convert Images to pdf, pdf to images, 45+ file formats to pdf, more features Soon..
Stars: ✭ 140 (+833.33%)
Mutual labels:  docx
mathup
Easy MathML authoring tool with a quick to write syntax
Stars: ✭ 46 (+206.67%)
Mutual labels:  mathml

Build Status

mathtype-extension

An extension step for XML Calabash that converts a Mathtype Equation (MTEF) to MathML.

Incorporates (J)Ruby mathtype gem: https://github.com/sbulka/mathtype (forked from Jure Triglav's gem)

XSLT adapted from: https://github.com/jure/mathtype_to_mathml/tree/master/lib/xsl

Written by Sebastian Bulka, le-tex publishing services GmbH

Development was sponsored by

If you or your organization benefit from this tool, if you are interested in supporting the continuous maintenance, or if you have a feature request: All development costs have not been covered yet; we do welcome more sponsors. If you are interested, please get in touch with @sbulka, @mkraetke, or @gimsieke.

Usage

There are different ways to call the xproc-step.

Standalone

  1. Call pipeline for one file.
    For setting the MATHTYPE_CP variable, see section 'Java classpath' below.
    java -cp $MATHTYPE_CP com.xmlcalabash.drivers.Main -c file:///uri/of/transpect-config.xml mathtype-example.xpl file=file:///uri/of/bin-file.bin

XProc extension

  1. Call <tr:mathtype2mml> from your pipeline.
    This requires you to have xproc-util available in calabash, to store debug-files.
    <p:import href="mathtype2mml-declaration-internal.xpl"/>

  2. Call <tr:mathtype2mml-internal> from your pipeline.
    No xproc-util needed, but no debug-files stored therefore.
    The debug is still available on xproc-ports, if you want to use them yourself.

From other front-end pipelines such as docx2tex

See https://github.com/transpect/docx2tex (note the MathType extension submodule might not be up to date)

Options

Configure tr:mathtype2mml step by passing options to it:

  • href (required): file name (not URI) of one file containing a Mathtype Equation
    supported filetypes:
    • .bin (OLE object)
    • .wmf
  • debug: Output debug messages (xsl:message) if set to 'yes'. Default is 'no'.
  • debug-dir: If debug is set, also output intermediate results for each internal xsl-step.
  • mml-space-handling: How to handle Mathtype-spacing in Mathml. Possible: 'char', 'mspace'. Default: mspace

Spaces

MathML states that whitespace-characters should be normalized before rendering.
Problems arise because in Mathtype, whitespace is sometimes also used for indentation.
The option for mml-space-handling was introduced so spaces can be converted to will not be normalized.
If 'char' is chosen, the Unicode-characters for spaces are used, wrapped in <mtext>.
Opening the MathML in e.g. your browser, spaces will likely get normalized. If 'mspace' is chosen, every Mathtype-space will be represented by <mspace>.
You can define your preferred width for each different Mathtype-Space.
Insert what you want to see on the mspace/@width, including unit. (e.g. '1pt' for what is called 1pt-space in Mathtype)
Every option has a default width:

  • em-width Default: '1em'
  • en-width Default: '0.33em'
  • standard-width Default: '0.16em'
  • thin-width Default: '0.08em'
  • hair-width Default: '0.08em'
  • zero-width Default: '0em'

Having issues?

You can file an issue on github for inconveniences with your conversion.
This may be asking for help, reporting bugs or requesting features.

Its sufficient to describe your Problem in natural language, e.g:
"In MathML output, the last parenthese is missing."
If possible, please attach the file which contains your formula, so we can investigate what went wrong.

Java classpath

The extension is shipped with a copy of jruby and some ruby gems.
These need to be on your classpath, or java wont find the files.
In addition, calabash and saxon should be included too, to be able to process XProc and XSLT.

Example (from https://github.com/transpect/calabash-frontend/blob/master/calabash.sh):
MATHTYPE_CP= "/path/to/calabash/distro/xmlcalabash-1.1.15-97.jar:/path/to/calabash/saxon/saxon9he.jar:/path/to/calabash/extensions/transpect/mathtype-extension/:/path/to/calabash/extensions/transpect/mathtype-extension/lib/jruby-complete-9.1.8.0.jar:/path/to/calabash/extensions/transpect/mathtype-extension/ruby/stdlib:/path/to/calabash/extensions/transpect/mathtype-extension/ruby/ruby-ole-1.2.12.1/lib:/path/to/calabash/extensions/transpect/mathtype-extension/ruby/nokogiri-1.7.0.1-java/lib:/path/to/calabash/extensions/transpect/mathtype-extension/ruby/bindata-2.3.5/lib:/path/to/calabash/extensions/transpect/mathtype-extension/ruby/mathtype-0.0.7.5/lib"

Compilation

If you happen to change java sources, you need to set the classpath as describe above for compilation too.
javac -target 1.7 -source 1.7 -cp $MATHTYPE_CP Ole2Xml.java Ole2XmlConverter.java

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].