2

This is a MWE using \rput in full-page picture to put text to the middle of the page:

\documentclass{article}
\usepackage[paperheight=100mm,paperwidth=100mm,margin=0mm,noheadfoot]{geometry}
\usepackage{pstricks}
\begin{document}
    \psset{unit=1mm}
    \begin{pspicture}(0,0)(\paperwidth,\paperheight)
        \rput[bl](50mm,50mm){abc}
    \end{pspicture}
\end{document}

and this is the result:

resulting page

This was compiled with xelatex on TeXlive 2019.202000218 (as packaged in Ubuntu 20.04). I am quite sure \rput used to work correctly as a more complex document, where this was used, is now broken and used to work (= abc was placed correctly) before the upgrade from Ubuntu 18.04 and related TEXlive packages.

Is there a problem on my side? Is there some fix for this?

Thanks!

PS: compiling via latexdvips places the text correctly.

eudoxos
  • 2,973
  • I have no problem (except a small error on the horizontal placement). How did you compile? – Bernard Sep 12 '20 at 08:51
  • Nothing fancy, just xelatex file.tex. Same as few years back when it worked. – eudoxos Sep 12 '20 at 09:02
  • I also compiled with xelatex. Perhaps you should update to TeX Live 2020? – Bernard Sep 12 '20 at 09:04
  • Just tried pasting the code to https://www.tutorialspoint.com/online_latex_editor.php and after hitting "preview", I get PDF with the same error as shown above. – eudoxos Sep 12 '20 at 09:04
  • 1
    I would like to understand the cause. Installing non-packaged version of TeXlive is a burden; I used to do that but avoid it now, especially because of cross-machine compatibility. Surely there is only something small I am missing? – eudoxos Sep 12 '20 at 09:14
  • What do you mean with non-packaged? As far as I know, all versions of TeX Live are packaged. Unless you mean Ubuntu-packaged? Also, don't you have TeX Live package manager installed? – Bernard Sep 12 '20 at 09:17
  • 1
    Correct, I meant ubuntu-packaged (as opposed to TeX-live, which is packaged, but using its own package manager). – eudoxos Sep 12 '20 at 09:19
  • I'm afraid you'll have to wait for a Ubuntu update. Meanwhile, maybe you can try the classic way: latex -> dvips -> pstopdf. – Bernard Sep 12 '20 at 09:24
  • Oops, I need fontspec in the real document (custom OTF). So latex is a no-go. – eudoxos Sep 12 '20 at 09:30
  • Duplicate of this one (same problem): https://tex.stackexchange.com/questions/537010/texlive-2019-debian-pst-plots-wrong-axes-label-positioning – eudoxos Sep 12 '20 at 09:35
  • I see. As a workaround, can't you compile such a code the classic way as a standalone document, and incorporate the resulting .pdf via \includegraphics? – Bernard Sep 12 '20 at 09:43
  • That would be difficult, as the text (with OTF) must be a part of the pstricks image. I used filed from texlive (see the answer) and it works fine now. Thanks for your advice. – eudoxos Sep 12 '20 at 12:02

1 Answers1

1

The same issue is described in TeXLive 2019 Debian: Pst-plots wrong axes label positioning (and explained in the comment linked) and comes from version mismatch between ghostscript and dvipdfmx.

It was solved by overwriting ubuntu-packaged /usr/bin/xdvipdfmx binary and its config /usr/share/texlive/texmf-dist/dvipdfmx/dvipdfmx.cfg with corresponding files from TeXLive 2020.

eudoxos
  • 2,973