# Vertical spacing with beamer and pstricks using Miktex

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.

Running this using the current Miktex gives the following.

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

Update

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

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

• 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
• Just out of curiosity : have you tried using \begin{pspicture} ... \end{pspicture} instead of \pspicture ... \endpspicture? – marmot Feb 1 at 1:45
• Instead of the environment center use a single \centering. Does it help? – user2478 Feb 1 at 5:29
• ok, what happens if you run the document with xelatex and without the optional argument [dvips]?? – user2478 Feb 1 at 9:49
• 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

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}