4

Just writing the following very simple program I had some problems. I use to write in plain TeX and in this case I tried to make a picture with PSTricks and first of all sized it with \pspicture. The program is:

\input pstricks
\pspicture (0,0)(5,5)
\endpspicture
\bye

but when I compiled with TeX, I encountered the following error:

Command Line:   tex.exe --src --interaction=errorstopmode "figura.tex"
Startup Folder: C:\Users\MT\Documents\TeX

This is TeXk, Version 3.14159265 (TeX Live 2015/W32TeX) (preloaded format=tex)
 Source specials enabled.
(./figura.tex (c:/texlive/texmf-dist/tex/generic/pstricks/pstricks.tex
we are running tex and have to define some LaTeX commands ...
(c:/texlive/texmf-dist/tex/generic/xkeyval/pst-xkey.tex
2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)
(c:/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(c:/texlive/texmf-dist/tex/generic/xkeyval/xkvutils.tex
(c:/texlive/texmf-dist/tex/generic/xkeyval/keyval.tex))
2014/12/03 v2.7a key=value parser (HA)
(c:/texlive/texmf-dist/tex/generic/xkeyval/xkvtxhdr.tex
2005/02/22 v1.1 xkeyval TeX header (HA))))
(c:/texlive/texmf-dist/tex/generic/pstricks/pst-fp.tex
`pst-fp' v0.05, 2010/01/17 (hv))
(c:/texlive/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex
(c:/texlive/texmf-dist/tex/generic/pgf/utilities/pgfutil-common-lists.tex))
(c:/texlive/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
(c:/texlive/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex))
(c:/texlive/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex
(c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex
(c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex
(c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex)
(c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex)
(c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.tex
(c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex)
(c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code
.tex)
(c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex)
(c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.comparison.code.te
x) (c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base.code.tex)
(c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code.tex)
(c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex)
(c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerarithmetics
.code.tex))) (c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex)
))
`PSTricks' v2.64b  <2015/14/11> (tvz)
(c:/texlive/texmf-dist/tex/generic/pstricks/pstricks.con))
! Undefined control sequence.
\endpspicture ...z@ \box \pst@hbox \else \fboxsep 
                                                  =0pt \fbox {\rule [-\pst@s...
l.5 \endpspicture

? x
No pages of output.
Transcript written on figura.log.

_____________________________________________________________________

 TeX Compilation Report (Pages: 0)

 Errors: 1   Warnings: 0   Bad Boxes: 0
_____________________________________________________________________

What's the problem?

3

Let's see the relevant code in pstricks.tex as found in TeX Live 2014, near the end (with [...] I denote code that's unimportant)

\def\endpspicture{%
  [...]
  \if@star\setbox\pst@hbox=\hbox{\clipbox@@\z@}\fi%
  \leavevmode\box\pst@hbox%
  \endgroup%
  \psset[pstricks]{shift=0}% reset value
}

The same in TeX Live 2015

\def\endpspicture{%
  [...]
  \if@star\setbox\pst@hbox=\hbox{\clipbox@@\z@}\fi
  \leavevmode\ifdim\overfullrule=\z@\box\pst@hbox\else
  \fboxsep=0pt
  \fbox{\rule[-\pst@shift]{0pt}{\ht\pst@hbox}\rule{\wd\pst@hbox}{0pt}}\fi
  \endgroup%
  \psset[pstricks]{shift=0}% reset value
}

Here's the version with TeX Live 2016

\def\endpspicture{%
  [...]
  \if@star\setbox\pst@hbox=\hbox{\clipbox@@\z@}\fi
  \leavevmode
  \ifdim\overfullrule=\z@
    \box\pst@hbox
  \else
    \expandafter\ifx\csname @latexerr\endcsname\relax
      \box\pst@hbox
    \else  %    do we have LaTeX? 
      \fboxsep=0pt
      \fbox{\rule[-\pst@shift]{0pt}{\ht\pst@hbox}\rule{\wd\pst@hbox}{0pt}}%
    \fi
  \fi
  \endgroup
  \psset[pstricks]{shift=0}% reset value
}

As you can clearly see, if \overfullrule is set to a value larger than 0pt (which is the default in plain TeX), some LaTeX code is executed when one uses TeX Live 2015.

Solution: update your TeX distribution.

If this is not possible, set \overfullrule to 0pt

\input pstricks

\overfullrule=0pt

\pspicture (0,0)(5,5)
\endpspicture
\bye

Alternatively,

\input pstricks

\catcode`@=11
\def\fboxsep#1\fi{\box\pst@hbox\fi}
\catcode`@=12

\pspicture (0,0)(5,5)
\endpspicture
\bye
  • Thanks for answers. I tried with \overfullrule=0ptand it worked. – Mirko Oct 5 '16 at 1:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.