3

I have some old files which I haven't used for a long time. They now produce different vertical layouts in beamer.

MWE (test.tex):

\documentclass[dvips]{beamer}

\usepackage{pstricks}
\psset{unit=1mm}

\begin{document}

\begin{frame}\frametitle{Test}
line 1

line 2

\begin{figure}[h]
\begin{center}
\pspicture(0,0)(60,60)
\psframe(0,0)(60,60)
\endpspicture
\end{center}
\caption{Figure}
\end{figure}

line 3

\end{frame}
\end{document}

Workflow:

latex test
dvips -P pdf test
ps2pdf test.ps

Running this using an old Miktex from late 2014 gives the following.

Result from old Miktex

Running this using the current Miktex gives the following.

Current Miktex

The vertical spacing is different for the two runs. Does anyone know what's changed to cause this? Thanks.

Update

Links to log files:

Miktex 2014 - https://1drv.ms/u/s!AuihY7Zd3CrNee0RytQa2zBX5qw

Miktex 2019 - https://1drv.ms/u/s!AuihY7Zd3CrNeh9xWI_j5BVIHgg

  • 1
    Can you put \listfiles into your document and then show us the list of packages from the .log file for both installations? – samcarter Feb 1 at 0:06
  • 1
    Just out of curiosity : have you tried using \begin{pspicture} ... \end{pspicture} instead of \pspicture ... \endpspicture? – marmot Feb 1 at 1:45
  • 1
    @marmot Gives the same results thanks. – user41974 Feb 1 at 4:09
  • 1
    Instead of the environment center use a single \centering. Does it help? – Herbert Feb 1 at 5:29
  • 1
    ok, what happens if you run the document with xelatex and without the optional argument [dvips]?? – Herbert Feb 1 at 9:49
3

The problem has nothing to do with pstricks. You see it also with pdflatex and a simple rule.

Between 2017 and 2018 beamer added in beamerbaselocalstructure.sty the command

\setlength\partopsep{\z@skip}

And this means that lists now have around 3pt less spacing before and after them. The figure environment is defined internally to use center which is a list. Side remark: that means that there is no need to add the center environment manually.

\documentclass{beamer}

\begin{document}

\begin{frame}\frametitle{Test}
line 1

line 2

\begin{center}
\the\partopsep %0pt in 2018, 3.0pt plus 1.0pt minus 1.0pt in 2017
\rule{60mm}{60mm}
\end{center}

line 3

\end{frame}
\end{document}

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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