| 1 |
\documentclass[pagesize=auto, parskip=half, fontsize=12pt, DIV=9]{scrartcl} |
| 2 |
|
| 3 |
\usepackage{fixltx2e} |
| 4 |
\usepackage{etex} |
| 5 |
\usepackage{xspace} |
| 6 |
\usepackage{lmodern} |
| 7 |
\usepackage[T1]{fontenc} |
| 8 |
\usepackage{textcomp} |
| 9 |
\usepackage{microtype} |
| 10 |
\usepackage{hyperref} |
| 11 |
|
| 12 |
\newcommand*{\mail}[1]{\href{mailto:#1}{\texttt{#1}}} |
| 13 |
\newcommand*{\pkg}[1]{\textsf{#1}} |
| 14 |
\newcommand*{\cs}[1]{\texttt{\textbackslash#1}} |
| 15 |
\makeatletter |
| 16 |
\newcommand*{\cmd}[1]{\cs{\expandafter\@gobble\string#1}} |
| 17 |
\makeatother |
| 18 |
|
| 19 |
\addtokomafont{title}{\rmfamily} |
| 20 |
|
| 21 |
\title{The \pkg{notoccite} package} |
| 22 |
\author{Donald Arseneau\thanks{\mail{[email protected]}; TRIUMF, Vancouver, Canada}} |
| 23 |
\date{Jul 20, 2000} |
| 24 |
|
| 25 |
|
| 26 |
\begin{document} |
| 27 |
|
| 28 |
\maketitle |
| 29 |
|
| 30 |
\noindent |
| 31 |
Ordinarily, cites used in titles or figure captions also appear in |
| 32 |
the table of contents and list of figures. If you then run \texttt{bibtex} |
| 33 |
using the \pkg{unsrt} (unsorted) style, they get numbered starting from 1, |
| 34 |
not the number they should have in the main text. |
| 35 |
|
| 36 |
A good option is to avoid cites in titles, and to specify optional |
| 37 |
caption text without cites:\\[0.4ex] |
| 38 |
\small |
| 39 |
\verb+\caption [Picture of a bird.]{Picture of a bird \cite{audobon}.}+ |
| 40 |
\normalsize |
| 41 |
|
| 42 |
If you must use moving cites, you could manage them by deleting \textsc{toc} |
| 43 |
and \textsc{lof} files, then running \texttt{latex} once, then \texttt{bibtex}\@. However, the |
| 44 |
following definition fixes the problem so you don't need to worry |
| 45 |
about that. |
| 46 |
|
| 47 |
\emph{NOTE:} This definition works for the ordinary \LaTeX\ definitions |
| 48 |
for \cmd{\cite} and others (\cmd{\addtocontents}, \cmd{\label}) but it may well |
| 49 |
fail when used with various packages for citations or cross |
| 50 |
references. |
| 51 |
|
| 52 |
It works by locally setting \cmd{\@fileswfalse}, which is something like |
| 53 |
\cmd{\nofiles}, but \cmd{\@fileswfalse} does not affect \cmd{\label} or \cmd{\addtocontents}. |
| 54 |
\cmd{\nofiles} does most of its work by redefining \cmd{\protected@write}, and |
| 55 |
neither \cmd{\addtocontents} nor \cmd{\label} check for \cs{if@filesw}. \cmd{\cite} \emph{does} |
| 56 |
check \cs{if@filesw}. |
| 57 |
|
| 58 |
\end{document} |