0

With the following document I am getting a

"Extra \else.
\align ...\@checkend {#2}\addto@envbody {#1}\else 
                                                  \addto@envbody {#1\end {#2...
l.107 \end{\align}"

Error. I am using Overleaf.

\documentclass[psamsfonts]{amsart}

%-------Packages---------
\usepackage{amssymb,amsfonts}
\usepackage[all,arc]{xy}

\usepackage{amsthm}

 \usepackage{mathrsfs}
\usepackage{amsmath}

 \usepackage{mathtools}


%--------Theorem Environments--------
%theoremstyle{plain} --- default
\newtheorem{thm}{Theorem}[section]
\newtheorem{cor}[thm]{Corollary}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{conj}[thm]{Conjecture}
\newtheorem{quest}[thm]{Question}

\theoremstyle{definition}
\newtheorem{defn}[thm]{Definition}
\newtheorem{defns}[thm]{Definitions}
\newtheorem{con}[thm]{Construction}
\newtheorem{exmp}[thm]{Example}
\newtheorem{exmps}[thm]{Examples}
\newtheorem{notn}[thm]{Notation}
\newtheorem{notns}[thm]{Notations}
\newtheorem{addm}[thm]{Addendum}
\newtheorem{exer}[thm]{Exercise}

\theoremstyle{remark}
\newtheorem{rem}[thm]{Remark}
\newtheorem{rems}[thm]{Remarks}
\newtheorem{warn}[thm]{Warning}
\newtheorem{sch}[thm]{Scholium}

\makeatletter


\makeatother
\numberwithin{equation}{section}

\bibliographystyle{plain}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

Thus \begin{align}
.
\end{\align}



\end{document}
  • 2
    \end{\align} is wrong. – user31729 Apr 15 '18 at 7:26
  • 2
    I'm voting to close this question as off-topic because the cause of the error is just a simple typo. – Johannes_B Apr 15 '18 at 7:28
  • 1
    I'm voting to close this question as off-topic because simple error as Johannes said – Dr. Manuel Kuehner Apr 15 '18 at 7:37
  • 1
    @Dr.ManuelKuehner: Yes, but here the error is clearly visible in contrast to many other questions where the relevant O.P. shouts: 'Help, TeX does not work any more out of the sudden' and the real culprit (a typo) is hidden... – user31729 Apr 15 '18 at 7:43
  • @Christian True! (+1 for your answer anyway) – Dr. Manuel Kuehner Apr 15 '18 at 10:44
3

There is a typo: \end{\align} ... you're trying to start another align at the end of the first align usage.

Correct it to \end{align}.

\documentclass[psamsfonts]{amsart}

%-------Packages---------
\usepackage{amssymb,amsfonts}
\usepackage[all,arc]{xy}

\usepackage{amsthm}

\usepackage{mathrsfs}
\usepackage{amsmath}

\usepackage{mathtools}


%--------Theorem Environments--------
%theoremstyle{plain} --- default
\newtheorem{thm}{Theorem}[section]
\newtheorem{cor}[thm]{Corollary}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{conj}[thm]{Conjecture}
\newtheorem{quest}[thm]{Question}

\theoremstyle{definition}
\newtheorem{defn}[thm]{Definition}
\newtheorem{defns}[thm]{Definitions}
\newtheorem{con}[thm]{Construction}
\newtheorem{exmp}[thm]{Example}
\newtheorem{exmps}[thm]{Examples}
\newtheorem{notn}[thm]{Notation}
\newtheorem{notns}[thm]{Notations}
\newtheorem{addm}[thm]{Addendum}
\newtheorem{exer}[thm]{Exercise}

\theoremstyle{remark}
\newtheorem{rem}[thm]{Remark}
\newtheorem{rems}[thm]{Remarks}
\newtheorem{warn}[thm]{Warning}
\newtheorem{sch}[thm]{Scholium}

\makeatletter


\makeatother
\numberwithin{equation}{section}

\bibliographystyle{plain}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

Thus \begin{align}
.
\end{align}



\end{document}
| improve this answer | |

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