LaTeX 页面大小 --- 如何生成“刚好足够大”的页面?
我今天正在学习使用命令行版本的 Latex,并且正在尝试将 .tex 输出到 .dvi,然后将 .dvi 输出到 .png。
问题是,我有一个简单的 .tex 文档,其中包含一些数学知识。目标是最终生成 png 形式的方程。但是当我运行:
$ latex -output-format=dvi test.tex
$ dvipng test.dvi
我得到 test1.png ,其形状像普通字母大小的页面。我只想要一个与方程需要一样大的图像。我确信我错过了一些明显的东西,但我无法弄清楚!
Latex 或 dvipng 是否有命令行选项来指定输出文件只能设置在渲染方程所需的大小的页面上?
这是我的示例 test.tex:
\documentclass{article}
\begin{document}
The solution to $\sqrt{x} = 5$ is $x=25$.
\end{document}
谢谢!
I was learning about using the command line version of latex today, and I was experimenting with outputting .tex to .dvi, and then .dvi to .png.
The problem is, I have a simple .tex document which contains some math. The goal is to eventually produce a png form of the equation. But when I run:
$ latex -output-format=dvi test.tex
$ dvipng test.dvi
I get test1.png that is shaped like a regular letter-sized page. I only want an image that is as big as the equation needs to be. I'm sure I'm missing something obvious, but I can't figure it out!
Is there a command line option for either latex or dvipng to specify that the output file should only be set on a page as large as needed to render the equation?
Here's my example test.tex:
\documentclass{article}
\begin{document}
The solution to $\sqrt{x} = 5$ is $x=25$.
\end{document}
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试
编辑:正如
tur1ing
先生指出的那样,您还需要\pagestyle{empty}
以避免页码搞乱作品。Try
EDIT: As Mr
tur1ing
points out, you'll also want\pagestyle{empty}
to avoid having a page number muck up the works.尝试 mathurl 和 罗杰的在线方程编辑器。可能还有其他几个这样的网站。
Try mathurl and Roger's Online Equation Editor. There probably several other such sites.