536 @MISC{shorttoc,
537 TITLE="The {\textsf{shorttoc}} package",
538 AUTHOR="Drucbert, Jean-Pierre F.",
539 ADDRESS="{\url{mailto:[email protected]}}",
540 NOTE="{\url{http://www.dante.de/CTAN/macros/latex/contrib/shorttoc/shorttoc.pdf}}",
541 MONTH=aug,
542 YEAR=2002}
543
• a novel [24] from which a short citation is taken:
544 @BOOK{dark,
545 TITLE="{Against a Dark Background}",
546 AUTHOR="Banks, Iain Menzies",
547 PUBLISHER="Bantam Books",
548 ISBN="0553292240 (pb)",
549 YEAR=1993}
550 h/mtc−addbibi
But the database created this way must be trimmed of some spurious lines; on Unix-like systems, do3:
cat mtc-add.bib | grep -v ’^%%’ > addbib;mv addbib mtc-add.bib
\doparttoc
\dopartlof
\dopartlot
\dosecttoc
\dosectlof
\dosectlot
The preparation commands:
563\begin{document}
564\doparttoc \dopartlof \dopartlot
565\dosecttoc \dosectlof \dosectlot
\setcounter
\tableofcontents
\mtcaddsection
\listoffigures
\listoftables
The commands to prepare the table of contents, the list of figures and the list of tables. As we use thetocbibindpackage, we must add some\mtcaddsectioncommands:
566\setcounter{tocdepth}{6}
567\setcounter{parttocdepth}{6}
568\setcounter{secttocdepth}{6}
569\tableofcontents \mtcaddsection
570\listoffigures \mtcaddsection
571\listoftables \mtcaddsection
\parttoc
\partlof
\partlot
\secttoc
\sectlof
\sectlot
\mtcskip
The body of the document: a part with its part-level mini-tables, some sections with their section-level mini-tables. The document has an index and contains figures and tables.
572\part{Part~1}
573\parttoc \mtcskip \partlof \mtcskip \partlot
574
575\section{First section}
576\index{section!normal}
577\secttoc \mtcskip \sectlof \mtcskip \sectlot
578\subsection{First subsection}
579
580\begin{figure}[tp] \caption{First figure} \end{figure}
581\begin{table}[tp] \caption{First table} \end{table}
582
583\subsection{Second subsection}
584A small nice citation from~\cite{dark}:\\
585\index{small}\index{citation}\index{nice}\index{A}%
586\index{a}\index{and}\index{bird}\index{But}%
587\index{cannot}\index{claim}\index{great}\index{he}%
588\index{I}\index{imagine}\index{it}\index{know}%
589\index{land}\index{on}\index{once}\index{that}%
590\index{to}\index{tree}\index{would}\index{yes}%
591A bird cannot land once on a great tree and claim to know it.
592But I imagine that he would, yes.\\
593\hbox{}\hfill Iain~M.~\textsc{Banks} (1993), \textsl{Against a dark background.}%
594\index{Iain}\index{Banks}\index{Against}\index{dark}\index{background}
595\begin{figure}[tp] \caption{Second figure} \end{figure}
596\begin{table} \caption{Second table} \end{table}
\section*
\mtcaddsection
Here, we try a starred section, with its entry in the table of contents. You can try several solutions (good or bad).
597\section*{Second section, starred}
598\index{section!starred}
599%% UNCOMMENT ONE AND ONLY ONE OF THE 4 FOLLOWING LINES
600\mtcaddsection[Second section, starred] % OK
601%% \mtcaddsection[] % BAD
602%% \mtcaddsection[~] % produces a (strange) correct result.
603%% \mtcaddsection % BAD
604%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
605\index{tests}
606
607This is a starred section; you can test here variations on
608the \verb|\mtcaddsection| command. Just uncomment one (and
609only one) of the \verb|\mtcaddsection| commands after
610\verb|\section*| in the source code of \texttt{mtc-add.tex}.
611For each case, look at the \index{Table of Contents}Table of Contents
612and at this section.
613\index{a}\index{added}\index{after}\index{also}\index{and}%
614\index{at}\index{can}\index{case}\index{section}%
615\index{code}\index{command}\index{commands}%
616\index{Contents}\index{each}\index{entries}\index{For}%
617\index{here}\index{I}\index{in}\index{index}\index{is}%
618\index{Just}\index{just}\index{look}\index{lot}%
619\index{of}\index{on}\index{one}\index{only}\index{source}%
620\index{starred}\index{Table}\index{test}\index{the}%
621\index{This}\index{this}\index{to}\index{uncomment}%
622\index{variations}\index{you}%
623I also added a lot of index entries, just to test.
624
625\section{Third section}
626\index{section!normal}
627\secttoc \mtcskip \sectlof \mtcskip \sectlot
628\subsection{Third subsection}
629
630\begin{figure} \caption{Third figure} \end{figure}
631\begin{table} \caption{Third table} \end{table}
632
633\subsection{Fourth subsection}
634
635\begin{figure} \caption{Fourth figure} \end{figure}
636\begin{table} \caption{Fourth table} \end{table}
637
638\subsubsection{Even a sub-sub-section!}
639\subsubsection{And yet another one}
640
641\part{Part~2}
642\parttoc \mtcskip \partlof \mtcskip \partlot
643
644\section{Fourth section}
645\index{section!normal}
646\secttoc \mtcskip \sectlof \mtcskip \sectlot
647\subsection{Fifth subsection}
648
649\begin{figure}[tp] \caption{Fifth figure} \end{figure}
650\begin{table}[tp] \caption{Fifth table} \end{table}
651
652\subsection{Sixth subsection}
653A small nice citation from~\cite{dark}:\\
654\index{small}\index{citation}\index{nice}\index{A}%
655\index{a}\index{and}\index{bird}\index{But}%
656\index{cannot}\index{claim}\index{great}\index{he}%
657\index{I}\index{imagine}\index{it}\index{know}%
658\index{land}\index{on}\index{once}\index{that}%
659\index{to}\index{tree}\index{would}\index{yes}%
660A bird cannot land once on a great tree and claim to know it.
661But I imagine that he would, yes.\\
662\hbox{}\hfill
663Iain~M.~\textsc{Banks} (1993), \textsl{Against a dark background.}%
664\index{Iain}\index{Banks}\index{Against}\index{dark}\index{background}
665
666\begin{figure}[tp] \caption{Sixth figure} \end{figure}
667\begin{table} \caption{Sixth table} \end{table}
668
669\section*{Fifth section, starred}
670\index{section!starred}
671%% UNCOMMENT ONE AND ONLY ONE OF THE 4 FOLLOWING LINES
672\mtcaddsection[Fifth section, starred] % OK
673%% \mtcaddsection[] % OK
674%% \mtcaddsection[~] % produces a (strange) correct result.
675%% \mtcaddsection % OK
676%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
677\index{tests}
678
679This is a starred section; you can test here variations on
680the \verb|\mtcaddsection| command. Just uncomment one (and
681only one) of the \verb|\mtcaddsection| commands after
682\verb|\section*| in the source code of \texttt{mtc-add.tex}.
683For each case, look at the \index{Table of Contents}Table of Contents
684and at this section.\index{a}%
685\index{added}\index{after}\index{also}\index{and}%
686\index{at}\index{can}\index{case}\index{section}%
687\index{code}\index{command}\index{commands}\index{Contents}%
688\index{each}\index{entries}\index{For}\index{here}%
689\index{I}\index{in}\index{index}\index{is}%
690\index{Just}\index{just}\index{look}\index{lot}%
691\index{of}\index{on}\index{one}\index{only}%
692\index{source}\index{starred}\index{Table}\index{test}%
693\index{the}\index{This}\index{this}\index{to}%
694\index{uncomment}\index{variations}\index{you}%
695I also added a lot of index entries, just to test.
696
697\section{Sixth section}
698\index{section!normal}
699\secttoc \mtcskip \sectlof \mtcskip \sectlot
700\subsection{Seventh subsection}
701
702\begin{figure} \caption{Seventh figure} \end{figure}
703\begin{table} \caption{Seventh table} \end{table}
704
705\subsection{Eighth subsection}
706
707\begin{figure} \caption{Eighth figure} \end{figure}
708\begin{table} \caption{Eighth table} \end{table}
\bibliographystyle
\bibliography
\adjuststc
The bibliography: as we want an entry for it in the table of contents, we use the tocbibind package [472] and a correction with\adjuststc:
709\nocite*
710\def\noopsort#1{\relax}
711\bibliographystyle{plain}
712\bibliography{mtc-add}
713\adjuststc
\printindex
\mtcfixindex
The index: as we want an entry for it in the table of contents, we use the tocbibind package [472] and a correction with\mtcfixindex:
714\printindex
715\mtcfixindex % use this OR the 3 following lines
716%% \addcontentsline{lof}{xsect}{}
717%% \addcontentsline{lot}{xsect}{}
718%% \mtcaddsection
719
720\appendix
721\section{App.~1}
722\index{section!appendix}
723\secttoc \mtcskip \sectlof \mtcskip \sectlot
724\subsection{Ninth subsection}
725
726\begin{figure} \caption{Ninth figure} \end{figure}
727\begin{table} \caption{Ninth table} \end{table}
728
729\subsection{Tenth subsection}
730
731\begin{figure} \caption{Tenth figure} \end{figure}
732\begin{table} \caption{Tenth table} \end{table}
733
734\section{App.~2}
735\index{section!appendix}
736%% contains no tables but asks for a sectlot! No sectlot printed.
737\secttoc \mtcskip \sectlof \mtcskip \sectlot
738\subsection{Eleventh subsection}
739
740\begin{figure} \caption{Eleventh figure} \end{figure}
741\begin{figure} \caption{Twelfth figure} \end{figure}
742
743\subsection{Twelfth subsection}
744
745\begin{figure} \caption{Thirdteenth figure} \end{figure}
746\begin{figure} \caption{Fourteenth figure} \end{figure}
747
748\end{document}
749h/mtc−adsi