I am preparing my manuscript for submission to a conference. Here is the link to the style sheets required by the conference. In particular, they have the following lines in there:


I am not changing anything in my main LaTeX file, but when I write a sample algorithm, it doesn't appear with horizontal lines on top, as it should according to the definition of these options for algorithm2e package, which is what is used in the provided stylesheet. Here is a MWE. Note, it only compiles with the stylesheets (colt2018.cls, jmlr.cls, jmlrutils.sty) provided in the link above.

\documentclass[anon,12pt]{colt2018} % Anonymized submission
% \documentclass{colt2017} % Include author names

% The following packages will be automatically loaded:
% amsmath, amssymb, natbib, graphicx, url, algorithm2e

\title[Short Title]{Full Title of Article}

 % Authors with different addresses:
 \coltauthor{\Name{Author Name1} \Email{[email protected]}\\
 \addr Address 1
 \Name{Author Name2} \Email{[email protected]}\\
 \addr Address 2



This is a great paper and it has a concise abstract.

List of keywords


  \KwData{this text}
  \KwResult{how to write algorithm with \LaTeX2e }
  \While{not at end of this document}{
    read current\;
      go to next section\;
      current section becomes this one\;
      go back to the beginning of current section\;
  \caption{How to write algorithms}

% Acknowledgments---Will not appear in anonymized version
\acks{We thank a bunch of people.}



What am I doing wrong here?

1 Answer 1


I don't think you're doing anything wrong. In the documentation of the class you find the following somewhat cryptic comment:

Allow old command names in the event that the proceedings contains a mix- ture of papers that use old and new versions. (This means that editors need to install the newer version.) For some reason, loading algorithm2e causes the message

(\end occurred inside a group at level 1)

I don’t know why, but it’s outside the control of this class.

558 \PassOptionsToPackage{algo2e,ruled}{algorithm2e} 559 \RequirePackage{algorithm2e}

When you examine jmlrutils.sty definition of algorithm you find the following:

  {`algorithm2e' package is required if you want to
   use the algorithm environment}%

This redefines \@makecaption so that the ruled caption is not used, despite the option being passed to the class.

The cryptic comment suggests that passing the ruled option to the package prevents the error, and that's all. It's not intended to actually make the algorithms ruled.

  • Great answer. Thank you for your effort (of downloading the stylesheets and looking at them so carefully!). Do you think there's a way to actually get the algortihms to be ruled? They look so ... naked now, there's no other way to put it.
    – lazulikid
    Jan 29, 2018 at 16:00
  • 1
    Well since I assume you're using the class to submit to the conference, and they've made it this way I wouldn't recommend changing it.
    – Alan Munn
    Jan 29, 2018 at 16:07

You must log in to answer this question.

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