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.
Asked
Active
Viewed 259 times
0
Mico
- 506,678
1 Answers
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}
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
-
Wow, ok. I added the last piece of code and it just worked. Thank you :) – LaTeX Learner Dec 27 '22 at 13:02


\appendixmacro or of theappendicesenvironment. Do you load theappendicespackage? – Mico Dec 27 '22 at 12:27\renewcommand\thesection{Appendix\quad\Alph{section}}somewhere in your code? – Mico Dec 27 '22 at 12:49