summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/refstyle/refstyle.cfg
blob: 79444d6949141082d637b38ad753dd6f7c99e997 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
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  <dnjels@sun.ac.za>
%%

\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'.