5

I am trying to obtain the following structure (in terms of titles) :

Chapter 5 : Last Title
Annex 
  A - Section1Annex
  B - Section2Annex

where Chapter 5 and Annex are referenced as \chapter title.

I managed to "remove" the chapter numbering for the Annex (with addcontentsline and chapter*{Annex} inside a custom made command, "\myChap), so, no problem on that side.

Then, on below the code I wrote :

\chapter{Last Title}
\myChap{Annex}
\appendix
\section{Section1Annex}
\section{Section2Annex}

However, it displays the following structure:

Chapter 5 : Last Title
Annex 
  0.1 - Section1Annex
  0.2 - Section2Annex

My problem :

How can I switch these section numbering from 0.1 (resp.0.2) to A (resp. B). I am having difficulties to deal with the \appendix environment.

Thank you in advance for your help.

12
  • 1
    If you want to have unnumbered chapters, use \chapter*{Annex} instead. And for standard document classes, \appendix will switch to alpha 'numbering' of its sections. Most proably, you will have to say \renewcommand{\thesection}{\Alph{section}} after saying \appendix, in order to get rid off the 0 numbering for appendix sections
    – user31729
    Commented Aug 18, 2014 at 12:41
  • 1
    @ChristianHupfer I am already using chapter* inside the new command I created \myChap. I know how to have unnumbered chapters, that's not my problem.
    – enigmator
    Commented Aug 18, 2014 at 12:45
  • 1
    @ChristianHupfer : You solved my problem with \renewcommand{\thesection}{\Alph{section}}, thank you very much.
    – enigmator
    Commented Aug 18, 2014 at 12:48
  • 1
    But three chapters and ten annexes seems quite odd, to be honest. Can you group them somehow?
    – Johannes_B
    Commented Aug 18, 2014 at 12:55
  • 1
    @Johannes_B Unfortunately, my report has only 3 chapters but several documentation to refers, I may have more than 3 annexes, making the report unbalanced imo. I am open to any suggestion/documentation to help me improving this setup anyway. :)
    – enigmator
    Commented Aug 18, 2014 at 13:00

1 Answer 1

2

A solution suggestion, since lacking a MWE, \mychap is unknown and not used in here.

\documentclass[12pt]{report}

\usepackage{hyperref}%

\begin{document}
\tableofcontents

\chapter{The last one}


\renewcommand{\appendixname}{Annex}%
\chapter*{\appendixname}

\phantomsection
\addcontentsline{toc}{chapter}{\appendixname}%
% Eventually a \cleardoublepage here
 \cleardoublepage
\renewcommand{\thesection}{\Alph{section}}

\section{AnnexSectionOne}
\section{AnnexSectionTwo}

\end{document}
3
  • 1
    Thanks, as said, your solution in comments above solved my issue. Have a nice day!
    – enigmator
    Commented Aug 18, 2014 at 13:24
  • \phantomsection isn't necessary in later versions of hyperref (after of 2009/11/25 v6.79h). In fact this example works better without it, because the link points directly to Annex. (remove it and observe)
    – skpblack
    Commented Aug 18, 2014 at 14:05
  • @skpblack: Thanks, I just tested it. Nevertheless, there might be situations, where it is still necessary, so I have grown accustomed to use it as much as possible.
    – user31729
    Commented Aug 18, 2014 at 14:07

You must log in to answer this question.

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