跳转到主要内容

LaTeX文档构建系统。

项目描述

texbuild

texbuild是一个LaTeX文档的构建系统。它为标记项提供命名空间。考虑一个由主文件组成的LaTeX文档

% 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}

它包含一个从属文件

% foo.tex

\begin{equation}
  f(x) = x^2 \label{equation}
\end{equation}

在这种情况下,\ref{equation}是模糊的,因为两个文件都使用了\label{equation},而LaTeX中标记项的命名空间是全局的。texbuild通过支持导入语义来解决这个问题

% 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}

% foo.tex

\begin{equation}
  f(x) = x^2 \label{equation} % export
\end{equation}

示例

要查看texbuild的实际应用,请按照以下步骤安装它,并使用它构建此仓库中提供的示例LaTeX文档:

$ pip install texbuild
$ git clone https://github.com/DanielSank/texbuild
$ cd texbuild/example
$ texbuild

This produces `texbuild/example/texbuild-out/main.pdf`, which illustrates the use of `texbuild`.

项目详情


下载文件

下载适合您平台的自定义文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源分布

texbuild-0.3.tar.gz (5.9 kB 查看哈希值)

上传时间:

构建分发

texbuild-0.3-py3-none-any.whl (6.8 kB 查看哈希)

上传时间 Python 3

支持者