Skip to main content
4 of 4
texfaq
David Carlisle
  • 828.7k
  • 74
  • 1.7k
  • 2.6k

I was advised once to test on functionality rather than on class name. The problem is that both appendix.sty and IEEEtran.cls defines \appendices. So only load the appendix package if there isn't already a command \appendices defined. Here is a working example:

\documentclass{IEEEtran} \title{Test of conditional use of the appendix package} \usepackage{lipsum} % just for dummy text \ifcsname appendices\endcsname % do nothing \else \usepackage{appendix} \fi \begin{document} \maketitle \section{Foo} \lipsum \section{Bar} \lipsum \appendix \section{Appendix} \lipsum \end{document} 

\ifcsame is available on all e-TeX builds and is documented (along with other ways to check if a command is defined) here.

Matthew Leingang
  • 47.1k
  • 14
  • 139
  • 206