Skip to content

Integrating LaTeXML into TeX editors

Frédéric Wang edited this page May 14, 2014 · 5 revisions

TeXworks

TeXworks is an open-source TeX editors available on Linux, Mac and Windows which is packaged with MiKTeX, MacTeX and TeXLive. It is possible to configure your own typesetting engines with TeXworks.

On Linux/Mac, create a file latexmlc-html.sh with the following content:

#!/bin/sh
latexmlc --dest "$1.html" "$1.tex"

and similarly a file latexmlc-epub.sh:

#!/bin/sh
latexmlc --dest "$1.epub" "$1.tex"

On Windows, create two files latexmlc-html.bat and latexmlc-epub.bat:

@latexmlc --dest "%1.html" "%1.tex"

and

@latexmlc --dest "%1.html" "%1.tex"

Now, in TeXworks go to Edit → Preference → Typesetting. In Processing Tools, add two new LaTeXML HTML5 and LaTeXML EPUB3 modes with the following configuration:

Name: LaTeXML HTML5
Program: latexmlc-html
Arguments: $basename
[ ] View PDF after running

Name: LaTeXML EPUB3
Program: latexmlc-epub
Arguments: $basename
[ ] View PDF after running

These modes will then appear in the drop-down menu of the main toolbar. You can now generate HTML5 and EPUB3 files by selecting the new corresponding LaTeXML mode and clicking on the green "Typeset" button.

Note: LaTeXML does not have non-zero exit status code when a parsing error happens. If you wish to see the result of LaTeXML in the console ouput, you can add a line "exit 1" (Linux/Mac) or "EXIT 1" (Windows) at then end of the script files.

LyX

6v.0.0.0 IV ice

Clone this wiki locally