diff options
author | Karl Berry <karl@freefriends.org> | 2009-09-28 15:28:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-09-28 15:28:40 +0000 |
commit | 0ca968cf4811fe9dee1a22dfbd031510dbcbda70 (patch) | |
tree | ea5a997fcee434f40f13fc8951e00255b7d521de /Master/texmf-dist/source/latex/tools/varioref.dtx | |
parent | a7413da58c33f9b31d87d35b556eb455cefa06eb (diff) |
tools (latex core) update via latex-tds (25sep09)
git-svn-id: svn://tug.org/texlive/trunk@15511 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/tools/varioref.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/tools/varioref.dtx | 110 |
1 files changed, 96 insertions, 14 deletions
diff --git a/Master/texmf-dist/source/latex/tools/varioref.dtx b/Master/texmf-dist/source/latex/tools/varioref.dtx index 9f1ec820a4c..9404a96ab21 100644 --- a/Master/texmf-dist/source/latex/tools/varioref.dtx +++ b/Master/texmf-dist/source/latex/tools/varioref.dtx @@ -1,6 +1,7 @@ % \iffalse meta-comment % -% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 +% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 +% 2006 2008 2009 2009 % The LaTeX3 Project and any individual authors listed elsewhere % in this file. % @@ -21,7 +22,7 @@ % \fi % \iffalse %% Package varioref to use with LaTeX2e -%% Copyright (C) 1992-2006 Frank Mittelbach, all rights reserved. +%% Copyright (C) 1992-2009 Frank Mittelbach, all rights reserved. %% %% For additions or updates to the language options please contact %% the author at @@ -33,10 +34,10 @@ % %<package>\NeedsTeXFormat{LaTeX2e}[1995/05/16] %<package>\ProvidesPackage{varioref} -%<package> [2006/05/13 v1.4p package for extended references (FMi)] +%<package> [2009/09/13 v1.4w package for extended references (FMi)] % \fi % -% \CheckSum{1899} +% \CheckSum{2150} %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z @@ -296,7 +297,7 @@ % If you like to have |\vref| suppress the page number on pages where % label and reference fall onto the same page, but prefer reference to % page numbers otherwise then |\vpagerefnum| can be used. This macro -% hold the current page ``number" when |\vpageref| and friends are +% hold the current page ``number'' when |\vpageref| and friends are % executed. Thus, by defining, for example %\begin{verbatim} %\renewcommand\reftextfaceafter {on page~\thevpagerefnum} @@ -314,6 +315,7 @@ % (Some languages need updating, however.) % It also supports languages currently not in babel; % check the section on options later on. +% % You can also modify some or all of the strings by redefining the % following commands. %\DescribeMacro\reftextbefore @@ -343,6 +345,18 @@ % |\vpageref| commands. As an example see the definitions of % |\reftextbefore| etc.\ \vpageref[below]{reftextbefore}. % +% \begin{itshape} If babel is being used then the above commands need to be +% changed using the Babel mechanism, e.g., +%\begin{verbatim} +%\addto\extrasngerman{% +% \renewcommand\reftextfaceafter {auf der n\"achsten Seite}% +% ... +% } +%\end{verbatim} +% Otherwise babel will reintroduce its own defaults each time the language is +% changed (which happens in particular during |\begin{document}| where the +% main language is selected). +% \end{itshape} % % \subsection{Additions in 1998} % @@ -370,7 +384,7 @@ % As mentioned above the package supports all standard options offered % by the Babel system to customize the strings produced. In addition it % offers the option \texttt{draft} to turn error messages into warnings -% during development. The defaul \texttt{final} produces error message +% during development. The default \texttt{final} produces error message % when a generated string falls onto a page boundary (see next section). % % @@ -657,9 +671,10 @@ % (|adij@di.ufpe.br|). % \changes{v1.0g}{1994/05/18}{Brazil defaults added.} % \changes{v1.4o}{2005/11/07}{Added a few more brazil strings} +% \changes{v1.4r}{2007/05/26}{Misspelling of \cs{extrasbrazil}} % \begin{macrocode} \DeclareOption{brazil} - {\vref@addto\extrabrazil{% + {\vref@addto\extrasbrazil{% \def\reftextfaceafter {na \reftextvario{p\'agina oposta}{pr\'oxima p\'agina}}% \def\reftextfacebefore{na p\'agina \reftextvario{oposta}{anterior}}% @@ -694,6 +709,40 @@ \ref{#1} to~\ref{#2}}% }} % \end{macrocode} +% Text for Bulgarian defaults was contributed by +% Georgi Boshnakov (|georgi.boshnakov@gmail.com|). +% \changes{v1.4q}{2006/05/23}{Added defaults for bulgarian} +% \begin{macrocode} +\DeclareOption{bulgarian}% + {\vref@addto\extrasbulgarian{% + \def\reftextfaceafter{\cyrn\cyra\ + \reftextvario{\cyrs\cyrery\cyrs\cyre\cyrd\cyrn\cyra\cyrt\cyra}% + {\cyrs\cyrl\cyre\cyrd\cyrv\cyra\cyrshch\cyra\cyrt\cyra} + \cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra}% + \def\reftextfacebefore{\cyrn\cyra\ + \reftextvario{\cyrs\cyrery\cyrs\cyre\cyrd\cyrn\cyra\cyrt\cyra}% + {\cyrp\cyrr\cyre\cyrd\cyrn\cyra\cyrt\cyra} + \cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra}% + \def\reftextafter{\cyrn\cyra\ + \reftextvario{\cyrs\cyrl\cyre\cyrd\cyrv\cyra\cyrshch\cyra\cyrt\cyra}% + {\cyrs\cyrl\cyre\cyrd\cyrv\cyra\cyrshch\cyra\cyrt\cyra} + \cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra}% + \def\reftextbefore{\cyrn\cyra\ + \reftextvario{\cyrp\cyrr\cyre\cyrd\cyrn\cyra\cyrt\cyra}% + {\cyrp\cyrr\cyre\cyrd\cyri\cyrsh\cyrn\cyra\cyrt\cyra} + \cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra}% + \def\reftextcurrent{\cyrn\cyra\ + \reftextvario{\cyrt\cyra\cyrz\cyri}% + {\cyrt\cyre\cyrk\cyru\cyrshch\cyra\cyrt\cyra} + \cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra}% + \def\reftextfaraway#1{\cyrn\cyra\ \cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra + ~\pageref{#1}}% + \def\reftextpagerange#1#2{\cyrn\cyra\ + \cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyri + ~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1} \cyrd\cyro~\ref{#2}}% + }} +% \end{macrocode} % Text for catalan defaults was contributed by Robert Fuster\\ % (\verb=rfuster@mat.upv.es=). % \changes{v1.1c}{1997/06/12}{Added defaults for catalan} @@ -967,12 +1016,34 @@ \def\reftextlabelrange#1#2{\ref{#1} ws\nobreakspace\ref{#2}}% }} % \end{macrocode} +% Iselandic defaults suggested by Thorhallur Sverrisson +% (\verb=thorhs@basis.is=). +% \changes{v1.4t}{2007/09/07}{Added defaults for islandic} +% \begin{macrocode} +\DeclareOption{icelandic} + {\vref@addto\extrasicelandic{% + \def\reftextfaceafter {\'{a} \reftextvario{n{\ae}stu}% + {n{\ae}stu} s\'{i}{\dh}u}% + \def\reftextfacebefore{\'{a} \reftextvario{fyrri}% + {fyrri} s\'{i}{\dh}u}% + \def\reftextafter {\'{a} \reftextvario{n{\ae}stu}% + {n{\ae}stu} s\'{i}{\dh}u}% + \def\reftextbefore {\'{a} \reftextvario{fyrri}{fyrri} s\'{i}{\dh}u}% + \def\reftextcurrent {\'{a} \reftextvario{{\th}essari}% + {{\th}essari} s\'{i}{\dh}u}% + \def\reftextfaraway#1{\'{a} s\'{i}{\dh}u~\pageref{#1}}% + \def\reftextpagerange#1#2{\'{a} s\'{i}{\dh}um~\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1} til~\ref{#2}}% + }} +% \end{macrocode} % Defaults for Italian suggested by Giovanni Pensa % (\verb=pensa@dsi.unimi.it=) with i{\TeX}nici. % \changes{v1.1b}{1995/10/19}{Added defaults for Italian} % \changes{v1.2a}{1998/08/22}{Removed incorrect warning} % \changes{v1.4k}{2004/10/30}{Added missing defaults supplied by Lapo Mori} % \changes{v1.4n}{2005/07/24}{Small change} +% \changes{v1.4u}{2009/03/21}{Correction for \cs{reftextfaraway} suggested +% by Lorenzo Pantieri} % \begin{macrocode} \DeclareOption{italian} {\vref@addto\extrasitalian{% @@ -984,7 +1055,7 @@ {successiva}}% \def\reftextbefore {nella pagina precedente}% \def\reftextcurrent {in questa pagina}% - \def\reftextfaraway#1{nella pagina~\pageref{#1}}% + \def\reftextfaraway#1{a pagina~\pageref{#1}}% \def\reftextpagerange#1#2{nelle pagine~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{da~\ref{#1} a~\ref{#2}}% }} @@ -1115,9 +1186,10 @@ % Jos\'e Carlos Oliveira Santos \verb=jcsantos@fc.up.pt=. % \changes{v1.2b}{1999/11/25}{Added portuguese defaults} % \changes{v1.2c}{1999/12/02}{Added more portuguese defaults} +% \changes{v1.4r}{2007/05/26}{Misspelling of \cs{extrasportuges}} % \begin{macrocode} \DeclareOption{portuges} - {\vref@addto\extraportuges{% + {\vref@addto\extrasportuges{% \def\reftextfaceafter {na \reftextvario{p\'agina ao lado}{pr\'oxima p\'agina}}% \def\reftextfacebefore{na p\'agina \reftextvario{ao lado}{anterior}}% @@ -1129,11 +1201,15 @@ \def\reftextpagerange#1#2{nas p\'aginas~\pageref{#1}--\pageref{#2}}% \def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}% }} +% \end{macrocode} +% \changes{v1.4v}{2009/06/13}{Incorrect text in \cs{reftextafter} (pr/4070)} +% \begin{macrocode} \DeclareOption{romanian} {\vref@addto\extrasromanian{% \def\reftextfaceafter {pe pagina \reftextvario{opus\u{a}}{urm\u{a}toarei}}% \def\reftextfacebefore{pe pagina \reftextvario{opus\u{a}}{precedentei}}% - \def\reftextafter {pe pagina \reftextvario{dup\u{a}}{urm\u{a}toarea}}% + \def\reftextafter {\reftextvario{pe pagina urm\u{a}toare}% + {pe urm\u{a}toarea pagin\u{a}}}% \def\reftextbefore {pe pagina \reftextvario{dinaintea}{ precedentei}}% \def\reftextcurrent {pe aceast\u{a} pagin\u{a}}% @@ -1813,6 +1889,8 @@ % % \begin{macro}{\vref@pagenum} % \changes{v1.2a}{1998/08/01}{Macro added} +% \changes{v1.4w}{2009/09/13}{Use \cs{protected@edef} to avoid problems +% in complicated setups, e.g., microtype (pr/4080)} % This command takes a label as |#1| extracts the page number % associated with it and saves the result in a csname which is % passed as |#1|. If the label isn't associates with a page number @@ -1823,7 +1901,7 @@ % \begin{macrocode} \def\vref@pagenum#1#2{% \@ifundefined{r@#2}{\@namedef{r@#2}{{??}{??}}}{}% - \edef#1{\expandafter\expandafter\expandafter + \protected@edef#1{\expandafter\expandafter\expandafter \@cdr\csname r@#2\endcsname \@nil}% } @@ -1849,6 +1927,8 @@ % \begin{macro}{\@svpagerefrange} % \changes{v1.2a}{1998/08/01}{Macro added} % \changes{v1.3b}{2001/04/14}{Scan for star form} +% \changes{v1.4s}{2007/08/07} +% {Prevent loss of brackets} % If both labels refer to the same page then we produce a % |\vpageref|. Otherwise we produce the result of % |\reftextpagerange|. @@ -1863,7 +1943,7 @@ \vrefpagenum\@tempa{#2}% \vrefpagenum\@tempb{#3}% \ifx\@tempa\@tempb - \vpageref*[#1]{#2}% + \vpageref*[{#1}]{#2}% \else \reftextpagerange{#2}{#3}% \fi @@ -1875,7 +1955,7 @@ \vrefpagenum\@tempa{#2}% \vrefpagenum\@tempb{#3}% \ifx\@tempa\@tempb - \vpageref[#1]{#2}% + \vpageref[{#1}]{#2}% \else \reftextpagerange{#2}{#3}% \fi @@ -1892,9 +1972,11 @@ % % \begin{macro}{\vrefrange} % \changes{v1.2a}{1998/08/01}{Macro added} +% \changes{v1.4s}{2006/08/07} +% {Prevent loss of brackets} % \begin{macrocode} \newcommand\vrefrange[3][\reftextcurrent] - {\reftextlabelrange{#2}{#3} \vpagerefrange[#1]{#2}{#3}} + {\reftextlabelrange{#2}{#3} \vpagerefrange[{#1}]{#2}{#3}} % \end{macrocode} % \end{macro} % |