https://github.com/nmwsharp/render-mathtex-doc
Parse a document with embedded LaTeX equations and replace them with images.
https://github.com/nmwsharp/render-mathtex-doc
Last synced: about 1 month ago
JSON representation
Parse a document with embedded LaTeX equations and replace them with images.
- Host: GitHub
- URL: https://github.com/nmwsharp/render-mathtex-doc
- Owner: nmwsharp
- License: gpl-3.0
- Created: 2017-11-14T16:38:30.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-14T19:49:48.000Z (over 8 years ago)
- Last Synced: 2025-03-12T14:49:17.978Z (about 1 year ago)
- Language: Python
- Size: 29.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# raster-mathtex-doc
Parse a document with embedded LaTeX equations and replace them with images.
Uses the simple [tex2im](http://www.nought.de/tex2im.php) to generate math rasters. Assumes `pdflatex` and ImageMagick's `convert` are both on your path.
Example usage:
```
python render-doc.py document.md document_processed.md --output-image-dir generated_images
```
For now, this is specified to generate PNGs and embed them in the github wiki style, because that's what I specifically needed. However, the code is written to be easy to extend to other variations.
Warning: This program passes the equations around as command line arguments; it is very likely vulnerable to malicous "equations" executing code. Don't run on untrusted input!