5

My document class

\documentclass[a4paper,openany,article]{memoir}

I want to add Appendix before the number so that \chapter{An appendix} displays Appendix A An appendix and not A An appendix

Alternatively, if I change my document class to

\documentclass[a4paper,openany]{memoir}

and remove chapter so that when calling a \chapter it only numbers

ex. \chapter{Title 1} results in in 1 Title 1

My doc:

\documentclass[a4paper,openany,article]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}

\maxsecnumdepth{subsection}
\settocdepth{subsection}
%----------------------------------------------------------
\begin{document}
%-------------------------------
    \frontmatter
        \pagenumbering{Roman}

        \tableofcontents

%-------------------------------
    \mainmatter

             \chapter{Introduction}

             \appendix
             \addappheadtotoc
             \chapter{Derivations}
             \section{Celerity at arbitrary depth}\label{sec:celerity_ar_dep}
             \includepdf[pages=59,scale=1,trim = 0mm 0mm 0mm 10cm,clip]{Litteratur/Hydrodynamics2012.pdf}

%-------------------------------
    \backmatter

\end{document}
Malthe Eisum
  • 3,019
  • Please make your code compilable, starting with \documentclass{...} and ending with \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to help you. Help them help you: remove that one hurdle between you and a solution to your problem. – jub0bs Nov 19 '13 at 21:02
  • Please remove everything that is not necessary to explain what your problem is. In particular, we don't have the files that you \input. Also, your code contains loads of packages that are irrelevant to your problem. What we need is a minimal working example (MWE). – jub0bs Nov 19 '13 at 21:10
  • related: http://tex.stackexchange.com/a/60342/21891 – jub0bs Nov 19 '13 at 21:15
  • @Jubobs I will remove what you request. Thought the full preambel wold the info need to see package collisions. – Malthe Eisum Nov 19 '13 at 21:21
  • Unless I misread the question, it has nothing to do with package conflicts, so there is no harm in removing some of those \usepackages. – jub0bs Nov 19 '13 at 21:23
  • Your question is not very clear. Please clarify your second sentence (Alternatively... it only numbers). – jub0bs Nov 19 '13 at 23:33

1 Answers1

5

Hope I haven't misunderstood the question...

If you want to add the word "Appendix" each time a chapter title is printed (inside appendices), you can add the line

\renewcommand*\printchaptername{\Large\bfseries\appendixname~}

just after issuing the \appendix command.

MWE

\documentclass[a4paper,openany,article]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}

\maxsecnumdepth{subsection}
\settocdepth{subsection}
%----------------------------------------------------------
\begin{document}
%-------------------------------
    \frontmatter
        \pagenumbering{Roman}

        \tableofcontents

%-------------------------------
    \mainmatter

             \chapter{Introduction}

             \appendix
             \addappheadtotoc
             \renewcommand*\printchaptername{\Large\bfseries\appendixname~}
             \chapter{Derivations}
             \section{Celerity at arbitrary depth}\label{sec:celerity_ar_dep}
             %\includepdf[pages=59,scale=1,trim = 0mm 0mm 0mm 10cm,clip]{Litteratur/Hydrodynamics2012.pdf}

%-------------------------------
    \backmatter

\end{document}

Output:

enter image description here

If you also want the same behavior in the ToC, you can add the line

\renewcommand*\cftappendixname{\appendixname~}

in the preamble.


Instead, if you want to use

\documentclass[a4paper,openany]{memoir}

you can remove the words "Chapter" and "Appendix" from chapter titles by simply adding the following line in your preamble:

\renewcommand*\printchaptername{}

If you want to remove "Chapter" but not "Appendix" add also

\renewcommand*\printchaptername{\chapnamefont\appendixname}

just after issuing \appendix.

karlkoeller
  • 124,410