Does anyone know how to convert from PreTexT files to straight LaTeX? I see on the website that it's possible, but I can't find the exact commands.
Asked
Active
Viewed 531 times
2 Answers
3
According to the documentation the command:
xsltproc /path/to/mathbook/xsl/mathbook-latex.xsl <your-document>.xml
should produce the file article-1.tex which can be processed with LaTeX.
Alan Munn
- 218,180
0
I know this is quite an old question, but in case someone else searches and finds it, there is now a much easier way to convert from PreTeXt to LaTeX. You will need python installed, but then you can install PreTeXt with pip install pretext.
Each project needs a project manifest, which you can get with pretext init. You might need to edit the pretext.ptx file to point to your source files.
Then to "build" latex you can run pretext build print-latex.
This is now included in the getting started part of the documentation.
There is also an easy to use extension to VS Code, PreTeXt-tools, that provides a GUI for this.
Oscar Levin
- 11