从乳胶数学公式到大jpeg文件 [英] From latex math formula to big jpeg file
本文介绍了从乳胶数学公式到大jpeg文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道是否有人知道将乳胶数学公式转换为大jpeg文件的简便方法?
I am wondering whether anyone knows a easy way to convert a latex math formula to a big jpeg file?
这是乳胶的数学公式:
\[
\lim_{u\rightarrow 0_+} \int_0^u \ud s \int_{-\infty}^\infty
\frac{f(u-s,x-y)}{\sqrt{2\pi
s}} \exp\left\{-\frac{y^2}{2s}\right\} \ud y
\]
谢谢!
推荐答案
这与编程完全没有关系,但是这是一种实现方法:
This isn’t really programming related at all, but here’s a way to do this:
- 在您的LaTeX源文件中使用类
standalone
.这将生成一个与所需大小完全一样的文档,而不会更大. - 使用
pdflatex
生成PDF文件... - 使用
convert
(来自ImageMagick)转换为JPEG.
- Use the class
standalone
in your LaTeX source file. This will produce a document that is exactly as large as needed, and no larger. - Produce a PDF file using
pdflatex
… - Convert to JPEG using
convert
(from ImageMagick).
最小示例:
\documentclass{standalone}
\begin{document}
\[
\sum_{i=1}^n i
\]
\end{document}
convert
并具有适当的分辨率:
convert
with appropriate resolution:
convert -density 400 file.pdf -scale 2000x1000 file.jpg
注意事项:standalone
在确定文档的大小方面存在一些问题.我实际上并不喜欢它产生的结果.您可能需要加载geometry
程序包并手动设置文档尺寸.这需要一些摆弄,但结果要好得多.
Caveat: standalone
has some issues determining the size of the document. I don’t actually like the results it produces. You may require loading the geometry
package and setting the document dimensions manually. This requires a bit of fiddling but the results are much better.
这篇关于从乳胶数学公式到大jpeg文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文