summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-12 23:55:35 +0000
committerKarl Berry <karl@freefriends.org>2006-01-12 23:55:35 +0000
commitde20a197ac285de9f243c60bc1c0d4694083c6ea (patch)
tree27ea3feba0e98a82b78e88c9e38b8e832e0c7a55 /Master/texmf-dist/tex
parent107474d38006c270570c5310ddd47f194d2405af (diff)
fancyref
git-svn-id: svn://tug.org/texlive/trunk@906 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/fancyref/fancyref.sty511
1 files changed, 511 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/fancyref/fancyref.sty b/Master/texmf-dist/tex/latex/fancyref/fancyref.sty
new file mode 100644
index 00000000000..3e1d329fcb6
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/fancyref/fancyref.sty
@@ -0,0 +1,511 @@
+%%
+%% This is file `fancyref.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% fancyref.dtx (with options: `package')
+%%
+%% LaTeX package for fancy cross-referencing.
+%%
+%% Copyright (C) 1999 Axel Reichert
+%% See the files README and COPYING.
+%%
+%% \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
+%% Digits \0\1\2\3\4\5\6\7\8\9
+%% Exclamation \! Double quote \" Hash (number) \#
+%% Dollar \$ Percent \% Ampersand \&
+%% Acute accent \' Left paren \( Right paren \)
+%% Asterisk \* Plus \+ Comma \,
+%% Minus \- Point \. Solidus \/
+%% Colon \: Semicolon \; Less than \<
+%% Equals \= Greater than \> Question mark \?
+%% Commercial at \@ Left bracket \[ Backslash \\
+%% Right bracket \] Circumflex \^ Underscore \_
+%% Grave accent \` Left brace \{ Vertical bar \|
+%% Right brace \} Tilde \~}
+\NeedsTeXFormat{LaTeX2e}[1995/06/01]%
+\ProvidesPackage{fancyref}[%
+ 1999/02/03 v0.9c Fancy cross-referencing%
+]%
+\newcommand*{\@fancyref@add@to}[2]{%
+ \ifx#1\@undefined
+ \newcommand*{#1}{#2}%
+ \else
+ \ifx#1\relax
+ \newcommand*{#1}{#2}%
+ \else
+ \bgroup
+ \toks@\expandafter{#1#2}%
+ \xdef#1{\the\toks@}%
+ \egroup
+ \fi
+ \fi
+}%
+\newcommand*{\@fancyref@temp}{\@empty}%
+\newcommand*{\fancyrefaddcaptions}[2]{%
+ \@ifundefined{captions#1}{%
+ #2%
+ }{%
+ \expandafter
+ \@fancyref@add@to\csname captions#1\endcsname{#2}%
+ \AtBeginDocument{%
+ \let\@fancyref@temp=\languagename
+ \csname captions#1\endcsname
+ \csname captions\@fancyref@temp\endcsname
+ \let\@fancyref@temp=\@empty
+ }%
+ }%
+}%
+\newcommand*{\fancyrefhook}[1]{#1}%
+\newcommand*{\fancyrefloosespacing}{~}%
+\newcommand*{\fancyreftightspacing}{\,}%
+\newcommand*{\fancyrefdefaultformat}{\@empty}%
+\newcommand*{\Frefchapname}{\@empty}%
+\newcommand*{\Frefenumname}{\@empty}%
+\newcommand*{\Frefeqname}{\@empty}%
+\newcommand*{\Freffigname}{\@empty}%
+\newcommand*{\Freffnname}{\@empty}%
+\newcommand*{\Frefonname}{\@empty}%
+\newcommand*{\Frefpgname}{\@empty}%
+\newcommand*{\Frefsecname}{\@empty}%
+\newcommand*{\Frefseename}{\@empty}%
+\newcommand*{\Freftabname}{\@empty}%
+\newcommand*{\Freffigshortname}{\@empty}%
+\newcommand*{\Frefpgshortname}{\@empty}%
+\newcommand*{\Freftabshortname}{\@empty}%
+\newcommand*{\frefchapname}{\@empty}%
+\newcommand*{\frefenumname}{\@empty}%
+\newcommand*{\frefeqname}{\@empty}%
+\newcommand*{\freffigname}{\@empty}%
+\newcommand*{\freffnname}{\@empty}%
+\newcommand*{\frefonname}{\@empty}%
+\newcommand*{\frefpgname}{\@empty}%
+\newcommand*{\frefsecname}{\@empty}%
+\newcommand*{\frefseename}{\@empty}%
+\newcommand*{\freftabname}{\@empty}%
+\newcommand*{\freffigshortname}{\@empty}%
+\newcommand*{\frefpgshortname}{\@empty}%
+\newcommand*{\freftabshortname}{\@empty}%
+\DeclareOption{english}{%
+ \fancyrefaddcaptions{english}{%
+ \providecommand*{\chaptername}{Chapter}%
+ \providecommand*{\figurename}{Figure}%
+ \providecommand*{\pagename}{Page}%
+ \providecommand*{\tablename}{Table}%
+ \renewcommand*{\Frefchapname}{\chaptername}%
+ \renewcommand*{\Frefenumname}{Item}%
+ \renewcommand*{\Frefeqname}{Equation}%
+ \renewcommand*{\Freffigname}{\figurename}%
+ \renewcommand*{\Freffnname}{Footnote}%
+ \renewcommand*{\Frefonname}{On}%
+ \renewcommand*{\Frefpgname}{\pagename}%
+ \renewcommand*{\Frefsecname}{Section}%
+ \renewcommand*{\Frefseename}{See}%
+ \renewcommand*{\Freftabname}{\tablename}%
+ \renewcommand*{\Freffigshortname}{Fig.}%
+ \renewcommand*{\Frefpgshortname}{P.}%
+ \renewcommand*{\Freftabshortname}{Tab.}%
+ \renewcommand*{\frefchapname}{%
+ \MakeLowercase{\Frefchapname}%
+ }%
+ \renewcommand*{\frefenumname}{%
+ \MakeLowercase{\Frefenumname}%
+ }%
+ \renewcommand*{\frefeqname}{%
+ \MakeLowercase{\Frefeqname}%
+ }%
+ \renewcommand*{\freffigname}{%
+ \MakeLowercase{\Freffigname}%
+ }%
+ \renewcommand*{\freffnname}{%
+ \MakeLowercase{\Freffnname}%
+ }%
+ \renewcommand*{\frefonname}{%
+ \MakeLowercase{\Frefonname}%
+ }%
+ \renewcommand*{\frefpgname}{%
+ \MakeLowercase{\Frefpgname}%
+ }%
+ \renewcommand*{\frefsecname}{%
+ \MakeLowercase{\Frefsecname}%
+ }%
+ \renewcommand*{\frefseename}{%
+ \MakeLowercase{\Frefseename}%
+ }%
+ \renewcommand*{\freftabname}{%
+ \MakeLowercase{\Freftabname}%
+ }%
+ \renewcommand*{\freffigshortname}{%
+ \MakeLowercase{\Freffigshortname}%
+ }%
+ \renewcommand*{\frefpgshortname}{%
+ \MakeLowercase{\Frefpgshortname}%
+ }%
+ \renewcommand*{\freftabshortname}{%
+ \MakeLowercase{\Freftabshortname}%
+ }%
+ }%
+ \@ifundefined{captionsenglish}{%
+ }{%
+ \selectlanguage{english}%
+ }%
+ \PassOptionsToPackage{\CurrentOption}{varioref}%
+}%
+\DeclareOption{german}{%
+ \fancyrefaddcaptions{german}{%
+ \providecommand*{\chaptername}{Kapitel}%
+ \providecommand*{\figurename}{Abbildung}%
+ \providecommand*{\pagename}{Seite}%
+ \providecommand*{\tablename}{Tabelle}%
+ \renewcommand*{\Frefchapname}{\chaptername}%
+ \renewcommand*{\Frefenumname}{Punkt}%
+ \renewcommand*{\Frefeqname}{Gleichung}%
+ \renewcommand*{\Freffigname}{\figurename}%
+ \renewcommand*{\Freffigshortname}{Abb.}%
+ \renewcommand*{\Freffnname}{Fu\ss note}%
+ \renewcommand*{\Frefonname}{Auf}%
+ \renewcommand*{\Frefpgname}{\pagename}%
+ \renewcommand*{\Frefpgshortname}{S.}%
+ \renewcommand*{\Frefsecname}{Abschnitt}%
+ \renewcommand*{\Frefseename}{Siehe}%
+ \renewcommand*{\Freftabname}{\tablename}%
+ \renewcommand*{\Freftabshortname}{Tab.}%
+ \renewcommand*{\frefchapname}{\Frefchapname}%
+ \renewcommand*{\frefenumname}{\Frefenumname}%
+ \renewcommand*{\frefeqname}{\Frefeqname}%
+ \renewcommand*{\freffigname}{\Freffigname}%
+ \renewcommand*{\freffigshortname}{\Freffigshortname}%
+ \renewcommand*{\freffnname}{\Freffnname}%
+ \renewcommand*{\frefonname}{%
+ \MakeLowercase{\Frefonname}%
+ }%
+ \renewcommand*{\frefpgname}{\Frefpgname}%
+ \renewcommand*{\frefpgshortname}{\Frefpgshortname}%
+ \renewcommand*{\frefsecname}{\Frefsecname}%
+ \renewcommand*{\frefseename}{%
+ \MakeLowercase{\Frefseename}%
+ }%
+ \renewcommand*{\freftabname}{\Freftabname}%
+ \renewcommand*{\freftabshortname}{\Freftabshortname}%
+ }%
+ \@ifundefined{captionsgerman}{%
+ }{%
+ \selectlanguage{german}%
+ }%
+ \PassOptionsToPackage{\CurrentOption}{varioref}%
+}%
+\DeclareOption{loose}{%
+ \newcommand*{\fancyrefdefaultspacing}{%
+ \fancyrefloosespacing
+ }%
+}%
+\DeclareOption{margin}{%
+ \renewcommand{\fancyrefhook}[1]{%
+ \mbox{}%
+ \marginpar{%
+ \raggedright\hspace{0pt}\footnotesize
+ \ensuremath{\m@th\rightarrow}~#1%
+ }%
+ }%
+}%
+\DeclareOption{paren}{%
+ \renewcommand*{\fancyrefhook}[1]{(#1)}%
+}%
+\DeclareOption{plain}{%
+ \renewcommand*{\fancyrefdefaultformat}{plain}%
+}%
+\DeclareOption{tight}{%
+ \newcommand*{\fancyrefdefaultspacing}{%
+ \fancyreftightspacing
+ }%
+}%
+\DeclareOption{vario}{%
+ \renewcommand*{\fancyrefdefaultformat}{vario}%
+}%
+\DeclareOption*{%
+ \PackageError{fancyref}{%
+ Unknown option ``\CurrentOption''%
+ }{%
+ The option ``\CurrentOption'' was not declared in
+ package ``fancyref'',\MessageBreak
+ perhaps you have only misspelled its name.\MessageBreak
+ Currently only the languages ``english'' and
+ ``german'' are defined.\MessageBreak
+ Try typing <return> to proceed. Most likely your
+ output will be wrong,\MessageBreak
+ e. g. ``Figure'' instead of ``Abbildung''.%
+ }%
+ \PassOptionsToPackage{\CurrentOption}{varioref}%
+}%
+\ExecuteOptions{english,loose,vario}%
+\ProcessOptions*%
+\RequirePackage{varioref}%
+\newcommand*{\fancyrefchaplabelprefix}{chap}%
+\newcommand*{\fancyrefenumlabelprefix}{enum}%
+\newcommand*{\fancyrefeqlabelprefix}{eq}%
+\newcommand*{\fancyreffiglabelprefix}{fig}%
+\newcommand*{\fancyreffnlabelprefix}{fn}%
+\newcommand*{\fancyrefseclabelprefix}{sec}%
+\newcommand*{\fancyreftablabelprefix}{tab}%
+\newcommand*{\@fancyref@ren}{\@empty}%
+\newcommand*{\@fancyref@append@ren}[2]{%
+ \ifx\relax#1%
+ \def#1{\@fancyref@ren{#2}}%
+ \else
+ \expandafter\def\expandafter#1%
+ \expandafter{#1\@fancyref@ren{#2}}%
+ \fi
+}%
+\newcommand*{\@fancyref@check@prefix}[1]{%
+ \expandafter\let\expandafter\@fancyref@old@prefix
+ \csname @fancyref@saved@prefix\string#1\endcsname
+ \ifx\@fancyref@old@prefix#1%
+ \else
+ \def\@fancyref@ren##1{%
+ \expandafter
+ \let\csname fr@##1@#1\expandafter\endcsname
+ \csname fr@##1@\@fancyref@old@prefix\endcsname
+ \expandafter
+ \let\csname fr@##1@\@fancyref@old@prefix\endcsname
+ \@undefined
+ }%
+ \csname @fr@ren@list\string#1\endcsname
+ \def\@fancyref@ren##1{%
+ \expandafter
+ \let\csname Fr@##1@#1\expandafter\endcsname
+ \csname Fr@##1@\@fancyref@old@prefix\endcsname
+ \expandafter
+ \let\csname Fr@##1@\@fancyref@old@prefix\endcsname
+ \@undefined
+ }%
+ \csname @Fr@ren@list\string#1\endcsname
+ \expandafter\let
+ \csname @fancyref@saved@prefix\string#1\endcsname#1%
+ \fi
+}%
+\newcommand*{\fancyrefchangeprefix}[2]{%
+ \renewcommand*{#1}{#2}%
+ \@fancyref@check@prefix{#1}%
+}%
+\newcommand{\frefformat}[2]{%
+ \@fancyref@check@prefix{#2}%
+ \expandafter\@fancyref@append@ren
+ \csname @fr@ren@list\string#2\endcsname{#1}%
+ \@namedef{fr@#1@#2}##1##2##3%
+}%
+\newcommand{\Frefformat}[2]{%
+ \@fancyref@check@prefix{#2}%
+ \expandafter\@fancyref@append@ren
+ \csname @Fr@ren@list\string#2\endcsname{#1}%
+ \@namedef{Fr@#1@#2}##1##2##3%
+}%
+\frefformat{vario}{\fancyrefchaplabelprefix}{%
+ \frefchapname\fancyrefdefaultspacing#1#3%
+}%
+\frefformat{plain}{\fancyrefchaplabelprefix}{%
+ \frefchapname\fancyrefdefaultspacing#1%
+}%
+\frefformat{vario}{\fancyrefenumlabelprefix}{%
+ \frefenumname\fancyrefdefaultspacing#1#3%
+}%
+\frefformat{plain}{\fancyrefenumlabelprefix}{%
+ \frefenumname\fancyrefdefaultspacing#1%
+}%
+\@ifundefined{tagform@}{%
+ \frefformat{vario}{\fancyrefeqlabelprefix}{%
+ \frefeqname\fancyrefdefaultspacing\textup{(#1)}#3%
+ }%
+ \frefformat{plain}{\fancyrefeqlabelprefix}{%
+ \frefeqname\fancyrefdefaultspacing\textup{(#1)}%
+ }%
+}{%
+ \frefformat{vario}{\fancyrefeqlabelprefix}{%
+ \frefeqname\fancyrefdefaultspacing
+ \textup{\tagform@{#1}}#3%
+ }%
+ \frefformat{plain}{\fancyrefeqlabelprefix}{%
+ \frefeqname\fancyrefdefaultspacing
+ \textup{\tagform@{#1}}%
+ }%
+}%
+\frefformat{margin}{\fancyreffiglabelprefix}{%
+ \mbox{}\marginpar{%
+ \raggedright\hspace{0pt}\footnotesize
+ \ensuremath{\m@th\rightarrow}~%
+ \Freffigshortname\fancyreftightspacing#1,
+ \frefpgshortname\fancyreftightspacing#2%
+ }%
+}%
+\frefformat{main}{\fancyreffiglabelprefix}{%
+ \textbf{\freffigname\fancyrefdefaultspacing#1}#3%
+}%
+\frefformat{vario}{\fancyreffiglabelprefix}{%
+ \freffigname\fancyrefdefaultspacing#1#3%
+}%
+\frefformat{plain}{\fancyreffiglabelprefix}{%
+ \freffigname\fancyrefdefaultspacing#1%
+}%
+\frefformat{vario}{\fancyreffnlabelprefix}{%
+ \freffnname\fancyrefdefaultspacing#1#3%
+}%
+\frefformat{plain}{\fancyreffnlabelprefix}{%
+ \freffnname\fancyrefdefaultspacing#1%
+}%
+\frefformat{vario}{\fancyrefseclabelprefix}{%
+ \frefsecname\fancyrefdefaultspacing#1#3%
+}%
+\frefformat{plain}{\fancyrefseclabelprefix}{%
+ \frefsecname\fancyrefdefaultspacing#1%
+}%
+\frefformat{margin}{\fancyreftablabelprefix}{%
+ \mbox{}\marginpar{%
+ \raggedright\hspace{0pt}\footnotesize
+ \ensuremath{\m@th\rightarrow}~%
+ \Freftabshortname\fancyreftightspacing#1,
+ \frefpgshortname\fancyreftightspacing#2%
+ }%
+}%
+\frefformat{main}{\fancyreftablabelprefix}{%
+ \textbf{\freftabname\fancyrefdefaultspacing#1}#3%
+}%
+\frefformat{vario}{\fancyreftablabelprefix}{%
+ \freftabname\fancyrefdefaultspacing#1#3%
+}%
+\frefformat{plain}{\fancyreftablabelprefix}{%
+ \freftabname\fancyrefdefaultspacing#1%
+}%
+\Frefformat{vario}{\fancyrefchaplabelprefix}{%
+ \Frefchapname\fancyrefdefaultspacing#1#3%
+}%
+\Frefformat{plain}{\fancyrefchaplabelprefix}{%
+ \Frefchapname\fancyrefdefaultspacing#1%
+}%
+\Frefformat{vario}{\fancyrefenumlabelprefix}{%
+ \Frefenumname\fancyrefdefaultspacing#1#3%
+}%
+\Frefformat{plain}{\fancyrefenumlabelprefix}{%
+ \Frefenumname\fancyrefdefaultspacing#1%
+}%
+\@ifundefined{tagform@}{%
+ \Frefformat{vario}{\fancyrefeqlabelprefix}{%
+ \Frefeqname\fancyrefdefaultspacing\textup{(#1)}#3%
+ }%
+ \Frefformat{plain}{\fancyrefeqlabelprefix}{%
+ \Frefeqname\fancyrefdefaultspacing\textup{(#1)}%
+ }%
+}{%
+ \Frefformat{vario}{\fancyrefeqlabelprefix}{%
+ \Frefeqname\fancyrefdefaultspacing
+ \textup{\tagform@{#1}}#3%
+ }%
+ \Frefformat{plain}{\fancyrefeqlabelprefix}{%
+ \Frefeqname\fancyrefdefaultspacing
+ \textup{\tagform@{#1}}%
+ }%
+}%
+\Frefformat{margin}{\fancyreffiglabelprefix}{%
+ \mbox{}\marginpar{%
+ \raggedright\hspace{0pt}\footnotesize
+ \ensuremath{\m@th\rightarrow}~%
+ \Freffigshortname\fancyreftightspacing#1,
+ \frefpgshortname\fancyreftightspacing#2%
+ }%
+}%
+\Frefformat{main}{\fancyreffiglabelprefix}{%
+ \textbf{\Freffigname\fancyrefdefaultspacing#1}#3%
+}%
+\Frefformat{vario}{\fancyreffiglabelprefix}{%
+ \Freffigname\fancyrefdefaultspacing#1#3%
+}%
+\Frefformat{plain}{\fancyreffiglabelprefix}{%
+ \Freffigname\fancyrefdefaultspacing#1%
+}%
+\Frefformat{vario}{\fancyreffnlabelprefix}{%
+ \Freffnname\fancyrefdefaultspacing#1#3%
+}%
+\Frefformat{plain}{\fancyreffnlabelprefix}{%
+ \Freffnname\fancyrefdefaultspacing#1%
+}%
+\Frefformat{vario}{\fancyrefseclabelprefix}{%
+ \Frefsecname\fancyrefdefaultspacing#1#3%
+}%
+\Frefformat{plain}{\fancyrefseclabelprefix}{%
+ \Frefsecname\fancyrefdefaultspacing#1%
+}%
+\Frefformat{margin}{\fancyreftablabelprefix}{%
+ \mbox{}\marginpar{%
+ \raggedright\hspace{0pt}\footnotesize
+ \ensuremath{\m@th\rightarrow}~%
+ \Freftabshortname\fancyreftightspacing#1,
+ \frefpgshortname\fancyreftightspacing#2%
+ }%
+}%
+\Frefformat{main}{\fancyreftablabelprefix}{%
+ \textbf{\Freftabname\fancyrefdefaultspacing#1}#3%
+}%
+\Frefformat{vario}{\fancyreftablabelprefix}{%
+ \Freftabname\fancyrefdefaultspacing#1#3%
+}%
+\Frefformat{plain}{\fancyreftablabelprefix}{%
+ \Freftabname\fancyrefdefaultspacing#1%
+}%
+\newcommand*{\fancyrefargdelim}{:}%
+\begingroup \catcode`\|=0 |catcode`|\=12
+|toks0={|endgroup
+ |def|backslashchar{\}}
+|the|toks0 \relax
+\newcommand*{\@fancyref@page@ref}{\@ifnextchar[%]
+ \@vpageref{\@vpageref[\unskip]}%
+}%
+\newcommand*{\@f@ref}[4]{%
+ \@ifundefined{#1r@#2@#3}{%
+ \PackageError{fancyref}{%
+ \backslashchar#1ref\space format ``#2''
+ undefined\MessageBreak
+ for label type ``#3''%
+ }{%
+ The format ``#2'' was not defined for the label type
+ ``#3''\MessageBreak
+ and the \backslashchar#1ref\space command. Perhaps
+ you have only misspelled its name.\MessageBreak
+ Otherwise you will have to define it with
+ \protect\new#1refformat\MessageBreak
+ prior to using it.%
+ }%
+ }{%
+ \fancyrefhook{%
+ \@nameuse{#1r@#2@#3}%
+ {\ref{#3\fancyrefargdelim#4}}%
+ {\pageref{#3\fancyrefargdelim#4}}%
+ {\@fancyref@page@ref{#3\fancyrefargdelim#4}}%
+ }%
+ }%
+}%
+\newcommand*{\@fref}{\@empty}%
+\newcommand*{\fref}[2][\fancyrefdefaultformat]{%
+ \edef\@fref{%
+ \def\noexpand\@fref
+ ####1\fancyrefargdelim####2\noexpand\@fref{%
+ \noexpand\@f@ref{f}{#1}{####1}{####2}%
+ }%
+ }%
+ \@fref
+ \@fref#2\@fref
+}%
+\newcommand*{\@Fref}{\@empty}%
+\newcommand*{\Fref}[2][\fancyrefdefaultformat]{%
+ \edef\@Fref{%
+ \def\noexpand\@Fref
+ ####1\fancyrefargdelim####2\noexpand\@Fref{%
+ \noexpand\@f@ref{F}{#1}{####1}{####2}%
+ }%
+ }%
+ \@Fref
+ \@Fref#2\@Fref
+}%
+\endinput
+%%
+%% End of file `fancyref.sty'.