GeneralAppendix Problem

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
wellison999
Posts: 2
Joined: Sat Jun 13, 2009 3:30 pm

Appendix Problem

Post by wellison999 »

Greetings,

I've been having a bit of trouble sorting out the appendices on my master's project...currently, the hyperref links in the left panel for the appendices link to chapters 1 and 2 respectively, and sometimes the chapter 1 and 2 links seem to go to the appendices (I am aware that this is to do with the counter being reset). Similarly for the toc entries. Also, the bibliography and index appear under the appendix 2 'chapter' in the table of contents (see the code below) (but for some reason I can't get this minimal code version to show that)...

Code: Select all

 \documentclass[openbib]{report}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{makeidx}
\usepackage{parskip}
%\usepackage{fullpage}
\usepackage[toc,page,header]{appendix}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{enumerate}
\usepackage{color}
\usepackage{fancyhdr}
\usepackage[super,square]{natbib}
\usepackage{subfig}
\usepackage{framed}
\usepackage{verbatim}
\usepackage[all, cmtip]{xy}
\usepackage[OT2,T1]{fontenc}
\usepackage[Bjarne]{fncychap}
\usepackage{mathrsfs}
\usepackage{makeidx}
\makeindex

\begin{document}

\clearpage
\phantomsection
\addcontentsline{toc}{chapter}{Contents}
\tableofcontents

\chapter{Chapter 1}
...\index{index entry}
\chapter{Chapter 2}
\appendix
\chapter{Appendix 1}
...
\chapter{Appendix 2}
...


\clearpage
\phantomsection
\addcontentsline{toc}{chapter}{Bibliography}
\begin{thebibliography}{99}
\bibitem{asd}Stuff.
\end{thebibliography}

\clearpage
\phantomsection
\addcontentsline{toc}{chapter}{Index}
\vspace{-10pt}
\printindex


\end{document}


 

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Re: Appendix Problem

Post by Stefan Kottwitz »

Hi,

load the hyperref package later, after makeidx and before \begin{document}. hyperref redefines macros of other packages, that's why it should be loaded at the end of the preamble, with some exceptions.

Stefan
LaTeX.org admin
wellison999
Posts: 2
Joined: Sat Jun 13, 2009 3:30 pm

Appendix Problem

Post by wellison999 »

Stefan_K wrote:Hi,

load the hyperref package later, after makeidx and before \begin{document}. hyperref redefines macros of other packages, that's why it should be loaded at the end of the preamble, with some exceptions.

Stefan
Thanks very much, that sorted it!
Post Reply