Python Preprocessor for (La)TeX
Project description
PypTeX: the Python Preprocessor for TeX
Author: Sébastien Loisel
PypTeX is the Python Preprocessor for LaTeX. It allows one to embed Python code fragments in a LaTeX template file.
Installation
pip install pyptex
You will also need a LaTeX installation, and the default LaTeX processor is pdflatex
.
Hello, world
Put the following in example.tex
:
\documentclass{article}
@{from sympy import *}
\begin{document}
$$\int x^3\,dx = @{S('integrate(x^3,x)')}+C$$
\end{document}
The command pyptex example.tex
will generate example.pdf
and an intermediary
pure-LaTeX file example.pyptex
. The resulting PDF can be found
here
Slightly bigger example
This PypTeX source file produces this example of a matrix inversion by augmented matrix approach.
Documentation
Detailed documentation can be found here
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyptex-0.1.3.tar.gz
(10.5 kB
view hashes)