如何使用pandoc将tex转换为自然的pdf

时间:2017-11-14 09:55:21

标签: pdf latex pandoc tex

我想使用pandoc将tex转换为pdf for nature。

我安装了texlive2017和pandoc(在docker容器中)。

$ tex -v
TeX 3.14159265 (TeX Live 2017)
kpathsea version 6.2.3
Copyright 2017 D.E. Knuth.

$ pandoc -v
pandoc 1.12.4.2
Compiled with texmath 0.6.6.1, highlighting-kate 0.5.8.5.
Syntax highlighting is supported for the following languages:
actionscript, ada, apache, asn1, asp, awk, bash, bibtex, boo, c, changelog,
clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, css, curry, d,
diff, djangotemplate, doxygen, doxygenlua, dtd, eiffel, email, erlang,
fortran, fsharp, gcc, gnuassembler, go, haskell, haxe, html, ini, isocpp,
java, javadoc, javascript, json, jsp, julia, latex, lex, literatecurry,
literatehaskell, lua, makefile, mandoc, markdown, matlab, maxima, metafont,
mips, modelines, modula2, modula3, monobasic, nasm, noweb, objectivec,
objectivecpp, ocaml, octave, pascal, perl, php, pike, postscript, prolog,
pure, python, r, relaxngcompact, restructuredtext, rhtml, roff, ruby, rust,
scala, scheme, sci, sed, sgml, sql, sqlmysql, sqlpostgresql, tcl, texinfo,
verilog, vhdl, xml, xorg, xslt, xul, yacc, yaml
Default user data directory: /root/.pandoc
Copyright (C) 2006-2014 John MacFarlane

我安装了自然包。
https://ctan.org/tex-archive/macros/latex/contrib/nature/

$ tlmgr install nature

然后我下载了http://mirrors.ctan.org/macros/latex/contrib/nature/nature-template.tex并使用lualatex命令将其转换为pdf。它运作良好。

$ lualatex nature-template.tex

然后我尝试使用pandoc。

$ pandoc nature-template.tex --latex-engine=lualatex -o sample.pdf

这被转换为pdf,但tex中的数字块没有以pdf格式输出。

如何使用pandoc将tex文件正确转换为pdf?

2017-11-15 15:05)编辑
我重新安装了最新的pandoc。

$ pandoc -v
pandoc 2.0.2
Compiled with pandoc-types 1.17.3, texmath 0.10, skylighting 0.4.3.2
Default user data directory: /root/.pandoc
Copyright (C) 2006-2017 John MacFarlane

再次尝试。

$ pandoc nature-template.tex --pdf-engine=lualatex -o sample.pdf

结果是一样的。

0 个答案:

没有答案