1

I am using a journal template to write a paper, but when I add

\usepackage[ruled]{algorithm2e}

to it, it will automatically collapse with error like

/usr/share/texlive/texmf-dist/tex/latex/relsize/relsize.sty:220:
Runaway argument?
{10}
Paragraph ende
d before \@tempb was complete.
<to be read again> 
                   \par 
l.220 \@tempa\small

What's wrong with it? How do I solve it?

Note that the package algorithm2e is needed in my paper.

My code is in https://www.overleaf.com/5851896cgssfm

Main.tex

\documentclass[twocolumn]{autart}
\usepackage{amsmath}

\usepackage{mathrsfs,makecell}          % Enable this line and disable the
                               % preceding line to obtain a two-column
                               % document whose style resembles the
                               % printed Automatica style.


\usepackage{graphicx}          % Include this line if your
                               % document contains figures,
\usepackage[dvips]{epsfig}     % or this line, depending on which
                               % you prefer.
\usepackage{amsfonts}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amsfonts, amssymb}
\usepackage{subfigure}
\usepackage{cite}
\usepackage[subnum]{cases}
\usepackage{multicol}
\usepackage{multirow}
\usepackage[justification=centering]{caption} 
\usepackage[ruled]{algorithm2e}

\newtheorem{theorem}{Theorem}
\newtheorem{corollary}{Corollary}
\newtheorem{definition}{Definition}
\newtheorem{lemma}{Lemma}
\newtheorem{assumption}{Assumption}
\newtheorem{proposition}{Proposition}
\newtheorem{remark}{Remark}
\newtheorem{example}{Example}
\allowdisplaybreaks 

\renewcommand{\baselinestretch}{0.9}

\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
    T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}

\begin{document}

 \begin{frontmatter}
 \title{Test
 \vspace{-3.5ex}
 \thanksref{footnoteinfo}}

 \thanks[footnoteinfo]{}

 \author[li]{Wangyan Li}
 %\corauth[cor1]{Corresponding author. Tel.: +86 21 55271299; fax: +86 21 55271299.}

 \address[li]{Business School, University of Shanghai for Science and Technology, Shanghai, China.\vspace{-1.5ex}}


 \begin{keyword}
 \end{keyword}

 \vspace{-1.0ex}
 \begin{abstract}
In this paper,
 \end{abstract}
 \end{frontmatter}
\end{document}

autart.cls (too big to post, please find it on https://www.overleaf.com/5851896cgssfm)

Thanks!

4
  • 1
    There's no code at the link you give…
    – Bernard
    Aug 10, 2016 at 1:25
  • Can't you add it to your post?
    – Bernard
    Aug 10, 2016 at 1:31
  • Please post a minimal example. For your question to be useful to others, the code causing the problem needs to be here unless you plan to maintain the buggy version indefinitely at that link. Moreover, people are more inclined to answer questions they can see all at once. Especially since I always assume a link means the OP has just posted everything with no attempt at minimisation - and who wants to wade through the entire mess of somebody else's buggy document?
    – cfr
    Aug 10, 2016 at 1:47
  • there's an unrelated bug in algorithm2e; see the brief discussion in thd chat: chat.stackexchange.com/transcript/message/31581522#31581522 . this may or may not be affecting your project. Aug 10, 2016 at 18:36

1 Answer 1

4

(Clicking on "PROJECT" in Overleaf's top bar will display the file list; the file autart.cls can then be viewed.)

Sounds related to this question, where relsize isn't compatible with amsart.cls (and probably autart.cls as well.)

Adding the norelsize option to algorithm2e gets rid of this error, but then you'd get another error:

Error: Command \algorithm already defined.
          Or name \end... illegal, see p.192 of the manual.

Check in autart.cls, and you'll indeed see it already defines its own algorithm environment.

So it does look like algorithm2e isn't compatible with this journal document class!

1
  • Thank you so much for your help, I found if we replace the package algorithm2eby algorithm, it works fine.
    – wayne
    Aug 11, 2016 at 1:34

You must log in to answer this question.

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