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.

  • May this tex.stackexchange.com/questions/511138/… will helps you – MadyYuvi Jan 16 at 10:06
  • 1
    Welcome to TEX.SE! In a standard setup this should work, so whatever is happening is related to some code you are withholding. Please provide a full minimal working example which reproduces the issue, starting with \documentclass{...} and ending with \end{document}. – campa Jan 16 at 10:27
  • you haven't given enough information to debug, but check you have loaded graphicx package (not graphics) – David Carlisle Jan 16 at 11:03
  • Thank you for the comments, I've edited my question so it is now self contained. – Cain Jan 16 at 11:20
  • 1
    Thank you for the update! However, colt2020.cls is no standard LaTeX class, so you should please provide a link to it. – campa Jan 16 at 11:23
4

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).

|improve this answer|||||
  • It works! Thanks! Though I find it weird that other machines do manage to compile graphics using the original class. – Cain Jan 16 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 at 13:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.