Skip to main content

狮身人面像的 TeX 图扩展

项目描述

概述

sphinxcontrib-texfigure是一个Sphinx扩展,用于从 TeX 文件生成图形和图表。

有关此扩展可以生成的图表示例,请参阅 http://htsql.org/doc/overview.html#htsql-in-a-nutshell。有关更多示例,请参阅源代码分发中的演示目录。

此扩展在范围上类似于sphinxcontrib-tikz扩展,但输入和选项的方法不同。

该软件由 Kirill Simonov ( Prometheus Research, LLC ) 编写,并在 BSD 许可下发布。

先决条件

以下可执行文件用于光栅化 TeX 文档:

  • 胶乳

  • pdftopppm

  • pnmcrop

  • pnmtopng

DebianDebian 派生系统上,它们可以安装:

# apt-get install texlive
# apt-get install poppler-utils
# apt-get install netpbm

如果要使用TikZ生成图表,请安装:

# apt-get install texlive-pictures

用法

要启用此扩展,请将以下行添加到conf.py

extensions.append('sphinxcontrib.texfigure')

使用texfigure指令将 TeX/LaTeX 文档转换为图像。例如:

.. texfigure:: hello-world.tex

该指令将呈现Hello, World! 在假设 hello-world.tex包含以下 LaTeX 文档的框中:

\documentclass{article}
\usepackage{tikz}
\pagestyle{empty}

\begin{document}
\begin{tikzpicture}
\node[draw] {Hello, World!};
\end{tikzpicture}
\end{document}

使用选项align指定水平对齐方式,使用alt指定图像的文本内容:

.. texfigure:: hello-world.tex
   :align: center
   :alt: Hello, World!

参考

指令

纹理图

从 TeX 文档渲染图形。

该指令的参数必须是 TeX/LaTeX 文件的路径。该指令没有正文。

选项:

对齐

水平对齐(

alt

图像的替代文本内容。

配置参数

texfigure_pdftex(默认:pdflatex

pdftexpdflatex可执行文件的路径。

texfigure_pdftoppm(默认值:pdftoppm

pdftoppm可执行文件的路径。

texfigure_pnmcrop(默认值:pnmcrop

pnmcrop可执行文件的路径。

texfigure_pnmtopng(默认:pnmtopng

pnmtopng可执行文件的路径。

texfigure_texinputs(默认值:[]

TeX 搜索输入文件的目录列表。

texfigure_resolution(默认值:110

图像分辨率,以 DPI 为单位。

CSS 类

纹理图

适用于生成的图像。

项目详情


下载文件

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

源分布

sphinxcontrib-texfigure-0.1.3.tar.gz (6.8 kB 查看哈希)

已上传 source

内置分布

sphinxcontrib_texfigure-0.1.3-py2-none-any.whl (7.4 kB 查看哈希

已上传 2 7