我正在使用终端编译在 texshop 中创建的 .tex 文件,因为它包含 chemnum 包。运行时,"latex filename", "dvips filename" , "ps2pdf filename"
我会生成一个空的 pdf,一个 20 mb 的 .ps 文件,在预览中打开时,它会包含所有正确的输出,并且实际上是一个可以运行的文件。
但是,我想让 ps2pdf 功能正常运行。我该怎么做?
.log 文件在此处:
Last login: Sat Jun 16 19:05:55 on ttys000
mbp:ESA Report ART$ latex ESAReport
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded format=latex)
restricted \write18 enabled.
entering extended mode
(./ESAReport.tex
LaTeX2e <2018-04-01> patch level 2
Babel <3.18> and hyphenation patterns for 84 language(s) loaded.
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2018/texmf-dist/tex/latex/tex-gyre/tgbonum.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/oberdiek/kvoptions.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/etexcmds.sty
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/ifluatex.sty)))))
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/t1enc.def)
(/usr/local/texlive/2018/texmf-dist/tex/latex/tex-gyre/t1qbk.fd))
(/usr/local/texlive/2018/texmf-dist/tex/latex/geometry/geometry.sty
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/ifvtex.sty)
(/usr/local/texlive/2018/texmf-dist/tex/generic/ifxetex/ifxetex.sty))
(/usr/local/texlive/2018/texmf-dist/tex/latex/chemstyle/chemstyle.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/local/texlive/2018/texmf-dist/tex/latex/caption/caption.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/caption/caption3.sty))
(/usr/local/texlive/2018/texmf-dist/tex/latex/chemstyle/chemscheme.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/psfrag/psfrag.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics-def/dvips.def))))
(/usr/local/texlive/2018/texmf-dist/tex/latex/tools/xspace.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/siunitx/siunitx.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/l3kernel/expl3-code.tex)
(/usr/local/texlive/2018/texmf-dist/tex/latex/l3kernel/l3dvips.def))
(/usr/local/texlive/2018/texmf-dist/tex/latex/l3packages/xparse/xparse.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/tools/array.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/translator/translator.sty))
(/usr/local/texlive/2018/texmf-dist/tex/latex/tools/varioref.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/floatrow/floatrow.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/chemcompounds/chemcompounds.sty))
(/usr/local/texlive/2018/texmf-dist/tex/generic/chemfig/chemfig.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.te
x
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/utilities/pgfutil-common-li
sts.tex))
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def
(/usr/local/texlive/2018/texmf-dist/tex/latex/ms/everyshi.sty))
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex))
(/usr/local/texlive/2018/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/graphicx.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.c
ode.tex))
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvips.de
f
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-p
ostscript.def)))
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.
code.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.
code.tex)) (/usr/local/texlive/2018/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics-cfg/color.cfg))
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex
)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.
tex
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic
.code.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigo
nometric.code.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.rando
m.code.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.compa
rison.code.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base.
code.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round
.code.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.
code.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integ
erarithmetics.code.tex)))
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex)
)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.co
de.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconst
ruct.code.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage
.code.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.co
de.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicst
ate.code.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransform
ations.code.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.cod
e.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.c
ode.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathproce
ssing.code.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.co
de.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.cod
e.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.cod
e.tex
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.
code.tex))
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.co
de.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretranspare
ncy.code.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.
code.tex)))
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.cod
e.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.
tex)
(/usr/local/texlive/2018/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version
-0-65.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version
-1-18.sty))
(/usr/local/texlive/2018/texmf-dist/tex/latex/pgf/utilities/pgffor.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex)
) (/usr/local/texlive/2018/texmf-dist/tex/latex/pgf/math/pgfmath.sty
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex))
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex)))
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.cod
e.tex
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothan
dlers.code.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.cod
e.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/frontendlayer/tikz/librarie
s/tikzlibrarytopaths.code.tex)))
(/usr/local/texlive/2018/texmf-dist/tex/generic/chemfig/chemfig.tex
(/usr/local/texlive/2018/texmf-dist/tex/generic/simplekv/simplekv.tex)
(/usr/local/texlive/2018/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.
meta.code.tex)))
(/usr/local/texlive/2018/texmf-dist/tex/latex/booktabs/booktabs.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/natbib/natbib.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/hyperref/hyperref.sty
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))
(/usr/local/texlive/2018/texmf-dist/tex/latex/oberdiek/auxhook.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/usr/local/texlive/2018/texmf-dist/tex/latex/latexconfig/hyperref.cfg)
(/usr/local/texlive/2018/texmf-dist/tex/latex/url/url.sty))
(/usr/local/texlive/2018/texmf-dist/tex/latex/hyperref/hdvips.def
(/usr/local/texlive/2018/texmf-dist/tex/latex/hyperref/pdfmark.def
(/usr/local/texlive/2018/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty)))
(/usr/local/texlive/2018/texmf-dist/tex/latex/chemnum/chemnum.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/translations/translations.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/scrlfile.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/etoolbox/etoolbox.sty))
(/usr/local/texlive/2018/texmf-dist/tex/latex/chemgreek/chemgreek.sty))
(./ESAReport.aux)
*geometry* driver: auto-detecting
*geometry* detected driver: dvips
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/ts1enc.dfu)
(/usr/local/texlive/2018/texmf-dist/tex/latex/translator/translator-basic-dicti
onary-English.dict)
(/usr/local/texlive/2018/texmf-dist/tex/latex/siunitx/siunitx-abbreviations.cfg
) ABD: EveryShipout initializing macros
(/usr/local/texlive/2018/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(./ESAReport.out) (./ESAReport.out)
(/usr/local/texlive/2018/texmf-dist/tex/latex/translations/translations-basic-d
ictionary-english.trsl)
Underfull \hbox (badness 1635) in paragraph at lines 51--52
\T1/qbk/m/n/10 pos-sess-ing an ac-tive and in-ac-tive state that
<azoUV.eps> <typesofAB.eps> [1] <tautomer.eps>
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/t1cmss.fd)
LaTeX Font Warning: Font shape `T1/cmss/b/n' undefined
(Font) using `T1/cmss/m/n' instead on input line 79.
Underfull \hbox (badness 2376) in paragraph at lines 90--91
\T1/qbk/m/n/10 eroarene. So called azo-heteroarene pho-to-
[2]
Underfull \hbox (badness 1107) in paragraph at lines 100--101
\T1/qbk/m/n/10 Through a col-lab-o-ra-tion with Joaqu?n Calbo,
Underfull \hbox (badness 1259) in paragraph at lines 100--101
\T1/qbk/m/n/10 com-pu-ta-tional in-ves-ti-ga-tions were ini-ti-ated to
Underfull \hbox (badness 1248) in paragraph at lines 100--101
\T1/qbk/m/n/10 mal half lives (see Fig. [][][][] and Ta-ble
<untitled.eps>
Overfull \hbox (1.90135pt too wide) in paragraph at lines 112--124
[][]
<untitled1.eps>
Underfull \hbox (badness 10000) in paragraph at lines 146--147
<1802.eps> [3] (./ESAReport.bbl
Underfull \hbox (badness 4913) in paragraph at lines 71--77
\T1/qbk/m/it/10 Ange-wandte Chemie In-ter-na-tional Edi-tion\T1/qbk/m/n/10 ,
) [4] (./ESAReport.aux)
LaTeX Font Warning: Some font shapes were not available, defaults substituted.
)
(see the transcript file for additional information)
Output written on ESAReport.dvi (4 pages, 55836 bytes).
Transcript written on ESAReport.log.
adityas-mbp:ESA Report ART$ dvips ESAReport
This is dvips(k) 5.998 Copyright 2018 Radical Eye Software (www.radicaleye.com)
' TeX output 2018.06.16:1919' -> ESAReport.ps
dvips: Font Arial-BoldMT used in file typesofAB.eps is not in the mapping file.
dvips: Font ArialMT used in file typesofAB.eps is not in the mapping file.
dvips: Font ArialMT used in file tautomer.eps is not in the mapping file.
dvips: Font Arial-BoldMT used in file tautomer.eps is not in the mapping file.
dvips: Font ArialMT used in file untitled1.eps is not in the mapping file.
dvips: Font Arial-BoldMT used in file untitled1.eps is not in the mapping file.
</usr/local/texlive/2018/texmf-dist/dvips/base/tex.pro>
</usr/local/texlive/2018/texmf-dist/dvips/psfrag/psfrag.pro>
</usr/local/texlive/2018/texmf-dist/fonts/enc/dvips/tex-gyre/q-ec.enc>
</usr/local/texlive/2018/texmf-dist/fonts/enc/dvips/cm-super/cm-super-t1.enc>
</usr/local/texlive/2018/texmf-dist/dvips/base/texps.pro>
</usr/local/texlive/2018/texmf-dist/dvips/base/special.pro>
</usr/local/texlive/2018/texmf-dist/dvips/base/color.pro>.
</usr/local/texlive/2018/texmf-dist/fonts/type1/public/tex-gyre/qbkri.pfb>
</usr/local/texlive/2018/texmf-dist/fonts/type1/public/tex-gyre/qbkb.pfb>
</usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi7.pfb>
</usr/local/texlive/2018/texmf-dist/fonts/type1/public/cm-super/sfss1000.pfb>
</usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy7.pfb>
</usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb>
</usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb>
</usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
</usr/local/texlive/2018/texmf-dist/fonts/type1/public/tex-gyre/qbkr.pfb>[1
<./azoUV.eps><./typesofAB.eps>] [2<./tautomer.eps>] [3<./untitled.eps>
<./untitled1.eps>] [4<./MF1802.eps>]
mbp:ESA Report ART$ ps2pdf ESAReport
Error: /undefinedfilename in (ESAReport)
Operand stack:
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push
Dictionary stack:
--dict:983/1684(ro)(G)-- --dict:0/20(G)-- --dict:78/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 9.23: Unrecoverable error, exit code 1
mbp:ESA Report ART$
答案1
随后的 latex 处理dvips
成功生成了一个 .ps 文件,但尝试将 .ps 文件转换为 pdf 失败,并出现以下错误:
ESA Report ART$ ps2pdf ESAReport
Error: /undefinedfilename in (ESAReport)
...
Last OS error: No such file or directory
与 latex 和 不同dvips
,ps2pdf
它对文件名的扩展名没有任何假设,因此无法识别 .ps 文件的存在。
解决方案很简单:ps2pdf
使用完整文件名运行:
ps2pdf ESAReport.ps
正如评论中所报道的,这成功产生了所需的 pdf 输出。