0

I am writing a paper for the MLHC conference in Overleaf using the official template. So in the template, when I try to uncomment the given image sample it shows me the error mentioned before. Even if I change it to my image, it shows the same error and shows runaway argument } in every blankline below it. If I comment out the includegraphics, the error goes away. I also did not find any runaway argument throughout the doc. The document class comes from a jmlr.cls file.

\documentclass[pmlr]{jmlr}% new name PMLR (Proceedings of Machine Learning)

 % The following packages will be automatically loaded:
 % amsmath, amssymb, natbib, graphicx, url, algorithm2e
 \usepackage{booktabs}
 %\usepackage{rotating}% for sideways figures and tables
\usepackage{longtable}% for long tables
 % The booktabs package is used by this sample document
 % (it provides \toprule, \midrule and \bottomrule).
 % 
 % book quality tables

 
 % The siunitx package is used by this sample document
 % to align numbers in a column by their decimal point.
 % Remove the next line if you don't require it.
 %\usepackage[load-configurations=version-1]{siunitx} % newer version
 %\usepackage{siunitx}

\makeatletter
\def\set@curr@file#1{\def\@curr@file{#1}} %temp workaround for 2019 latex release
\makeatother

 % The following command is just for this sample document:
\newcommand{\cs}[1]{\texttt{\char`\\#1}}

 % Define an unnumbered theorem just for this sample document:
\theorembodyfont{\upshape}
\theoremheaderfont{\scshape}
\theorempostheader{:}
\theoremsep{\newline}
\newtheorem*{note}{Note}

 % change the arguments, as appropriate, in the following:
\jmlrvolume{[VOLUME \# TBD]}
\jmlryear{2024}
\jmlrworkshop{Machine Learning for Healthcare}
\begin{document}
 %other sections and subsections
    \begin{figure}[t]
      \centering 
      % \includegraphics[width=2.5in]{images/plot.png} 
      \caption{Description with the main takeaway point. Note that figure captions should appear below the figure.}
      \label{fig:example} 
    \end{figure} 
\end{document}

Here is the first error in the log. Line 221 has a blank line. So if I remove it, it will show the error in the next blank line.

images/plot.png \edef \Gin@ext {\Gin@sepdefault \filename@ext }\ifx \Gin@ext \ETC.
! Paragraph ended before \@tempa was complete.
<to be read again> 
                   \par 
l.221 
      
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.
3
  • it shows that I am missing } symbol somewhere but I double-checked the whole thing
    – MFarhan
    Feb 27 at 20:21
  • 1
    Welcome to TeX.SE! Where does your documentclass comes from? Can you please show us the first error from your logfile (copy and paste it to your question)?
    – Mensch
    Feb 27 at 20:40
  • I would start by removing def\set@curr@file#1{\def\@curr@file{#1}} %temp workaround for 2019 latex release which breaks a core part of latex's file handling. Feb 27 at 21:25

1 Answer 1

3

I changed the image to example-image.png which is generally available for these tests and got essentially the error you showed.

Commenting out this line

\def\set@curr@file#1{\def\@curr@file{#1}}

fixes the issue. It's best not to redefine core latex commands, especially using \def so you get no warning.

\documentclass[pmlr]{jmlr}% new name PMLR (Proceedings of Machine Learning)

 % The following packages will be automatically loaded:
 % amsmath, amssymb, natbib, graphicx, url, algorithm2e
 \usepackage{booktabs}
 %\usepackage{rotating}% for sideways figures and tables
\usepackage{longtable}% for long tables
 % The booktabs package is used by this sample document
 % (it provides \toprule, \midrule and \bottomrule).
 % 
 % book quality tables

 
 % The siunitx package is used by this sample document
 % to align numbers in a column by their decimal point.
 % Remove the next line if you don't require it.
 %\usepackage[load-configurations=version-1]{siunitx} % newer version
 %\usepackage{siunitx}

\makeatletter
%NO!!!!!!!!!!!!\def\set@curr@file#1{\def\@curr@file{#1}} %temp workaround for 2019 latex release
\makeatother

 % The following command is just for this sample document:
\newcommand{\cs}[1]{\texttt{\char`\\#1}}

 % Define an unnumbered theorem just for this sample document:
\theorembodyfont{\upshape}
\theoremheaderfont{\scshape}
\theorempostheader{:}
\theoremsep{\newline}
\newtheorem*{note}{Note}

 % change the arguments, as appropriate, in the following:
\jmlrvolume{[VOLUME \# TBD]}
\jmlryear{2024}
\jmlrworkshop{Machine Learning for Healthcare}
\begin{document}
 %other sections and subsections
    \begin{figure}[t]
      \centering 
      \includegraphics[width=2.5in]{example-image.png} 
      \caption{Description with the main takeaway point. Note that figure captions should appear below the figure.}
      \label{fig:example} 
    \end{figure} 
\end{document}

You must log in to answer this question.

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