3

I am trying to adjust the formatting for my appendix chapters. I am using a document class specific to my school, but many TeX suggestions for articles and reports seem to work.

I use the following commands:

\usepackage[titletoc]{appendix}
\begin{document}
\chapter{chapter 1 title}
text
\chapter{chapter 2 title}

\appendix
\chapter{Appendix chapter title 1}
text
\chapter{Appendix chapter title 2}
text
\end{document}

The titles for the appendices appear as:

Appendix A

Appendix chapter title 1

Appendix B

Appendix chapter title 2

What I'd like to do is suppress the "Appendix A" and "Appendix B" or alter them. that is, I'd like the title of the appendix to appear:

Appendix chapter title 1

Appendix chapter title 2

However, I'd like to maintain the number of figures and tables within the appendix. I'd appreciate any suggestions on how to do this!

1
  • you want number of figures A.1 or just 1
    – touhami
    May 3, 2015 at 21:12

2 Answers 2

2

This removes the (huge) space above the chapter title as well as the chapter leadin for appendix chapters (i.e. the Appendix A stuff)

It requires the output of the appendix number however. I will add this after the next edit.

\documentclass{book}

\usepackage{xpatch}
\usepackage[toc]{appendix}

\makeatletter
\xapptocmd{\appendix}{%
\xpatchcmd{\@makechapterhead}{\vspace*{50\p@}}{}{\typeout{Success}}{}
\xpatchcmd{\@makechapterhead}{\huge\bfseries \@chapapp\space \thechapter}{}{%
\typeout{removed title}}{}%
\xpatchcmd{\@makechapterhead}{\Huge \bfseries #1\par\nobreak}{\Huge \bfseries \@chapapp\space \thechapter~#1\par\nobreak}{%
\typeout{Changed title}}{}%
}{}{}
\makeatother


\begin{document}
\tableofcontents
\chapter{chapter 1 title}
text
\chapter{chapter 2 title}

\appendix
\appendixheaderoff
\chapter{chapter title 1}
\begin{figure}
  \caption{Some figure}
\end{figure}
text
\chapter{chapter title 2}
text

\chapter{chapter title 3}
text

\end{document}

enter image description here

3
  • I don't think the OP want this,the 3 rd \xpatchcmd not necessary no?
    – touhami
    May 4, 2015 at 7:56
  • The 3rd \xpatchcmd is perhaps not necessary, but the appendix number should appear anyway, I believe. Since the Appendix title vanished, there is no further information on the appendix number left
    – user31729
    May 4, 2015 at 8:41
  • well, you are right.
    – touhami
    May 4, 2015 at 19:56
2

Here a complete code, thanks to Christian Hupfer

\documentclass{book}
\usepackage[titletoc]{appendix}
\begin{document}
\chapter{chapter 1 title}
text
\chapter{chapter 2 title}

\appendix
\chapter*{Appendix chapter title 1}
\stepcounter{chapter}
\section{title 1}
text
\begin{figure}[hbp]
\centering
image
\caption{Appendix}
\end{figure}
\chapter*{Appendix chapter title 2}
\stepcounter{chapter}
text
\end{document}

enter image description here

7
  • Please elaborate a little bit on your answer
    – user31729
    May 3, 2015 at 22:19
  • @ChristianHupfer i will try
    – touhami
    May 4, 2015 at 7:53
  • I meant: Wrap a 'full' document around it ;-) I had your answer in the Low-Quality-Queue, but declined to vote for delete (But I will delete this comment after elaboration ;-))
    – user31729
    May 4, 2015 at 11:31
  • @ChristianHupfer really I didn't understand your last comment, I trust in you, if you can edit my answer (+1) if you want me to delete it just ask. I think this is what the OP ask for and this is the simplest way i know to do.
    – touhami
    May 4, 2015 at 20:08
  • Just \documentclass{...} ... \begin{document}...\end{document}, perhaps with a screen shot ;-)
    – user31729
    May 4, 2015 at 20:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .