7

I have issues compiling with using memoir class, table of contents, a chapter and begin{figure}.

\documentclass{memoir}
\usepackage[british, ngerman]{babel}
\usepackage{graphicx}

\begin{document}
\tableofcontents
\chapter{test}

\begin{figure}
\includegraphics[width=\textwidth]{testing.pdf}
\end{figure}

\end{document}

If I remove either \tableofcontents, \chapter, or the begin{figure} it works fine. I tried to run the code on my non-portable version on my PC, which had no troubles. I already reinstalled the portable-version but nothing changed.

! Use of \@xnext doesn't match its definition.
\@freelist ->,
              \bx@E ,,\bx@F ,,\bx@G ,,\bx@H ,,\bx@I ,,\bx@J ,,\bx@K ,,\bx@L ...
l.10 \includegraphics
                     [width=\textwidth]{testing.pdf}
? 

So obvioulsy there must be something wrong with MiKteX since the code works with a different installation of it. I'm using MiKTeX version 2.9.7300.

While in the MiKTeX console I'm receiving this error for a PATH issue, despite the path variable being the same directory. Not sure tho if it has something to do with the original problem.

Any kind of advise or help is highly appreciated.

enter image description here

1 Answer 1

8

that is a known bug https://github.com/latex3/babel/issues/51 which will resolved when babel is updated is a few days

As a work-around:

\documentclass{memoir}
\usepackage[british, ngerman]{babel}
\makeatletter\AtBeginDocument{\let\@elt\relax}\makeatother
\usepackage{graphicx}

\begin{document}
\tableofcontents
\chapter{test}

\begin{figure}
\includegraphics[width=\textwidth]{example-image.pdf}
\end{figure}

\end{document}
6
  • Thanks so much, the work-around resolves it
    – Timo
    Feb 28, 2020 at 19:30
  • 3
    This error presented in the Ubuntu 20.10. Thank you for this work-around. May 3, 2020 at 8:45
  • 1
    It's 2021, Ubuntu 20.04.2 LTS, pdfTeX 3.14159265-2.6-1.40.20, and the bug is still there... Apr 8, 2021 at 14:07
  • @pawel_winzig the bug is long gone, so complain to ubuntu if their tex system is not up-to-date. Apr 8, 2021 at 14:10
  • @UlrikeFischer: Can you suggest how to properly update it? Apr 8, 2021 at 14:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .