Build system for LaTeX documents.
Project description
texbuild
texbuild
is a build system for LaTeX documents.
It provides namespacing for labeled items.
Consider a LaTeX document composed of a main file
% main.tex
\documentclass{article}
\begin{document}
This is an equation
\begin{equation}
f(x) = x \label{equation}
\end{equation}
\input{foo.tex}
Let's refer to Equation~(\ref{equation}).
\end{document}
which includes a subordinate file
% foo.tex
\begin{equation}
f(x) = x^2 \label{equation}
\end{equation}
In this situation, \ref{equation}
is ambiguous because both files use \label{equation}
and the namespace for labeled items in LaTeX is global.
texbuild
fixes this by supporting import semantics:
% main.tex
% -- begin imports --
% import foo as foo
% -- end imports --
\documentclass{article}
\begin{document}
This is an equation
\begin{equation}
f(x) = x \label{equation} % export
\end{equation}
\input{foo.tex}
We can refer to foo's Equation~(\ref{foo.equation}) or our own Equation~(\ref{equation}).
\end{document}
and
% foo.tex
\begin{equation}
f(x) = x^2 \label{equation} % export
\end{equation}
Example
To see texbuild
in action, install it and use it to build the example LaTeX documemt provided in this repo, by following these steps:
$ pip install texbuild
$ git clone https://github.com/DanielSank/texbuild
$ cd texbuild/example
$ texbuild
This produces `texbuild/example/build/main.pdf`, which illustrates the use of `texbuild`.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file texbuild-0.2.tar.gz
.
File metadata
- Download URL: texbuild-0.2.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 472865cba980ab9a8b2f31aa7068b79d8398bb1a925376ac3195271d2d3a2915 |
|
MD5 | cf09ae1b23d01896db2c0e633bcf8f43 |
|
BLAKE2b-256 | c2f74de5224383a2e976421160c1c8d32410734f853cc93aa9131e50b13a104f |
Provenance
File details
Details for the file texbuild-0.2-py3-none-any.whl
.
File metadata
- Download URL: texbuild-0.2-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9428faca67eb75580813c720a91898920563a9be56809f256954b37f53fe4aa8 |
|
MD5 | cf1ffc541125905c9459fe827ed13dde |
|
BLAKE2b-256 | e77681b7dc249703862d4f42c7851c783e5aa0d18ca4775b9586a42f3f020d1b |