From 6a5c8c809990518333962bdfefc346581304ddd1 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 13 Jan 2006 00:05:15 +0000 Subject: refstyle git-svn-id: svn://tug.org/texlive/trunk@1272 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/refstyle/refstyle.cfg | 237 +++++++++++++++++ Master/texmf-dist/tex/latex/refstyle/refstyle.sty | 298 ++++++++++++++++++++++ Master/texmf-dist/tex/latex/refstyle/reftmpl.cfg | 102 ++++++++ 3 files changed, 637 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/refstyle/refstyle.cfg create mode 100644 Master/texmf-dist/tex/latex/refstyle/refstyle.sty create mode 100644 Master/texmf-dist/tex/latex/refstyle/reftmpl.cfg (limited to 'Master/texmf-dist/tex/latex/refstyle') diff --git a/Master/texmf-dist/tex/latex/refstyle/refstyle.cfg b/Master/texmf-dist/tex/latex/refstyle/refstyle.cfg new file mode 100644 index 00000000000..79444d69491 --- /dev/null +++ b/Master/texmf-dist/tex/latex/refstyle/refstyle.cfg @@ -0,0 +1,237 @@ +%% +%% This is file `refstyle.cfg', +%% +%% Configuration file for use with the refstyle package +%% +%% +%% (c) 2003 Danie Els +%% +%% This file is distributed under the terms of the LaTeX Project Public +%% License from CTAN archives in directory macros/latex/base/lppl.txt. +%% Either version 1.0 or, at your option, any later version. +%% +%% This file is completely free and comes without any warranty. +%% +%% Send comments and ideas or error reports on the package to +%% Danie Els +%% + +\ProvidesFile{refstyle.cfg} + [2003/04/23 v0.1 % + Configuration file for refstyle + (DNJ Els)] + + +%%--- DEFAULT LANGUAGE OPTIONS ------------------- + +\newcommand\RSafrikaans{% + \def\RSrngtxt{\space tot~}% + \def\RSlsttxt{\space en~}% + \def\RSparttxt{Deel~}% + \def\RSpartstxt{Dele~}% + \def\RSParttxt{Deel~}% + \def\RSPartstxt{Dele~}% + \def\RSappendixname{bylae~}% + \def\RSAppendixname{Bylae~}% + \def\RSappendicesname{bylaes~}% + \def\RSAppendicesname{Bylaes~}% + \def\RSchaptername{hoofstuk~}% + \def\RSChaptername{Hoofstuk~}% + \def\RSchaptersname{hoofstukke~}% + \def\RSChaptersname{Hoofstukke~}% + \def\RSsectxt{afdeling~}% + \def\RSsecstxt{afdelings~}% + \def\RSSectxt{Afdeling~}% + \def\RSSecstxt{Afdelings~}% + \def\RSeqtxt{vergelyking~}% + \def\RSeqstxt{vergelykings~}% + \def\RSEqtxt{Vergelyking~}% + \def\RSEqstxt{Vergelyking~}% + \def\RSfigtxt{figuur~}% + \def\RSfigstxt{figure~}% + \def\RSFigtxt{Figuur~}% + \def\RSFigstxt{Figure~}% + \def\RStabtxt{tabel~}% + \def\RStabstxt{tabelle~}% + \def\RSTabtxt{Tabel~}% + \def\RSTabstxt{Tabelle~}% + \def\RSfootntxt{footnota~}% + \def\RSfootnstxt{footnotas~}% + \def\RSFootntxt{Footnota~}% + \def\RSFootnstxt{Footnotas~}% + } + +\newcommand\RSenglish{% + \def\RSrngtxt{\space to~}% + \def\RSlsttxt{\space and~}% + \def\RSparttxt{Part~}% + \def\RSpartstxt{Parts~}% + \def\RSParttxt{Part~}% + \def\RSPartstxt{Parts~}% + \def\RSappendixname{appendix~}% + \def\RSAppendixname{Appendix~}% + \def\RSappendicesname{appendices~}% + \def\RSAppendicesname{Appendices~}% + \def\RSchaptername{chapter~}% + \def\RSChaptername{Chapter~}% + \def\RSchaptersname{chapters~}% + \def\RSChaptersname{Chapters~}% + \def\RSsectxt{section~}% + \def\RSsecstxt{sections~}% + \def\RSSectxt{Section~}% + \def\RSSecstxt{Sections~}% + \def\RSeqtxt{equation~}% + \def\RSeqstxt{equations~}% + \def\RSEqtxt{Equation~}% + \def\RSEqstxt{Equations~}% + \def\RSfigtxt{figure~}% + \def\RSfigstxt{figures~}% + \def\RSFigtxt{Figure~}% + \def\RSFigstxt{Figures~}% + \def\RStabtxt{table~}% + \def\RStabstxt{tables~}% + \def\RSTabtxt{Table~}% + \def\RSTabstxt{Tables~}% + \def\RSfootntxt{footnote~}% + \def\RSfootnstxt{footnotes~}% + \def\RSFootntxt{Footnote~}% + \def\RSFootnstxt{Footnotes~}% + } +\RSenglish% Default + +\DeclareLangOpt{afrikaans}{\RSafrikaans} +\DeclareLangOpt{english}{\RSenglish} +\DeclareLangOpt{USenglish}{\RSenglish} +\DeclareLangOpt{american}{\RSenglish} +\DeclareLangOpt{UKenglish}{\RSenglish} +\DeclareLangOpt{british}{\RSenglish} +\DeclareLangOpt{canadian}{\RSenglish} + + +%%--- TEMPLATE FOR PARTS ------------------------- + + \newref{part}{% + name = \RSparttxt, + names = \RSpartstxt, + Name = \RSPparttxt, + Names = \RSPartstxt, + rngtxt = \RSrngtxt, + lsttxt = \RSlsttxt} + +%%--- TEMPLATE FOR CHAPTERS & APPENDIXES -------- +\providecommand*{\p@chapter}{} +\AtBeginDocument{% +\RS@ifundefined{chapter}{}{% + \RS@ifundefined{@chapapp}% + {\renewcommand*{\p@chapter}{\string\chpname{\chaptername}}}% AMS + {\renewcommand*{\p@chapter}{\string\chpname{\@chapapp}}}% Normal + }% +} + +\newcommand*{\chpname}[1]{} + +\newcommand*{\RS@chpname}[1]{% + \ifRSnameon + \edef\RS@tmpa{#1}% + \edef\RS@tmpb{\appendixname}% + \ifx\RS@tmpa\RS@tmpb\relax% + \ifRSplural + \ifRScapname \RSAppendicesname \else \RSappendicesname \fi + \else + \ifRScapname \RSAppendixname \else \RSappendixname \fi + \fi + \else + \ifRSplural + \ifRScapname \RSChaptersname \else \RSchaptersname \fi + \else + \ifRScapname \RSChaptername \else \RSchaptername \fi + \fi + \fi + \fi} + + \newref{chap}{% + refcmd = {{\let\chpname=\RS@chpname\ref{#1}}}, + rngtxt = \RSrngtxt, + lsttxt = \RSlsttxt} + +%%--- TEMPLATE FOR SECTIONS --------------------- + + \newref{sec}{% + name = \RSsectxt, + names = \RSsecstxt, + Name = \RSSectxt, + Names = \RSSecstxt, + refcmd = {\S\ref{#1}}, + rngtxt = \RSrngtxt, + lsttxt = \RSlsttxt} + +%%--- TEMPLATE FOR EQUATIONS -------------------- +\newcommand*{\RSeqrefform}[1]{\textup{(\ref{#1})}} + +\@ifpackageloaded{amsmath}% + {\let\AMSeqref\eqref + \let\eqref\relax}% + {} + +\newref{eq}{% + name = \RSeqtxt, + names = \RSeqstxt, + Name = \RSEqtxt, + Names = \RSEqstxt, + refcmd = \RSeqrefform{#1}, + rngtxt = \RSrngtxt, + lsttxt = \RSlsttxt} + +\let\RSeqref\eqref +\let\eqref\relax + +\AtBeginDocument{% + \@ifpackageloaded{amsmath}% + {\RS@ifundefined{AMSeqref}{\let\AMSeqref\eqref}{}% + \let\RSeqrefform\AMSeqref}% + {}% + \let\eqref=\RSeqref + } + + + +%%--- TEMPLATE FOR FIGURES ---------------------- + + \newref{fig}{% + name = \RSfigtxt, + names = \RSfigstxt, + Name = \RSFigtxt, + Names = \RSFigstxt, + rngtxt = \RSrngtxt, + lsttxt = \RSlsttxt} + +%%--- TEMPLATE FOR TABLES ----------------------- + + \newref{tab}{% + name = \RStabtxt, + names = \RStabstxt, + Name = \RSTabtxt, + Names = \RSTabstxt, + rngtxt = \RSrngtxt, + lsttxt = \RSlsttxt} + +%%--- TEMPLATE FOR FOOTNOTES -------------------- + + \newcommand{\RSfnmark}[1]{% + \begingroup + \unrestored@protected@xdef\@thefnmark{\ref{#1}}% + \endgroup + \@footnotemark} + + \newref{fn}{% + name = \RSfootntxt, + names = \RSfootnstxt, + Name = \RSFootntxt, + Names = \RSFootnstxt, + refcmd = {\ifRSstar\RSfnmark{#1}\else(\ref{#1})\fi}, + rngtxt = \RSrngtxt, + lsttxt = \RSlsttxt} + +\endinput +%% +%% End of file `refstyle.cfg'. diff --git a/Master/texmf-dist/tex/latex/refstyle/refstyle.sty b/Master/texmf-dist/tex/latex/refstyle/refstyle.sty new file mode 100644 index 00000000000..cba88645c90 --- /dev/null +++ b/Master/texmf-dist/tex/latex/refstyle/refstyle.sty @@ -0,0 +1,298 @@ +%% +%% This is file `refstyle.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% refstyle.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright (C) 2003 by Danie Els +%% +%% This file may be distributed and/or modified under the conditions of +%% the LaTeX Project Public License, either version 1.2 of this license +%% or (at your option) any later version. The latest version of this +%% license is in: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.2 or later is part of all distributions of LaTeX version +%% 1999/12/01 or later. +%% + + +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{refstyle} + [2003/04/23 v0.1 Reference formatting (DNJ Els)] +\newcommand*{\RS@pkgname}{refstyle} +\RequirePackage{keyval} +\@ifundefined{vref@space}{\let\vref@space\space}{} +\newcommand*{\RS@namelet}[1]{\expandafter\let\csname #1\endcsname} +\newcommand*{\RS@nameuse}[1]{\csname #1\endcsname} +\newcommand*{\RS@namedef}[1]{\expandafter\def\csname #1\endcsname} +\newcommand*{\RS@robustnamedef}[1]{% + \expandafter\edef\csname #1\endcsname{% + \noexpand\protect\RS@nameuse{#1 }}% + \RS@namedef{#1 }} +\def\RS@ifundefined#1{% + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname#1\endcsname\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\newcommand*{\RS@removedef}[1]{% + \RS@namelet{#1}\@undefined% + \RS@ifundefined{#1 }{}{\RS@namelet{#1 }\@undefined}} +\newcommand*{\RS@testednamedef}[1]{% + \RS@ifnamedefinable{#1}\RS@namedef{#1}} +\newcommand*{\RS@testedrobustnamedef}[1]{% + \RS@ifnamedefinable{#1}\RS@robustnamedef{#1}} +\long\def\RS@ifnamedefinable #1{% + \edef\reserved@a{#1}% + \RS@ifundefined\reserved@a + {\edef\reserved@b{\expandafter\@carcube \reserved@a xxx\@nil}% + \ifx \reserved@b\@qend \RS@notdefinable\else + \ifx \reserved@a\@qrelax \RS@notdefinable\else + \PackageInfo{\RS@pkgname}{\@backslashchar\reserved@a\space created}% + \fi + \fi}% + \RS@notdefinable} +\gdef\RS@notdefinable{% + \PackageError{\RS@pkgname}{% + Command \@backslashchar\reserved@a\space + already defined.\MessageBreak + Or name \@backslashchar\@qend... illegal.\MessageBreak + It can not be redefined by the \@backslashchar newref% + }{% + If \@backslashchar\reserved@a\space is not important\MessageBreak + then \protect\let\@backslashchar\reserved@a% + =\protect\relax,\MessageBreak + else use a different \@backslashchar newref.}% + } +\newcommand*{\RS@setbool}[2]{% + \lowercase{\def\@tempa{#2}}% + \@ifundefined{@tempswa\@tempa}% + {\PackageError{\RS@pkgname}% + {You can only set the option to `true' or `false'}\@ehc}% + {\csname#1\@tempa\endcsname}} +\def\RS@firstcap#1#2\@nil{% + \iffalse{\fi + \uppercase{\edef\RS@cap{\iffalse}\fi#1}#2}}% +\newif\ifRSstar\RSstarfalse +\newif\ifRSnameon\RSnameontrue +\newif\ifRScapname\RScapnamefalse +\newif\ifRSplural\RSpluralfalse +\newcommand*{\newref}[1]{% + \lowercase{\def\RS@tempa{#1}}% + \expandafter\RS@newref\expandafter{\RS@tempa}} +\newcommand*{\RS@newref}[2]{% + \RS@clearref{#1}% + \define@key{RS@#1}{key}[#1:]{\RS@namedef{RS@#1@key}{##1}}% + \define@key{RS@#1}{s}[true]{\RS@setbool{RSplural}{##1}}% + \define@key{RS@#1}{name}[]{\RS@namedef{RS@#1@name}{##1}}% + \define@key{RS@#1}{names}[]{\RS@namedef{RS@#1@names}{##1}}% + \define@key{RS@#1}{Name}[]{\RS@namedef{RS@#1@Name}{##1}}% + \define@key{RS@#1}{Names}[]{\RS@namedef{RS@#1@Names}{##1}}% + \define@key{RS@#1}{rngtxt}[\space to~]{\RS@namedef{RS@#1@rngtxt}{##1}}% + \define@key{RS@#1}{lsttxt}[\space and~]{\RS@namedef{RS@#1@lsttxt}{##1}}% + \define@key{RS@#1}{refcmd}[\ref{####1}]{\RS@namedef{RS@#1@rcmd}####1{##1}}% + \define@key{RS@#1}{xr}[]{\RS@namedef{RS@#1@xr}{##1}}% + \define@key{RS@#1}{vref}[true]{\RS@namedef{RS@#1vref}{##1}}% + \setkeys{RS@#1}{key, + s=false, + name,names,Name,Names, + rngtxt,lsttxt, + refcmd, + xr, + vref=false}% + \setkeys{RS@#1}{#2}% + \RS@buildref{#1}% + } +\newcommand*{\RS@clearref}[1]{% + \RS@ifundefined{RS@#1@template} + {\RS@namedef{RS@#1@template}{#1}% + \PackageInfo{\RS@pkgname}% + {New reference template \protect\newref{#1}}{}} + {\PackageInfo{\RS@pkgname}% + {Reference template \protect\newref{#1} redefined}{} + \RS@firstcap#1\@nil + \RS@removedef{#1key}% + \RS@removedef{#1label}% + \RS@removedef{#1ref}% + \RS@removedef{\RS@cap ref}% + \RS@removedef{#1rangeref}% + \RS@removedef{\RS@cap rangeref}% + \RS@removedef{#1pageref}% + }% + } +\newcommand*{\RS@buildref}[1]{% + \RS@firstcap#1\@nil + \RS@testednamedef{#1key}{\RS@nameuse{RS@#1@key}} + \RS@testedrobustnamedef{#1label}{\RS@cmd{label}{#1}} + \RS@testedrobustnamedef{#1ref}{\RScapnamefalse\RS@cmd{ref}{#1}} + \RS@testedrobustnamedef{\RS@cap ref}{\RScapnametrue\RS@cmd{ref}{#1}} + \RS@testedrobustnamedef{#1rangeref}{\RScapnamefalse\RS@cmd{rangeref}{#1}} + \RS@testedrobustnamedef{\RS@cap rangeref}{\RScapnametrue\RS@cmd{rangeref}{#1}} + \RS@testedrobustnamedef{#1pageref}{\RScapnamefalse\RS@cmd{pageref}{#1}} + } +\newcommand*{\RS@cmd}[2]{% + \@ifstar{\RSstartrue\RSnameonfalse\RS@@cmd{#1}{#2}}% + {\RSstarfalse\RSnameontrue\RS@@cmd{#1}{#2}}} +\newcommand*{\RS@@cmd}[2]{% + \@ifnextchar[% + {\RS@nameuse{RS@#1}{#2}}% + {\RS@nameuse{RS@#1}{#2}[]}} +\def\RS@ref#1[#2]#3{% + \begingroup + \setkeys{RS@#1}{#2}% + \edef\RS@tmpa{\zap@space#3 \@empty}% + \edef\RS@tmpa{\noexpand\RS@@ref{#1} \RS@tmpa,\relax\noexpand\@eolst}% + \RS@tmpa% + \endgroup} +\def\RS@@ref#1 #2,#3\@eolst{% + \ifx\relax#3\relax + \RS@makename{#1}% + \RS@makeref{#1}{#2}% + \RS@makevpageref{#1}{#2}% + \else + \RSpluraltrue% + \RS@makename{#1}% + \RS@makeref{#1}{#2}% + \RS@makevpageref{#1}{#2}% + \RSnameonfalse% + \RS@@@ref{#1} #3\@eolst% + \fi} +\def\RS@@@ref#1 #2,#3\@eolst{% + \ifx\relax#3\relax + \RS@nameuse{RS@#1@lsttxt}% + \RS@makeref{#1}{#2}% + \RS@makevpageref{#1}{#2}% + \else + \unskip,\space% + \RS@makeref{#1}{#2}% + \RS@makevpageref{#1}{#2}% + \RS@@@ref{#1} #3\@eolst% + \fi} +\def\RS@rangeref#1[#2]#3#4{% + \begingroup + \setkeys{RS@#1}{#2}% + \RSpluraltrue% + \RS@makename{#1}% + \RS@makeref{#1}{#3}% + \RS@nameuse{RS@#1@rngtxt}% + \RSnameonfalse% + \RS@makeref{#1}{#4}% + \RS@makevpagerefrange{#1}{#3}{#4}% + \endgroup} +\def\RS@pageref#1[#2]#3{% + \begingroup% + \setkeys{RS@#1}{#2}% + \RS@ifvref{#1}% + {\mbox{}\vpageref*{\RS@lbl{#1}{#3}}}% + {\reftextfaraway{\RS@lbl{#1}{#3}}}% + {\pageref{\RS@lbl{#1}{#3}}}% + \endgroup} +\def\RS@label#1[#2]#3{% + \begingroup% + \setkeys{RS@#1}{#2}% + \label{\RS@nameuse{RS@#1@key}#3}% + \endgroup} +\newcommand*{\RS@true}{true} +\newcommand*{\RS@false}{false} +\newcommand*{\RS@far}{far} +\newcommand{\RS@ifvref}[4]{% + \edef\RS@tempa{\RS@nameuse{RS@#1vref}}% + \ifx\RS@tempa\RS@true\relax + #2% + \else\ifx\RS@tempa\RS@far\relax + #3% + \else\ifx\RS@tempa\RS@false\relax + #4% + \else + \PackageError{\RS@pkgname}% + {You can only set the vref option to `true', `far' or `false'}\@ehc + \fi\fi\fi} +\newcommand{\RS@makename}[1]{% + \ifRSstar\else\ifRSnameon + \ifRSplural + \ifRScapname + \RS@nameuse{RS@#1@Names}% + \else + \RS@nameuse{RS@#1@names}% + \fi + \else + \ifRScapname + \RS@nameuse{RS@#1@Name}% + \else + \RS@nameuse{RS@#1@name}% + \fi + \fi + \fi\fi + } +\newcommand*{\RS@lbl}[2]{% + \RS@nameuse{RS@#1@xr}\RS@nameuse{RS@#1@key}#2% + } +\newcommand{\RS@makeref}[2]{% + \RS@nameuse{RS@#1@rcmd}{\RS@lbl{#1}{#2}}% + } +\newcommand{\RS@makevpageref}[2]{% + \RS@ifvref{#1}% + {\vpageref[\unskip]{\RS@lbl{#1}{#2}}}% + { \reftextfaraway{\RS@lbl{#1}{#2}}}% + {}% + } +\newcommand{\RS@makevpagerefrange}[3]{% + \RS@ifvref{#1}% + {\space\vpagerefrange[\unskip]{\RS@lbl{#1}{#2}}{\RS@lbl{#1}{#3}}}% + {\space\vpagerefrange[\unskip]{\RS@lbl{#1}{#2}}{\RS@lbl{#1}{#3}}}% + {}% + } +\AtBeginDocument{% + \providecommand{\vpageref}{% + \PackageError{\RS@pkgname}% + {The vref option used, but varioref.sty not loaded.}% + {Load varioref.sty}} + \providecommand{\reftextfaraway}{% + \PackageError{\RS@pkgname}% + {The vref=far option used, but varioref.sty not loaded.}% + {Load varioref.sty}} + \providecommand{\vpagerefrange}{% + \PackageError{\RS@pkgname}% + {The vref option used, but varioref.sty not loaded.}% + {Load varioref.sty}} + } +\def\RS@addto#1#2{% + #2% + \@temptokena{#2}% + \ifx#1\relax + \let#1\@empty + \fi + \ifx#1\undefined + \edef#1{\the\@temptokena}% + \else + \toks@\expandafter{#1}% + \edef#1{\the\toks@\the\@temptokena}% + \fi + \@temptokena{}\toks@\@temptokena} +\def\DeclareLangOpt#1#2{% + \edef\RS@tempa{\expandafter\@gobble\string#2}% + \RS@ifundefined{\RS@tempa}% + {\PackageError{\RS@pkgname}% + {Unknown definitions \@backslashchar\RS@tempa\MessageBreak + for language option `#1'}{}}% + {\DeclareOption{#1}{\expandafter\RS@addto\csname extras#1\endcsname #2}}% + } +\newcommand*{\RS@cfgfile}{refstyle.cfg} +\@ifpackagewith{\@currname}{noconfig} + {\PackageInfo{\RS@pkgname}{No config file loaded}}% + {\InputIfFileExists{\RS@cfgfile}% + {\PackageInfo{\RS@pkgname}{Config file \RS@cfgfile\space used}}% + {\PackageInfo{\RS@pkgname}{Config file \RS@cfgfile\space not found}}% + } +\DeclareOption{noconfig}{\OptionNotUsed} +\ProcessOptions*\relax +\endinput +%% +%% End of file `refstyle.sty'. diff --git a/Master/texmf-dist/tex/latex/refstyle/reftmpl.cfg b/Master/texmf-dist/tex/latex/refstyle/reftmpl.cfg new file mode 100644 index 00000000000..af0a773f723 --- /dev/null +++ b/Master/texmf-dist/tex/latex/refstyle/reftmpl.cfg @@ -0,0 +1,102 @@ +%% +%% This is file `reftmpl.cfg', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% refstyle.dtx (with options: `tmpl') +%% +%% This is a generated file. +%% +%% This is an example of a template configuration file +%% for the refstyle package. The user may redefine it +%% to suit his or her own needs. +%% + + +%%--- TEMPLATE FOR PARTS ------------------------- + \newref{part}{% + name = {Part~}, + names = {Parts~}, + Name = {Part~}, + Names = {Parts~}, + rngtxt = {\space to~}, + lsttxt = {\space and~}} +%%--- TEMPLATE FOR CHAPTERS & APPENDIXES -------- + \makeatletter + \providecommand*{\p@chapter}{} + \renewcommand*{\p@chapter}{\string\chpname{\@chapapp}} + \makeatother + \newcommand*{\chpname}[1]{} +\newcommand*{\RSchpname}[1]{% + \ifRSnameon + \edef\RStmpa{#1}% + \edef\RStmpb{\appendixname}% + \ifx\RStmpa\RStmpb\relax% + \ifRSplural \ifRScapname Appendices~\else appendices~\fi + \else \ifRScapname Appendix~\else appendix~\fi + \fi + \else + \ifRSplural \ifRScapname Chapters~\else chapters~\fi + \else \ifRScapname Chapter~\else chapter~\fi + \fi + \fi + \fi} + \newref{chap}{% + refcmd = {\let\chpname=\RSchpname\ref{#1}}, + rngtxt = {\space to~}, + lsttxt = {\space and~}} +%%--- TEMPLATE FOR SECTIONS --------------------- + \newref{sec}{% + name = {section~}, + names = {sections~}, + Name = {Section~}, + Names = {Sections~}, + refcmd = {\S\ref{#1}}, + rngtxt = {\space to~}, + lsttxt = {\space and~}} +%%--- TEMPLATE FOR EQUATIONS -------------------- + \let\eqref\relax + \newref{eq}{% + name = {equation~}, + names = {equations~}, + Name = {Equation~}, + Names = {Equations~}, + refcmd = \textup{(\ref{#1})}, + rngtxt = {\space to~}, + lsttxt = {\space and~}}% +%%--- TEMPLATE FOR FIGURES ---------------------- + \newref{fig}{% + name = {figure~}, + names = {figures~}, + Name = {Figure~}, + Names = {Figures~}, + rngtxt = {\space to~}, + lsttxt = {\space and~}} +%%--- TEMPLATE FOR TABLES ----------------------- + \newref{tab}{% + name = {table~}, + names = {tables~}, + Name = {Table~}, + Names = {Tables~}, + rngtxt = {\space to~}, + lsttxt = {\space and~}} +%%--- TEMPLATE FOR FOOTNOTES -------------------- + \makeatletter + \newcommand{\RSfnmark}[1]{% + \begingroup + \unrestored@protected@xdef\@thefnmark{#1}% + \endgroup + \@footnotemark} + \makeatother + \newref{fn}{% + name = {footnote~}, + names = {footnotes~}, + Name = {Footnote~}, + Names = {Footnotes~}, + refcmd = {\ifRSstar\RSfnmark{\ref{#1}}\else(\ref{#1})\fi}, + rngtxt = {\space to~}, + lsttxt = {\space and~}} +\endinput +%% +%% End of file `reftmpl.cfg'. -- cgit v1.2.3