是否可以使用"pandoc"将.tex文件编译为PDF? [英] Is it possible to compile .tex files to PDF with 'pandoc'?
问题描述
是否可以使用pandoc编译.tex文件?
Is it possible to compile a .tex file with pandoc?
我目前正在使用MacVim在MultiMarkdown中记录我的课堂笔记.这样,当我回到家时,我只需mmd2tex
并使用TexShop将.tex文件编译为PDF.效果很好,但过程实际上很耗时.
I'm currently taking my class notes in MultiMarkdown with MacVim. That way, when I get home, I can just mmd2tex
and compile the .tex file to PDF using TexShop. It works great but the process is actually quite time consuming.
我想知道是否可以通过命令行使用pandoc
来实现几乎相同的目的.我尝试使用pandoc
将原始.txt文件直接转换为PDF,但是出现各种错误...
I'd like to know if there would be a way to achieve virtually the same thing using pandoc
from the command line. I tried to convert my original .txt file directly to PDF with pandoc
but I'm getting all sort of errors...
有人对此有解决方案吗?还是建议其他工作流程进行记笔记?
Anyone have a solution for this? Or maybe suggesting another workflow for notetaking?
推荐答案
如果只想将.tex
文件转换为PDF,则不需要pandoc
,最好直接使用LaTeX处理器(而不是使用pandoc,它将依次调用pdflatex,但只会传递所有LaTeX命令的一个子集):
If you just want to convert a .tex
file to PDF you don't need pandoc
, it's better to use a LaTeX processor directly (instead of using pandoc which will call pdflatex in turn, but will pass along only a subset of all LaTeX commands):
pdflatex test.tex
要从markdown创建 PDF ,pandoc是正确的工具.默认情况下,它也会在后台使用LaTeX:
To create a PDF from markdown, pandoc is the right tool. It also uses LaTeX under the hood by default:
pandoc test.md -o test.pdf
这篇关于是否可以使用"pandoc"将.tex文件编译为PDF?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!