2

I'm trying to compile a document using a class provided by a journal. I get the following error

Paragraph ended before \@tempa was complete.
Emergency stop.

This is the problematic code:

\documentclass{colt2020}

\begin{document}
\begin{figure}
     \includegraphics[width=\columnwidth] {Figure1}
\end{figure}
\end{document}

The 'colt2020' class may be found here here. Without the supplied class, the following code does compile and displays the figure

\documentclass{article}

\usepackage{graphicx}

\begin{document}
\begin{figure}
   \includegraphics[width=\columnwidth] {Figure1}
\end{figure}
\end{document}

I can add '\usepackage{graphicx}' to the first example and it will still not compile. It shouldn't matter anyways, since the class requires this package.

Cain
  • 123

1 Answers1

5

You can revert the patch that the class is trying to make to \includegraphics

\documentclass{jmlr}

\makeatletter
 \let\Ginclude@graphics\@org@Ginclude@graphics 
\makeatother
\begin{document}
\begin{figure}
     \includegraphics[width=\columnwidth] {example-image}
\end{figure}
\end{document}

Should work as long as you do not need the feature of having an alternative gray-scale version of your images for print versions rather than rely on automatic conversion of colour images to print.

The above patch is from Nicola Tablot, the jmlr class author. She will look into why the patch that the class makes is failing in recent latex releases. (The core file handling code changed in the 2019 latex release to cope with UTF-8 characters in filenames and to cope with filenames with spaces and multiple dots).

David Carlisle
  • 757,742
  • It works! Thanks! Though I find it weird that other machines do manage to compile graphics using the original class. – Cain Jan 16 '20 at 12:34
  • @Cain they will have an older latex, but I contacted Nicola and I have a better answer, look in a minute, I'm editing.. – David Carlisle Jan 16 '20 at 13:10