TeX 图形扩展程序用于 Sphinx
项目描述
概览
sphinxcontrib-texfigure 是一个 Sphinx 扩展程序,用于从 TeX 文件生成图形和图表。
要查看此扩展程序可以生成的图表示例,请参阅 http://htsql.org/doc/overview.html#htsql-in-a-nutshell。有关更多示例,请参阅源分布中的 demo 目录。
此扩展程序的范围与 sphinxcontrib-tikz 扩展程序类似,但在输入和选项方面采用不同的方法。
此软件由 Kirill Simonov (Prometheus Research, LLC) 编写,并按 BSD 许可证发布。
先决条件
以下可执行文件用于将 TeX 文档转换为位图
pdflatex
pdftoppm
pnmcrop
pnmtopng
在 Debian 或基于 Debian 的系统上,可以使用以下命令安装
# 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.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!
参考
指令
- texfigure
从TeX文档中渲染图像。
指令的参数必须是TeX/LaTeX文件的路径。此指令没有主体。
选项
- align
水平对齐(left、center 或 right)
- alt
图像的替代文本内容。
配置参数
- texfigure_pdftex(默认:pdflatex)
pdftex 或 pdflatex 可执行文件的路径。
- texfigure_pdftoppm(默认:pdftoppm)
pdftoppm 可执行文件的路径。
- texfigure_pnmcrop(默认:pnmcrop)
pnmcrop 可执行文件的路径。
- texfigure_pnmtopng(默认:pnmtopng)
pnmtopng 可执行文件的路径。
- texfigure_texinputs(默认:[])
TeX搜索输入文件的目录列表。
- texfigure_resolution(默认:110)
图像分辨率,以DPI为单位。
CSS类
- texfigure
应用于生成的图像。
项目详情
sphinxcontrib-texfigure-0.1.3.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 02511585d01052e4fa2ebc2bda9d242eae08aa9ac0142b2d4ab411d11fcc711e |
|
MD5 | b8799bfe8644108eb15fedbde330f64e |
|
BLAKE2b-256 | bb7d6f9128033fa361d69c6f89a0c8d34dbfe5fa822a53ef3dc1a198aa3cff93 |
sphinxcontrib_texfigure-0.1.3-py2-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 67f8f1b6ce4bbe2d8cbdbb3dd82b52afa68d5789333c4079d5f7a7c7e239b427 |
|
MD5 | 78e2b6ec6fad9003d95c5c3b519ec622 |
|
BLAKE2b-256 | 4840dc6ca60dae7e2c8b4e7d712a7a59ed56988388923327b2d461a1de8798d1 |