LaTeX forum ⇒ Graphics, Figures & TablesNew install of MikTex compiles empty PSTricks figures in projects that used to work Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
User avatar
Bozack
Posts: 117
Joined: Wed Feb 06, 2008 4:21 pm

New install of MikTex compiles empty PSTricks figures in projects that used to work

Postby Bozack » Mon Apr 17, 2023 11:13 am

I have just gotten a new computer, and installed the newest version of MikTeX on the machine. Now a lot of my old (previously working) documents no longer work correctly. It seems that my main problem is with PSTricks, where figures simply don't compile right, or they compile and look really odd.

I've attempted to make a minimal working example that shows the problem:

\documentclass{extbook}
\usepackage{pstricks}

\begin{document}

Test

\begin{figure}
  \centering
  \psset{unit=1cm}
  \begin{pspicture}(10,10)
    \psline(0,0)(10,10)
    \psline(10,0)(0,10)
  \end{pspicture}
  \caption{test figure}
\end{figure}

\end{document}


This code, run via TeXnicCenter, using a LaTeX => DVI => PDF compilation profile that otherwise seems to work, gives me the following page, with no actual graphic in it, although it looks like maybe the bounding box is defined correctly:

Image

The full log file can be seen here:

This is pdfTeX, Version 3.141592653-2.6-1.40.24 (MiKTeX 23.1) (preloaded format=latex 2023.3.16)  17 APR 2023 11:06
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**./TestCompile.tex
(TestCompile.tex
LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2023-02-07> (C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/latex/extsizes\extbook.cls
Document Class: extbook 1999/01/07 v1.4a NON-Standard LaTeX document class
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/latex/base\bk10.clo
File: bk10.clo 2022/07/02 v1.4n Standard LaTeX file (size option)
)
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/latex/base\exscale.sty
Package: exscale 2018/09/24 v2.1i Standard LaTeX package exscale
LaTeX Font Info:    Redeclaring symbol font `largesymbols' on input line 57.
LaTeX Font Info:    Overwriting symbol font `largesymbols' in version `normal'
(Font)                  OMX/cmex/m/n --> OMX/cmex/m/n on input line 57.
LaTeX Font Info:    Overwriting symbol font `largesymbols' in version `bold'
(Font)                  OMX/cmex/m/n --> OMX/cmex/m/n on input line 57.
\big@size=\dimen140
)
\c@part=\count185
\c@chapter=\count186
\c@section=\count187
\c@subsection=\count188
\c@subsubsection=\count189
\c@paragraph=\count190
\c@subparagraph=\count191
\c@figure=\count192
\c@table=\count193
\abovecaptionskip=\skip48
\belowcaptionskip=\skip49
\bibindent=\dimen141
)
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/latex/pstricks\pstricks.sty
Package: pstricks 2022/19/23 v0.72 LaTeX wrapper for `PSTricks' (RN,HV)

(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/iftex\iftex.sty
Package: iftex 2022/02/03 v1.0f TeX engine tests
)
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/latex/xcolor\xcolor.sty
Package: xcolor 2022/06/12 v2.14 LaTeX color extensions (UK)

(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/latex/graphics-cfg\color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: dvips.def on input line 227.

(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/latex/graphics-def\dvips.def
File: dvips.def 2022/09/22 v3.1e Graphics/color driver for dvips
)
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/latex/graphics\mathcolor.ltx)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1353.
Package xcolor Info: Model `RGB' extended on input line 1369.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1371.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1372.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1373.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1374.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1375.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1376.
)
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/xkeyval\pst-xkey.tex
File: pst-xkey.tex 2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)

(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/latex/xkeyval\xkeyval.sty
Package: xkeyval 2022/06/16 v2.9 package option processing (HA)

(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/xkeyval\xkeyval.tex
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/xkeyval\xkvutils.tex
\XKV@toks=\toks16
\XKV@tempa@toks=\toks17

(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/xkeyval\keyval.tex))
\XKV@depth=\count194
File: xkeyval.tex 2014/12/03 v2.7a key=value parser (HA)
)))
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pstricks\pstricks.tex
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pstricks\pst-fp.tex `pst-fp' v0.06, 2020/11/20 (hv)
\pstFP@xs=\count195
\pstFP@xia=\count196
\pstFP@xib=\count197
\pstFP@xfa=\count198
\pstFP@xfb=\count199
\pstFP@rega=\count266
\pstFP@regb=\count267
\pstFP@regs=\count268
\pstFP@times=\count269
)
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/latex/pgf/utilities\pgffor.sty
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/latex/pgf/utilities\pgfrcs.sty
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfutil-common.tex
\pgfutil@everybye=\toks18
\pgfutil@tempdima=\dimen142
\pgfutil@tempdimb=\dimen143
)
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfutil-latex.def
\pgfutil@abb=\box51
)
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfrcs.code.tex
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pgf\pgf.revision.tex)
Package: pgfrcs 2023-01-15 v3.1.10 (3.1.10)
))
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/latex/pgf/utilities\pgfkeys.sty
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfkeys.code.tex
\pgfkeys@pathtoks=\toks19
\pgfkeys@temptoks=\toks20

(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfkeyslibraryfiltered.code.tex
\pgfkeys@tmptoks=\toks21
)))
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/latex/pgf/math\pgfmath.sty
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmath.code.tex
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathutil.code.tex
\pgf@x=\dimen144
\pgf@xa=\dimen145
\pgf@xb=\dimen146
\pgf@xc=\dimen147
\pgf@y=\dimen148
\pgf@ya=\dimen149
\pgf@yb=\dimen150
\pgf@yc=\dimen151
\c@pgf@counta=\count270
\c@pgf@countb=\count271
\c@pgf@countc=\count272
\c@pgf@countd=\count273
)
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathparser.code.tex
\pgfmath@dimen=\dimen152
\pgfmath@count=\count274
\pgfmath@box=\box52
\pgfmath@toks=\toks22
\pgfmath@stack@operand=\toks23
\pgfmath@stack@operation=\toks24
)
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunctions.code.tex)
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunctions.basic.code.tex)
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunctions.trigonometric.code.tex)
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunctions.random.code.tex)
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunctions.comparison.code.tex)
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunctions.base.code.tex)
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunctions.round.code.tex)
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunctions.misc.code.tex)
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunctions.integerarithmetics.code.tex)
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathcalc.code.tex)
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfloat.code.tex
\c@pgfmathroundto@lastzeros=\count275
)))
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgffor.code.tex
Package: pgffor 2023-01-15 v3.1.10 (3.1.10)
\pgffor@iter=\dimen153
\pgffor@skip=\dimen154
\pgffor@stack=\toks25
\pgffor@toks=\toks26
))
\psLoopIndex=\count276

`PSTricks' v3.18  <2022/11/28> (tvz,hv)
\pst@dima=\dimen155
\pst@dimb=\dimen156
\pst@dimc=\dimen157
\pst@dimd=\dimen158
\pst@dimg=\dimen159
\pst@dimh=\dimen160
\pst@dimm=\dimen161
\pst@dimn=\dimen162
\pst@dimo=\dimen163
\pst@dimp=\dimen164
\pst@hbox=\box53
\pst@ibox=\box54
\pst@boxg=\box55
\pst@cnta=\count277
\pst@cntb=\count278
\pst@cntc=\count279
\pst@cntd=\count280
\pst@cntg=\count281
\pst@cnth=\count282
\pst@cntm=\count283
\pst@cntn=\count284
\pst@cnto=\count285
\pst@cntp=\count286
\@zero=\count287
\pst@toks=\toks27
--- We are running latex or xelatex ---
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pstricks\pstricks.con)
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pstricks\pstricks-color.tex)
\psunit=\dimen165
\psxunit=\dimen166
\psyunit=\dimen167
\pst@C@@rType=\count288
\pslinewidth=\dimen168
\psk@startLW=\dimen169
\psk@endLW=\dimen170

(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pstricks\pstricks-arrows.tex
\pshooklength=\dimen171
\pshookwidth=\dimen172
)
\pst@customdefs=\toks28

(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pstricks\pstricks-dots.tex)
\pslinearc=\dimen173
\pst@symbolStep=\dimen174
\pst@symbolWidth=\dimen175
\pst@symbolLinewidth=\dimen176
\everypsbox=\toks29
\psframesep=\dimen177
\pslabelsep=\dimen178
\sh@wgridXunit=\dimen179
\sh@wgridYunit=\dimen180
\pst@shift=\dimen181
\ps@imagectr=\count289

(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pstricks\pstricks.con))
File: pstricks.tex 2022/11/28 v3.18 `PSTricks' (tvz,hv)

(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/generic/pstricks\pst-fp.tex `pst-fp' v0.06, 2020/11/20 (hv))
File: pst-fp.tex 2020/11/20 v0.06 `PST-fp' (hv)
)
(C:\Users\bozack\AppData\Local\Programs\MiKTeX\tex/latex/l3backend\l3backend-dvips.def
File: l3backend-dvips.def 2023-01-16 L3 backend support: dvips
\l__pdf_internal_box=\box56
\g__pdf_backend_object_int=\count290
\l__pdf_backend_content_box=\box57
\l__pdf_backend_model_box=\box58
\g__pdf_backend_annotation_int=\count291
\g__pdf_backend_link_int=\count292
\g__pdf_backend_link_sf_int=\count293
) (TestCompile.aux)
\openout1 = `TestCompile.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
 [1

]
(TestCompile.aux) ) 
Here is how much of TeX's memory you used:
 8204 strings out of 476340
 158456 string characters out of 5787673
 1850337 words of memory out of 5000000
 28560 multiletter control sequences out of 15000+600000
 512640 words of font info for 33 fonts, out of 8000000 for 9000
 1141 hyphenation exceptions out of 8191
 75i,5n,72p,400b,287s stack positions out of 10000i,1000n,20000p,200000b,200000s

Output written on TestCompile.dvi (1 page, 1732 bytes).


Any clue what might be happening? Thank you in advance for any time you might use on this!
OS, LaTeX-system, editor: Arch Linux 64bit, TeXlive, Kile | Windows 10 Professional 64bit, MikTeX 4.9, TeXnicCenter 2.02 64bit

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics
User avatar
Bozack
Posts: 117
Joined: Wed Feb 06, 2008 4:21 pm

New install of MikTex compiles empty PSTricks figures in projects that used to work  Topic is solved

Postby Bozack » Tue May 02, 2023 1:24 pm

After a lot more debugging, I narrowed down the problem and found a workaround. I am leaving it here in case someone else has the same problem, or maybe if someone feels like debugging the underlying problem one day.

The issue, recapped
The problem was not the LaTeX installation itself: it was the method of converting from DVI to PDF that failed.

I use TeXnicCenter, and on there have always used the dvipdfm.exe postprocessor on my documents, straight on the DVI file, with the LaTeX → DVI → PDF build profile. Turns out, when I use that now, it makes a ton of errors like these:

dvipdfm:warning: Unknown token "tx@Dict"
dvipdfm:warning: Interpreting PS code failed!!! Output might be broken!!!
dvipdfm:warning: Interpreting special command "  (ps:) failed.
dvipdfm:warning: >> at page="1" position="(141.732, 141.732)" (in PDF)
dvipdfm:warning: >> xxx ""  tx@Dict begin STP newpath /ArrowA { moveto } def /ArrowB ..."
dvipdfm:warning: >> Reading special command stopped around >>begin STP newpath /ArrowA { moveto } def /ArrowB { } def /Ar...<<

The log file I attached in the original post did not have the error-output from this execution - only the output from the latex.exe run - which is why I was so confused about what the problem was.

On a second note, all the DVI files I produced using this build profile also crashed Yap whenever I tried to open them. Either way, the result was PS and PDF files with figures that were just empty areas, sometimes with text in the middle of them.

Trying to use a clean separate Ghostscript install and using gswin64c.exe on my PS files made no change either.

I assume that my old install of MikTeX/Ghostscript just somehow did not have this problem, and I have no idea what changed after that.

Workaround
While I do not know how to fix the underlying problem, I found a workaround: Instead of using dvipdfm.exe, I now use a LaTeX → PS → PDF build profile instead: dvips.exe (with arguments -P pdf "%Bm.dvi") and then ps2pdf.exe (with arguments -dNOSAFER "%bm.ps").

The DVI file still crashes Yap, but I can live with that. Using this approach, the PDF files (and also the PS files, if I look into those) now generate correctly!
OS, LaTeX-system, editor: Arch Linux 64bit, TeXlive, Kile | Windows 10 Professional 64bit, MikTeX 4.9, TeXnicCenter 2.02 64bit

veshapa
Posts: 1
Joined: Thu Nov 28, 2024 12:19 pm

New install of MikTex compiles empty PSTricks figures in projects that used to work

Postby veshapa » Thu Nov 28, 2024 12:22 pm

Thanks a lot for sharing the solution/workaround! The problem is still there, but the workaround works great!


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 22 guests