GeneralAppendices conflict with minitoc:no prefix for article class

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
sdaau
Posts: 26
Joined: Fri Feb 19, 2010 2:08 pm

Appendices conflict with minitoc:no prefix for article class

Post by sdaau »

Hi all,

Consider the following MWE:

Code: Select all

\documentclass{article}

\usepackage{url}
\usepackage[breaklinks]{hyperref}
\usepackage{appendix}
\usepackage{minitoc}
\usepackage{appendix}



\begin{document}

\tableofcontents

\bigskip

\section{My Section 1}

Blahblah...

\subsection{My SubSection 1}

Blahblah...


%%% these must occur before \begin{appendices}
\appendixtocon
\appendixpageon
\appendixtitleon
\appendixtitletocon
\appendixheaderon
\begin{appendices}

\section{My App 1}

Blahblah blah ...

\section{My App 2}

Blahblah blah ...

\end{appendices}



\end{document}
The option 'title' should add/prefix the word "Appendix" to the section titles, which works fine if minitoc is not included.

However, if minitoc is used, then the rendering outcome after

Code: Select all

pdflatex test.tex && pdflatex test.tex && evince test.pdf
is (somewhat) like this:

Code: Select all

Contents
1 My Section 1 1
1.1 My SubSection 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Appendices 1
Appendix A My App 1 . . . 1
Appendix B My App 2 . . . 1

1 My Section 1
Blahblah...

1.1 My SubSection 1
Blahblah...

Appendices
A My App 1
Blahblah blah ...

B My App 2
Blahblah blah ...

... that is: TOC shows 'Appendix B My App 2' as requested by \appendixtitletocon - however, the title itself shows just 'B My App 2'; which should also be 'Appendix B My App 2', as requested by \appendixtitletocon.

Any ideas for a workaround ??

Thanks in advance for any answers,

Cheers!

Recommended reading 2024:

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

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

sdaau
Posts: 26
Joined: Fri Feb 19, 2010 2:08 pm

Appendices conflict with minitoc:no prefix for article class

Post by sdaau »

Ok, a temporary workaround for me is to conditionally load minitoc, only if appendix is not defined beforehand:

Code: Select all

\usepackage{appendix}

% conditional load: check if appendix is loaded by checking if \appendixtocon is defined; if so, do not load minitoc
\ifdefined\appendixtocon
\else
\usepackage{minitoc}
\fi
... but if there's a better way, I'd love to know about it :)

Cheers!
Post Reply