1

We have some document.tex-file with hyperlinks:

\documentclass[]{article}
\usepackage{amsmath}
\usepackage{hyperref}

\begin{document}

\begin{equation}\label{key}
 E = mc^c
\end{equation}

\eqref{key}

\end{document}

I created a document.pax-file based on above .tex-file using Java x64 (build 1.8.0_201-b09) based on these answers:

http://tex.stackexchange.com/questions/78863/how-to-install-pdfbox-on-windows-so-it-works-with-pax

http://bryanwweber.com/writing/personal/2014/04/13/use-pax-to-extract-and-include-links-from-external-pdf-files-in-latex-on-windows/

http://tex.stackexchange.com/questions/60201/getting-pax-pdfpages-to-work-with-xelatex

\[{pax}{0.1l}\\
\[{file}{\<653A5C476172626167655C646F63756D656E742E706466\>}{
  Size={23982},
  Date={D:20190404100715+03'00'},
}\\
\[{pagenum}{1}\\
\[{page}{1}{0 0 612 792}{}\\
\[{annot}{1}{Link}{151.59 623.861 158.564 635.816}{GoTo}{
  C={[1 0 0]},
  H={/I},
  DestLabel={1},
  Border={[0 0 1]},
}\\
\[{dest}{1}{1}{XYZ}{
  DestY={657.235},
  DestX={286.459},
}\\

Next, I want to insert document.pdf from document.tex into another Main.pdf compiled from Main.tex with LuaLaTeX:

% !TeX program = lualatex
% !TeX encoding = utf8


\documentclass[14pt]{extarticle}

\usepackage{fontspec}
\setmainfont{CMU Serif}%{Times New Roman}
\usepackage[english]{babel}
\usepackage{pdfpages}

\usepackage{pdftexcmds}
\makeatletter
\let\pdfescapename=\pdf@escapename
\let\pdfstrcmp=\pdf@strcmp
\makeatother
\usepackage{pax}

\usepackage{hyperref}

\begin{document}

\includepdf{document.pdf}

\end{document}

But I get an error Undefined control sequence and Main.pdf appears with a strange string namePAX@document.pax@1xyz enter image description here

.log-file

File: document.pdf Graphic file (type pdf)
<use document.pdf, page 1>
Package luatex.def Info: document.pdf , page1 used on input line 23.
(luatex.def)             Requested size: 614.58406pt x 795.3441pt.
 (./document.pax
! Undefined control sequence.
<argument> ...X@raise \hb@xt@ \z@ {\kern \PAX@right \pdfdest 
                                                  \PAX@name \PAX@type \relax...
l.17 }
    \\
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

)

Previously, this code worked fine, but after some updates these errors appeared. I use TexLive 2018.

sergiokapone
  • 5,578
  • 1
  • 16
  • 39

0 Answers0