[texhax] Problem with the xr-hyper package
José Carlos Santos
jcsantos at fc.up.pt
Sat May 17 16:06:07 CEST 2014
Hi all,
Six days ago, I posted this question at the comp.text.tex newsgroup, but
I got no reply there.
Please consider these LaTeX files:
--------------------------- A.tex ---------------------------
\documentclass{book}
\usepackage{hyperref}
\newcommand*{\newchapter}[1]{\chapter[\texorpdfstring{\MakeUppercase{#1}}{#1}]{#1}}
\begin{document}
\newchapter{ABC}\label{cha}
A
\end{document}
-------------------------------------------------------------
--------------------------- B.tex ---------------------------
\documentclass[article]{memoir}
\usepackage{amsmath}
\usepackage{xr-hyper}
\usepackage{hyperref}
\externaldocument{A}
\begin{document}
\chapter{\nameref{cha}}
\end{document}
-------------------------------------------------------------
If I compile the file A.tex and then the file B.tex, I get this error
message:
Runaway definition?
->\protect \protect {\<def>-command \i \<def>-command \j \<def>-command
\ETC.
! TeX capacity exceeded, sorry [main memory size=8000000].
If the first line of the file B.tex gets replaced by
\documentclass{book}, then I get another error message:
! Use of \@chapter doesn't match its definition.
\@uclclist ->\oe
\OE \o \O \ae \AE \dh \DH \dj \DJ \l \L \ng \NG \ss
\SS \th...
l.7 \chapter{\nameref{cha}}
Why?
Best regards,
Jose Carlos Santos
More information about the texhax
mailing list