0

How do I remove the word "Appendix" in "Appendix A"? Or, what can I do so that my lemma just says "Lemma A.1"? All I have used in my code is \appendix followed by \section{Optimal Values of Weighted Averages}, and I have seen many people's LaTeX files not displaying the word "Appendix". Many thanks.

enter image description here

Mico
  • 506,678
  • Welcome to TeX.SE. The behavior you've encountered is not the default behavior for any document class I'm familiar with. Please tell us which document class you employ, and please reveal whether the preamble of your document modifies the properties of the \appendix macro or of the appendices environment. Do you load the appendices package? – Mico Dec 27 '22 at 12:27
  • E.g., is there an instruction such as \renewcommand\thesection{Appendix\quad\Alph{section}} somewhere in your code? – Mico Dec 27 '22 at 12:49
  • OTOH, if you had provided a complete MWE we could have found what was causing it in the first place. – John Kormylo Dec 27 '22 at 21:54

1 Answers1

1

Difficult to answer without knowing the class you are using. Everything works fine with the standard article class:

\documentclass{article}

\usepackage{amsmath,amsthm}

\newtheorem{lemma}{Lemma}[section]

\begin{document}

\appendix

\section{Optimal Values of Weighted Averages}

Below, we will prove two lemmas [...]

\begin{lemma} Suppose $a \geq b$ and $\lambda \in [0,1]$. Then $a \geq a\lambda + b(1 - \lambda) \geq b$. \end{lemma}

\end{document}

enter image description here

The problem you have seems to be a wrong modification of \appendix. Try with writing

\renewcommand{\appendix}{\par
  \setcounter{section}{0}
  \setcounter{subsection}{0}
  \gdef\thesection{\Alph{section}}
}
user94293
  • 4,254