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? – user36296 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
    Instead of the environment center use a single \centering. Does it help? – user2478 Feb 1 at 5:29
  • 1
    ok, what happens if you run the document with xelatex and without the optional argument [dvips]?? – user2478 Feb 1 at 9:49
  • 1
    Unrelated to your problem: you don't need [H] in beamer, as beamer does not have a foating mechanism – user36296 Feb 1 at 11:36
4

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 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.