summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ltxmisc/notoccite.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-13 00:40:05 +0000
committerKarl Berry <karl@freefriends.org>2006-01-13 00:40:05 +0000
commit5c2154214afee3119a591c6a9f9447a652d2ef4c (patch)
tree491bffcd0eff2d5c1b2a321fbee6d0db2d201e9b /Master/texmf-dist/tex/latex/ltxmisc/notoccite.sty
parent661380740cba9728be71d20fc9de02348db3c811 (diff)
ltxmisc
git-svn-id: svn://tug.org/texlive/trunk@1476 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ltxmisc/notoccite.sty')
-rw-r--r--Master/texmf-dist/tex/latex/ltxmisc/notoccite.sty43
1 files changed, 43 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/ltxmisc/notoccite.sty b/Master/texmf-dist/tex/latex/ltxmisc/notoccite.sty
new file mode 100644
index 00000000000..af4ec3bd048
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ltxmisc/notoccite.sty
@@ -0,0 +1,43 @@
+% notoccite.sty no t.o.c. cite Jul 20, 2000
+% Donald Arseneau asnd@triumf.ca TRIUMF, Vancouver, Canada,
+% This is unrestricted software contributed to the public domain.
+%
+% Ordinarily, cites used in titles or figure captions also appear in
+% the table of contents and list of figures. If you then run bibtex
+% using the unsrt (unsorted) style, they get numbered starting from 1,
+% not the number they should have in the main text.
+%
+% A good option is to avoid cites in titles, and to specify optional
+% caption text without cites:
+% \caption [Picture of a bird.]{Picture of a bird \cite{audobon}.}
+%
+% If you must use moving cites, you could manage them by deleting toc
+% and lof files, then running latex once, then bibtex. However, the
+% following definition fixes the problem so you don't need to worry
+% about that.
+%
+% *NOTE* This definition works for the ordinary LaTeX definitions
+% for \cite and others (\addtocontents, \label) but it may well
+% fail when used with various packages for citations or cross
+% references.
+%
+% It works by locally setting \@fileswfalse, which is something like
+% \nofiles, but \@fileswfalse does not affect \label or \addtocontents.
+% \nofiles does most of its work by redefining \protected@write, and
+% neither \addtocontents nor \label check for \if@filesw. \cite *does*
+% check \if@filesw.
+
+\ProvidesPackage{notoccite}[2000/07/20]
+\def\@starttoc#1{%
+ \begingroup
+ \@fileswfalse
+ \makeatletter
+ \@input{\jobname.#1}%
+ \endgroup
+ \if@filesw
+ \expandafter\newwrite\csname tf@#1\endcsname
+ \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
+ \fi
+ \@nobreakfalse
+}
+