2

I am using ShareLaTex with the UC Berkeley Thesis template.

I want to load appendix with the titletoc and header options:

\usepackage[titletoc,header]{appendix}
\usepackage{algorithmic}

It throws a compile error.

LaTeX Error: Option clash for package appendix.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.24 \usepackage
                {algorithmic}
The package appendix has already been loaded with options:
  []
There has now been an attempt to load it with options
  [titletoc,toc]

I gather appendix is being loaded from the memoire class used by the ucbthesis class included with the template. Digging into the raw logs I find this:

Package appendix [2008/07/23] emulated by memoir.

So... is there a way I can tell memoir to not emulate appendix?

Here is a sample from the ucbthesis class where memoire is passed a bunch of options.

\newcommand\thes@sidedness{-1}
\DeclareOption{oneside}
  {\renewcommand\thes@sidedness{1}\PassOptionsToClass{\CurrentOption}{memoir}}
\DeclareOption{twoside}
  {\renewcommand\thes@sidedness{2}\PassOptionsToClass{\CurrentOption}{memoir}}

%  Changing the default point size from 10pt to 12pt uses a similar procedure,
%  but it's messier.

\newcommand\thes@ptsize{0}
\DeclareOption{9pt}
  {\renewcommand\thes@ptsize{9}\PassOptionsToClass{\CurrentOption}{memoir}}
%yada yada yada
\DeclareOption{*pt}
  {\renewcommand\thes@ptsize{99}\PassOptionsToClass{\CurrentOption}{memoir}}

% Other options are passed on to the memoir class.

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{memoir}}
  • 2
    memoir does provide \DisemulatePackage{appendix}, but that only ensures that you can load the package. It does not, however, take care of commands that are already defined. Perhaps, instead of following this route, you could explain what appendix provides that memoir does not, as it may be easier to update memoir to do what you're after. – Werner Nov 10 '16 at 0:52
4

Not really, you can use

\DisemulatePackage{appendix}

to stop memoir claiming that appendix is loaded, but then if you try to load it

\documentclass[titletoc,header]{memoir}
\DisemulatePackage{appendix}
\usepackage[titletoc,header]{appendix}
\usepackage{algorithmic}
\begin{document}
\end{document}

you get multiple errors starting

! LaTeX Error: Command \c@@ppsavesec already defined.

the appendix functionality isn't implemented by loading appendix with some fixed options, it is just embedded in the core memoir code as far as I can see in the sources. You should look to see if there is a "memoir-way" for whatever layout you wanted.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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