我已经在 sublime text 3 中编写了一个构建系统来构建 markdown 文件并将其转换为 pdf。
我的系统是:
- 操作系统:Windows 10
- MiKTeX 版本:MiKTeX 20.12
- pdflatex 版本:MiKTeX-pdfTeX 4.1
在 Sublime Text 中构建一个只有一个单词(“test”)的 md 文件需要 17.5 秒。
我已经使用 powershell 进行了一些分析eisvogel 模板:
- 使用 pandoc 将 md 转换为 tex:0.0907997 [s]
- 转换:使用 pdflatex 将 tex 转换为 pdf:6.3132436 [s]
- 使用 pandoc 将 md 转换为 pdf:13.2551959 [s]
如果我在 Sublime Text 3 中运行 1 和 2,该过程将持续大约 8 秒,控制台将打印以下内容:
LaTeX2e <2020-10-01> patch level 3
L3 programming layer <2020-12-07> xparse <2020-03-03>
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/koma-script\scra
rtcl.cls
Document Class: scrartcl 2020/09/21 v3.32 KOMA-Script document class (article)
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/koma-script\scrk
base.sty
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/koma-script\scrb
ase.sty
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/koma-script\scrl
file.sty
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/koma-script\scrl
file-hook.sty
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/koma-script\scrl
ogo.sty))) ("C:\Program Files\MiKTeX\tex/latex/graphics\keyval.sty")))
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/koma-script\tocb
asic.sty)
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/koma-script\scrs
ize11pt.clo)
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/koma-script\type
area.sty)) ("C:\Program Files\MiKTeX\tex/latex/amsmath\amsmath.sty"
For additional information on amsmath, use the `?' option.
("C:\Program Files\MiKTeX\tex/latex/amsmath\amstext.sty"
("C:\Program Files\MiKTeX\tex/latex/amsmath\amsgen.sty"))
("C:\Program Files\MiKTeX\tex/latex/amsmath\amsbsy.sty")
("C:\Program Files\MiKTeX\tex/latex/amsmath\amsopn.sty"))
("C:\Program Files\MiKTeX\tex/latex/amsfonts\amssymb.sty"
("C:\Program Files\MiKTeX\tex/latex/amsfonts\amsfonts.sty"))
("C:\Program Files\MiKTeX\tex/latex/lm\lmodern.sty")
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/setspace\setspac
e.sty) ("C:\Program Files\MiKTeX\tex/generic/iftex\ifxetex.sty"
("C:\Program Files\MiKTeX\tex/generic/iftex\iftex.sty"))
("C:\Program Files\MiKTeX\tex/generic/iftex\ifluatex.sty")
("C:\Program Files\MiKTeX\tex/latex/base\fontenc.sty"
("C:\Program Files\MiKTeX\tex/latex/lm\t1lmr.fd"))
("C:\Program Files\MiKTeX\tex/latex/base\inputenc.sty")
("C:\Program Files\MiKTeX\tex/latex/base\textcomp.sty")
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/upquote\upquote.
sty)
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/microtype\microt
ype.sty
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/microtype\microt
ype-pdftex.def)
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/microtype\microt
ype.cfg)) ("C:\Program Files\MiKTeX\tex/latex/xcolor\xcolor.sty"
("C:\Program Files\MiKTeX\tex/latex/graphics-cfg\color.cfg")
("C:\Program Files\MiKTeX\tex/latex/graphics-def\pdftex.def")
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/colortbl\colortb
l.sty
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/latex-tools\arra
y.sty)) ("C:\Program Files\MiKTeX\tex/latex/graphics\dvipsnam.def")
("C:\Program Files\MiKTeX\tex/latex/xcolor\svgnam.def")
("C:\Program Files\MiKTeX\tex/latex/xcolor\x11nam.def"))
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/xurl\xurl.sty
("C:\Program Files\MiKTeX\tex/latex/url\url.sty"))
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/bookmark\bookmar
k.sty ("C:\Program Files\MiKTeX\tex/latex/hyperref\hyperref.sty"
(C:\Users\username\AppData\Roaming\MiKTeX\tex/generic/ltxcmds\ltxcmd
s.sty) ("C:\Program Files\MiKTeX\tex/generic/pdftexcmds\pdftexcmds.sty"
(C:\Users\username\AppData\Roaming\MiKTeX\tex/generic/infwarerr\infw
arerr.sty))
(C:\Users\username\AppData\Roaming\MiKTeX\tex/generic/kvsetkeys\kvse
tkeys.sty)
(C:\Users\username\AppData\Roaming\MiKTeX\tex/generic/kvdefinekeys\k
vdefinekeys.sty)
(C:\Users\username\AppData\Roaming\MiKTeX\tex/generic/pdfescape\pdfe
scape.sty)
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/hycolor\hycolor.
sty)
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/letltxmacro\letl
txmacro.sty)
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/auxhook\auxhook.
sty)
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/kvoptions\kvopti
ons.sty) ("C:\Program Files\MiKTeX\tex/latex/hyperref\pd1enc.def")
(C:\Users\username\AppData\Roaming\MiKTeX\tex/generic/intcalc\intcal
c.sty)
(C:\Users\username\AppData\Roaming\MiKTeX\tex/generic/etexcmds\etexc
mds.sty) ("C:\Program Files\MiKTeX\tex/latex/hyperref\puenc.def")
(C:\Users\username\AppData\Roaming\MiKTeX\tex/generic/bitset\bitset.
sty
(C:\Users\username\AppData\Roaming\MiKTeX\tex/generic/bigintcalc\big
intcalc.sty)) ("C:\Program Files\MiKTeX\tex/latex/base\atbegshi-ltx.sty"))
("C:\Program Files\MiKTeX\tex/latex/hyperref\hpdftex.def"
("C:\Program Files\MiKTeX\tex/latex/base\atveryend-ltx.sty")
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/rerunfilecheck\r
erunfilecheck.sty
(C:\Users\username\AppData\Roaming\MiKTeX\tex/generic/uniquecounter\
uniquecounter.sty)))
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/bookmark\bkm-pdf
tex.def))
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/geometry\geometr
y.sty ("C:\Program Files\MiKTeX\tex/generic/iftex\ifvtex.sty")
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/geometry\geometr
y.cfg))
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/footnotebackref\
footnotebackref.sty)
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/float\float.sty)
("C:\Program Files\MiKTeX\tex/generic/babel\babel.sty"
("C:\Program Files\MiKTeX\tex/generic/babel\babel.def"
("C:\Program Files\MiKTeX\tex/generic/babel\txtbabel.def"))
*************************************
* Local config file bblopts.cfg used
*
("C:\Program Files\MiKTeX\tex/latex/arabi\bblopts.cfg")
("C:\Program Files\MiKTeX\tex/latex/babel-english\english.ldf"))
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/csquotes\csquote
s.sty ("C:\Program Files\MiKTeX\tex/latex/etoolbox\etoolbox.sty")
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/csquotes\csquote
s.def)
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/csquotes\csquote
s.cfg))
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/caption\caption.
sty
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/caption\caption3
.sty
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/caption\caption-
koma.sto)))
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/mdframed\mdframe
d.sty ("C:\Program Files\MiKTeX\tex/latex/l3packages/xparse\xparse.sty"
("C:\Program Files\MiKTeX\tex/latex/l3kernel\expl3.sty"
("C:\Program Files\MiKTeX\tex/latex/l3backend\l3backend-pdftex.def"))
("C:\Program Files\MiKTeX\tex/latex/l3packages/xparse\xparse-generic.tex"))
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/zref\zref-abspag
e.sty
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/zref\zref-base.s
ty))
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/needspace\needsp
ace.sty)
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/mdframed\md-fram
e-0.mdf))
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/sourcesanspro\so
urcesanspro.sty ("C:\Program Files\MiKTeX\tex/latex/xkeyval\xkeyval.sty"
("C:\Program Files\MiKTeX\tex/generic/xkeyval\xkeyval.tex"
("C:\Program Files\MiKTeX\tex/generic/xkeyval\xkvutils.tex")))
("C:\Program Files\MiKTeX\tex/latex/base\fontenc.sty"
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/ly1\ly1enc.def
("C:\Program Files\MiKTeX\tex/latex/base\ly1enc.dfu"))))
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/sourcecodepro\so
urcecodepro.sty ("C:\Program Files\MiKTeX\tex/latex/base\fontenc.sty"
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/sourcesanspro\t1
sourcesanspro-tlf.fd)))
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/titling\titling.
sty)
Class scrartcl Warning: Usage of package `fancyhdr' together
(scrartcl) with a KOMA-Script class is not recommended.
(scrartcl) I'd suggest to use
(scrartcl) package `scrlayer' or `scrlayer-scrpage', because
(scrartcl) they support KOMA-Script classes.
(scrartcl) With `fancyhdr' several features of class `scrartcl'
(scrartcl) like options `headsepline', `footsepline' or command
(scrartcl) `\MakeMarkcase' and the commands `\setkomafont' and
(scrartcl) `\addtokomafont' for the page style elements need
(scrartcl) explicite user intervention to work.
(scrartcl) Nevertheless, using requested
(scrartcl) package `fancyhdr' on input line 248.
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/fancyhdr\fancyhd
r.sty) (test.aux)
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/ly1\ly1ptm.fd)
("C:\Program Files\MiKTeX\tex/context/base/mkii\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
) ("C:\Program Files\MiKTeX\tex/latex/hyperref\nameref.sty"
(C:\Users\username\AppData\Roaming\MiKTeX\tex/latex/refcount\refcoun
t.sty)
(C:\Users\username\AppData\Roaming\MiKTeX\tex/generic/gettitlestring
\gettitlestring.sty))
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
[1{C:/Users/username/AppData/Local/MiKTeX/pdftex/config/pdftex.map}]
(test.aux) ){C:/Users/username/AppData/Roaming/MiKTeX/fonts/enc/dvi
ps/sourcesanspro/a_emkxm5.enc}<C:/Users/username/AppData/Roaming/MiK
TeX/fonts/type1/adobe/sourcesanspro/SourceSansPro-Regular.pfb>
Output written on test.pdf (1 page, 53720 bytes).
Transcript written on test.log.
在 macbook pro(M1 处理器,2020 年末,安装了 texlive)上使用相同的构建系统,使用 pandoc 将 md 转换为 pdf 的过程只需不到 2 秒。
您知道为什么 miktex 比 texlive 慢约 3 倍吗?