The Refstyle Package: Dnjels@sun - Ac.za
The Refstyle Package: Dnjels@sun - Ac.za
The Refstyle Package: Dnjels@sun - Ac.za
Danie Els
Department of Mechanical and Mechatronics Engineering
University of Stellenbosch, South Africa.
e-mail: dnjels@sun.ac.za
2010/11/02
1
Contents
1 Loading the refstyle Package 3
1.1 Document preamble . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Package options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Companion packages . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 User Interface 5
3 Command Descriptions 5
3.1 The reference key . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2 Reference label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.3 Reference commands . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.4 Range reference commands . . . . . . . . . . . . . . . . . . . . . . 7
3.5 Page reference command . . . . . . . . . . . . . . . . . . . . . . . . 7
6 Implementation: refstyle.sty 13
6.1 Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6.2 External packages . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6.3 Utility commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6.4 First character case changes . . . . . . . . . . . . . . . . . . . . . . 15
6.5 Reference building commands . . . . . . . . . . . . . . . . . . . . . 15
6.6 Reference formatting commands . . . . . . . . . . . . . . . . . . . 17
6.7 varioref command predefinitions . . . . . . . . . . . . . . . . . . . . 20
6.8 Support for language option inclusions in config file . . . . . . . . . 20
6.9 Configuration files . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2
1 Loading the refstyle Package
1.1 Document preamble
The refstyle package is loaded in the preamble of the document:
(a) With a config file with babel language support
\usepackage{varioref}[2001/09/04]% ← To use the vref option
\usepackage{refstyle}
When the package is loaded, it first searchers for a local user defined con-
figuration file refstyle.def. If it is not available it looks for the global
default config file refstyle.cfg provided with this package. These configu-
ration files are loaded before the package options are precess. It can therefore
contain option commands using globally defined language options and can
interface to babel for language changes. The macro
\DeclareLangOpt{hlanguagei}{hdefinitionsi}
(c) Or without any configuration file, but by declaring your own reference com-
mands in the preamble.
\usepackage[noconfig]{refstyle}
\newref{hreftype 1 i}{hkey lsti}
\newref{hreftype 2 i}{hkey lsti}
..
.
(d) Or with your own configuration file (without babel language support) for a
specific project:
\usepackage[noconfig]{refstyle}
\input{thisproject.ref}
3
1.2 Package options
noconfig Neither of the user supplied refstyle.def config file or refstyle.cfg
the config file supplied with this package are loaded. The user must declare
his or her own definitions and templates. Note that these definitions are not
passed on to babel’s language changing mechanisms.
nokeyprefix Custom labeling commands \htypeilabel are generated by refstyle
for every htypei definition. It defaults to
\htypeilabel{abc} → \label{htype : iabc}
With the nokeyprefix option, the prefix is turned of and the labeling com-
mands defaults to
\htypeilabel{abc} → \label{abc}
This is useful for old documents with existing labeling commands or where
the user prefer not to use the \htypeilabel commands.
1 varioref v1.3c, 2001/09/04 or later, because the starred versions of the commands are used.
2 hyperref v6.72r, 2002/05/27 or later, where a bug for interference with varioref was fixed.
4
2 User Interface
\newref The refstyle package has one configuring command, \newref, that internally cre-
ates a series of label and reference commands:
\newref{htypei}{hkey lsti}
\htypeikey Reference argument prefix
\htypeilabel Custom label
\htypeiref In text reference
\hTypeiref Start of sentence reference
\htypeirangeref In text range reference
\hTypeirangeref Start of sentence range reference
\htypeipageref Page reference
All the \htypei... commands, excluding \htypeikey and \htypeilabel are robust.
All the options for the referencing commands are set with a key-value list. Table 1
on page 8 gives a full list of all the key-values and defaults.
The refstyle package do not redefine any internal LATEX commands and depends
only on the \label, \ref, \pageref and the varioref commands. The internally
defined commands do not overwrite any existing command with the same name,
and an error results if a command already exists. The exception is commands
declared with a previous \newref call, can be redefined by calling \newref again
with a new set of parameter. If the amsmath package is loaded, and you define
\newref{eq} for references to equations, you need to undefine \eqref before
issuing \newref by
\let\eqref=\relax
3 Command Descriptions
The structure of the label and reference commands is given by the syntax diagrams
that follows. Examples are included for references to equations, defined according
to the template in refstyle.cfg with the \newref{eq}{hkey lsti}. See also
section §4 for explanations of the key-values.
The \htypeikey command returns the prefix added to the argument of the label
and the reference commands, for example:
The \htypeikey command is not a general command, but was provided only as a
link to the standard LATEX \ref and \pageref commands:
5
Note if the the nokeyprefix option is active then the \htypeikey is empty.
The command \htypeilabel prefix the reference string in the \label with the
string htype : i, or its redefinition with the key option.
\htypeilabel{abc} → \label{htype : iabc}
Examples:
Let z = x + iy and α = β + iγ, with i2 = −1, then
ez = ex (cos y + i sin y) (1) \eqlabel{e1}
α α ln z
z =e (2) \eqlabel{e2}
,
-
- \hTypeiref { hlbl i } -
∗ [hkey lsti]
The * optional form of the \htypeiref and \hTypeiref commands eliminates the
name prefix. The [s] optional key-value argument is for the plural form of the
name prefix.
Examples:
in \eqref{e1} ... in equation (1) ...
in \eqref[s]{e1}--\eqref*{e4} ... in equations (1)–(4) ...
in \eqref[name=eq.~]{e2} ... in eq. (2) ...
6
The reference to the page can be included with the vref or vref=far options
that activates the varioref reference.
in \eqref[vref]{e1} ... in equation (1) on the previous page ...
in \eqref[vref=far]{e1} ... in equation (1) on page 6 ...
References to external documents can be added with the xr option. Please read
the documentation of the xr package.
-
- \hTypeirangeref {hlbl i1 }{hlbl i2 } -
∗ [hkey lsti]
Examples:
in \eqrangeref{e1}{e4} ... in equations (1) to (4) ...
... and \eqrangeref*{e1}{e4} ... ... and (1) to (4) ...
\Eqrangeref{e1}{e4} are ... Equations (1) to (4) are ...
\Eqrangeref[vref,rngtxt=--]{e1}{e4} Equations (1)–(4) on the preceding page
Examples:
it is on page \eqpageref{e1} ... it is on page 6 ...
it is \eqpageref[vref]{e1} ... it is on the previous page ...
7
Table 1: The available options and key-value parameters for the label and reference
commands of the refstyle package.
Commands∗
\hTypeirangeref
\htypeirangeref
\htypeipageref
\htypeilabel
\hTypeiref
\htypeikey
\htypeiref
Parameter Default
∗
[hkey lsti]
key ={htype:i},
s ={true}† ,
vref ={true}† ,
xr ={},
name ={},
names ‡ ={},
Name ={},
Names ‡ ={},
lsttwotxt ={\space and~},
lsttxt ={\space and~},
rngtxt ={\space to~},
refcmd =\ref{#1},
– Available
– Not available
∗ The commands are obtained by calling the configuring command \newref and
setting the default key-values. The active key-values can be changed temporarily
inside the commands.
† Options defaults to true but is initialized as false. The \htypeiref[s]{hlbli}
command results in the plural: names. The same principle is also valid for the
vref option.
‡ Option depends on the selection of the s=true/false optional key-value for
singular or plural.
8
4 Keyval Optional Arguments
Al the options for the referencing commands are set with a key-value list. Table 1
on the preceding page gives a full list of all the key-values and defaults. The
options can also be changed locally with the [hkey lsti] optional arguments.
\newref{tab}{...}
\tablabel{abc} → \label{tab:abc}
\tabref{abc} → table~\ref{tab:abc}
\newref{tab}{key=xxx-,...}
\tablabel{abc} → \label{xxx-abc}
\tabref{abc} → table~\ref{xxx-abc}
For existing documents containing labels such as \label{tab:xx}, you can use
the nokeyprefix option which defines key ={}. The normal \label command
can then be used and the reference commands defaults to
\label{tab:xx}
\tabref{tab:xx} → table~\ref{tab:xx}
\tabref{abc} → table~\ref{tab:abc}
\tabref[vref]{abc} → table~\ref{tab:abc} \vpageref[\unskip]{tab:abc}
\tabref[vref=far]{abc} → table~\ref{tab:abc} \reftextfaraway{tab:abc}
9
If, for example, an external document defined with hxr keyi={A-}, uses an iden-
tical setup (e.g. the same refstyle.cfg), then it can be referenced with
\tabref[xr=A-]{abc} → table~\ref{A-tab:abc}
or otherwise
\tabref[xr=A-,key=]{abc} → table~\ref{A-abc}
Good typographic style manuals recommend the minimum use of capital letters
and punctuation that breaks the flow of a sentence or paragraph. For abbrevia-
tions, Bringhurst[1] recommends the Oxford house style: Use a period only when
the word stops prematurely. The period is omitted if the abbreviation begins with
the first letter and end with the last. As an example for equations, use eq. (1)
or eqn (1). A good guideline is not to abbreviate any reference type names. If
a sentence starts with a reference then the type name must always be written in
full. A typical example for references to a table is:
name ={table~}, names ={tables~},
Name ={Table~}, Names ={Tables~},
rngtxt ={\ to~}, lsttxt ={, and~}, lsttwotxt ={\ and~},
Note the hardspace after the text. It is needed to keep the text and the reference
together on the same line.
The refstyle configuration file can be setup to interface with babel for different
languages or for automatic language changes inside a document. The language
specific key-values can be added to the babel hook \extrashlanguagei. The com-
\DeclareLangOpt mand \DeclareLangOpt3 is provided to supply a hlanguagei option to the package
and to add the option contents to \extrashlanguagei. The default config file con-
tains the following lines for equations:
\newcommand\RSenglish{%
\def\RSeqtxt{equation~}%
\def\RSeqstxt{equations~}%
\def\RSEqtxt{Equation~}%
\def\RSEqstxt{Equations~}%
:
}
\DeclareLangOpt{english}{\RSenglish}
3 Only for use in refstyle.cfg the default config file
10
\RSaddto or manually with the \RSaddto command
\RSaddto{\extrasenglish}{\RSenglish}
The key-value options for language specific options are then set as:
\newref{eq}{%
name = \RSeqtxt,
names = \RSeqstxt,
Name = \RSEqtxt,
Names = \RSEqstxt,
:
}
\chaptername \appendixname
\figurename \tablename
\partname \pagename
To setup a multilingual document with babel, always make the language op-
tions global so that other language compliant packages can detect it. A typical
setup for an Afrikaans/English document would be:
\documentclass[UKenglish,afrikaans,hoptions i]{hLaTeX class i}
\usepackage[T1]{fontenc}%..hyphenation of words with accents
\usepackage{babel}%........language def’s
\usepackage{varioref}%.....for vref option
\usepackage{refstyle}
11
The second footnote mark, † , in table 1 on page 8, was obtained in this way with
the reference \fnref*{b}. See refstyle.cfg for another example for references
to chapters and appendices.
The nameref package can easily be incorporated if you need elaborate references
which include the section or chapter name:
\Secref[vref, refcmd={\S\ref{#1}, ‘\nameref{#1}’}]{PRefCmds}
gives
Section §3.5, ‘Page reference command’ on page 7
References
[1] Bringhurst, R. (1996), The elements of typographic style, Hartley & Marks
Publishers, Point Roberts, WA, USA and Vancouver, BC, Canada, second
edn.
12
6 Implementation: refstyle.sty
6.1 Identification
1 h∗pkgi
2 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
3 \ProvidesPackage{refstyle}[\RefstyleFileDate\space
4 \RefstyleFileVersion\space
5 Reference formatting (DNJ Els)]
6 \newcommand*{\RS@pkgname}{refstyle}
\RS@setkeys Note if xkeyval is loaded, it redefines keyval’s macros. To fix this bug, we need the
original \setkeys command.
\def\RS@setkeys#1#2{%
8
9 \def\KV@prefix{KV@#1@}%
10 \let\@tempc\relax
11 \KV@do#2,\relax,}
A small bug-fix for showkeys. Will be removed after release of new version.
12 \@ifundefined{vref@space}{\let\vref@space\space}{}
15 \newcommand*{\RS@namelet}[1]{\expandafter\let\csname #1\endcsname}
16 \newcommand*{\RS@nameuse}[1]{\csname #1\endcsname}
17 \newcommand*{\RS@namedef}[1]{\expandafter\def\csname #1\endcsname}
18 \newcommand*{\RS@robustnamedef}[1]{%
19 \expandafter\edef\csname #1\endcsname{%
20 \noexpand\protect\RS@nameuse{#1 }}%
21 \RS@namedef{#1 }}
\RS@ifundefined This is an improved definition4 for the LATEX kernel command \@ifundefined
that do not leave an undefined command defined as \relax after the test.
The usage is: \RS@ifundefined{hnamei}{htruei}{hfalsei} executes the con-
tents of htruei if \hnamei is not defined and hfalsei if defined.
4 Posted by Markus Kohm on c.t.t. 2002/11/11
13
22 \def\RS@ifundefined#1{%
23 \begingroup\expandafter\expandafter\expandafter\endgroup
24 \expandafter\ifx\csname#1\endcsname\relax
25 \expandafter\@firstoftwo
26 \else
27 \expandafter\@secondoftwo
28 \fi}
\RS@removedef The command removes the definition of a command, including robust definitions.
29 \newcommand*{\RS@removedef}[1]{%
30 \RS@namelet{#1}\@undefined%
31 \RS@ifundefined{#1 }{}{\RS@namelet{#1 }\@undefined}}
\RS@testednamedef These command are identical to \RS@namedef and \RS@robustnamedef, but only
\RS@testedrobustnamedef define the \hnamei command if it is legal. Otherwise an error message is written
to the log file and the program is terminated.
32 \newcommand*{\RS@testednamedef}[1]{%
33 \RS@ifnamedefinable{#1}\RS@namedef{#1}}
34 \newcommand*{\RS@testedrobustnamedef}[1]{%
35 \RS@ifnamedefinable{#1}\RS@robustnamedef{#1}}
14
58 \newcommand*{\RS@setbool}[2]{%
59 \lowercase{\def\@tempa{#2}}%
60 \@ifundefined{@tempswa\@tempa}%
61 {\PackageError{\RS@pkgname}%
62 {You can only set the option to ‘true’ or ‘false’}\@ehc}%
63 {\csname#1\@tempa\endcsname}}
64 \def\RS@firstcap#1#2\@nil{%
65 \iffalse{\fi
66 \uppercase{\edef\RS@cap{\iffalse}\fi#1}#2}}%
\ifRSstar The \if conditional values that are set by the reference commands. These values
\ifRSnameon can be accessed by user defined key-values.
\ifRScapname 72 \newif\ifRSstar\RSstarfalse
\ifRSplural 73 \newif\ifRSnameon\RSnameontrue
\ifRSlsttwo 74 \newif\ifRScapname\RScapnamefalse
75 \newif\ifRSplural\RSpluralfalse
76 \newif\ifRSlsttwo\RSlsttwofalse
\newref The main user interface for template setup. It take the #1 or hkeyi parameter and
make it lowercase before passing it on to \RS@newref.
77 \newcommand*{\newref}[1]{%
78 \lowercase{\def\RS@tempa{#1}}%
79 \expandafter\RS@newref\expandafter{\RS@tempa}}
15
Creates a series of key-values for every template that stores the setup
for the specific template.
83 \ifRS@keyactive
84 \define@key{RS@#1}{key}[#1:]{\RS@namedef{RS@#1@key}{##1}}%
85 \else
86 \define@key{RS@#1}{key}[]{\RS@namedef{RS@#1@key}{##1}}%
87 \fi
88 \define@key{RS@#1}{s}[true]{\RS@setbool{RSplural}{##1}}%
89 \define@key{RS@#1}{name}[]{\RS@namedef{RS@#1@name}{##1}}%
90 \define@key{RS@#1}{names}[]{\RS@namedef{RS@#1@names}{##1}}%
91 \define@key{RS@#1}{Name}[]{\RS@namedef{RS@#1@Name}{##1}}%
92 \define@key{RS@#1}{Names}[]{\RS@namedef{RS@#1@Names}{##1}}%
93 \define@key{RS@#1}{rngtxt}[\space to~]{\RS@namedef{RS@#1@rngtxt}{##1}}%
94 \define@key{RS@#1}{lsttwotxt}[\space and~]{\RS@namedef{RS@#1@lsttwotxt}{##1}}%
95 \define@key{RS@#1}{lsttxt}[\space and~]{\RS@namedef{RS@#1@lsttxt}{##1}}%
96 \define@key{RS@#1}{refcmd}[\ref{####1}]{\RS@namedef{RS@#1@rcmd}####1{##1}}%
97 \define@key{RS@#1}{xr}[]{\RS@namedef{RS@#1@xr}{##1}}%
98 \define@key{RS@#1}{vref}[true]{\RS@namedef{RS@#1vref}{##1}}%
Set default key-value parameters.
99 \RS@setkeys{RS@#1}{key,
100 s=false,
101 name,names,Name,Names,
102 rngtxt,lsttwotxt,lsttxt,
103 refcmd,
104 xr,
105 vref=false}%
Set key-values according to user definitions.
106 \RS@setkeys{RS@#1}{#2}%
Build the reference commands.
107 \RS@buildref{#1}%
108 }
\RS@clearref Clear a reference template for redefinition. It check if the template already exists
and clear it if it does.
109 \newcommand*{\RS@clearref}[1]{%
110 \RS@ifundefined{RS@#1@template}
111 {\RS@namedef{RS@#1@template}{#1}%
112 \PackageInfo{\RS@pkgname}%
113 {New reference template \protect\newref{#1}}{}}
114 {\PackageInfo{\RS@pkgname}%
115 {Reference template \protect\newref{#1} redefined}{}
116 \RS@firstcap#1\@nil
117 \RS@removedef{#1key}%
118 \RS@removedef{#1label}%
119 \RS@removedef{#1ref}%
120 \RS@removedef{\RS@cap ref}%
121 \RS@removedef{#1rangeref}%
122 \RS@removedef{\RS@cap rangeref}%
123 \RS@removedef{#1pageref}%
124 }%
125 }
16
\RS@buildref Build the reference commands. See table 1 for the list of commands. The
\RS@buildref{hkeyi} build commands to call \RS@cmd{hcmdi}{hkeyi}, for ex-
ample:
\hkeyiref → {\RScapnamefalse\RS@cmd{ref}{hkeyi}}
126 \newcommand*{\RS@buildref}[1]{%
127 \RS@firstcap#1\@nil
128 \RS@testednamedef{#1key}{\RS@nameuse{RS@#1@key}}
129 \RS@testednamedef{#1label}##1{\label{\RS@nameuse{RS@#1@key}##1}}
130 \RS@testedrobustnamedef{#1ref}{\RScapnamefalse\RS@cmd{ref}{#1}}
131 \RS@testedrobustnamedef{\RS@cap ref}{\RScapnametrue\RS@cmd{ref}{#1}}
132 \RS@testedrobustnamedef{#1rangeref}{\RScapnamefalse\RS@cmd{rangeref}{#1}}
133 \RS@testedrobustnamedef{\RS@cap rangeref}{\RScapnametrue\RS@cmd{rangeref}{#1}}
134 \RS@testedrobustnamedef{#1pageref}{\RScapnamefalse\RS@cmd{pageref}{#1}}
135 }
\RS@cmd The command \RS@cmd{hcmdi}{hkeyi} calls the final reference formatting com-
\RS@@cmd mands. It checks for the starred form and set the conditionals \ifRSstar and
\ifRSnameon accordingly. It also extracts the optional key-value list.
\RS@cmd{ref}{hkeyi} → \RS@ref{hkeyi}[hkey lsti]
\RS@cmd{rangeref}{hkeyi} → \RS@rangeref{hkeyi}[hkey lsti]
\RS@cmd{pageref}{hkeyi} → \RS@pageref{hkeyi}[hkey lsti]
136 \newcommand*{\RS@cmd}[2]{%
137 \@ifstar{\RSstartrue\RSnameonfalse\RS@@cmd{#1}{#2}}%
138 {\RSstarfalse\RSnameontrue\RS@@cmd{#1}{#2}}}
139 \newcommand*{\RS@@cmd}[2]{%
140 \@ifnextchar[%
141 {\RS@nameuse{RS@#1}{#2}}%
142 {\RS@nameuse{RS@#1}{#2}[]}}
17
153 \ifx\relax#3\relax
154 \RS@makename{#1}%
155 \RS@makeref{#1}{#2}%
156 \RS@makevpageref{#1}{#2}%
157 \else
158 \RSpluraltrue%
159 \RS@makename{#1}%
160 \RS@makeref{#1}{#2}%
161 \RS@makevpageref{#1}{#2}%
162 \RSnameonfalse%
163 \RSlsttwotrue%
164 \RS@@@ref{#1} #3\@eolst%
165 \fi}
For more than one reference in the reference list, typeset the rest of the references.
166 \def\RS@@@ref#1 #2,#3\@eolst{%
167 \ifx\relax#3\relax
168 \ifRSlsttwo
169 \RS@nameuse{RS@#1@lsttwotxt}%
170 \else
171 \RS@nameuse{RS@#1@lsttxt}%
172 \fi
173 \RS@makeref{#1}{#2}%
174 \RS@makevpageref{#1}{#2}%
175 \else
176 \RSlsttwofalse%
177 \unskip,\space%
178 \RS@makeref{#1}{#2}%
179 \RS@makevpageref{#1}{#2}%
180 \RS@@@ref{#1} #3\@eolst%
181 \fi}
\RS@pageref The command \RS@pageref{hkeyi}[hkey lsti]{hlbli} type the page where {hlbli}
was defined.
193 \def\RS@pageref#1[#2]#3{%
194 \begingroup%
195 \RS@setkeys{RS@#1}{#2}%
196 \RS@ifvref{#1}%
197 {\mbox{}\vpageref*{\RS@lbl{#1}{#3}}}%
198 {\reftextfaraway{\RS@lbl{#1}{#3}}}%
18
199 {\pageref{\RS@lbl{#1}{#3}}}%
200 \endgroup}
201 \newcommand*{\RS@true}{true}
202 \newcommand*{\RS@false}{false}
203 \newcommand*{\RS@far}{far}
\RS@makename The command \RS@makename{hkeyi} build the prefix to the reference commands.
216 \newcommand{\RS@makename}[1]{%
217 \ifRSstar\else\ifRSnameon
218 \ifRSplural
219 \ifRScapname
220 \RS@nameuse{RS@#1@Names}%
221 \else
222 \RS@nameuse{RS@#1@names}%
223 \fi
224 \else
225 \ifRScapname
226 \RS@nameuse{RS@#1@Name}%
227 \else
228 \RS@nameuse{RS@#1@name}%
229 \fi
230 \fi
231 \fi\fi
232 }
\RS@lbl This command builds the full label string for the \ref command.
\RS@lbl{hkeyi}{hlabeli} → {hxr keyihkeyihlabeli}
233 \newcommand*{\RS@lbl}[2]{%
234 \RS@nameuse{RS@#1@xr}\RS@nameuse{RS@#1@key}#2%
235 }
19
236 \newcommand{\RS@makeref}[2]{%
237 \RS@nameuse{RS@#1@rcmd}{\RS@lbl{#1}{#2}}%
238 }
20
276 \fi
277 \@temptokena{}\toks@\@temptokena}
\DeclareLangOpt Command to declare a language option and add language definitions to the
\extrashlanguagei token for babel.
278 \def\DeclareLangOpt#1#2{%
279 \edef\RS@tempa{\expandafter\@gobble\string#2}%
280 \RS@ifundefined{\RS@tempa}%
281 {\PackageError{\RS@pkgname}{%
282 Unknown definitions \@backslashchar\RS@tempa\MessageBreak
283 for language option ‘#1’}{}}%
284 {\DeclareOption{#1}{%
285 \AtBeginDocument{\expandafter\RSaddto\csname extras#1\endcsname #2}}}%
286 }
We need to peek into the options list before the options are processed to find
out if the config file is to be loaded or not. The config file can contain options and
must be loaded before \ProcessOptions. Make noconfig not used afterwards.
We first test for a local config file refstyle.def and then for the global config
file refstyle.cfg.
289 \@ifpackagewith{\@currname}{noconfig}%
290 {\PackageInfo{\RS@pkgname}{No config file loaded}}%
291 {\InputIfFileExists{\RS@reffile}%
292 {\PackageInfo{\RS@pkgname}{Local config file \RS@reffile\space used}}
293 {\InputIfFileExists{\RS@cfgfile}%
294 {\PackageInfo{\RS@pkgname}{Config file \RS@cfgfile\space used}}%
295 {\PackageInfo{\RS@pkgname}{No config file found}}}}
296 \DeclareOption{noconfig}{\OptionNotUsed}%
Process the options, including options in config file.
297 \ProcessOptions*\relax
The end of this package.
298 h/pkgi
Change History
v0.0 of \htypeilabel . . . . . . . . . . 17
General: Initial version . . . . . . . . 1 \RSaddto: Rename \RS@addto to
v0.1 \RSaddto . . . . . . . . . . . . . . . 20
General: First stable version . . . . . 1
v0.3
v0.2
General: First updated version . . . 1 General: Documentation update . . 1
Remove redundant \RS@label 19 \RS@setkeys: original \setkeys
\RS@buildref: Remove robust def copy . . . . . . . . . . . . . . . . . . . 13
21
v0.4 \efstyle.def . . . . . . . . . . . . 21
General: Add nokeyprefix option 1 \RS@newref: Ad lsttwotxt option 15
Documentation update . . . . . . . 1 v0.5
\ifRS@keyactive: Add nokeyprefix
\@safe@activesfalse: Add
to turn of the key prefix . . . . 15
\@safe@activestrue . . . . . . . 13
\ifRSlsttwo: Add \ifRSlsttwo
\@safe@activestrue: Add
test for list containing only two
\@safe@activesfalse . . . . . . 13
parameter . . . . . . . . . . . . . . . 15
\RS@@@ref: Add \ifRSlsttwo test General: Documentation update . . 1
for list containing only two pa- \DeclareLangOpt: Add \extrashlanguagei
rameter . . . . . . . . . . . . . . . . 17 to beginning of document. . . . 21
\RS@cfgfile,\RS@reffile: Ad \RS@ref: Add \@safe@activestrue
alternative definition file to avoid active chars is ref list 17
Index
Numbers written in italic refer to the page where the corresponding entry is de-
scribed; numbers underlined refer to the code line of the definition; numbers in
roman refer to the code lines where the entry is used.
22
\RS@pageref . . . . . . . 193 \RS@testedrobustnamedef \RSstarfalse . . . 72, 138
\RS@rangeref . . . . . . 182 . . . . . 32, 130–134 \RSstartrue . . . . . . . 137
\RS@ref . . . . . . . . . . 143 \RS@true . . . . . 201, 206
\RS@reffile . . . 291, 292 \RSaddto . . . . . 265, 285 T
\RScapnamefalse . . . \the . . . . . . . . . 272, 275
\RS@removedef . . . . .
. 74, 130, 132, 134 \toks@ . . . . 274, 275, 277
. . . . . 29, 117–123
\RS@robustnamedef 15, 35 \RScapnametrue 131, 133
U
\RS@setbool . . . . . 58, 88 \RSlsttwofalse . 76, 176
\undefined . . . . . . . 271
\RS@setkeys . . . . . . . . 8 \RSlsttwotrue . . . . . 163
\RS@tempa . . . 78, 79, \RSnameonfalse . . . . V
205, 206, 208, . . . . 137, 162, 189 \vpageref . 197, 241, 252
210, 279, 280, 282 \RSnameontrue . . 73, 138 \vpagerefrange . . . .
\RS@testednamedef . \RSpluralfalse . . . . 75 . . . . 247, 248, 260
. . . . . 32, 128, 129 \RSpluraltrue . 158, 185 \vref@space . . . . . . . 12
23