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!
Best Answer
(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 withamsart.cls
(and probablyautart.cls
as well.)Adding the
norelsize
option toalgorithm2e
gets rid of this error, but then you'd get another error:Check in
autart.cls
, and you'll indeed see it already defines its ownalgorithm
environment.So it does look like
algorithm2e
isn't compatible with this journal document class!