HenrikBengtsson / R.devices

🎨 R package: Unified Handling of Graphics Devices
https://henrikbengtsson.github.io/R.devices/
19 stars 5 forks source link

LaTeX: LaTeX errors: ! Undefined control sequence. \pdfsuppressptexinfo (on some older LaTeX systems) #38

Closed HenrikBengtsson closed 9 months ago

HenrikBengtsson commented 2 years ago

Issue

I added the following to the vignette in the most recent release to suppress PTEX metadata (for reproducibility reasons):

\pdfsuppressptexinfo=-1

It turns out it's not supported by all LaTeX distros, e.g. if fails with:

LaTeX errors:
! Undefined control sequence.
l.21 \pdfsuppressptexinfo
                         =-1

using

$ texi2dvi --version
texi2dvi (GNU Texinfo 5.1) 5234

Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

which is what we get with CentOS 7.9.

Action

Try with

\@ifundefined{pdfsuppressptexinfo}{}{\pdfsuppressptexinfo=-1}

cf. https://texfaq.org/FAQ-isdef