![在 Windows 上,使用 crop=on 时 pspictures 会消失](https://linux22.com/image/302481/%E5%9C%A8%20Windows%20%E4%B8%8A%EF%BC%8C%E4%BD%BF%E7%94%A8%20crop%3Don%20%E6%97%B6%20pspictures%20%E4%BC%9A%E6%B6%88%E5%A4%B1.png)
以下代码:
\documentclass{article}
\usepackage[crop=on]{auto-pst-pdf}
\usepackage{pstricks}
\begin{document}
aaaa
\begin{pspicture}(25mm,25mm)
\psset{unit=1mm}
\psframe(0,0)(20,20)
\end{pspicture}
bbbb
\end{document}
在 Windows 上使用 pdflatex 运行时,会生成仅包含“aaaa bbbb”的 PDF 文件 - 没有框架。在 Ubuntu 上,此方法可正常运行。
以下是 Windows 上的完整日志文件:
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9) (preloaded format=pdflatex 2014.3.10) 30 NOV 2014 17:36
entering extended mode
**mwe.tex
(F:\Dropbox\papers\FairAndSquareProportional\mwe.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2013-05-26, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,
lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n
german-x-2013-05-26, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman
ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm
an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl
ishmax, welsh, loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
("C:\Program Files\MiKTeX 2.9\tex\latex\auto-pst-pdf\auto-pst-pdf.sty"
Package: auto-pst-pdf 2009/04/26 v0.6 Wrapper for pst-pdf
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty"
Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)
Package ifpdf Info: pdfTeX in PDF mode is detected.
)
("C:\Program Files\MiKTeX 2.9\tex\latex\xkeyval\xkeyval.sty"
Package: xkeyval 2014/05/25 v2.7 package option processing (HA)
("C:\Program Files\MiKTeX 2.9\tex\generic\xkeyval\xkeyval.tex"
("C:\Program Files\MiKTeX 2.9\tex\generic\xkeyval\xkvutils.tex"
\XKV@toks=\toks14
\XKV@tempa@toks=\toks15
("C:\Program Files\MiKTeX 2.9\tex\generic\xkeyval\keyval.tex"))
\XKV@depth=\count87
File: xkeyval.tex 2014/05/25 v2.7 key=value parser (HA)
))
("C:\Program Files\MiKTeX 2.9\tex\latex\ifplatform\ifplatform.sty"
Package: ifplatform 2010/10/22 v0.4 Testing for the operating system
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\pdftexcmds.sty"
Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO
)
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty"
Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)
)
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifluatex.sty"
Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty"
Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
)
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\catchfile.sty"
Package: catchfile 2011/03/01 v1.6 Catch the contents of a file (HO)
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\etexcmds.sty"
Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
Package etexcmds Info: Could not find \expanded.
(etexcmds) That can mean that you are not using pdfTeX 1.50 or
(etexcmds) that some package has redefined \expanded.
(etexcmds) In the latter case, load this package earlier.
)))
\c@app@runs=\count88
runsystem(echo " ")...executed.
runsystem(echo "-------------------------------------------------")...executed.
runsystem(echo "auto-pst-pdf: Auxiliary LaTeX compilation")...executed.
runsystem(echo "-------------------------------------------------")...executed.
runsystem(del "mwe-pics.pdf")...executed.
runsystem(latex -disable-write18 -jobname="mwe-autopp" -interaction=batchmode
"\let \APPmakepictures \empty \input mwe.tex")...executed.
runsystem(dvips -Ppdf -o "mwe-autopp.ps" "mwe-autopp.dvi")...executed.
runsystem(ps2pdf "mwe-autopp.ps" "mwe-autopp.pdf")...executed.
runsystem(pdfcrop "mwe-autopp.pdf" "mwe-pics.pdf")...executed.
Package auto-pst-pdf Warning:
Creation of mwe-pics.pdf failed.
This warning occured on input line 124.
Package auto-pst-pdf Warning:
Could not create mwe-pics.pdf. Auxiliary files not deleted.
This warning occured on input line 124.
runsystem(echo "-------------------------------------------------")...executed.
runsystem(echo "auto-pst-pdf: End auxiliary LaTeX compilation")...executed.
runsystem(echo "-------------------------------------------------")...executed.
("C:\Program Files\MiKTeX 2.9\tex\latex\pst-pdf\pst-pdf.sty"
Package: pst-pdf 2008/10/09 v1.1v PS graphics for pdfLaTeX (RN,HjG)
\c@pspicture=\count89
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"
Package: graphicx 2014/04/25 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\trig.sty"
Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
)
("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg"
File: graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
)
Package graphics Info: Driver file: pdftex.def on input line 91.
("C:\Program Files\MiKTeX 2.9\tex\latex\pdftex-def\pdftex.def"
File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
\Gread@gobject=\count90
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
)
Package pst-pdf Info: MODE: 1 (pdfTeX mode) on input line 214.
("C:\Program Files\MiKTeX 2.9\tex\latex\pstricks\pstricks.sty"
Package: pstricks 2013/12/12 v0.60 LaTeX wrapper for `PSTricks' (RN,HV)
("C:\Program Files\MiKTeX 2.9\tex\generic\pstricks\base\pstricks.tex"
("C:\Program Files\MiKTeX 2.9\tex\generic\xkeyval\pst-xkey.tex"
File: pst-xkey.tex 2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)
)
("C:\Program Files\MiKTeX 2.9\tex\generic\pstricks\base\pst-fp.tex"
`pst-fp' v0.05, 2010/01/17 (hv)
\pstFP@xs=\count91
\pstFP@xia=\count92
\pstFP@xib=\count93
\pstFP@xfa=\count94
\pstFP@xfb=\count95
\pstFP@rega=\count96
\pstFP@regb=\count97
\pstFP@regs=\count98
\pstFP@times=\count99
)
("C:\Program Files\MiKTeX 2.9\tex\generic\pgf\utilities\pgfutil-common.tex"
\pgfutil@everybye=\toks16
\pgfutil@tempdima=\dimen105
\pgfutil@tempdimb=\dimen106
("C:\Program Files\MiKTeX 2.9\tex\generic\pgf\utilities\pgfutil-common-lists.te
x")) ("C:\Program Files\MiKTeX 2.9\tex\generic\pgf\utilities\pgfkeys.code.tex"
\pgfkeys@pathtoks=\toks17
\pgfkeys@temptoks=\toks18
("C:\Program Files\MiKTeX 2.9\tex\generic\pgf\utilities\pgfkeysfiltered.code.te
x"
\pgfkeys@tmptoks=\toks19
)) ("C:\Program Files\MiKTeX 2.9\tex\generic\pgf\utilities\pgffor.code.tex"
("C:\Program Files\MiKTeX 2.9\tex\generic\pgf\math\pgfmath.code.tex"
("C:\Program Files\MiKTeX 2.9\tex\generic\pgf\math\pgfmathcalc.code.tex"
("C:\Program Files\MiKTeX 2.9\tex\generic\pgf\math\pgfmathutil.code.tex"
\pgf@x=\dimen107
\pgf@xa=\dimen108
\pgf@xb=\dimen109
\pgf@xc=\dimen110
\pgf@y=\dimen111
\pgf@ya=\dimen112
\pgf@yb=\dimen113
\pgf@yc=\dimen114
\c@pgf@counta=\count100
\c@pgf@countb=\count101
\c@pgf@countc=\count102
\c@pgf@countd=\count103
\pgfutil@tempcnta=\count104
\pgfutil@tempcntb=\count105
)
("C:\Program Files\MiKTeX 2.9\tex\generic\pgf\math\pgfmathparser.code.tex"
\pgfmath@dimen=\dimen115
\pgfmath@count=\count106
\pgfmath@box=\box26
\pgfmath@toks=\toks20
\pgfmath@stack@operand=\toks21
\pgfmath@stack@operation=\toks22
)
("C:\Program Files\MiKTeX 2.9\tex\generic\pgf\math\pgfmathfunctions.code.tex"
("C:\Program Files\MiKTeX 2.9\tex\generic\pgf\math\pgfmathfunctions.basic.code.
tex")
("C:\Program Files\MiKTeX 2.9\tex\generic\pgf\math\pgfmathfunctions.trigonometr
ic.code.tex")
("C:\Program Files\MiKTeX 2.9\tex\generic\pgf\math\pgfmathfunctions.random.code
.tex")
("C:\Program Files\MiKTeX 2.9\tex\generic\pgf\math\pgfmathfunctions.comparison.
code.tex")
("C:\Program Files\MiKTeX 2.9\tex\generic\pgf\math\pgfmathfunctions.base.code.t
ex")
("C:\Program Files\MiKTeX 2.9\tex\generic\pgf\math\pgfmathfunctions.round.code.
tex")
("C:\Program Files\MiKTeX 2.9\tex\generic\pgf\math\pgfmathfunctions.misc.code.t
ex")
("C:\Program Files\MiKTeX 2.9\tex\generic\pgf\math\pgfmathfunctions.integerarit
hmetics.code.tex")))
("C:\Program Files\MiKTeX 2.9\tex\generic\pgf\math\pgfmathfloat.code.tex"
\c@pgfmathroundto@lastzeros=\count107
))
\pgffor@iter=\dimen116
\pgffor@skip=\dimen117
\pgffor@stack=\toks23
\pgffor@toks=\toks24
)
\psLoopIndex=\count108
`PSTricks' v2.57 <2014/08/27> (tvz)
\pst@dima=\dimen118
\pst@dimb=\dimen119
\pst@dimc=\dimen120
\pst@dimd=\dimen121
\pst@dimg=\dimen122
\pst@dimh=\dimen123
\pst@dimm=\dimen124
\pst@dimn=\dimen125
\pst@dimo=\dimen126
\pst@dimp=\dimen127
\pst@hbox=\box27
\pst@ibox=\box28
\pst@boxg=\box29
\pst@cnta=\count109
\pst@cntb=\count110
\pst@cntc=\count111
\pst@cntd=\count112
\pst@cntg=\count113
\pst@cnth=\count114
\pst@cntm=\count115
\pst@cntn=\count116
\pst@cnto=\count117
\pst@cntp=\count118
\@zero=\count119
\pst@toks=\toks25
("C:\Program Files\MiKTeX 2.9\tex\generic\pstricks\base\pstricks.con")
\psunit=\dimen128
\psxunit=\dimen129
\psyunit=\dimen130
\pst@C@@rType=\count120
\pslinewidth=\dimen131
\psk@startLW=\dimen132
\psk@endLW=\dimen133
\pst@customdefs=\toks26
\pslinearc=\dimen134
\pst@symbolStep=\dimen135
\pst@symbolWidth=\dimen136
\pst@symbolLinewidth=\dimen137
\everypsbox=\toks27
\psframesep=\dimen138
\pslabelsep=\dimen139
\sh@wgridXunit=\dimen140
\sh@wgridYunit=\dimen141
\pst@shift=\dimen142
)
File: pstricks.tex 2014/08/27 v2.57 `PSTricks' (tvz,hv)
("C:\Program Files\MiKTeX 2.9\tex\generic\pstricks\base\pst-fp.tex")
File: pst-fp.tex 2014/08/27 v2.57 `PST-fp' (hv)
("C:\Program Files\MiKTeX 2.9\tex\latex\xcolor\xcolor.sty"
Package: xcolor 2007/01/21 v2.11 LaTeX color extensions (UK)
("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\color.cfg"
File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1337.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1341.
Package xcolor Info: Model `RGB' extended on input line 1353.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1355.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1356.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1357.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1358.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1359.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1360.
))
\ppf@output=\toks28
("C:\Program Files\MiKTeX 2.9\tex\latex\preview\preview.sty"
Package: preview 2010/02/14 11.86 (AUCTeX/preview-latex)
\pr@snippet=\count121
\pr@box=\box30
\pr@output=\toks29
)
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\dvips.def"
File: dvips.def 2014/04/23 v3.0j Driver-dependant file (DPC,SPQR)
)
("C:\Program Files\MiKTeX 2.9\tex\latex\environ\environ.sty"
Package: environ 2014/05/04 v0.3 A new way to define environments
("C:\Program Files\MiKTeX 2.9\tex\latex\trimspaces\trimspaces.sty"
Package: trimspaces 2009/09/17 v1.1 Trim spaces around a token list
)
\@envbody=\toks30
)))
(F:\Dropbox\papers\FairAndSquareProportional\mwe.aux)
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
("C:\Program Files\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count122
\scratchdimen=\dimen143
\scratchbox=\box31
\nofMPsegments=\count123
\nofMParguments=\count124
\everyMPshowfont=\toks31
\MPscratchCnt=\count125
\MPscratchDim=\dimen144
\MPnumerator=\count126
\makeMPintoPDFobject=\count127
\everyMPtoPDFconversion=\toks32
)
Preview: Fontsize 10pt
Preview: PDFoutput 1
Package pst-pdf Warning: pspicture No. 1 undefined.
Package pst-pdf Warning: File `mwe-pics.pdf' not found.
(pst-pdf) Use the following commands to create it:
(pst-pdf) ----------------------------------------------------
(pst-pdf) latex mwe.tex
(pst-pdf) dvips -o mwe-pics.ps mwe.dvi
(pst-pdf) ps2pdf mwe-pics.ps
(pst-pdf) ---------------------------------------------------- .
[1
Non-PDF special ignored!
Non-PDF special ignored!
Non-PDF special ignored!{C:/ProgramData/MiKTeX/2.9/pdftex/config/pdftex.map}]
(F:\Dropbox\papers\FairAndSquareProportional\mwe.aux) )
Here is how much of TeX's memory you used:
8506 strings out of 493921
150399 string characters out of 3147252
198209 words of memory out of 3000000
11707 multiletter control sequences out of 15000+200000
3640 words of font info for 14 fonts, out of 3000000 for 9000
841 hyphenation exceptions out of 8191
50i,5n,44p,485b,121s stack positions out of 5000i,500n,10000p,200000b,50000s
<C:/Program Files/MiKTeX
2.9/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on mwe.pdf (1 page, 10384 bytes).
PDF statistics:
10 PDF objects out of 1000 (max. 8388607)
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
当我改为“crop=off”时,它在 Windows 中也能正常工作(但这有其他不良的副作用)。
答案1
pdfcrop
需要安装 Perl 语言。您的系统上是否安装了 Perl 语言?我想没有。然后从以下位置安装一个:http://www.activestate.com/activeperl或者http://strawberryperl.com/ 应该crop=on
可以工作。
为了进行测试,打开终端(DOS 窗口)进入文档目录并手动运行: pdflatex -shell-escape <file>