How to make an Anex in latex

8,467 views
Skip to first unread message

fofo vivi

unread,
Sep 2, 2011, 7:14:34 AM9/2/11
to latexus...@googlegroups.com
Hi,
do you know how to create annex in latex
Actually i made a chapter called Annex and I made sections inside it manually numbered as A, B...etc:


\chapter*{Annexes}
\addcontentsline{toc}{chapter}{Annexes}
\pagestyle{plain}
\section*{A. Connect Rules}
\addcontentsline{toc}{chapter}{A. Connect Rules}


But all figures and tables are numbered as if they belong to the later chapter???

Any idea

Regardes

nicolas ferriere

unread,
Sep 2, 2011, 7:26:12 AM9/2/11
to latexus...@googlegroups.com
Hi,

There is an easy solution:

You can create a standard chapter \chapter called "Annexes". The line before, just write :

\appendix

--> just try it!

Nicolas

2011/9/2 fofo vivi <fofo...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "LaTeX Users Group" group.
To post to this group, send email to latexus...@googlegroups.com.
To unsubscribe from this group, send email to latexusersgro...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/latexusersgroup?hl=en.

Peter Flynn

unread,
Sep 2, 2011, 2:58:12 PM9/2/11
to latexus...@googlegroups.com
On Fri, Sep 2, 2011 at 12:14 PM, fofo vivi <fofo...@gmail.com> wrote:
Hi,
do you know how to create annex in latex
Actually i made a chapter called Annex and I made sections inside it manually numbered as A, B...etc:

\chapter*{Annexes}
\addcontentsline{toc}{chapter}{Annexes}
\pagestyle{plain}
\section*{A. Connect Rules}
\addcontentsline{toc}{chapter}{A. Connect Rules}

This will work but It's error-prone. Better to borrow the idea used by \appendix:

\documentclass{report}
\newcommand{\annexname}{Annex}
\makeatletter
\newcommand\annex{\par
  \setcounter{chapter}{0}%
  \setcounter{section}{0}%
  \gdef\@chapapp{\annexname}%
  \gdef\thechapter{\@Roman\c@chapter}}
\makeatother
\begin{document}
\tableofcontents
\chapter{one}
\chapter{two}
\appendix
\chapter{one}
\chapter{two}
\annex
\chapter{one}
\chapter{two}
\end{document}

I have made Annexes numbered Roman (I, II, III, IV, etc) so that they don't conflict with Appendixes. If you're not using \appendix at all, you could simply change the meaning of \appendixname, and use \appendix instead:

\documentclass{report}
\renewcommand{\appendixname}{Annex}
\begin{document}
\tableofcontents
\chapter{one}
\chapter{two}
\appendix
\chapter{one}
\chapter{two}
\end{document}

But all figures and tables are numbered as if they belong to the later chapter???

Of course. \chapter* is an UNnumbered title, so it doesn't change the chapter counter, so all following composite counters will use the most recent value of chapter.

///Peter

fofo vivi

unread,
Sep 7, 2011, 9:27:46 AM9/7/11
to latexus...@googlegroups.com
Thank you very much


2011/9/2 Peter Flynn <angleb...@gmail.com>
Reply all
Reply to author
Forward
0 new messages