summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-02-01 03:00:51 +0000
committerNorbert Preining <norbert@preining.info>2024-02-01 03:00:51 +0000
commita494a509f3f4a13a450c898488155f7aa5353bd3 (patch)
treeab11a3116dfe36f273b0eefe1a7abb556253a9c8 /macros/latex
parent79e1bbc1ad6b308aa2074540b2afd43b6a72ce03 (diff)
CTAN sync 202402010300
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx34
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin599182 -> 598552 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex10
-rw-r--r--macros/latex/contrib/hvextern/Changes1
-rw-r--r--macros/latex/contrib/hvextern/doc/hvextern.pdfbin1498836 -> 1481699 bytes
-rw-r--r--macros/latex/contrib/hvextern/doc/hvextern.tex59
-rw-r--r--macros/latex/contrib/hvextern/latex/hvextern.sty107
-rwxr-xr-x[-rw-r--r--]macros/latex/contrib/hvextern/script/hvextern-checkfile.lua0
-rw-r--r--macros/latex/contrib/leftindex/README.md3
-rw-r--r--macros/latex/contrib/leftindex/leftindex.pdfbin72581 -> 89885 bytes
-rw-r--r--macros/latex/contrib/leftindex/leftindex.sty29
-rw-r--r--macros/latex/contrib/leftindex/leftindex.tex43
-rw-r--r--macros/latex/contrib/litetable/doc/favicon.pngbin0 -> 17761 bytes
-rw-r--r--macros/latex/contrib/litetable/doc/litetable-demo.pdfbin30108 -> 46294 bytes
-rw-r--r--macros/latex/contrib/litetable/doc/litetable-demo.tex86
-rw-r--r--macros/latex/contrib/litetable/doc/litetable-doc-cn.pdfbin0 -> 193124 bytes
-rw-r--r--macros/latex/contrib/litetable/doc/litetable-doc-cn.tex210
-rw-r--r--macros/latex/contrib/litetable/doc/litetable-doc-en.pdfbin0 -> 103291 bytes
-rw-r--r--macros/latex/contrib/litetable/doc/litetable-doc-en.tex (renamed from macros/latex/contrib/litetable/doc/litetable-doc.tex)87
-rw-r--r--macros/latex/contrib/litetable/doc/litetable-doc.pdfbin79686 -> 0 bytes
-rw-r--r--macros/latex/contrib/litetable/tex/litetable.cls210
-rw-r--r--macros/latex/contrib/refstyle/README140
-rw-r--r--macros/latex/contrib/refstyle/refconfig.dtx2421
-rw-r--r--macros/latex/contrib/refstyle/refconfig.pdfbin292980 -> 303725 bytes
-rw-r--r--macros/latex/contrib/refstyle/refstyle.cfg571
-rw-r--r--macros/latex/contrib/refstyle/refstyle.dtx3591
-rw-r--r--macros/latex/contrib/refstyle/refstyle.ins189
-rw-r--r--macros/latex/contrib/refstyle/refstyle.pdfbin484262 -> 485427 bytes
-rw-r--r--macros/latex/contrib/refstyle/refstyle.sty327
-rw-r--r--macros/latex/contrib/schooldocs/schooldocs-examples.pdfbin390596 -> 270592 bytes
-rw-r--r--macros/latex/contrib/schooldocs/schooldocs-examples.tex327
-rw-r--r--macros/latex/contrib/schooldocs/schooldocs.dtx151
-rw-r--r--macros/latex/contrib/schooldocs/schooldocs.ins4
-rw-r--r--macros/latex/contrib/schooldocs/schooldocs.pdfbin156752 -> 157543 bytes
34 files changed, 4176 insertions, 4424 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index bc2be5f112..885a059c97 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -15,7 +15,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2024/01/30}{2024R}
+\ProvidesExplClass{easybook}{2024/01/31}{2024S}
{Easily typesetting Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -297,7 +297,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2024/01/30}{2024R}
+\ProvidesExplPackage{easybase}{2024/01/31}{2024S}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -384,7 +384,6 @@
\seq_map_function:NN
\l_tmpb_seq \eb_match_load_package:n
}
-\msg_redirect_module:nnn { hooks } { warning } { info }
\bool_set_true:N \l__eb_class_mode_book_bool
\bool_set_false:N \l__eb_compile_draft_bool
@@ -1416,6 +1415,7 @@
{
#1 .meta:nn = { ctex/#1 } {##1},
#1/between .tl_set:c = l__eb_toc_#1_between_hook_tl,
+ #1/between .initial:n = \bool_if:NT \l__eb_class_mode_book_bool { \vspace*{-10pt} },
#1/tocline .cs_set:cp = { eb@tocline@#1 } ##1##2,
#1/tocline .initial:n = \listnumberline{##1}##2
}
@@ -1487,6 +1487,7 @@
{
\ctex_define:n
{
+ #1 .meta:nn = { ctex/#1 } {##1},
#1/tocformat .tl_set:c = l__eb_toc_#1_format_tl,
#1/tocformat+ .code:n = \tl_put_right:cn { l__eb_toc_#1_format_tl } {##1},
#1/tocformat~+ .code:n = \tl_put_right:cn { l__eb_toc_#1_format_tl } {##1},
@@ -1504,6 +1505,12 @@
{\eb_toc_entry_if_hang:n {#1}}{}
{\tl_use:c { l__eb_toc_#1_rule_tl }}
[\tl_use:c { l__eb_toc_#1_below_tl }]
+ \ctex_set:nn {#1}
+ {
+ tocindent = 0em,
+ tocrule = \tocrule{$\cdot$},
+ tocafter = \hspace{1em}
+ }
}
\cs_new_protected:Npn \RegisterTocName #1
{
@@ -1512,13 +1519,6 @@
}
\seq_map_function:NN
\c__ctex_headings_seq \RegisterTocName
-\seq_remove_all:Nn \c__ctex_headings_seq { table }
-\seq_remove_all:Nn \c__ctex_headings_seq { figure }
-\seq_remove_all:Nn \c__ctex_headings_seq { lstlisting }
-\cs_new_protected:Npn \eb@key@path@meta@define #1
- { \ctex_define:n { #1 .meta:nn = { ctex/#1 } {##1} } }
-\seq_map_function:NN
-\c__ctex_headings_seq \eb@key@path@meta@define
\eb_seq_map_inline:nn
{
tocformat,tocformat+,tocformat~+,
@@ -1627,17 +1627,7 @@
}
},
subsection =
- {
- tocindent = \bool_if:NTF \l__eb_class_mode_book_bool { 3.8em } { 1.4em },
- tocrule = \tocrule{$\cdot$}
- },
- float =
- {
- tocindent = 0em,
- tocrule = \tocrule{$\cdot$},
- between = \bool_if:NT \l__eb_class_mode_book_bool { \vspace*{-10pt} }
- },
- tocset/tocafter-every = \hspace{1em}
+ { tocindent = \bool_if:NTF \l__eb_class_mode_book_bool { 3.8em } { 1.4em } }
}
\ctex_at_end_package:nn { imakeidx }
@@ -2330,7 +2320,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2024/01/30}{2024R}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2024/01/31}{2024S}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index 97d9370cd9..f7a0a541b1 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex
index b0291dfb82..6ac54ffeee 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -23,8 +23,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK使用手册,
- version = v2024R,
- date = 2024/01/30,
+ version = v2024S,
+ date = 2024/01/31,
authors = 瞿毅,
info = 简便地排版中文学位论文或书籍,
email = toquyi@163.com,
@@ -832,7 +832,7 @@
\begin{commands}
\command{RegisterTocName}[\marg{条目名}]
- 给条目类型名称为 \meta{条目名} 的标题注册用于设置目录样式的选项,即选项前有符号 \ding{73} 表示需要注册后使用。前面提到的条目类型均已注册,需要注意新类型的条目注册后选项初始值\textbf{均为空}。
+ 给条目类型名称为 \meta{条目名} 的标题注册用于设置目录样式的选项,即选项前有符号 \ding{73} 表示需要注册后使用。前面提到的条目类型均已注册,新类型的条目注册后选项初始值与图表条目相同。
\command{contentsuse}[\marg{条目名}\marg{扩展名}]
激活条目类型名称为 \meta{条目名} 的目录定制功能,它使用的目录文件后缀为 \meta{扩展名}。需要在激活条目后再使用命令 \cs{RegisterTocName} 注册选项。
\command{DeclareFloatList}[\marg{条目名}\marg{扩展名}]
@@ -981,7 +981,7 @@
\end{commands}
\subsection[上标和下标]{上标和下标\smodule{style}}
-上标和下标的功能来自 \pkg*{spbmark} 宏包,下面有三个命令可以用于输出上标和下标。可以使用键值列表的形式对上下标格式进行局部或全局设置,下面命令中两个可选参数的键值列表是等效的。全局设置的详情见\ref{subsubsec:super-sub-script}。
+上标和下标的功能来自 \pkg*{spbmark} 宏包,下面有三个命令可以用于输出上标和下标。可以使用键值列表的形式对上下标格式进行局部或全局设置,下面命令中两个可选参数的键值列表是等效的。全局设置的详情见\ref{subsubsec:super-sub-script},更多命令和详细用法见 \pkg*{spbmark} 宏包说明文档。
\begin{commands}
\command{super}[\sarg\oarg{键值列表1}\marg{内容}\oarg{键值列表2}]
输出上标的命令,可用于文本和数学模式,在数学模式中可代替 \code{\^{}} 符号和 \cs*{sp} 命令。
@@ -1350,7 +1350,7 @@
\shortversion{v = 1.638,date = 2022/03/04,changes = 增加目录条目样式选项注册命令 \cs{RegisterTocName}。}
\shortversion{v = 1.644,date = 2022/03/10,changes = 增加浮动环境目录声明命令 \cs{DeclareFloatList} 配合 \pkg*{caption} 宏包。}
\shortversion{v = 1.682,date = 2022/05/01,changes = 将迷你页判断命令 \cs{notminipage} 改为被保护命令兼容 \pkg*{circledtext} 宏包。}
- \begin{version}[v = 2024R,date = 2024/01/30,simple]
+ \begin{version}[v = 2024S,date = 2024/01/31,simple]
\item 核对依赖宏包的更新改动,优化使用手册的内容细节。
\item 修复图表等浮动环境题注目录中条目标签编号的计数器值显示错误问题。
\item 修复附录命令 \cs{appendix} 的可选参数设置英文目录中条目名字和编号失效的问题。
diff --git a/macros/latex/contrib/hvextern/Changes b/macros/latex/contrib/hvextern/Changes
index 3f870a713e..2d7f41812e 100644
--- a/macros/latex/contrib/hvextern/Changes
+++ b/macros/latex/contrib/hvextern/Changes
@@ -1,5 +1,6 @@
hvextern.sty ----------------
+v 0.39 2024-01-30 - fixed bug with check for force option
v 0.38 2023-12-08 - change internal macroname \Write@Ex to \hv@Write@EX
v 0.37b 2023-11-22 - fix typo in documentation
v 0.37a 2023-11-20 - fix bug in documentation
diff --git a/macros/latex/contrib/hvextern/doc/hvextern.pdf b/macros/latex/contrib/hvextern/doc/hvextern.pdf
index d78c943a84..793507b058 100644
--- a/macros/latex/contrib/hvextern/doc/hvextern.pdf
+++ b/macros/latex/contrib/hvextern/doc/hvextern.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvextern/doc/hvextern.tex b/macros/latex/contrib/hvextern/doc/hvextern.tex
index 6dcdf79d54..7172969db8 100644
--- a/macros/latex/contrib/hvextern/doc/hvextern.tex
+++ b/macros/latex/contrib/hvextern/doc/hvextern.tex
@@ -1,4 +1,4 @@
-%% $Id: hvextern.tex 822 2023-11-22 12:16:48Z herbert $
+%% $Id: hvextern.tex 853 2024-01-30 20:34:00Z herbert $
\DocumentMetadata{}% for lualatex and pstricks
\documentclass[english,paper=a4,twoside,usegeometry]{scrartcl}
\usepackage{babel}
@@ -16,8 +16,7 @@
\usepackage[automark]{scrlayer-scrpage}
\pagestyle{scrheadings}
\usepackage{hvlogos}
-\usepackage%[checkCode]
-{hvextern}
+\usepackage[checkCode]{hvextern}
\usepackage{hvindex}
\usepackage{hvdoctools}
\usepackage{listings}
@@ -32,7 +31,6 @@
-
\begin{document}
\title{Writing, running and including the output of external documents
from within a main\newline \LaTeX\ document~--v. \hvexternFileversion}
@@ -43,8 +41,7 @@ Werner Lemberg; Rolf Niepraschk}}
%\newpage
-\setkeys{hv}{moveToExampleDir,ExampleDir=Exa,
-showFilename,verbose}
+\setkeys{hv}{moveToExampleDir,ExampleDir=Exa,showFilename,verbose,force=false}
%\clearpage
@@ -118,7 +115,7 @@ outside of the main document and then to insert the output
we can do this from within this \LuaLaTeX\ document itself. The external document is compiled
with \XeLaTeX\ and the output is insert as pdf image:
\begin{externalDocument}[%
- compiler=xelatex, inline, force=true, runs=2, grfOptions={height=8pt},%
+ compiler=xelatex, inline, runs=2, grfOptions={height=8pt},%
crop, cropmargin=0, cleanup, docType=latex,vshift=-1pt]{voss}
\documentclass{ctexart}
\pagestyle{empty}
@@ -138,7 +135,7 @@ shown by the environment \Lenv{externalDocument}.
\begin{minipage}{.59\linewidth}
\begin{lstlisting}
\begin{externalDocument}[
- compiler=pdflatex,force=true,cleanup]{voss}
+ compiler=pdflatex,cleanup]{voss}
\documentclass{standalone}
%StartVisiblePreamble
\usepackage{fontenc}
@@ -151,7 +148,7 @@ shown by the environment \Lenv{externalDocument}.
[VP
[DP]
[V’
- [V]
+ [V]
[DP]
]
]
@@ -162,7 +159,7 @@ shown by the environment \Lenv{externalDocument}.
\end{minipage}
\begin{minipage}{.39\linewidth}
\begin{externalDocument}[
- compiler=pdflatex,force=true,cleanup={log,aux},showFilename=false]{voss}
+ compiler=pdflatex,cleanup={log,aux},showFilename=false]{voss}
\documentclass{standalone}
%StartVisiblePreamble
\usepackage{fontenc}
@@ -218,7 +215,6 @@ catagory, which is done internally by the package. The complete definition of th
compiler=python3,
code,
ext=py,
- force=true,
docType=py,
usefancyvrb,
grfOptions={width=\linewidth}]{python}
@@ -268,7 +264,6 @@ line in the above code shows how it can be done with Python.
\begin{externalDocument}[
compiler=python3,
progpath=/usr/local/bin/,
- force=true,
runs=1,
code,
ext=py,
@@ -328,7 +323,7 @@ e.g. \texttt{shiftFN=5ex}.
\begin{externalDocument}[grfOptions={width=0.95\linewidth},
compiler=xelatex,code,mpwidth=0.6\linewidth,
- crop,cleanup,force=true,usefancyvrb=false,ext=tex,showFilename=false]{voss}
+ crop,cleanup,usefancyvrb=false,ext=tex,showFilename=false]{voss}
\documentclass{article}
%StartVisiblePreamble
\usepackage{tikz}
@@ -438,9 +433,7 @@ runsequence={lualatex,biber,xindex -l de -c AU,lualatex,lualatex}
pagesep=2pt,
frame,
runsequence={lualatex,biber,xindex -l de -c AU,lualatex,lualatex},
- ,
verbose,
- force=true,
cleanup={log,aux,toc,bbl,blg},
code,docType=latex,
lstOptions={columns=fixed}]{voss}
@@ -479,7 +472,7 @@ the environment \Lenv{externalDocument} is:
\begin{externalDocument}[
verbose,
compiler=java,ext=java,code,
- force=true,docType=java,includegraphic,
+ docType=java,includegraphic,
usefancyvrb,grfOptions={width=0.9\linewidth}]{java}
import java.awt.Color;
import java.awt.Graphics;
@@ -558,7 +551,7 @@ the follwing example.
\begin{externalDocument}[grfOptions={angle=90,width=\linewidth},
compiler=xelatex,code,mpwidth=0.6\linewidth,
- crop,cleanup,force]{voss}
+ crop,cleanup]{voss}
\documentclass{article}
%StartVisiblePreamble
\usepackage{tikz}
@@ -610,7 +603,6 @@ to \Lcs{VerbatimInput}. The following example uses
mpwidth=0.6\linewidth,
crop,
cleanup,
- force=true,
docType=latex]{voss}
\RequirePackage{pdfmanagement-testphase}
\DeclareDocumentMetadata{}
@@ -658,7 +650,6 @@ The color of the frame is set to the same values, hence not seen. The following
mpwidth=0.6\linewidth,
crop,
cleanup,
- force=true,
usefancyvrb,
docType=latex]{voss}
\RequirePackage{pdfmanagement-testphase}
@@ -745,7 +736,6 @@ The following example uses:
% mpwidth=0.6\linewidth,
% crop,
cleanup,
- force=true,
frame,
% usefancyvrb,
% float,
@@ -798,7 +788,6 @@ which is the default. Using a caption and a label are optional.
% mpwidth=0.6\linewidth,
crop,
cleanup,
- force=true,
usefancyvrb,
float,
floatsetting=!ht,
@@ -861,7 +850,6 @@ The follwoing example was created with
% mpwidth=0.6\linewidth,
crop, cropmargin=5,
cleanup,
- force=true,
frame,
% usefancyvrb,
% float,
@@ -922,7 +910,6 @@ or \Lkeyval{b}.
showFilename=false,
crop,
cleanup,
- force=true,
aboveskip=0pt,belowskip=0pt,
docType=latex]{voss}
\documentclass{article}
@@ -947,7 +934,6 @@ or \Lkeyval{b}.
code,
crop,
cleanup,
- force=true,
aboveskip=0pt,belowskip=0pt,
docType=latex]{voss}
\documentclass{article}
@@ -973,7 +959,6 @@ or \Lkeyval{b}.
showFilename=false,
crop,
cleanup,
- force=true,
aboveskip=0pt,belowskip=0pt,
docType=latex]{voss}
\documentclass{article}
@@ -999,7 +984,6 @@ or \Lkeyval{b}.
crop,
showFilename=false,
cleanup,
- force=true,
mpwidth=0.5\linewidth,
aboveskip=0pt,belowskip=0pt,
docType=latex]{voss}
@@ -1025,7 +1009,6 @@ or \Lkeyval{b}.
showFilename=false,
crop,
cleanup,
- force=true,
mpwidth=0.5\linewidth,
aboveskip=0pt,belowskip=0pt,
docType=latex]{voss}
@@ -1052,7 +1035,6 @@ or \Lkeyval{b}.
showFilename=false,
crop,
cleanup,
- force=true,
mpwidth=0.5\linewidth,
aboveskip=0pt,belowskip=0pt,
docType=latex]{voss}
@@ -1083,7 +1065,7 @@ next Chinese characters \label{inline-exa}
\begin{externalDocument}[
compiler=xelatex, inline, runs=2, grfOptions={height=8pt},
crop, cropmargin=0, vshift=-1pt,usefancyvrb,
- cleanup, force=true, docType=latex]{voss}%
+ cleanup, docType=latex]{voss}%
\documentclass{ctexart}
\pagestyle{empty}
\begin{document}
@@ -1100,7 +1082,7 @@ With \Lkeyset{inline} the optional argument \Lkeyword{code} is
automatically set to false. The next Chinese characters
\begin{externalDocument}[vshift=-1pt,
compiler=xelatex, inline, runs=2, grfOptions={height=8pt},
- crop, cropmargin=0, cleanup, force=true, docType=latex]{voss}
+ crop, cropmargin=0, cleanup, docType=latex]{voss}
\documentclass{ctexart}
\pagestyle{empty}
\begin{document}
@@ -1140,7 +1122,7 @@ sorted digits of the number $A$: $495=954-459$.
\begin{externalDocument}[
- compiler=perl, force=true, docType=pl, ext=pl, includegraphic=false,
+ compiler=perl, docType=pl, ext=pl, includegraphic=false,
code, mpwidth=0.6\linewidth]{voss}
#!/usr/bin/perl
#
@@ -1195,7 +1177,7 @@ outFile = io.open(shortFN..".txt","w+") -- open external file
\begin{externalDocument}[
- compiler=lua, force=true, docType=lua, ext=lua, includegraphic=false,
+ compiler=lua, docType=lua, ext=lua, includegraphic=false,
code, usefancyvrb=false,textOptions={basicstyle=\ttfamily\footnotesize},
shiftFN=6ex]{voss}
#!/usr/bin/env lua
@@ -1270,7 +1252,6 @@ The following examples uses
pages=2,
crop,
cleanup,
- force=true,
xindex,
xindexOptions={-l DE --config AU},
mpwidth=0.6\linewidth,
@@ -1326,7 +1307,6 @@ runsequence={lualatex,biber,{xindex -l de -c AU},lualatex,lualatex}
frame,
runsequence={lualatex,biber,xindex -l de -c AU,lualatex,lualatex},
verbose,
- force=true,
cleanup={log,aux,toc,bbl,blg},
code,docType=latex,
lstOptions={columns=fixed}]{voss}
@@ -1366,7 +1346,7 @@ The default is using \Lcs{lstinputlisting} for the printed code sequences.
pages={1,3},
frame,compiler=pdflatex,
% crop,
- force=true,runs=2,code,docType=latex,
+ runs=2,code,docType=latex,
frame,
lstOptions={columns=fixed}]{voss}
%StartVisiblePreamble
@@ -1426,7 +1406,7 @@ it makes no difference using the optional argument \Lkeyword{usefancyvrb} or not
frame,compiler=pdflatex,
showFilename,
% crop,
- force=true,runs=2,code,docType=latex,
+ runs=2,code,docType=latex,
frame,framesep=0pt,usefancyvrb]{voss}
%StartVisiblePreamble
\documentclass[chapterprefix=on,parskip=half-,DIV=12,fontsize=12pt]{scrbook}
@@ -1520,7 +1500,7 @@ other examples, you can set \Lkeyword{showoutput} to false.
showoutput=false,
frame,compiler=pdflatex,
crop,
- force=true,runs=2,code,docType=latex,
+ runs=2,code,docType=latex,
frame,usefancyvrb]{voss}
%StartVisiblePreamble
\documentclass[chapterprefix=on,parskip=half-,DIV=12,fontsize=12pt]{scrbook}
@@ -1596,7 +1576,6 @@ Whith this definition and the setting \Lkeyset{docType=ltx} the last example loo
frame,
compiler=pdflatex,
showFilename,
- force=true,
runs=2,code,docType=ltx,
usefancyvrb]{voss}
\documentclass[chapterprefix=on,parskip=half-,DIV=12,fontsize=12pt]{scrreprt}
@@ -1660,7 +1639,6 @@ It is already internally defined.
compiler=mpost,
showFilename,
% crop,
- force=true,
cleanup,
code,
docType=mp,
@@ -1696,7 +1674,6 @@ It is already internally defined.
compiler=tex,
showFilename,
% crop,
- force=true,
code,
docType=tex,
ext=tex,]{voss}
@@ -1762,7 +1739,6 @@ not needed. The \texttt{pdf} is directly created.
compiler=lualatex,
showFilename,
crop,
- force=true,
code,
docType=latex,
ext=tex,]{voss}
@@ -1804,7 +1780,6 @@ not needed. The \texttt{pdf} is directly created.
compiler=context,
showFilename,
runs=2,
- force=true,
code,
docType=context,
ext=tex,]{voss}
diff --git a/macros/latex/contrib/hvextern/latex/hvextern.sty b/macros/latex/contrib/hvextern/latex/hvextern.sty
index cfdd56053d..bfe8f75e8f 100644
--- a/macros/latex/contrib/hvextern/latex/hvextern.sty
+++ b/macros/latex/contrib/hvextern/latex/hvextern.sty
@@ -1,7 +1,7 @@
-%% $Id: hvextern.sty 833 2023-12-08 19:31:08Z herbert $
+%% $Id: hvextern.sty 853 2024-01-30 20:34:00Z herbert $
%% This is file `hvextern.sty',
%%
-%% Copyright (C) 2016-23
+%% Copyright (C) 2016-24
%% Herbert Voss
%%
%% It may be distributed and/or modified under the
@@ -12,8 +12,8 @@
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
-\def\hvexternFileversion{0.38}
-\ProvidesFile{hvextern}[2023/12/08 v\hvexternFileversion: package for running external documents (HV)]
+\def\hvexternFileversion{0.39}
+\ProvidesFile{hvextern}[2024/01/30 v\hvexternFileversion: package for running external documents (HV)]
\newif\ifhv@extern@checkCode
\hv@extern@checkCodefalse
@@ -72,6 +72,8 @@
\newlength\hv@extern@mpwidth \setlength\hv@extern@mpwidth{\z@}
+\newif\ifhv@extern@save@force@state
+
\define@key{hv}{progpath}{\def\hv@extern@progpath{#1}}
\define@key{hv}{runsequence}[]{\def\hv@extern@runsequence{#1}}
\define@key{hv}{runs}[1]{\setcounter{hv@extern@runs}{#1}}
@@ -106,7 +108,7 @@
\define@key{hv}{shiftFN}[0pt]{\setlength\hv@extern@shiftFN{#1}}
\define@key{hv}{vshift}[0pt]{\setlength\hv@extern@vshift{#1}}%
\define@boolkey{hv}[hv@extern@]{code}[true]{}
-\define@boolkey{hv}[hv@extern@]{force}[true]{}
+\define@boolkey{hv}[hv@extern@]{force}[true]{\@nameuse{hv@extern@save@force@state#1}}
\define@boolkey{hv}[hv@extern@]{crop}[true]{}
\define@boolkey{hv}[hv@extern@]{tcbox}[true]{}
\define@boolkey{hv}[hv@extern@]{biber}[true]{}
@@ -119,7 +121,7 @@
\define@key{hv}{framesep}[\the\fboxsep]{\setlength\hv@extern@framesep{#1}}
\define@boolkey{hv}[hv@extern@]{float}[true]{}
\define@key{hv}{floatsetting}[]{\def\hv@extern@floatsetting{#1}}
-\define@key{hv}{cleanup}[{aux,log}]{\def\hv@extern@cleanup{#1}}%
+\define@key{hv}{cleanup}[{aux,log,psaux}]{\def\hv@extern@cleanup{#1}}%
\define@boolkey{hv}[hv@extern@]{moveToExampleDir}[true]{}
\define@key{hv}{align}[\centering]{\def\hv@extern@align{#1}}
\define@key{hv}{ExampleDir}[Examples]{%
@@ -151,64 +153,64 @@
\def\ResetKeys{%
\setkeys{hv}{%
- showFilename=false,% Filenamen im Rand angeben
- outerFN=false,% use fullwidth in twocolumn mode (starred floats)
- shiftFN=\z@,% raise printed filename
- vshift=\z@,% raise object (pdf) with \raisebox{}{}
- ext=tex,% file extension
- code=false,% show Code
- crop=false,% erzeugte PDF "croppen"
- compiler=pdflatex,% zu verwendener Compiler
- shellesc=false,% use shell-escape
- redirect=false,% write output into a file *.txt
- tcbox=true,% use tcolorbox
- grfOptions={},% Optionen der einzubindenden Grafik
- lstOptions={},% Optionen für das Listing
- textOptions={},% Options for text output
+ align=\centering,% Ausgabe zentrieren
+ aboveskip=\medskipamount,% space above everything
+ belowpreambleskip=2pt, %\smallskipamount,% space below preamble
+ belowbodyskip=2pt, %\smallskipamount,% space below body
+ belowskip=\medskipamount,% space below everything
BGpreamble=black!12,% Backgroundcolor for preamble
BGbody=black!8,% Backgroundcolor for body
BOpreamble=black!12,% Bodercolor for preamble
BObody=black!8,% Bodercolor for body
- showoutput=true,% with false only code is shown
- includegraphic=true,% Grafik einbinden oder User überlassen
- inline=false,% Grafik nicht in derselben Zeile
- runs=1,% Anzahl Compiler-Durchläufe
- runsAfter=0, % Anzahl Durchläufe nach makeindex
- runsequence={},% Im Moment nicht aktiv
biber=false,% Biber laufen lassen?
- xindex=false,% xindex laufen lassen?
- xindexOptions={},% options for xindex
+ caption=,% keine Caption
+ cleanup={},% Hilfsdateien nicht löschen
+ code=false,% show Code
+ compiler=pdflatex,% zu verwendener Compiler
+ crop=false,% erzeugte PDF "croppen"
+ cropmargin=2,% 2pb margin
+ docType=latex,% LaTeX example Code
+ eps=false,% create an eps output?
+ ExampleDir=Examples,% Unterverzeichnis für Beispiele
+ ext=tex,% file extension
+ float=false,% nicht als Gleitumgebung
+ floatsetting=!htb,% placement
force=false,% Compiler, auch wenn PDF existiert?
frame=false,% keinen Rahmen um Abbildung
framesep=\the\fboxsep,%
- float=false,% nicht als Gleitumgebung
- floatsetting=!htb,% placement
- caption=,% keine Caption
+ grfOptions={},% Optionen der einzubindenden Grafik
+ includegraphic=true,% Grafik einbinden oder User überlassen
+ inline=false,% Grafik nicht in derselben Zeile
label=,% kein Label
- pages=1,% welche Seiten auszugeben sind
- pagesep=1em,% horizontal sep between pages
- docType=latex,% LaTeX example Code
- cleanup={},% Hilfsdateien nicht löschen
+ lstOptions={},% Optionen für das Listing
moveToExampleDir=false,% Verschieben nach ExamplesDir
- ExampleDir=Examples,% Unterverzeichnis für Beispiele
- align=\centering,% Ausgabe zentrieren
mpwidth=0pt,% no minipage
mpsep=1em,% sep between two minipages
mpvalign=t,% if side by side output the vertical alignment
- usefancyvrb=false,% use VerbatimInput instead of listings
+ outerFN=false,% use fullwidth in twocolumn mode (starred floats)
+ pages=1,% welche Seiten auszugeben sind
+ pagesep=1em,% horizontal sep between pages
progpath={},
- cropmargin=2,% 2pb margin
- eps=false,% create an eps output?
- aboveskip=\medskipamount,% space above everything
- belowpreambleskip=2pt, %\smallskipamount,% space below preamble
- belowbodyskip=2pt, %\smallskipamount,% space below body
- belowskip=\medskipamount,% space below everything
+ redirect=false,% write output into a file *.txt
+ runs=1,% Anzahl Compiler-Durchläufe
+ runsAfter=0, % Anzahl Durchläufe nach makeindex
+ runsequence={},% Im Moment nicht aktiv
+ shellesc=false,% use shell-escape
+ shiftFN=\z@,% raise printed filename
+ showFilename=false,% Filenamen im Rand angeben
+ showoutput=true,% with false only code is shown
+ tcbox=true,% use tcolorbox
+ textOptions={},% Options for text output
+ usefancyvrb=false,% use VerbatimInput instead of listings
+ verbose=false,% no extra output in the logfile
+ vshift=\z@,% raise object (pdf) with \raisebox{}{}
+ xindex=false,% xindex laufen lassen?
+ xindexOptions={},% options for xindex
}%
}
\ResetKeys
-
\ifhv@extern@checkCode
\ifluatex
\hv@ex@typeout{Loading hvextern.lua}%
@@ -464,8 +466,9 @@
\let\endfilecontents\endcomment
\fi
\filecontents[force,noheader]{\hvExternFilename\hv@extern@ext}%
- }
- {\endfilecontents
+ }% end \begin{externaldocument} env
+ {% start \end{externaldocument} env
+ \endfilecontents
\ifhv@extern@shellescape\hv@ex@typeout{... done}\fi
\global\stepcounter{hv@example@counter}%
\endgroup
@@ -489,7 +492,7 @@
\global\hv@extern@forcefalse
\else
\hv@ex@typeout{current file is newer: force run }%
- \global\hv@extern@forcetrue
+ \hv@extern@forcetrue
\fi
\ifhv@extern@verbose\else\ShellEscape{\hv@rm \hvExternFilename\hv@extern@ext.diff}\fi
\fi
@@ -564,7 +567,7 @@
\ifhv@extern@eps
\ShellEscape{pdftops -eps -f 1 -l 1 \hvExternFilename.pdf}%
\fi
- \else
+ \else % if force ...
\hv@ex@typeout{force=false: NOT running \hvExternFilename\hv@extern@ext ...}%
\fi% end force
\hfuzz=\maxdimen
@@ -713,6 +716,11 @@
\expandafter\run@hv@extern@cleanup\expandafter{\hv@extern@cleanup}%
\fi% cleanup
\vspace{\hv@extern@belowskip}%
+ \ifhv@extern@save@force@state
+ \global\hv@extern@forcetrue
+ \else
+ \global\hv@extern@forcefalse
+ \fi% restore value
}
\newcommand\runExtCmd[3][]{% #1:options; #2:comamnd; #3:filename
@@ -894,6 +902,7 @@
\expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternFilename.pdf}{}{%
\expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternFilename.png}{}{%
\expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternFilename.txt}{}{%
+ \gdef\hv@extern@save@force@state{}
\global\hv@extern@forcetrue}}}% set force, if no pdf or png exists
\begingroup
\hv@ex@typeout{writing file \hvExternFilename\hv@extern@ext ...}%
diff --git a/macros/latex/contrib/hvextern/script/hvextern-checkfile.lua b/macros/latex/contrib/hvextern/script/hvextern-checkfile.lua
index ea163c6a72..ea163c6a72 100644..100755
--- a/macros/latex/contrib/hvextern/script/hvextern-checkfile.lua
+++ b/macros/latex/contrib/hvextern/script/hvextern-checkfile.lua
diff --git a/macros/latex/contrib/leftindex/README.md b/macros/latex/contrib/leftindex/README.md
index 7832b57454..8e2ae62c88 100644
--- a/macros/latex/contrib/leftindex/README.md
+++ b/macros/latex/contrib/leftindex/README.md
@@ -7,10 +7,11 @@ providing much better spacing in general.
----------------------------------------------------------------
leftindex -- left indices with better spacing
-Version: 0.1beta
+Version: 0.2beta
Maintained by Sebastian Ørsted
E-mail: sorsted@gmail.com
Released under the LaTeX Project Public License v1.3c or later
+
See http://www.latex-project.org/lppl.txt
----------------------------------------------------------------
diff --git a/macros/latex/contrib/leftindex/leftindex.pdf b/macros/latex/contrib/leftindex/leftindex.pdf
index 01950aa9a3..abeefe6113 100644
--- a/macros/latex/contrib/leftindex/leftindex.pdf
+++ b/macros/latex/contrib/leftindex/leftindex.pdf
Binary files differ
diff --git a/macros/latex/contrib/leftindex/leftindex.sty b/macros/latex/contrib/leftindex/leftindex.sty
index fdd7a6a822..406c7a973e 100644
--- a/macros/latex/contrib/leftindex/leftindex.sty
+++ b/macros/latex/contrib/leftindex/leftindex.sty
@@ -1,9 +1,9 @@
\RequirePackage{xparse,mathtools}
-\ProvidesExplPackage{leftindex}{2020/08/25}{0.1beta}{}
+\ProvidesExplPackage{leftindex}{2024/01/31}{0.2beta}{}
%----------------------------------------------------------------
% leftindex -- left indices with better spacing
-% Version: 0.1beta
+% Version: 0.2beta
% Maintained by Sebastian Ørsted
% E-mail: sorsted@gmail.com
% Released under the LaTeX Project Public License v1.3c or later
@@ -35,7 +35,7 @@
\manualleftindex { #2 } { #1 } { #3 } { #4 }
}
{
- \manualleftindex { #5 } { #1 } { #3 } { #4 }
+ \manualleftindex { #1 } { #1 } { #3 } { #4 }
}
}
{
@@ -44,6 +44,27 @@
#5
}
+\DeclareDocumentCommand\LeftIndex { o o E{^_}{{}{}} }
+{
+ % #1 = slanting phantom
+ % #2 = height phantom
+ % #3 = left superscript
+ % #4 = left subscript
+ \IfValueTF {#1}
+ {
+ \IfValueTF{#2}
+ {
+ \manualleftindex { #2 } { #1 } { #3 } { #4 }
+ }
+ {
+ \manualleftindex { #1 } { #1 } { #3 } { #4 }
+ }
+ }
+ {
+ \manualleftindex { } { } { #3 } { #4 }
+ }
+}
+
\ExplSyntaxOn
\cs_new_protected:Npn\leftindex_kern_horizontal:n#1
@@ -131,13 +152,13 @@
\box_wd:N \l__leftindex_subscript_temp_box
}
}
+ \mathop{}
\leftindex_kern_horizontal:n
{
\dim_max:nn
{ \l__leftindex_width_of_superscript_dim }
{ \l__leftindex_width_of_subscript_dim }
}
- \mathop{}
\mathopen{ \vphantom { #2 } }
\tl_if_blank:nF { #4 }
{
diff --git a/macros/latex/contrib/leftindex/leftindex.tex b/macros/latex/contrib/leftindex/leftindex.tex
index 45f21c4c20..dd7161dec8 100644
--- a/macros/latex/contrib/leftindex/leftindex.tex
+++ b/macros/latex/contrib/leftindex/leftindex.tex
@@ -5,7 +5,7 @@
\usepackage{babel}
\usepackage{kpfonts,microtype}
-\usepackage{leftindex,listings,showexpl,xspace}
+\usepackage{leftindex,listings,showexpl}
\usepackage[hidelinks]{hyperref}
@@ -35,9 +35,9 @@
explpreset={numbers=none,},
}
-\newcommand\pkgleftindex{\texttt{leftindex}\xspace}
+\newcommand\pkgleftindex{\texttt{leftindex}}
-\title{\pkgleftindex\ -- left indices with better spacing (v0.1$\beta$)}
+\title{\pkgleftindex\ -- left indices with better spacing (v0.2$\beta$)}
\date{\today}
\author{Sebastian \O rsted (\href{mailto:sorsted@gmail.com}{sorsted@gmail.com})}
@@ -51,8 +51,8 @@
\maketitle
\noindent
-The package \pkgleftindex provides commands for typesetting left indices.
-Unlike any other similar package I know of, \pkgleftindex also indents the left superscript, providing much better spacing in general:
+The package \pkgleftindex\ provides commands for typesetting left indices.
+Unlike any other similar package I know of, \pkgleftindex\ also indents the left superscript, producing much better spacing in general:
\[
\leftindex^a_b{f}
\qquad\text{(compare to $\leftindex[]^a_b{f}$)}
@@ -62,14 +62,14 @@ As \TeX\ provides no metrics for the indentation of left superscripts,
the only way to accomplish this is to measure the negative indentation of the right subscript and then use that value.
This works well for most symbols, with a few exceptions, which can be dealt with by
supplying a few extra arguments.
-The package is a generalization of egreg's excellent code on
+The package is a generalization of egreg's excellent code found at
\begin{center}
\url{https://tex.stackexchange.com/questions/557655/low-level-command-for-controlling-left-superscript-spacing/}
\end{center}
\chapter*{The commands}
-The fundamental, user-level command of~\pkgleftindex is called~\lstinline!\leftindex! and has
+The main user-level command of~\pkgleftindex\ is called~\lstinline!\leftindex! and has
the syntax
\begin{lstlisting}
\leftindex^{@<left superscript>@}_{@<left subscript>@}{@<symbol>@}
@@ -87,7 +87,7 @@ $ \leftindex{A} $,
f(x)\, dx
\]
\end{LTXexample}
-For the indentaiton of the left superscript, the package always
+For the indentaiton of the left superscript, the package by default
uses the negative indentation of the right subscript. This yields good results
most of the time, as seen above. However, there are cases where this goes wrong,
the most notable example being the Greek letter~$ \Gamma $ in many fonts (not in Computer Modern, though). Less serious examples arise with letters like $P$ and $L$:
@@ -115,27 +115,42 @@ $\leftindex[]^a_b {\Gamma}$,
$\leftindex[I]^a_b {L}$,
$\leftindex[I]^a_b {P}$
\end{LTXexample}
-The <slanting phantom> will never be used for calculating the height of the indices.
-For this, you can supply a <height phantom>:
+By default, the <slanting phantom> is also used for calculating the height of the indices.
+If this is not the behaviour you want, you can supply an additional <height phantom>:
\begin{LTXexample}
$\leftindex[][\Bigg|]^a_b{x}$
\end{LTXexample}
I doubt anyone will ever really need this much in practice, but the option is provided for completeness.
-I provide a more primitive, underlying command with four mandatory arguments:
+Sometimes, having to include the symbol as a mandatory argument can be a burden. For these cases, I also provide the command~\lstinline!\LeftIndex! with the syntax:
+\begin{lstlisting}
+\LeftIndex[@<slanting phantom>@][@<height phantom>@]
+ ^{@<left superscript>@}_{@<left subscript>@}
+\end{lstlisting}
+Here, all arguments are optional.
+With this, we can do stuff like:
+\begin{LTXexample}
+$\LeftIndex^a_b \Gamma $,
+$\LeftIndex[]^a_b L $,
+$\LeftIndex[I]^a_b$,
+$\LeftIndex[I]^a_b$
+\end{LTXexample}
+
+
+I also provide the more primitive, underlying command with four mandatory arguments:
\begin{lstlisting}
\manualleftindex{@<height phantom>@}{@<slanting phantom>@}
{@<left superscript>@}{@<left subscript>@}
\end{lstlisting}
This one is mainly intended for use in commands and by other packages.
Note that the arguments <height phantom> and <slanting phantom> have
-switched places compared to the command~\lstinline!\leftindex!.
+switched places compared to the commands \lstinline!\leftindex! and~\lstinline!\LeftIndex!.
This is because <height phantom> is regarded as a ``more important''
argument than <slanting phantom> from an implementation point of view,
but the user is probably less likely to change it. Therefore,
-the user-level command~\lstinline!\leftindex! has <slanting phantom>
+the user-level commands \lstinline!\leftindex! and~\lstinline!\LeftIndex! have <slanting phantom>
before <height phantom>.
-Note also that \lstinline!\manualleftindex! does not take a <symbol>;
+Note also that \lstinline!\manualleftindex! (like \lstinline!\LeftIndex!) does not take a <symbol>;
you will have to write this yourself afterwards:
\begin{LTXexample}
$\manualleftindex{P}{I}{a}{b}$
diff --git a/macros/latex/contrib/litetable/doc/favicon.png b/macros/latex/contrib/litetable/doc/favicon.png
new file mode 100644
index 0000000000..4e105b2ce0
--- /dev/null
+++ b/macros/latex/contrib/litetable/doc/favicon.png
Binary files differ
diff --git a/macros/latex/contrib/litetable/doc/litetable-demo.pdf b/macros/latex/contrib/litetable/doc/litetable-demo.pdf
index f9ed4fafbb..3ee841c94d 100644
--- a/macros/latex/contrib/litetable/doc/litetable-demo.pdf
+++ b/macros/latex/contrib/litetable/doc/litetable-demo.pdf
Binary files differ
diff --git a/macros/latex/contrib/litetable/doc/litetable-demo.tex b/macros/latex/contrib/litetable/doc/litetable-demo.tex
index c40f8e3415..33d6f53b41 100644
--- a/macros/latex/contrib/litetable/doc/litetable-demo.tex
+++ b/macros/latex/contrib/litetable/doc/litetable-demo.tex
@@ -1,32 +1,68 @@
\documentclass[libertinus]{litetable}
\begin{document}
-\begin{tikzpicture}[scale=0.05]
- \makeframe{Timetable -- Semester 5}% make title & background
+
+\timelist{
+8:05,8:55,10:00,10:50,11:40,13:30,14:20,15:15,16:05,18:30,19:20,20:10;
+8:50,9:40,10:45,11:35,12:25,14:15,15:05,16:00,16:50,19:15,20:05,20:55}
+\sticker{favicon}
+
+\begin{tikzpicture}
+ \makeframe{Axia\!\texttt{'}\!s Timetable -- Semester 5}% make title & background
% Mon.
- \course{H1}{1}{1}{2}{Badminton}{Badminton Court}{Yongsheng Yu}{Week 1 -- 18}
- \course{H7}{1}{3}{5}{Lens Design Expt}{Building 6·South 402}{Hao Ying}{Week 5 -- 15}
- % Tue.
- \course{H9}{2}{3}{5}{Marx's Principles}{Building 6·320}{Yang Wang}{Week 1 -- 18}
- \course{H8}{2}{6}{8}{Photoelectric Det}{Building 6·320}{Xuefeng Huang}{Week 1 -- 18}
- % Wed.
- \course{H7}{3}{3}{4}{Laster Tech}{Building 6·301}{Haidan Mao}{Week 1 -- 18}
- \course{H9}{3}{6}{7}{Empt 3 | Situ 5}{Bldg 6·301 | Situ 6·208}{Mjh | Qxr}{Week 5 -- 14}
- \course{H5}{3}{8}{9}{Computational Phys}{Building 6·215}{Wenjia Rao}{Week 1 -- 18}
- \course{H1}{3}{10}{11}{Essay Writing}{Building 6·416}{Yueqin Shi}{Week 1 -- 18}
- % Thu.
- \course{H6}{4}{1}{2}{Sensing System}{Building 6·110}{Benxiao Cai}{Week 1 -- 18}
- \course{H5}{4}{3}{5}{AQM}{Building 6·225}{Yuan Li \& Mengnan Chen}{Week 1 -- 18}
- \course{H3}{4}{6}{8}{Modern Phys Expt 2}{Building 6·South}{Xiangxiang Chen}{Week 5 -- 16}
- \course{H8}{4}{10}{12}{OE Info Expt 1}{Building 6·South 302}{Yu Zhou}{Week 5 -- 15}
- % Fri.
- \course{H7}{5}{1}{2}{Lens Design}{Building 6·422}{Hao Ying}{Week 1 -- 18}
- \course{H5}{5}{3}{5}{Optoelectronics}{Building 6·202}{Ruixue Li \& Yuan Li}{Week 1 -- 18}
- \course{H8}{5}{6}{7}{Innovative Practice 4}{Building 7·216B}{Qinglong Huang}{Week 5 -- 16}
- \course{H5}{5}{8}{9}{Group Meeting}{Building 6·Middle}{Yuan Li}{Week 1 -- 18}
- \more{\textbf{·School Starts}: 11/09/2023 \textbf{·Winter Vacation}: 26/01/2024 \textbf{·Hangzhou Asian Games}: 23/09/2023 -- 08/10/2023}
+ \course{H1}{1}{2}{Badminton}{Badminton Court}{Yongsheng Yu}{Week 1 -- 18}
+ \course{H7}{3}{5}{Lens Design Expt}{Building 6·South 402}{Hao Ying}{Week 5 -- 15}
+ \newday % Tue.
+ \course{H9}{3}{5}{Marx's Principles}{Building 6·320}{Yang Wang}{Week 1 -- 18}
+ \course{H8}{6}{8}{Photoelectric Det}{Building 6·320}{Xuefeng Huang}{Week 1 -- 18}
+ \newday % Wed.
+ \course{H7}{3}{4}{Laster Tech}{Building 6·301}{Haidan Mao}{Week 1 -- 18}
+ \course{H9}{6}{7}{Empt 3 | Situ 5}{Bldg 6·301 | Situ 6·208}{Mjh | Qxr}{Week 5 -- 14}
+ \course{H5}{8}{9}{Computational Phys}{Building 6·215}{Wenjia Rao}{Week 1 -- 18}
+ \course{H1}{10}{11}{Essay Writing}{Building 6·416}{Yueqin Shi}{Week 1 -- 18}
+ \newday % Thu.
+ \course{H6}{1}{2}{Sensing System}{Building 6·110}{Benxiao Cai}{Week 1 -- 18}
+ \course{H5}{3}{5}{AQM}{Building 6·225}{Yuan Li \& Mengnan Chen}{Week 1 -- 18}
+ \course{H3}{6}{8}{Modern Phys Expt 2}{Building 6·South}{Xiangxiang Chen}{Week 5 -- 16}
+ \course{H8}{10}{12}{OE Info Expt 1}{Building 6·South 302}{Yu Zhou}{Week 5 -- 15}
+ \newday % Fri.
+ \course{H7}{1}{2}{Lens Design}{Building 6·422}{Hao Ying}{Week 1 -- 18}
+ \course{H5}{3}{5}{Optoelectronics}{Building 6·202}{Ruixue Li \& Yuan Li}{Week 1 -- 18}
+ \course{H8}{6}{7}{Innovative Practice 4}{Building 7·216B}{Qinglong Huang}{Week 5 -- 16}
+ \course{H5}{8}{9}{Group Meeting}{Building 6·Middle}{Yuan Li}{Week 1 -- 18}
+ \more{·School Starts: 11 / 09 / 2023 ·Winter Vacation: 26 / 01 / 2024 ·Hangzhou Asian Games: 23 / 09 / 2023 -- 08 / 10 / 2023}
\end{tikzpicture}
-\begin{tikzpicture}[scale=0.05]
- \makeframe{Timetable -- Semester 6}% make title & background
+
+
+
+
+
+
+
+\begin{tikzpicture}
+ \makeframe{Axia\!\texttt{'}\!s Timetable -- Semester 6}
+
+ % Mon.
+ \course{H5}{7}{8}{Introduction to Cond.}{Building 6·225}{Mn Chen}{Week 1 -- 16}
+
+ \newday % Tue.
+ \course{H1}{8}{9}{Group Theory}{Building 6·211}{Li Ge}{Week 1 -- 16}
+ \course{H5}{10}{11}{Mesoscopic Physics}{Building 6·211}{Yuan Li \& Mn Chen}{Week 1 -- 16}
+
+ \newday % Wed.
+ \course{H6}{1}{2}{Engineering Drawing}{Building 7·3012}{Hc Wang}{Week 1 -- 16}
+ \course{H9}{8}{9}{Situation \& Policy 6}{Building 6·302}{Xr Qi}{Double Week 10 -- 16}
+ \course{H9}{10}{11}{Operational Simu.}{Building 4·411 -- 413}{Li Zhang}{Week 1 -- 8}
+
+ \newday % Thu.
+ \course{H4}{1}{2}{Intercultural Comm.}{Building 3·422}{Cl Zuo}{Week 1 -- 16}
+ \course{H2}{3}{4}{Radio Direction}{Athletic Field}{Ys Yu}{Week 1 -- 16}
+ \course{H5}{6}{8}{Solid State Physics}{Building 6·408}{Kw Sun}{Week 1 -- 16}
+
+ \newday % Fri.
+ \course{H8}{1}{2}{OE. Display}{Building 7·3012}{Wt Su}{Week 1 -- 16}
+ \course{H3}{6}{8}{Group Meeting}{Building 6·Middle}{Yuan Li}{Week 1 -- 16}
+
+ \more{·School Start: 04 / 03 / 2024 ·Summer Vacation: 05 / 07 / 2024}
\end{tikzpicture}
\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/litetable/doc/litetable-doc-cn.pdf b/macros/latex/contrib/litetable/doc/litetable-doc-cn.pdf
new file mode 100644
index 0000000000..67810c50cd
--- /dev/null
+++ b/macros/latex/contrib/litetable/doc/litetable-doc-cn.pdf
Binary files differ
diff --git a/macros/latex/contrib/litetable/doc/litetable-doc-cn.tex b/macros/latex/contrib/litetable/doc/litetable-doc-cn.tex
new file mode 100644
index 0000000000..498167f8c3
--- /dev/null
+++ b/macros/latex/contrib/litetable/doc/litetable-doc-cn.tex
@@ -0,0 +1,210 @@
+%% ******************************************************
+%% * This work may be distributed and/or modified under *
+%% * the conditions of the LaTeX Project Public License *
+%% * http://www.latex-project.org/lppl.txt *
+%% * either version 1.3c of this license or any later *
+%% * version. *
+%% ******************************************************
+\PassOptionsToPackage{quiet}{xeCJK}
+\PassOptionsToPackage{quiet}{fontspec}
+\PassOptionsToPackage{no-math}{fontspec}
+\documentclass[11pt]{article}
+\usepackage{geometry}
+\usepackage{indentfirst,setspace}
+\usepackage[toc]{multitoc}
+\setlength{\parindent}{2em}
+\setstretch{1.25}
+\usepackage{pdfpages}
+\usepackage[level]{datetime}
+\usepackage{unicode-math,xeCJK}
+\usepackage{authblk}
+\setmainfont{Libertinus Serif}
+\setsansfont{Libertinus Sans}
+\setCJKmainfont{SimSong}[BoldFont=Chiron Sung HK, ItalicFont=Kaiti SC]
+\makeatletter
+\usepackage{listings,dirtree}
+\lstdefinestyle{TeX}{
+ language = [LaTeX]TeX,
+ texcsstyle = *\color{H7},
+ numbers = none,
+ basicstyle = {\small\color{H6}\tt},
+ mathescape = false,
+ breaklines = true,
+ columns = fixed,
+ keywordstyle = \color{H3},
+ commentstyle = \color{darkgray},
+ tabsize = 2,
+ keywords = {mail,flyleaf,sticker,logo,notebook,chapter,newnote,newnotesss,newnotessss,emptynote,newhdunote,
+ makeframe,course,more}
+}
+\usepackage{hyperref,xcolor,verbatim}
+
+\definecolor{pkgcolor}{Hsb}{103,.8,.5}
+\definecolor{moducolor}{Hsb}{290,.8,.5}
+\definecolor{cmdcolor}{Hsb}{188,.8,.5}
+\definecolor{filecolor}{Hsb}{207,.6,.7}
+\definecolor{H1}{Hsb}{349,.8,.8}% 海棠紅 (Hangzhou MTR L 1 )
+\definecolor{H2}{Hsb}{23, .8,.8}% 丹桂橙 (Hangzhou Metro 2 )
+\definecolor{H3}{Hsb}{48, .8,.8}% 柠檬黄 (Hangzhou Metro 3 )
+\definecolor{H4}{Hsb}{103,.8,.8}% 香樟绿 (Hangzhou Metro 4 )
+\definecolor{H5}{Hsb}{188,.8,.8}% 青藍色 (Hangzhou MTR L 5 )
+\definecolor{H6}{Hsb}{207,.8,.8}% 海洋蓝 (Hangzhou Metro 6 )
+\definecolor{H7}{Hsb}{290,.8,.8}% 浪漫紫 (Hangzhou Metro 7 )
+\hypersetup{colorlinks,urlcolor=H1,linkcolor=H2,filecolor=filecolor,pdfstartview=FitH,pdfview=FitH,pdfcreator=XeTeX output}
+
+\renewcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.1em}}
+\def\pkg#1{\texorpdfstring{\textcolor{pkgcolor}{\textsf{#1}}}{“#1”}}
+\def\mode#1{\texorpdfstring{\textcolor{moducolor}{\textsf{#1}}}{“#1”}}
+\def\cmd#1{\texorpdfstring{\textcolor{cmdcolor}{\textsf{#1}}}{“#1”}}
+\def\datechange#1#2{%
+ \noindent{\makebox[\textwidth][r]{\color{H7}\rule{1.15\textwidth}{.4pt}}}
+ \noindent\makebox[0pt][r]{\makebox[-3em][r]{\small\textbf{\textcolor{H7}{#1}}}\;\;}{\sffamily Update: \ignorespaces#2}}
+\makeatother
+
+\title{The \pkg{LiteTable} Template}
+\author[1]{Xia Mingyu, \href{https://www.hdu.edu.cn}{Hangzhou Dianzi University}}
+\yyyymmdddate
+\date{\today}
+\affil[1]{\href{mailto:xiamyphys@gmail.com}{\texttt{xiamyphys@gmail.com}}}
+\date{\today\quad Version 2.2a\thanks{%
+ \url{https://github.com/xiamyphys/litetable}}}
+\begin{document}
+\maketitle
+
+\vspace{-2em}
+\begin{abstract}
+\pkg{LiteTable} 模板提供了一个多彩的课程表设计,本文档为\pkg{LiteTable} 模板的说明文档.
+
+\end{abstract}
+
+\tableofcontents\clearpage
+
+\section{Introduction}
+
+\subsection{本模板的目的}
+本模板提供了一个多彩的课程表设计.
+
+如果你在使用本模板时遇到问题,或者有更好的建议,或者你想参与本模板或本人其他模板的开发,欢迎通过邮件 \href{mailto:xiamyphys@gmail.com}{xiamyphys@gmail.com} 联络我.
+
+同样,你也可以加入我的\textsf\LaTeX{} 技術交流群 \href{https://qm.qq.com/q/OnHzbNvVAG}{QQ Group: 760570712} 与我交流,来获取模板的内测版本.
+
+\subsection{所需宏集}
+本模板基于 \pkg{standalone} 文档类开发. 其需要 \pkg{tikz} 宏集去绘制图形,\pkg{kvoptions} 和 \pkg{etoolbox} 宏集用于提供全局选项,\pkg{expl3} 宏基用于支持数组,\pkg{ctex}宏集用于支持中文语言,\pkg{fontawesome5} 宏集提供一系列精美的图标.
+
+我强烈建议您使用终端机去执行以下命令,以将所有宏集更新到最新版本
+\begin{verbatim}
+ tlmgr update --self
+ tlmgr update --all
+\end{verbatim}
+
+如果您所在的地区存在网路封锁,你可以选择合适的镜像网站或其他方法\footnote{请遵循当地的网路条例.}. 欲详细了解,请前往 \href{https://tex.stackexchange.com/questions/55437/how-do-i-update-my-tex-distribution}{How do I update my TEX distribution?}
+
+\subsection{载入 \pkg{LiteTable} 和其模式}
+将文件 \verb|litetable.cls| 保存至你的项目根目录,然后创立一个 \verb|.tex| 文件,只需在第一行输入命令 \verb|\documentclass{litetable}| 即可.
+
+本模板提供了三个模式:\mode{date},\mode{style} 和 \mode{font}. 只需将你想要使用的模式选项分别添加在你的 \verb|.tex| 文件中命令 \verb|\documentclass[options]{litetable}| 的方括号中即可.
+
+\newpage
+\section{\pkg{LiteTable} 的模式}
+\begin{verbatim}
+ \documentclass[options]{litetable}
+\end{verbatim}
+\subsection{\mode{date} 模式}
+此模式有两个选项,\mode{en} 和 \mode{cn},可分别使工作日以英文或大陆简体显示,默认为英文.
+
+\subsection{\mode{style} 模式}
+此模式有两个选项,\mode{round} 和 \mode{sharp},可分别使课程块圆角或直角显示,默认为直角.
+
+\subsection{\mode{font} 模式}
+此模式有两个选项,\mode{times} 和 \mode{libertinus},可分别使字体为 ``Times New Roman'' 或 ``Libertinus'',默认为 ``Times New Roman''.\footnote{在使用 ``Libertinus'' 选项前请确保电脑中已安装该字体.}
+
+\section{\pkg{LiteTable} 的命令}
+
+\subsection{\cmd{makeframe} 命令}
+\begin{verbatim}
+ \makeframe{Timetable -- Semester 5}
+\end{verbatim}
+
+此命令可建立一个标题为 ``Timetable -- Semester 5'' 的空白课程表.
+
+\subsection{The \cmd{timelist} command}
+\begin{verbatim}
+ \timelist{
+ 8:05,8:55,10:00,10:50,11:40,13:30,14:20,15:15,16:05,18:30,19:20,20:10;
+ 8:50,9:40,10:45,11:35,12:25,14:15,15:05,16:00,16:50,19:15,20:05,20:55
+ }
+\end{verbatim}
+
+此命令可将时间添加至课程表的左侧,内容的第一行是每节课程开始时间,第二行是每节课程的结束时间,时间之间用逗号(\verb|,|)分隔,第一行与第二行之间用分号(\verb|;|)分隔.
+
+本课程表目前只支持每天12节课. 在后续更新中,将支持自定义每天的课程节数,敬请期待!
+
+\subsection{\cmd{course} 命令}
+\begin{verbatim}
+ \course{H5}{3}{5}{AQM}{Building 6·225}{Yuan Li \& Mengnan Chen}{Week 1 -- 18}
+\end{verbatim}
+
+此命令共有7个变量.
+\begin{itemize}
+ \item 第一个为你想选择的课程块颜色,从 ``H1'' 到 ``H9'' 可选.
+ \item 第二个和第三个为课程的起始节数和结束节数.
+ \item 第四个为课程的名称.
+ \item 第五个为课程的地址.
+ \item 第六个为教师的名字.
+ \item 第七个为课程的起始周和结束周.
+\end{itemize}
+
+\subsection{\cmd{newday} 命令}
+此命令可切换当前日到第二天,此时课程块会右移一格.
+
+\subsection{\cmd{more} 命令}
+\begin{verbatim}
+ \more{·School Start: 04 / 03 / 2024 ·Summer Vacation: 05 / 07 / 2024}
+\end{verbatim}
+此命令可在课程表末尾添加备注信息.
+
+\subsection{\cmd{sticker} 命令}
+\begin{verbatim}
+ \sticker{favicon}
+\end{verbatim}
+在使用此命令后页面的右下方会添加一张贴纸.
+
+\newpage
+\section{版本历史}
+
+课程表的设计源于杭电助手(\href{https://www.hdu.edu.cn}{杭州电子科技大学}\footnote{https://en.wikipedia.org/wiki/Hangzhou\_Dianzi\_University})学生课表页面\footnote{仅本校师生可访问.} 页面排版十分精美,于是本人使用\LaTeX{} 复刻出了课程表样式,并制作成模板分享给大家.
+
+\textsf{\bfseries Version 1.0} 于01/09/2023完成开发,并发布在\href{https://www.latexstudio.net/index/details/index/mid/3625.html}{LaTeX 工作室} (杭州萧山)和\href{http://xhslink.com/od7Ycw}{小红书}上,赢得了许多人的喜爱.
+
+\textsf{\bfseries Version 2.0a}于01/11/2023完成开发,并发布在\href{https://www.latexstudio.net/index/details/index/mid/3636.html}{LaTeX 工作室} (杭州萧山)和\href{http://xhslink.com/od7Ycw}{小红书}上. 此版本使用 \verb|.cls| 文件,使 \verb|main.tex| 文件更简洁. 同时,此版本添加了全局选项,可设置 ``课程块" 显示为圆角或直角. 此版本也支持一个 \verb|.tex| 文件中生成多张课表.
+
+\textsf{\bfseries Version 2.1a} 于05/11/2023完成开发. 支持 libertinus 字体.
+
+\textsf{\bfseries Version 2.2a} 于31/01/2024完成开发. 此版本修复了分辨率超出的bug,更改纸张类型为美国信纸并支持自定义课程起始和结束时间.
+
+\datechange{01/09/2023}{Version 2.0a}
+\begin{itemize}
+ \item 支持课程块显示为圆角或直角.
+ \item 支持一个 \verb|.tex| 文件中生成多张课表.
+\end{itemize}
+
+\datechange{05/11/2023}{Version 2.1a}
+\begin{itemize}
+ \item 支持 libertinus 字体.
+\end{itemize}
+
+\datechange{31/01/2024}{Version 2.2a}
+\begin{itemize}
+ \item 修复了分辨率超出的bug.
+ \item 更改纸张类型为美国信纸.
+ \item 支持自定义课程起始和结束时间.
+ \item 支持在页面右下角添加一个你喜欢的小贴纸.
+\end{itemize}
+
+\newpage\setstretch{1}
+\appendix
+\section{代码示例}
+\lstinputlisting[style=TeX]{litetable-demo.tex}
+
+\includepdf[pages=last-1,nup=1x2,angle=90]{litetable-demo.pdf}
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/litetable/doc/litetable-doc-en.pdf b/macros/latex/contrib/litetable/doc/litetable-doc-en.pdf
new file mode 100644
index 0000000000..1a201097da
--- /dev/null
+++ b/macros/latex/contrib/litetable/doc/litetable-doc-en.pdf
Binary files differ
diff --git a/macros/latex/contrib/litetable/doc/litetable-doc.tex b/macros/latex/contrib/litetable/doc/litetable-doc-en.tex
index ffe0a79b26..e799e32b6f 100644
--- a/macros/latex/contrib/litetable/doc/litetable-doc.tex
+++ b/macros/latex/contrib/litetable/doc/litetable-doc-en.tex
@@ -5,11 +5,14 @@
%% * either version 1.3c of this license or any later *
%% * version. *
%% ******************************************************
+\PassOptionsToPackage{quiet}{xeCJK}
+\PassOptionsToPackage{quiet}{fontspec}
+\PassOptionsToPackage{no-math}{fontspec}
\documentclass[11pt]{article}
\usepackage{geometry}
\usepackage{pdfpages}
\usepackage[level]{datetime}
-\usepackage{unicode-math}
+\usepackage{unicode-math,xeCJK}
\usepackage{authblk}
\setmainfont{Libertinus Serif}
\setsansfont{Libertinus Sans}
@@ -36,6 +39,7 @@
makeframe,course,more}
}
\usepackage{hyperref,xcolor,verbatim}
+
\definecolor{pkgcolor}{Hsb}{103,.8,.5}
\definecolor{moducolor}{Hsb}{290,.8,.5}
\definecolor{cmdcolor}{Hsb}{188,.8,.5}
@@ -50,10 +54,7 @@
\hypersetup{colorlinks,urlcolor=H1,linkcolor=H2,filecolor=filecolor,pdfstartview=FitH,pdfview=FitH,pdfcreator=XeTeX output}
\renewcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.1em}}
-\def\@pkg#1{\texorpdfstring{\href{https://www.ctan.org/pkg/#1}%
-{\textcolor{pkgcolor}{\textsf{#1}}}}{“#1”}}
-\def\s@pkg#1{\texorpdfstring{\textcolor{pkgcolor}{\textsf{#1}}}{“#1”}}
-\DeclareRobustCommand\pkg{\@ifstar\s@pkg\@pkg}
+\def\pkg#1{\texorpdfstring{\textcolor{pkgcolor}{\textsf{#1}}}{“#1”}}
\def\mode#1{\texorpdfstring{\textcolor{moducolor}{\textsf{#1}}}{“#1”}}
\def\cmd#1{\texorpdfstring{\textcolor{cmdcolor}{\textsf{#1}}}{“#1”}}
\def\datechange#1#2{%
@@ -63,10 +64,10 @@
\title{The \pkg{LiteTable} Template}
\author[1]{Xia Mingyu, \href{https://www.hdu.edu.cn}{Hangzhou Dianzi University}}
-\ddmmyyyydate
+\yyyymmdddate
\date{\today}
\affil[1]{\href{mailto:xiamyphys@gmail.com}{\texttt{xiamyphys@gmail.com}}}
-\date{\today\quad Version 2.0a\thanks{%
+\date{\today\quad Version 2.2a\thanks{%
\url{https://github.com/xiamyphys/litetable}}}
\begin{document}
\maketitle
@@ -88,7 +89,7 @@ If you meet bugs when using this template, or you have better suggestions or ide
Also, you can join my \textsf\LaTeX{} Template Discussion \href{https://qm.qq.com/q/OnHzbNvVAG}{QQ Group: 760570712} to communicate with me and get the insider preview edition of the template.
\subsection{Packages required}
-This template is based on the template \pkg{standalone}. And it requires \pkg{tikz} package to plot some graphics, \pkg{kvoptions} and \pkg{etoolbox} packages to provide global opinions, \pkg{ctex} package to supports the \textbf{Chinese, Simplified} language and \pkg{fontawesome5} package to provides a set of beautiful icons.
+This template is based on the template \pkg{standalone}. And it requires \pkg{tikz} package to plot some graphics, \pkg{kvoptions} and \pkg{etoolbox} packages to provide global options, \pkg{expl3} package to support \cmd{timelist} array, \pkg{ctex} package to supports the \textbf{Chinese, Simplified} language and \pkg{fontawesome5} package to provides a set of beautiful icons.
I strongly suggest that you should use cmd to implement the commands to update all the packages to the latest version or switch to portable version instead.
\begin{verbatim}
@@ -101,18 +102,23 @@ If you are in some areas with awful Internet environment, you can choose proper
\subsection{Loading \pkg{LiteTable} and its modes}
Save the file \verb|litetable.cls| to your project's root directory, and then create a \verb|.tex| file, just input the command \verb|\documentclass{litetable}| on the first line.
-The template provides two modes, \mode{style} and \mode{date}. Just add the options of the modes you want separately in the square bracket of the command \verb|\documentclass[options]{litetable}| in your \verb|.tex| file.
+The template provides three modes, \mode{date}, \mode{style} and \mode{font}. Just add the options of the modes you want separately in the square bracket of the command \verb|\documentclass[options]{litetable}| in your \verb|.tex| file.
+\newpage
\section{Modes of \pkg{LiteTable}}
\begin{verbatim}
\documentclass[options]{litetable}
\end{verbatim}
-\subsection{The \mode{round} \& \mode{sharp} modes}
-This mode can make the course block's corners be round or sharp, and the default opinion is sharp.
-\subsection{The \mode{times} \& \mode{libertinus} mode}
-This mode can make the font to be ``Times New Roman'' or ``Libertinus'', and the default opinion is ``Libertinus''.\footnote{Please ensure that your computer has been already installed the font ``Libertinus'' when using this opinion.}
+\subsection{The \mode{date} mode}
+This mode has two options, \mode{en} and \mode{cn}, which can make the weekdays display in English or 大陆简体, and the dafault option is English.
+
+\subsection{The \mode{style} mode}
+This mode has two options, \mode{round} and \mode{sharp}, which can make the course block's corners be round or sharp, and the default option is sharp.
-\section{Environment and commands of \pkg{LiteTable}}
+\subsection{The \mode{font} mode}
+This mode has two options, \mode{times} and \mode{libertinus}, which can make the font to be ``Times New Roman'' or ``Libertinus'', and the default option is ``Times New Roman''.\footnote{Please ensure that your computer has been already installed the font ``Libertinus'' when using this option.}
+
+\section{Commands of \pkg{LiteTable}}
\subsection{The \cmd{makeframe} command}
\begin{verbatim}
@@ -120,28 +126,53 @@ This mode can make the font to be ``Times New Roman'' or ``Libertinus'', and the
\end{verbatim}
This command can create an empty class schedule with the title ``Timetable -- Semester 5''.
-\subsection{The \cmd{course} command}
+\subsection{The \cmd{timelist} command}
+\begin{verbatim}
+ \timelist{
+ 8:05,8:55,10:00,10:50,11:40,13:30,14:20,15:15,16:05,18:30,19:20,20:10;
+ 8:50,9:40,10:45,11:35,12:25,14:15,15:05,16:00,16:50,19:15,20:05,20:55
+ }
+\end{verbatim}
+
+This command can add time to the left side of the timetable, and the first line of the content is the start time of the class while the second line of the content is the end time of the class, each time separates with comma (\verb|,|), the first line and the second line separates with semicolon (\verb|;|).
+
+The timetable currently only supports 12 classes per day. In the future updates, customization of the number of courses per day will be supported.
+
+\subsection{The \cmd{course} command}
\begin{verbatim}
- \course{H5}{4}{3}{5}{AQM}{Building 6·225}{Yuan Li \& Mengnan Chen}{Week 1 -- 18}
+ \course{H5}{3}{5}{AQM}{Building 6·225}{Yuan Li \& Mengnan Chen}{Week 1 -- 18}
\end{verbatim}
-There are 8 variables in this command.
+There are 7 variables in this command.
\begin{itemize}
\item The 1st one is the color of the class that you want, from ``H1'' to ``H5''.
- \item The 2nd one is the workday of the class.
- \item The 3rd and 4th ones is the starting number and ending number of the class.
- \item The 5th one is the name of the class.
- \item The 6th one is the address of the class.
- \item The 7th one is the name of the teacher(s).
+ \item The 2nd and 3rd ones is the starting number and ending number of the class.
+ \item The 4th one is the name of the class.
+ \item The 5th one is the address of the class.
+ \item The 6th one is the name of the teacher(s).
\item The last one is the start week and end week of the class.
\end{itemize}
+
+\subsection{The \cmd{newday} command}
+This command can switch the current weekday to the next day, then the course will move right one grid.
+
\subsection{The \cmd{more} command}
+\begin{verbatim}
+ \more{·School Start: 04 / 03 / 2024 ·Summer Vacation: 05 / 07 / 2024}
+\end{verbatim}
This command can add remark at the end of the class schedule.
+
+\subsection{The \cmd{sticker} command}
+\begin{verbatim}
+ \sticker{favicon}
+\end{verbatim}
+There will be a sticker on the southeast of the page after you add,otherwise it won't.
+
\newpage
\section{Version History}
-I am a college student studying at \href{https://www.hdu.edu.cn}{Hangzhou Dianzi University}\footnote{https://en.wikipedia.org/wiki/Hangzhou\_Dianzi\_University} in China. An official club named \href{https://www.hduhelp.cn/}{HDUHelp} in my school has created a web page \href{https://cinnamon.hduhelp.com/navigation/schedule}{schedule}\footnote{Only those studying at or graduated from Hangzhou Dianzi University can have the permission of access.}. Every students and teachers can view their own class schedule on it. The layout is very beautiful and then I used LaTeX to imitate that style and made a class schedule template to share with everyone.
+The design of this course schedule originated from the student course schedule web page\footnote{Only those studying at or graduated from Hangzhou Dianzi University can have the permission of access.} of the \href{https://www.hduhelp.cn/}{HDUHelp} in \href{https://www.hdu.edu.cn}{Hangzhou Dianzi University}\footnote{https://en.wikipedia.org/wiki/Hangzhou\_Dianzi\_University}. The layout is very beautiful and then I used \LaTeX{} to imitate that style and made a class schedule template to share with everyone.
\textsf{\bfseries Version 1.0} was finished on 1 September, 2023 and released on \href{https://www.latexstudio.net/index/details/index/mid/3625.html}{LaTeX Studio} (Xiaoshan, Hangzhou) and \href{http://xhslink.com/od7Ycw}{Xiaohongshu}, where won the favor of many people.
@@ -149,6 +180,8 @@ I am a college student studying at \href{https://www.hdu.edu.cn}{Hangzhou Dianzi
\textsf{\bfseries Version 2.1a} was finished developing on 5 November, 2023. Supports the libertinus font.
+\textsf{\bfseries Version 2.2a} was finished developing on 31 January, 2024. This Version fixed the bug of resolution exceeded, changed paper type to US letter and support custom course start time and end time.
+
\datechange{01/09/2023}{Version 2.0a}
\begin{itemize}
\item Supports the course block's corners be round or sharp.
@@ -160,6 +193,14 @@ I am a college student studying at \href{https://www.hdu.edu.cn}{Hangzhou Dianzi
\item Supports the libertinus font.
\end{itemize}
+\datechange{31/01/2024}{Version 2.2a}
+\begin{itemize}
+ \item Fixed the bug of resolution exceeded.
+ \item Changed paper type to US letter.
+ \item Support custom course start time and end time.
+ \item Support add sticker as you like at the southeast of the page.
+\end{itemize}
+
\newpage
\appendix
\section{Document Example}
diff --git a/macros/latex/contrib/litetable/doc/litetable-doc.pdf b/macros/latex/contrib/litetable/doc/litetable-doc.pdf
deleted file mode 100644
index 92cfe2a9ca..0000000000
--- a/macros/latex/contrib/litetable/doc/litetable-doc.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/litetable/tex/litetable.cls b/macros/latex/contrib/litetable/tex/litetable.cls
index 50c979fdd0..647d078520 100644
--- a/macros/latex/contrib/litetable/tex/litetable.cls
+++ b/macros/latex/contrib/litetable/tex/litetable.cls
@@ -6,14 +6,17 @@
%% * either version 1.3c of this license or any later * * * ** * ***** * *
%% * version. * * * ** * * * * *
%% ****************************************************** ***** ** * * *** * * *
-%% start of file `notebeamer.cls'. *
+%% start of file `litetable.cls'. *
%% Copyright 2023 LiteLaTeX (xiamyphys@gmail.com) *
%% available at https://github.com/xiamyphys/LiteTable *
%% !Mode:: "TeX:UTF-8" *
%% ************************************************************************************************************
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{litetable}[2023/11/05 v2.1a LiteTable document class]
-\LoadClass[tikz,margin=10pt]{standalone}
+\PassOptionsToPackage{quiet}{xeCJK}
+\PassOptionsToPackage{quiet}{fontspec}
+\PassOptionsToPackage{no-math}{fontspec}
+\ProvidesClass{litetable}[2024/01/31/ v2.2a LiteTable document class]
+
% ---------- 全局选项 ---------- %
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -30,28 +33,18 @@
\DeclareStringOption[times]{font}
\DeclareVoidOption{times}{\ekv{date=times}}
-\DeclareVoidOption{libertinus}{\ekv{date=libertinus}}
+\DeclareVoidOption{libertinuTs}{\ekv{date=libertinus}}
-\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{book}}
+\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{standalone}}
\ProcessKeyvalOptions*\relax
-
-% ---------- 中文字体 ---------- %
-\RequirePackage{ctex}
+\LoadClass[tikz,margin=6pt]{standalone}
% ---- 文本中的数字 & 字母设置 ---- %
-\PassOptionsToPackage{no-math}{fontspec}
-\PassOptionsToPackage{quiet}{fontspec}
+\RequirePackage{ctex}
\ifdefstring{\LITE@font}{libertinus}{
\setmainfont{Libertinus Serif}
\setsansfont{Libertinus Sans}
-\setmonofont{NotoSansMono}[
- Scale=MatchLowercase,
- Extension=.ttf,
- UprightFont=*-Light,
- BoldFont=*-Medium
-]
}{\relax}
-\RequirePackage{iftex}
\ifdefstring{\LITE@font}{times}{
\ifXeTeX
\RequirePackage[no-math]{fontspec}
@@ -79,7 +72,7 @@
% ---------- 色彩组合 ---------- %
\definecolor{darkgray}{HTML}{727477}% 时间颜色
\definecolor{darkergray}{HTML}{F1F3F5}% 深色块
-\definecolor{lightergray}{HTML}{F8F9FA}% 浅色块
+\definecolor{lightergray}{HTML}{FCFDFE}% 浅色块
\definecolor{blackgray}{HTML}{1A1D21}% 序号颜色
\definecolor{H1}{HTML}{74A7A2}% 深绿
\definecolor{H1*}{HTML}{E9EEED}
@@ -109,107 +102,114 @@
\definecolor{H9*}{HTML}{F2E0D0}
\definecolor{H9**}{HTML}{C96F1C}
\pagecolor{lightergray}
-\newcommand{\xscale}{2.2733}
-\newcommand{\yscale}{0.4291}
-
-\usetikzlibrary{calc}
-\ifdefstring{\LITE@style}{round}{
-\newcommand{\course}[8]{
- \fill [#1,rounded corners=5pt] ($({(-23+32*(#2))*\xscale},{-\yscale*(21+93*#3)-0.2})$) rectangle ($({(9+32*(#2))*\xscale},{-\yscale*(114+93*#4)+0.2})$);
- \fill [#1*,rounded corners=5pt] ($({(-23+32*(#2))*\xscale+0.1},{-\yscale*(42+93*#3)})$) -- ($({(-23+32*(#2))*\xscale+0.1},{-\yscale*(114+93*#4)+0.3})$) -- ($({(9+32*(#2))*\xscale-0.1},{-\yscale*(114+93*#4)+0.3})$) -- ($({(9+32*(#2))*\xscale-0.1},{-\yscale*(42+93*#3)})$);
- \node [#1**,anchor=south] at ($({((-23+32*(#2))*\xscale+(9+32*(#2))*\xscale)/2},{(-\yscale*(21+93*#3)-\yscale*(114+93*#4))/2})$) {\heiti\bfseries #5};
- \node [#1**,anchor=north] at ($({((-23+32*(#2))*\xscale+(9+32*(#2))*\xscale)/2},{(-\yscale*(21+93*#3)-\yscale*(114+93*#4))/2-21*\yscale})$) {\heiti\bfseries\footnotesize #6};
- \node [#1**,anchor=north] at ($({((-23+32*(#2))*\xscale+(9+32*(#2))*\xscale)/2},{(-\yscale*(21+93*#3)-\yscale*(114+93*#4))/2-42*\yscale})$) {\heiti\footnotesize #7};
- \node [#1**,anchor=south east] at ($({(9+32*(#2))*\xscale-0.1},{-\yscale*(114+93*#4)+0.3})$) {\heiti\footnotesize #8};
- }
- }{\relax}
-\ifdefstring{\LITE@style}{sharp}{
-\newcommand{\course}[8]{
- \fill [#1] ($({(-23+32*(#2))*\xscale},{-\yscale*(21+93*#3)-0.2})$) rectangle ($({(9+32*(#2))*\xscale},{-\yscale*(114+93*#4)+0.2})$);
- \fill [#1*] ($({(-23+32*(#2))*\xscale+0.1},{-\yscale*(42+93*#3)})$) rectangle ($({(9+32*(#2))*\xscale-0.1},{-\yscale*(114+93*#4)+0.3})$);
- \node [#1**,anchor=south] at ($({((-23+32*(#2))*\xscale+(9+32*(#2))*\xscale)/2},{(-\yscale*(21+93*#3)-\yscale*(114+93*#4))/2})$) {\heiti\bfseries #5};
- \node [#1**,anchor=north] at ($({((-23+32*(#2))*\xscale+(9+32*(#2))*\xscale)/2},{(-\yscale*(21+93*#3)-\yscale*(114+93*#4))/2-21*\yscale})$) {\heiti\bfseries\footnotesize #6};
- \node [#1**,anchor=north] at ($({((-23+32*(#2))*\xscale+(9+32*(#2))*\xscale)/2},{(-\yscale*(21+93*#3)-\yscale*(114+93*#4))/2-42*\yscale})$) {\heiti\footnotesize #7};
- \node [#1**,anchor=south east] at ($({(9+32*(#2))*\xscale-0.1},{-\yscale*(114+93*#4)+0.3})$) {\heiti\footnotesize #8};
- }
- }{\relax}
-
-\newcounter{number}
-\RequirePackage{fontawesome5}
\definecolor{丹色}{HTML}{E45E32}
\definecolor{紅緋}{HTML}{E83929}
\definecolor{紺碧}{HTML}{007BBB}
\definecolor{青碧}{HTML}{478384}
\definecolor{金色}{HTML}{E6B422}
+
+\def\pagewidth{8.5 in}
+\def\pageheight{-11 in}
+\usetikzlibrary{calc}
+\ifdefstring{\LITE@style}{round}{\def\corners{round corners=6pt}}{\relax}
+\ifdefstring{\LITE@style}{sharp}{\def\corners{}}{\relax}
+
+\ExplSyntaxOn % 二维数组
+\seq_new:N \l_node_row_seq
+\seq_new:N \l_node_tmp_seq
+\cs_set:Npn \timelist #1 {
+ \gdef\@timelist{#1} % 用于判断\@timelist是否存在
+ \seq_set_split:Nnn \l_node_row_seq {;} {#1}
+ \int_step_inline:nn{\seq_count:N \l_node_row_seq}
+ {
+ \seq_if_exist:cF {l_node_row_##1_seq}
+ {
+ \seq_new:c {l_node_row_##1_seq}
+ }
+ \exp_args:Ncx\seq_set_from_clist:Nn {l_node_row_##1_seq} {\seq_item:Nn \l_node_row_seq{##1}}
+ }
+}
+
+\cs_set:Npn \PrintTime [#1][#2] {
+ \tl_if_empty:nTF { #1 }
+ {
+ \tl_if_empty:nTF { #2 }
+ {
+ \seq_use:Nn \l_node_row_seq {,}
+ }
+ {
+ \int_step_inline:nn{\seq_count:N \l_node_row_seq}
+ {
+ \seq_put_right:Nn \l_node_tmp_seq {\seq_item:cn {l_node_row_##1_seq}{#2}}
+ }
+ \seq_use:Nn \l_node_tmp_seq {,}
+ }
+ }
+ {
+ \tl_if_empty:nTF {#2}
+ {
+ \seq_use:cn {l_node_row_#1_seq}{,}
+ }
+ {
+ \seq_item:cn {l_node_row_#1_seq}{#2}
+ }
+ }
+}
+\ExplSyntaxOff
+\RequirePackage{fontawesome5}
+\newcounter{number}
+\def\sticker{\gdef\@sticker}
\newcommand{\makeframe}[1]{
- \ifdefstring{\LITE@style}{round}{
- \fill [fill=darkergray,rounded corners=8pt] (0,0) rectangle ($({169*\xscale},{-\yscale*72})$);% 顶部深灰色块
+ \draw [gray!75] (0,0) rectangle (8.5 in,-11 in);
+ \fill [fill=darkergray,\corners] (0,0) rectangle (\pagewidth,1.5*\pageheight/27.5);% 顶部深灰色块
+ \node at (.5*\pagewidth,.75*\pageheight/27.5) {\huge\bfseries\sffamily #1};
\foreach \a in {2,4,...,12}
- \fill [fill=darkergray,yshift=\yscale*72 cm-\yscale*93*\a cm,rounded corners=8pt] (0,0) rectangle ($({169*\xscale},{-\yscale*93})$);% 中间深灰色块(循环)
- \fill [fill=darkergray,yshift=-\yscale*114 cm-\yscale*93*12 cm,rounded corners=8pt] (0,0) rectangle ($({169*\xscale},{-\yscale*36})$);% 底部深灰色块
- }{\relax}
- \ifdefstring{\LITE@style}{sharp}{
- \fill [fill=darkergray] (0,0) rectangle ($({169*\xscale},{-\yscale*72})$);% 顶部深灰色块
- \foreach \a in {2,4,...,12}
- \fill [fill=darkergray,yshift=\yscale*72 cm-\yscale*93*\a cm] (0,0) rectangle ($({169*\xscale},{-\yscale*93})$);% 中间深灰色块(循环)
- \fill [fill=darkergray,yshift=-\yscale*114 cm-\yscale*93*12 cm] (0,0) rectangle ($({169*\xscale},{-\yscale*36})$);% 底部深灰色块
- }{\relax}
+ \fill [fill=darkergray,yshift=2.5*\pageheight/27.5+2*(\a-2)*\pageheight/27.5,\corners] (0,0) rectangle (\pagewidth,2*\pageheight/27.5);% 中间深灰色块(循环)
+ \fill [fill=darkergray,yshift=2.5*\pageheight/27.5+2*12*\pageheight/27.5,\corners] (0,0) rectangle (\pagewidth,\pageheight/27.5);% 底部深灰色块
\foreach \a in {0,1,2,...,12}
- \draw [densely dashed,gray!75,yshift=-\yscale*114 cm-\yscale*93*\a cm] ($({9*\xscale},0)$)--($({169*\xscale},0)$);% 分割虚线
- \node at ($({169*\xscale/2},{-\yscale*72/2})$) {\huge\bfseries\sffamily #1};
+ \draw [densely dashed,gray!75,yshift=2.5*\pageheight/27.5+2*\a*\pageheight/27.5,] (0,0)--(\pagewidth,0);% 分割虚线
% 时间标注
\setcounter{number}{0}
\foreach \a in {1,2,...,12}
- \node [yshift=-93*\yscale*(\a-1)*0.05 cm] at ($({9*\xscale/2},{-\yscale*135})$) {\bfseries\color{blackgray}\texttt{\textit{\refstepcounter{number}\thenumber}}};
- \node at ($({9*\xscale/2},{-\yscale*171})$) {\footnotesize\color{darkgray}\texttt{8:05}};
- \node at ($({9*\xscale/2},{-\yscale*195})$) {\footnotesize\color{darkgray}\texttt{8:50}};
-
- \node [yshift=-93*\yscale*0.05 cm] at ($({9*\xscale/2},{-\yscale*171})$) {\footnotesize\color{darkgray}\texttt{8:55}};
- \node [yshift=-93*\yscale*0.05 cm] at ($({9*\xscale/2},{-\yscale*195})$) {\footnotesize\color{darkgray}\texttt{9:40}};
-
- \node [yshift=-2*93*\yscale*0.05 cm] at ($({9*\xscale/2},{-\yscale*171})$) {\footnotesize\color{darkgray}\texttt{10:00}};
- \node [yshift=-2*93*\yscale*0.05 cm] at ($({9*\xscale/2},{-\yscale*195})$) {\footnotesize\color{darkgray}\texttt{10:45}};
-
- \node [yshift=-3*93*\yscale*0.05 cm] at ($({9*\xscale/2},{-\yscale*171})$) {\footnotesize\color{darkgray}\texttt{10:50}};
- \node [yshift=-3*93*\yscale*0.05 cm] at ($({9*\xscale/2},{-\yscale*195})$) {\footnotesize\color{darkgray}\texttt{11:35}};
-
- \node [yshift=-4*93*\yscale*0.05 cm] at ($({9*\xscale/2},{-\yscale*171})$) {\footnotesize\color{darkgray}\texttt{11:40}};
- \node [yshift=-4*93*\yscale*0.05 cm] at ($({9*\xscale/2},{-\yscale*195})$) {\footnotesize\color{darkgray}\texttt{12:25}};
-
- \node [yshift=-5*93*\yscale*0.05 cm] at ($({9*\xscale/2},{-\yscale*171})$) {\footnotesize\color{darkgray}\texttt{13:30}};
- \node [yshift=-5*93*\yscale*0.05 cm] at ($({9*\xscale/2},{-\yscale*195})$) {\footnotesize\color{darkgray}\texttt{14:15}};
-
- \node [yshift=-6*93*\yscale*0.05 cm] at ($({9*\xscale/2},{-\yscale*171})$) {\footnotesize\color{darkgray}\texttt{14:20}};
- \node [yshift=-6*93*\yscale*0.05 cm] at ($({9*\xscale/2},{-\yscale*195})$) {\footnotesize\color{darkgray}\texttt{15:05}};
-
- \node [yshift=-7*93*\yscale*0.05 cm] at ($({9*\xscale/2},{-\yscale*171})$) {\footnotesize\color{darkgray}\texttt{15:15}};
- \node [yshift=-7*93*\yscale*0.05 cm] at ($({9*\xscale/2},{-\yscale*195})$) {\footnotesize\color{darkgray}\texttt{16:00}};
-
- \node [yshift=-8*93*\yscale*0.05 cm] at ($({9*\xscale/2},{-\yscale*171})$) {\footnotesize\color{darkgray}\texttt{16:05}};
- \node [yshift=-8*93*\yscale*0.05 cm] at ($({9*\xscale/2},{-\yscale*195})$) {\footnotesize\color{darkgray}\texttt{16:50}};
-
- \node [yshift=-9*93*\yscale*0.05 cm] at ($({9*\xscale/2},{-\yscale*171})$) {\footnotesize\color{darkgray}\texttt{18:30}};
- \node [yshift=-9*93*\yscale*0.05 cm] at ($({9*\xscale/2},{-\yscale*195})$) {\footnotesize\color{darkgray}\texttt{19:15}};
-
- \node [yshift=-10*93*\yscale*0.05 cm] at ($({9*\xscale/2},{-\yscale*171})$) {\footnotesize\color{darkgray}\texttt{19:20}};
- \node [yshift=-10*93*\yscale*0.05 cm] at ($({9*\xscale/2},{-\yscale*195})$) {\footnotesize\color{darkgray}\texttt{20:05}};
-
- \node [yshift=-11*93*\yscale*0.05 cm] at ($({9*\xscale/2},{-\yscale*171})$) {\footnotesize\color{darkgray}\texttt{20:10}};
- \node [yshift=-11*93*\yscale*0.05 cm] at ($({9*\xscale/2},{-\yscale*195})$) {\footnotesize\color{darkgray}\texttt{20:55}};
+ \node [yshift=2.5*\pageheight/27.5+2*(\a-.8)*\pageheight/27.5] at (\pagewidth/32,0) {\bfseries\color{blackgray}\texttt{\refstepcounter{number}\thenumber}};
+ \ifcsname @timelist\endcsname % 若 `\@timelist == empty', 跳过该函数
+ \foreach \x in {1,2,...,12}
+ {
+ \node[yshift=2.5*\pageheight/27.5+2*(\x-.475)*\pageheight/27.5] at (\pagewidth/32,0) {\color{darkgray}\texttt{\PrintTime[1][\x]}};
+ \node[yshift=2.5*\pageheight/27.5+2*(\x-.2)*\pageheight/27.5] at (\pagewidth/32,0) {\color{darkgray}\texttt{\PrintTime[2][\x]}};
+ }\fi
% 星期标注
\ifdefstring{\LITE@date}{en}{
- \node [xshift=\xscale*25*0.05 cm] at ($(0,{-\yscale*93})$) {\color{丹色}\faIcon{moon}\;\bfseries\heiti{Monday}};
- \node [xshift=\xscale*57*0.05 cm] at ($(0,{-\yscale*93})$) {\color{紅緋}\faIcon{fire}\;\bfseries\heiti{Tuesday}};
- \node [xshift=\xscale*89*0.05 cm] at ($(0,{-\yscale*93})$) {\color{紺碧}\faIcon{water}\;\bfseries\heiti{Wednesday}};
- \node [xshift=\xscale*121*0.05 cm] at ($(0,{-\yscale*93})$) {\color{青碧}\faIcon{tree}\;\bfseries\heiti{Thursday}};
- \node [xshift=\xscale*153*0.05 cm] at ($(0,{-\yscale*93})$) {\color{金色}\faIcon{sun}\;\bfseries\heiti{Friday}};
+ \node [xshift=2.5*\pagewidth/16] at (0,2*\pageheight/27.5) {\color{丹色}\faIcon{moon}\;\bfseries\heiti{Monday}};
+ \node [xshift=5.5*\pagewidth/16] at (0,2*\pageheight/27.5) {\color{紅緋}\faIcon{fire}\;\bfseries\heiti{Tuesday}};
+ \node [xshift=8.5*\pagewidth/16] at (0,2*\pageheight/27.5) {\color{紺碧}\faIcon{water}\;\bfseries\heiti{Wednesday}};
+ \node [xshift=11.5*\pagewidth/16] at (0,2*\pageheight/27.5) {\color{青碧}\faIcon{tree}\;\bfseries\heiti{Thursday}};
+ \node [xshift=14.5*\pagewidth/16] at (0,2*\pageheight/27.5) {\color{金色}\faIcon{sun}\;\bfseries\heiti{Friday}};
}{\relax}
\ifdefstring{\LITE@date}{cn}{
- \node [xshift=\xscale*25*0.05 cm] at ($(0,{-\yscale*93})$) {\color{丹色}\faIcon{moon}\;\bfseries\heiti{星期一}};
- \node [xshift=\xscale*57*0.05 cm] at ($(0,{-\yscale*93})$) {\color{紅緋}\faIcon{fire}\;\bfseries\heiti{星期二}};
- \node [xshift=\xscale*89*0.05 cm] at ($(0,{-\yscale*93})$) {\color{紺碧}\faIcon{water}\;\bfseries\heiti{星期三}};
- \node [xshift=\xscale*121*0.05 cm] at ($(0,{-\yscale*93})$) {\color{青碧}\faIcon{tree}\;\bfseries\heiti{星期四}};
- \node [xshift=\xscale*153*0.05 cm] at ($(0,{-\yscale*93})$) {\color{金色}\faIcon{sun}\;\bfseries\heiti{星期五}};
+ \node [xshift=2.5*\pagewidth/16] at (0,2*\pageheight/27.5) {\color{丹色}\faIcon{moon}\;\bfseries\heiti{星期一}};
+ \node [xshift=5.5*\pagewidth/16] at (0,2*\pageheight/27.5) {\color{紅緋}\faIcon{fire}\;\bfseries\heiti{星期二}};
+ \node [xshift=8.5*\pagewidth/16] at (0,2*\pageheight/27.5) {\color{紺碧}\faIcon{water}\;\bfseries\heiti{星期三}};
+ \node [xshift=11.5*\pagewidth/16] at (0,2*\pageheight/27.5) {\color{青碧}\faIcon{tree}\;\bfseries\heiti{星期四}};
+ \node [xshift=14.5*\pagewidth/16] at (0,2*\pageheight/27.5) {\color{金色}\faIcon{sun}\;\bfseries\heiti{星期五}};
}{\relax}
+ \ifcsname @sticker\endcsname
+ \node [opacity=.3,anchor=south east,yshift=1.5*\pageheight/27.5+2*12*\pageheight/27.5,inner sep=0pt,scale=3] at (\pagewidth,\pageheight/27.5) {\includegraphics[width=\dimeval{\pagewidth/16}]{\@sticker}};\fi
}
-\newcommand{\more}[1]{\node [yshift=-\yscale*0.05*114 cm-\yscale*0.05*93*12 cm,anchor=east] at ($({169*\xscale},{-\yscale*18})$) {\small\color{darkgray}#1};} \ No newline at end of file
+
+\newcounter{weekday}
+\def\newday{\addtocounter{weekday}{1}}
+\AtEndEnvironment{tikzpicture}{\setcounter{weekday}{0}}
+\newcommand{\course}[7]
+{
+ \fill [#1,\corners,yshift=2*(#2-1)*\pageheight/27.5,xshift=3*\theweekday*\pagewidth/16] (\pagewidth/16,2.5*\pageheight/27.5) rectangle ($({4*\pagewidth/16},{(4.5+2*(#3-#2))*\pageheight/27.5})$); % frame
+ \fill [#1*,\corners,yshift=(2*(#2-1)+.5)*\pageheight/27.5,xshift=3*\theweekday*\pagewidth/16] (\pagewidth/16,2.5*\pageheight/27.5) rectangle ($({4*\pagewidth/16},{(4+2*(#3-#2))*\pageheight/27.5})$); % content
+ \node [#1**,yshift=(#2+#3-1.25)*\pageheight/27.5,xshift=3*\theweekday*\pagewidth/16] at (2.5*\pagewidth/16,2.5*\pageheight/27.5) {\heiti\large\bfseries #4}; % course
+ \node [#1**,anchor=south,yshift=(#2+#3-.2)*\pageheight/27.5,xshift=3*\theweekday*\pagewidth/16] at (2.5*\pagewidth/16,2.5*\pageheight/27.5) {\heiti\bfseries\small #5}; % location
+ \node [#1**,anchor=north,yshift=(#2+#3-.2)*\pageheight/27.5,xshift=3*\theweekday*\pagewidth/16] at (2.5*\pagewidth/16,2.5*\pageheight/27.5) {\heiti\bfseries\small #6}; % teacher
+ \node [#1**,anchor=south east,yshift=2*#3*\pageheight/27.5,xshift=3*\theweekday*\pagewidth/16] at (4*\pagewidth/16,2.5*\pageheight/27.5) {\heiti\footnotesize #7}; % weeks
+}
+
+\def\more#1{
+ \node [xshift=-1em,yshift=2.5*\pageheight/27.5+2*12*\pageheight/27.5,anchor=east] at (\pagewidth,.5*\pageheight/27.5){\small\bfseries\color{darkgray}#1};
+} \ No newline at end of file
diff --git a/macros/latex/contrib/refstyle/README b/macros/latex/contrib/refstyle/README
index e33a537d59..93d23dc15e 100644
--- a/macros/latex/contrib/refstyle/README
+++ b/macros/latex/contrib/refstyle/README
@@ -1,70 +1,70 @@
- The refstyle package
- For extended references
-
-File: README
-Author: Danie Els
-
-DESCRIPTION
-===========
-
-The package provides a user interface to define sets of reference
-and label commands for each referable object such as an equation or
-a table, etc.
-
-Copyright: 2002--2010 Danie Els
-Licence: LPPL
-
-FILES IN DISTRIBUTION
-=====================
-
- BASE DISTRIBUTION:
-
- README This file.
- refstyle.ins Package installation file.
- refstyle.dtx Package source file.
- refconfig.dtx Package configuration source file.
-
- refstyle.sty
- refstyle.cfg Package style and config files. Was produced by
- executing "latex refstyle.ins".
-
- DOCUMENTATION:
-
- refstyle.pdf User manual for refstyle package. It was
- produced by executing:
-
- latex refstyle.ins
-
- pdflatex refstyle.dtx
- pdflatex refstyle.dtx
- makeindex -s gglo.ist -o refstyle.gls refstyle.glo
- makeindex -s gind.ist -o refstyle.ind refstyle.idx
- pdflatex refstyle.dtx
- pdflatex refstyle.dtx
-
- refconfig.pdf Configuration manual for refstyle package. Produced
- form refconfig.dtx in the same manner as above.
-
-
-BASIC INSTALLATION
-====================
-
- The minimum requirement to use the package is the to have
- refstyle.sty and refstyle.cfg in a directory where TeX can find it.
-
- For a basic installation on a TDS compliant system, move the following
- files to the following directories:
-
- <texmf>/tex/latex/refstyle/
- refstyle.sty
- refstyle.cfg
-
- <texmf>/source/latex/refstyle/
- refstyle.ins
- refstyle.dtx
- refconfig.dtx
-
- <texmf>/doc/latex/refstyle/
- README
- refstyle.pdf
- refconfig.pdf
+ The refstyle package
+ For extended references
+
+File: README
+Author: Danie Els
+
+DESCRIPTION
+===========
+
+The package provides a user interface to define sets of reference
+and label commands for each referable object such as an equation or
+a table, etc.
+
+Copyright: 2002--2024 Danie Els
+Licence: LPPL
+
+FILES IN DISTRIBUTION
+=====================
+
+ BASE DISTRIBUTION:
+
+ README This file.
+ refstyle.ins Package installation file.
+ refstyle.dtx Package source file.
+ refconfig.dtx Package configuration source file.
+
+ refstyle.sty
+ refstyle.cfg Package style and config files. Was produced by
+ executing "latex refstyle.ins".
+
+ DOCUMENTATION:
+
+ refstyle.pdf User manual for refstyle package. It was
+ produced by executing:
+
+ latex refstyle.ins
+
+ pdflatex refstyle.dtx
+ pdflatex refstyle.dtx
+ makeindex -s gglo.ist -o refstyle.gls refstyle.glo
+ makeindex -s gind.ist -o refstyle.ind refstyle.idx
+ pdflatex refstyle.dtx
+ pdflatex refstyle.dtx
+
+ refconfig.pdf Configuration manual for refstyle package. Produced
+ form refconfig.dtx in the same manner as above.
+
+
+BASIC INSTALLATION
+====================
+
+ The minimum requirement to use the package is the to have
+ refstyle.sty and refstyle.cfg in a directory where TeX can find it.
+
+ For a basic installation on a TDS compliant system, move the following
+ files to the following directories:
+
+ <texmf>/tex/latex/refstyle/
+ refstyle.sty
+ refstyle.cfg
+
+ <texmf>/source/latex/refstyle/
+ refstyle.ins
+ refstyle.dtx
+ refconfig.dtx
+
+ <texmf>/doc/latex/refstyle/
+ README
+ refstyle.pdf
+ refconfig.pdf
diff --git a/macros/latex/contrib/refstyle/refconfig.dtx b/macros/latex/contrib/refstyle/refconfig.dtx
index a603d8e135..22a675b8ac 100644
--- a/macros/latex/contrib/refstyle/refconfig.dtx
+++ b/macros/latex/contrib/refstyle/refconfig.dtx
@@ -1,1212 +1,1209 @@
-% \iffalse
-%
-% refconfig.dtx
-% Copyright (C) 2002--2010 Danie Els
-%
-% -------------------------------------------------------------------
-% The refstyle package
-% for the formatting of references
-% -------------------------------------------------------------------
-% This work may be distributed and/or modified under the conditions
-% of the LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later.
-%
-% This work is "maintained" (as per LPPL maintenance status)
-% by Danie Els (dnjels@sun.ac.za).
-%
-% This package consists of the files: refstyle.dtx
-% refconfig.dtx
-% refstyle.ins
-% and the derived files: refstyle.sty
-% refstyle.cfg
-% -------------------------------------------------------------------
-%
-%
-%<*driver>
-\documentclass[a4paper]{ltxdoc}
- \EnableCrossrefs
- \CodelineIndex
- \RecordChanges
-\usepackage{color}
-\usepackage{framed}
- \setlength{\FrameSep}{1\fboxsep}
- \definecolor{shadecolor}{gray}{0.9}
- \newenvironment{RSframed}{\shaded}{\endshaded}
-\usepackage{xspace}
-\usepackage{varioref}
-\usepackage{refstyle}
-
-%-- macrocode env changes ------------------------------
-
-\setlength{\MacroIndent}{1.5em}
-
-%-- Indented environments ------------------------------
-
-\newlength{\tdima}
-\newsavebox{\tboxa}
-\newlength{\mytab}
-\setlength{\mytab}{2\parindent}
-
-\newenvironment{IndentPara}[1][1]
- {\list{}{\setlength{\leftmargin}{#1\mytab}%
- \setlength{\labelwidth}{0pt}%
- \setlength{\labelsep}{0pt}%
- \setlength{\itemindent}{\parindent}%
- \setlength{\listparindent}{\parindent}%
- }\item[]}%
- {\endlist}
-\newenvironment{Ipara}[1][\small]%
- {\begin{IndentPara}\noindent#1\ignorespaces}%
- {\end{IndentPara}}
-\newenvironment{Itabb}[1][\small]%
- {\begin{IndentPara}#1\ignorespaces\begin{tabbing}\ignorespaces}%
- {\end{tabbing}\end{IndentPara}}
-
-%-- Additional documenting commands --------------------
-
-\makeatletter
-\def\meta@font@select{\normalfont\slshape}
-\makeatother
-
-\newcommand*{\file}[1]{\texttt{#1}}
-\newcommand*{\pkg}[1]{\textsf{#1}}
-\newcommand*{\env}[1]{\texttt{#1}}
-\newcommand*{\opt}[1]{\texttt{\slshape#1}}
-\newcommand*{\RS}{\pkg{refstyle}\xspace}
-
-\newcommand*{\ArTab}{\>\quad$\rightarrow$\quad}
-
-%-------------------------------------------------------
-
-\setlength\hfuzz{15pt}
-\hbadness=7000
-\begin{document}
- \DocInput{refconfig.dtx}
-\end{document}
-
-%</driver>
-% \fi
-%
-% \CheckSum{1098}
-%
-% \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 \~}
-%
-% \changes{v0.0}{2002/04/01}{Initial version}
-% \changes{v0.2}{2003/07/30}{Updated version}
-% \changes{v0.3}{2006/09/07}{Documentation update}
-% \changes{v0.4}{2010/10/21}{Add \cmd{\RSlsttwotxt} for lists}
-% \changes{v0.5}{2010/11/02}{Bug fixes}
-%
-% \DoNotIndex{
-% \",\@chapapp,\@ifpackageloaded,\AtBeginDocument,
-% \begingroup,\def,\edef,\else,\endgroup,
-% \fi,\ifx, \let, \newcommand,\newref,
-% \providecommand,\ProvidesFile,\ref,\relax,
-% \renewcommand,\RS@ifundefined,\RS@tmpa,\RS@tmpb,
-% \S,\space,\ss,\string,\textup,\unrestored@protected@xdef}
-%
-%^^A-- Titling --------------------------------------------
-% \GetFileInfo{refstyle.cfg}
-% \title{\vskip -2em
-% Configuration file for \RS\ package\thanks{
-% This file has version number
-% \fileversion, last revised
-% \filedate.}}
-% \author{Danie Els\\[1ex]
-% \small Department of Mechanical and Mechatroncs Engineering\\
-% \small University of Stellenbosch, South Africa.\\
-% \normalsize e-mail: \texttt{dnjels@sun.ac.za}}
-% \date{\filedate}
-% \maketitle
-%
-% \tableofcontents
-% \clearpage
-%
-%
-% \section{The \RS\ configuration file}
-%
-% \subsubsection*{Reference templates}
-% The default configuration file, \file{refstyle.cfg}, makes the
-% following reference declarations:
-% \begin{Ipara}
-% |\newref{part}{...}| \quad$\rightarrow$ Parts\\
-% |\newref{chap}{...}| \quad$\rightarrow$ Chapters and Appendices\\
-% |\newref{sec}{...} | \quad$\rightarrow$ Sections\\
-% |\newref{eq}{...} | \quad$\rightarrow$ Equations\\
-% |\newref{fig}{...} | \quad$\rightarrow$ Figures\\
-% |\newref{tab}{...} | \quad$\rightarrow$ Tables\\
-% |\newref{fn}{...} | \quad$\rightarrow$ Footnotes
-% \end{Ipara}
-% If there is a need for more reference types, this standard
-% list can be expanded.
-%
-% \subsubsection*{Language definitions}
-% The \RS\ package also provides the following language definitions
-% options for references, when loaded together with \pkg{babel}:
-% \begin{itemize}
-% \item afrikaans
-% \item danish
-% \item english, USenglish, american, canadian, UKenglish, british
-% \item french
-% \item german, ngerman, austrian, naustrian
-% \item italian
-% \item norwegian, nynorsk, norsk, bokmal\footnote{Norwegian Bokm{\aa}l
-% is not defined in \pkg{babel} yet.}
-% \item portuges, portuguese, brazilian, brazil
-% \item swedish
-% \end{itemize}
-%
-% \noindent See \secref[vref]{Thm} for an example of how to link your
-% own definitions to an exsiting language setup.
-% \StopEventually{\PrintChanges}
-% \clearpage
-% \section{Implementation}
-% \begin{macrocode}
-%<*cfg>
-% \end{macrocode}
-% \subsection{Identification}
-% \begin{RSframed}
-% \begin{macrocode}
-\ProvidesFile{refstyle.cfg}[2010/11/02\space
- 0.5\space
- Configuration file for refstyle (DNJ Els)]
-% \end{macrocode}
-% \end{RSframed}
-%
-% \subsection{Language Definitions for \RS\ Package}
-%
-% \subsubsection{English}
-%
-% \begin{macro}{\RSenglish,\RSukenglish}
-% Support provided by the author.
-% \begin{RSframed}
-% \begin{macrocode}
-%%-- ENGLISH ------------------------------------
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand\RSukenglish{%
- \def\RSrngtxt{\space to~}%........... Range: figures 5 to 6
- \def\RSlsttwotxt{\space and~}%....... List two: figures 5 and 6
- \def\RSlsttxt{, and~}%............... List more: figures 5, 6, and 7
- \def\RSparttxt{Part~}%............... Part lowercase singular
- \def\RSpartstxt{Parts~}%............. lowercase plural
- \def\RSParttxt{Part~}%............... uppercase singular (sentence start)
- \def\RSPartstxt{Parts~}%............. uppercase plural (sentence start)
- \def\RSappendixname{appendix~}%...... Appendix lowercase singular
- \def\RSappendicesname{appendices~}%.. lowercase plural
- \def\RSAppendixname{Appendix~}%...... uppercase singular (sentence start)
- \def\RSAppendicesname{Appendices~}%.. uppercase plural (sentence start)
- \def\RSchaptername{chapter~}%........ Chapter lowercase singular
- \def\RSchaptersname{chapters~}%...... lowercase plural
- \def\RSChaptername{Chapter~}%........ uppercase singular (sentence start)
- \def\RSChaptersname{Chapters~}%...... uppercase plural (sentence start)
- \def\RSsectxt{section~}%............. Section lowercase singular
- \def\RSsecstxt{sections~}%........... lowercase plural
- \def\RSSectxt{Section~}%............. uppercase singular (sentence start)
- \def\RSSecstxt{Sections~}%........... uppercase plural (sentence start)
- \def\RSeqtxt{equation~}%............. Equation lowercase singular
- \def\RSeqstxt{equations~}%........... lowercase plural
- \def\RSEqtxt{Equation~}%............. uppercase singular (sentence start)
- \def\RSEqstxt{Equations~}%........... uppercase plural (sentence start)
- \def\RSfigtxt{figure~}%.............. Figure lowercase singular
- \def\RSfigstxt{figures~}%............ lowercase plural
- \def\RSFigtxt{Figure~}%.............. uppercase singular (sentence start)
- \def\RSFigstxt{Figures~}%............ uppercase plural (sentence start)
- \def\RStabtxt{table~}%............... Table lowercase singular
- \def\RStabstxt{tables~}%............. lowercase plural
- \def\RSTabtxt{Table~}%............... uppercase singular (sentence start)
- \def\RSTabstxt{Tables~}%............. uppercase plural (sentence start)
- \def\RSfootntxt{footnote~}%.......... Footnote lowercase singular
- \def\RSfootnstxt{footnotes~}%........ lowercase plural
- \def\RSFootntxt{Footnote~}%.......... uppercase singular (sentence start)
- \def\RSFootnstxt{Footnotes~}%........ uppercase plural (sentence start)
-}
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand\RSenglish{%
- \def\RSrngtxt{\space to~}%
- \def\RSlsttwotxt{\space and~}%
- \def\RSlsttxt{\space and~}%
- \def\RSparttxt{Part~}%
- \def\RSpartstxt{Parts~}%
- \def\RSParttxt{Part~}%
- \def\RSPartstxt{Parts~}%
- \def\RSappendixname{appendix~}%
- \def\RSappendicesname{appendices~}%
- \def\RSAppendixname{Appendix~}%
- \def\RSAppendicesname{Appendices~}%
- \def\RSchaptername{chapter~}%
- \def\RSchaptersname{chapters~}%
- \def\RSChaptername{Chapter~}%
- \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~}%
-}
-% \end{macrocode}
-% \end{RSframed}
-% \end{macro}
-%
-% \noindent Make English the default.
-% \begin{RSframed}
-% \begin{macrocode}
-\RSenglish% Default
-% \end{macrocode}
-% \end{RSframed}
-%
-% \noindent Options
-% \begin{RSframed}
-% \begin{macrocode}
-\DeclareLangOpt{english}{\RSenglish}
-\DeclareLangOpt{USenglish}{\RSenglish}
-\DeclareLangOpt{american}{\RSenglish}
-\DeclareLangOpt{canadian}{\RSenglish}
-\DeclareLangOpt{UKenglish}{\RSukenglish}
-\DeclareLangOpt{british}{\RSukenglish}
-% \end{macrocode}
-% \end{RSframed}
-%
-%
-% \subsubsection{Afrikaans}
-%
-% \begin{macro}{\RSafrikaans}
-% Support provided by the author.
-% \begin{RSframed}
-% \begin{macrocode}
-%%-- AFRIKAANS ----------------------------------
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand\RSafrikaans{%
- \def\RSrngtxt{\space tot~}%
- \def\RSlsttwotxt{\space en~}%
- \def\RSlsttxt{\space en~}%
- \def\RSparttxt{Deel~}%
- \def\RSpartstxt{Dele~}%
- \def\RSParttxt{Deel~}%
- \def\RSPartstxt{Dele~}%
- \def\RSappendixname{bylae~}%
- \def\RSappendicesname{bylaes~}%
- \def\RSAppendixname{Bylae~}%
- \def\RSAppendicesname{Bylaes~}%
- \def\RSchaptername{hoofstuk~}%
- \def\RSchaptersname{hoofstukke~}%
- \def\RSChaptername{Hoofstuk~}%
- \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~}%
-}
-% \end{macrocode}
-% \end{RSframed}
-% \end{macro}
-%
-% \noindent Options
-% \begin{RSframed}
-% \begin{macrocode}
-\DeclareLangOpt{afrikaans}{\RSafrikaans}
-% \end{macrocode}
-% \end{RSframed}
-%
-%
-% \subsubsection{Danish}
-%
-% \begin{macro}{\RSdanish}
-% \changes{v0.2}{2003/07/30}{Add Danish language support}
-% Thomas Widmann: \texttt{<\,thomas.widmann AT harpercollins DOT co DOT uk>}
-% provided the definitions for Danish.
-% \begin{RSframed}
-% \begin{macrocode}
-%%-- DANISH -------------------------------------
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand\RSdanish{%
- \def\RSrngtxt{\space til~}%
- \def\RSlsttwotxt{\space og~}%
- \def\RSlsttxt{\space og~}%
- \def\RSparttxt{del~}%
- \def\RSpartstxt{del~}%
- \def\RSParttxt{Del~}%
- \def\RSPartstxt{Del~}%
- \def\RSappendixname{bilag~}% % 'appendiks' is also possible,
- \def\RSappendicesname{bilag~}% % but 'bilag' is used in Babel
- \def\RSAppendixname{Bilag~}%
- \def\RSAppendicesname{Bilag~}%
- \def\RSchaptername{kapitel~}%
- \def\RSchaptersname{kapitel~}%
- \def\RSChaptername{Kapitel~}%
- \def\RSChaptersname{Kapitel~}%
- \def\RSsectxt{afsnit~}%
- \def\RSsecstxt{afsnit~}%
- \def\RSSectxt{Afsnit~}%
- \def\RSSecstxt{Afsnit~}%
- \def\RSeqtxt{ligning~}%
- \def\RSeqstxt{ligning~}%
- \def\RSEqtxt{Ligning~}%
- \def\RSEqstxt{Ligning~}%
- \def\RSfigtxt{figur~}%
- \def\RSfigstxt{figur~}%
- \def\RSFigtxt{Figur~}%
- \def\RSFigstxt{Figur~}%
- \def\RStabtxt{tabel~}%
- \def\RStabstxt{tablel~}%
- \def\RSTabtxt{Tabel~}%
- \def\RSTabstxt{Tabel~}%
- \def\RSfootntxt{fodnote~}%
- \def\RSfootnstxt{fodnote~}%
- \def\RSFootntxt{Fodnote~}%
- \def\RSFootnstxt{Fodnote~}%
-}
-% \end{macrocode}
-% \end{RSframed}
-% \end{macro}
-%
-% \noindent Options
-% \begin{RSframed}
-% \begin{macrocode}
-\DeclareLangOpt{danish}{\RSdanish}
-% \end{macrocode}
-% \end{RSframed}
-%
-%
-% \subsubsection{French}
-%
-% \begin{macro}{\RSfrench}
-% \changes{v0.4}{2010/10/21}{Add French language support}
-% Jean-Pierre Chr\'etien \texttt{<\,jeanpierre.chretien AT free DOT fr>}
-% provided the definitions for French.
-% \begin{RSframed}
-% \begin{macrocode}
-%%-- FRENCH -------------------------------------
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand\RSfrench{%
- \def\RSrngtxt{\space \`{a}~}%
- \def\RSlsttwotxt{\space et~}%
- \def\RSlsttxt{\space et~}%
- \def\RSparttxt{partie~}%
- \def\RSpartstxt{parties~}%
- \def\RSParttxt{La partie~}%
- \def\RSPartstxt{Les parties~}%
- \def\RSappendixname{appendice~}%
- \def\RSappendicesname{appendices~}%
- \def\RSAppendixname{L'appendice~}%
- \def\RSAppendicesname{Les appendices~}%
- \def\RSchaptername{chapitre~}%
- \def\RSchaptersname{chapitres~}%
- \def\RSChaptername{Le chapitre~}%
- \def\RSChaptersname{Les chapitres~}%
- \def\RSsectxt{section~}%
- \def\RSsecstxt{sections~}%
- \def\RSSectxt{La section~}%
- \def\RSSecstxt{Les sections~}%
- \def\RSeqtxt{\'{e}quation~}%
- \def\RSeqstxt{\'{e}quations~}%
- \def\RSEqtxt{L'\'{e}quation~}%
- \def\RSEqstxt{Les \'{e}quations~}%
- \def\RSfigtxt{figure~}%
- \def\RSfigstxt{figures~}%
- \def\RSFigtxt{La figure~}%
- \def\RSFigstxt{Les figures~}%
- \def\RStabtxt{tableau~}%
- \def\RStabstxt{tableaux~}%
- \def\RSTabtxt{Le tableau~}%
- \def\RSTabstxt{Les tableaux~}%
- \def\RSfootntxt{note~}%
- \def\RSfootnstxt{notes~}%
- \def\RSFootntxt{La note~}%
- \def\RSFootnstxt{Les notes~}%
-}
-% \end{macrocode}
-% \end{RSframed}
-% \end{macro}
-%
-% \noindent Options
-% \begin{RSframed}
-% \begin{macrocode}
-\DeclareLangOpt{french}{\RSfrench}
-% \end{macrocode}
-% \end{RSframed}
-%
-%
-%
-% \subsubsection{German}
-%
-% \begin{macro}{\RSgerman}
-% \changes{v0.2}{2003/07/30}{Add German language support}
-% Harald Harders: \texttt{<\,h.harders AT tu-bs DOT de>}
-% provided the definitions for German.
-% \begin{RSframed}
-% \begin{macrocode}
-%%-- GERMAN -------------------------------------
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand\RSgerman{%
- \def\RSrngtxt{\space bis~}%
- \def\RSlsttwotxt{\space und~}%
- \def\RSlsttxt{\space und~}%
- \def\RSparttxt{Teil~}%
- \def\RSpartstxt{Teile~}%
- \def\RSParttxt{Teil~}%
- \def\RSPartstxt{Teile~}%
- \def\RSappendixname{Anhang~}%
- \def\RSappendicesname{Anh\"{a}nge~}%
- \def\RSAppendixname{Anhang~}%
- \def\RSAppendicesname{Anh\"{a}nge~}%
- \def\RSchaptername{Kapitel~}%
- \def\RSchaptersname{Kapitel~}%
- \def\RSChaptername{Kapitel~}%
- \def\RSChaptersname{Kapitel~}%
- \def\RSsectxt{Abschnitt~}%
- \def\RSsecstxt{Abschnitt~}%
- \def\RSSectxt{Abschnitt~}%
- \def\RSSecstxt{Abschnitt~}%
- \def\RSeqtxt{Gleichung~}%
- \def\RSeqstxt{Gleichungen~}%
- \def\RSEqtxt{Gleichung~}%
- \def\RSEqstxt{Gleichungen~}%
- \def\RSfigtxt{Abbildung~}%
- \def\RSfigstxt{Abbildung~}%
- \def\RSFigtxt{Abbildung~}%
- \def\RSFigstxt{Abbildung~}%
- \def\RStabtxt{Tabelle~}%
- \def\RStabstxt{Tabellen~}%
- \def\RSTabtxt{Tabelle~}%
- \def\RSTabstxt{Tabellen~}%
- \def\RSfootntxt{Fu\ss note~}%
- \def\RSfootnstxt{Fu\ss noten~}%
- \def\RSFootntxt{Fu\ss note~}%
- \def\RSFootnstxt{Fu\ss noten~}%
-}
-% \end{macrocode}
-% \end{RSframed}
-% \end{macro}
-%
-% \noindent Options
-% \begin{RSframed}
-% \begin{macrocode}
-\DeclareLangOpt{german}{\RSgerman}
-\DeclareLangOpt{ngerman}{\RSgerman}
-\DeclareLangOpt{austrian}{\RSgerman}
-\DeclareLangOpt{naustrian}{\RSgerman}
-% \end{macrocode}
-% \end{RSframed}
-%
-%
-% \subsubsection{Italian}
-%
-% \begin{macro}{\RSitalian}
-% \changes{v0.4}{2010/10/21}{Add Italian language support}
-% Nicola Lunghi: \texttt{<\,nick83ola AT gmail DOT com>}
-% provided the definitions for Italian.
-% \begin{RSframed}
-% \begin{macrocode}
-%%-- ITALIAN ------------------------------------
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand\RSitalian{%
- \def\RSrngtxt{--}%
- \def\RSlsttwotxt{\space e~}%
- \def\RSlsttxt{\space e~}%
- \def\RSparttxt{Parte~}%
- \def\RSpartstxt{Parti~}%
- \def\RSParttxt{Parte~}%
- \def\RSPartstxt{Parti~}%
- \def\RSappendixname{l'appendice~}%
- \def\RSappendicesname{le appendici~}%
- \def\RSAppendixname{l'Appendice~}%
- \def\RSAppendicesname{le Appendici~}%
- \def\RSchaptername{il capitolo~}%
- \def\RSchaptersname{i capitoli~}%
- \def\RSChaptername{il Capitolo~}%
- \def\RSChaptersname{i Capitoli~}%
- \def\RSsectxt{la sezione~}%
- \def\RSsecstxt{le sezioni~}%
- \def\RSSectxt{la Sezione~}%
- \def\RSSecstxt{la Sezioni~}%
- \def\RSeqtxt{l'equazione~}%
- \def\RSeqstxt{le equazioni~}%
- \def\RSEqtxt{l'Equazione~}%
- \def\RSEqstxt{le Equazioni~}%
- \def\RSfigtxt{la figura~}%
- \def\RSfigstxt{le figure~}%
- \def\RSFigtxt{la Figura~}%
- \def\RSFigstxt{le Figure~}%
- \def\RStabtxt{la tabella~}%
- \def\RStabstxt{le tabelle~}%
- \def\RSTabtxt{la Tabella~}%
- \def\RSTabstxt{le Tabelle~}%
- \def\RSfootntxt{la nota~}%
- \def\RSfootnstxt{le note~}%
- \def\RSFootntxt{la Nota~}%
- \def\RSFootnstxt{le Note~}%
-}
-% \end{macrocode}
-% \end{RSframed}
-% \end{macro}
-%
-% \noindent Options
-% \begin{RSframed}
-% \begin{macrocode}
-\DeclareLangOpt{italian}{\RSitalian}
-% \end{macrocode}
-% \end{RSframed}
-%
-%
-%
-% \subsubsection{Norwegian}
-%
-% \begin{macro}{\RSnorwegian}
-% \changes{v0.3}{2006/09/07}{Add Norwegian language support}
-% Karl Ove Hufthammer: \texttt{<\,karloh AT mi DOT uib DOT no>}
-% provided the definitions for Norwegian.
-%
-% Norway has two official languages Norwegian Nynorsk and
-% Norwegian Bokm{\aa}l (commonly 'nynorsk' and 'norsk' in LaTeX),
-% but the \pkg{refstyle} definitions are identically in both variants.
-% \begin{RSframed}
-% \begin{macrocode}
-%%-- NORWEGIAN -------------------------------------
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand\RSnorwegian{%
- \def\RSrngtxt{\space til~}%
- \def\RSlsttwotxt{\space og~}%
- \def\RSlsttxt{\space og~}%
- \def\RSparttxt{del~}%
- \def\RSpartstxt{del~}%
- \def\RSParttxt{Del~}%
- \def\RSPartstxt{Del~}%
- \def\RSappendixname{tillegg~}%
- \def\RSappendicesname{tillegg~}%
- \def\RSAppendixname{Tillegg~}%
- \def\RSAppendicesname{Tillegg~}%
- \def\RSchaptername{kapittel~}%
- \def\RSchaptersname{kapittel~}%
- \def\RSChaptername{Kapittel~}%
- \def\RSChaptersname{Kapittel~}%
- \def\RSsectxt{avsnitt~}%
- \def\RSsecstxt{avsnitt~}%
- \def\RSSectxt{Avsnitt~}%
- \def\RSSecstxt{Avsnitt~}%
- \def\RSeqtxt{formel~}%
- \def\RSeqstxt{formel~}%
- \def\RSEqtxt{Formel~}%
- \def\RSEqstxt{Formel~}%
- \def\RSfigtxt{figur~}%
- \def\RSfigstxt{figur~}%
- \def\RSFigtxt{Figur~}%
- \def\RSFigstxt{Figur~}%
- \def\RStabtxt{tabell~}%
- \def\RStabstxt{tabell~}%
- \def\RSTabtxt{Tabell~}%
- \def\RSTabstxt{Tabell~}%
- \def\RSfootntxt{fotnote~}%
- \def\RSfootnstxt{fotnote~}%
- \def\RSFootntxt{Fotnote~}%
- \def\RSFootnstxt{Fotnote~}%
-}
-% \end{macrocode}
-% \end{RSframed}
-% \end{macro}
-%
-% \noindent Options
-% \begin{RSframed}
-% \begin{macrocode}
-\DeclareLangOpt{norwegian}{\RSnorwegian}
-\DeclareLangOpt{nynorsk}{\RSnorwegian}
-\DeclareLangOpt{bokmal}{\RSnorwegian}% Not in babel yet
-\DeclareLangOpt{norsk}{\RSnorwegian}
-% \end{macrocode}
-% \end{RSframed}
-%
-%
-% \subsubsection{Portuguese/Brazilian}
-%
-% \begin{macro}{\RSportuguese,\RSbrazilian}
-% \changes{v0.4}{2010/10/21}{Add Portuguese language support}
-% Bernhard Enders and Flavio Costa \texttt{<\,flaviocosta AT yahoo DOT com DOT br>}
-% provided the definitions for Portuguese.
-% \begin{RSframed}
-% \begin{macrocode}
-%%-- PORTUGUESE -----------------------------------
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand\RSportuguese{%
- \def\RSrngtxt{\space a~}%
- \def\RSlsttwotxt{\space e~}%
- \def\RSlsttxt{\space e~}%
- \def\RSparttxt{Parte~}%
- \def\RSpartstxt{Partes~}%
- \def\RSParttxt{Parte~}%
- \def\RSPartstxt{Partes~}%
- \def\RSappendixname{ap\^{e}ndice~}%
- \def\RSappendicesname{ap\^{e}ndices~}%
- \def\RSAppendixname{Ap\^{e}ndice~}%
- \def\RSAppendicesname{Ap\^{e}ndices~}%
- \def\RSchaptername{cap\'{i}tulo~}%
- \def\RSchaptersname{cap\'{i}tulos~}%
- \def\RSChaptername{Cap\'{i}tulo~}%
- \def\RSChaptersname{Cap\'{i}tulos~}%
- \def\RSsectxt{se\c{c}\~{a}o~}%
- \def\RSsecstxt{se\c{c}\~{o}es~}%
- \def\RSSectxt{Se\c{c}\~{a}o~}%
- \def\RSSecstxt{Se\c{c}\~{o}es~}%
- \def\RSeqtxt{equa\c{c}\~{a}o~}%
- \def\RSeqstxt{equa\c{c}\~{o}es~}%
- \def\RSEqtxt{Equa\c{c}\~{a}o~}%
- \def\RSEqstxt{Equa\c{c}\~{o}es~}%
- \def\RSfigtxt{figura~}%
- \def\RSfigstxt{figuras~}%
- \def\RSFigtxt{Figura~}%
- \def\RSFigstxt{Figuras~}%
- \def\RStabtxt{tabela~}%
- \def\RStabstxt{tabelas~}%
- \def\RSTabtxt{Tabela~}%
- \def\RSTabstxt{Tabelas~}%
- \def\RSfootntxt{nota de rodap\'{e}~}%
- \def\RSfootnstxt{notas de rodap\'{e}~}%
- \def\RSFootntxt{Nota de rodap\'{e}~}%
- \def\RSFootnstxt{Notas de rodap\'{e}~}%
-}
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand\RSbrazilian{%
- \def\RSrngtxt{\space a~}%
- \def\RSlsttwotxt{\space e~}%
- \def\RSlsttxt{\space e~}%
- \def\RSparttxt{Parte~}%
- \def\RSpartstxt{Partes~}%
- \def\RSParttxt{Parte~}%
- \def\RSPartstxt{Partes~}%
- \def\RSappendixname{ap\^{e}ndice~}%
- \def\RSappendicesname{ap\^{e}ndices~}%
- \def\RSAppendixname{Ap\^{e}ndice~}%
- \def\RSAppendicesname{Ap\^{e}ndices~}%
- \def\RSchaptername{cap\'{i}tulo~}%
- \def\RSchaptersname{cap\'{i}tulos~}%
- \def\RSChaptername{Cap\'{i}tulo~}%
- \def\RSChaptersname{Cap\'{i}tulos~}%
- \def\RSsectxt{sec\c{c}\~{a}o~}%<---------------
- \def\RSsecstxt{sec\c{c}\~{o}es~}%<-------------
- \def\RSSectxt{Sec\c{c}\~{a}o~}%<---------------
- \def\RSSecstxt{Sec\c{c}\~{o}es~}%<-------------
- \def\RSeqtxt{equa\c{c}\~{a}o~}%
- \def\RSeqstxt{equa\c{c}\~{o}es~}%
- \def\RSEqtxt{Equa\c{c}\~{a}o~}%
- \def\RSEqstxt{Equa\c{c}\~{o}es~}%
- \def\RSfigtxt{figura~}%
- \def\RSfigstxt{figuras~}%
- \def\RSFigtxt{Figura~}%
- \def\RSFigstxt{Figuras~}%
- \def\RStabtxt{tabela~}%
- \def\RStabstxt{tabelas~}%
- \def\RSTabtxt{Tabela~}%
- \def\RSTabstxt{Tabelas~}%
- \def\RSfootntxt{nota de rodap\'{e}~}%
- \def\RSfootnstxt{notas de rodap\'{e}~}%
- \def\RSFootntxt{Nota de rodap\'{e}~}%
- \def\RSFootnstxt{Notas de rodap\'{e}~}%
-}
-% \end{macrocode}
-% \end{RSframed}
-% \end{macro}
-%
-% \noindent Options
-% \begin{RSframed}
-% \begin{macrocode}
-\DeclareLangOpt{portuges}{\RSportuguese}
-\DeclareLangOpt{portuguese}{\RSportuguese}
-\DeclareLangOpt{brazilian}{\RSbrazilian}
-\DeclareLangOpt{brazil}{\RSbrazilian}
-% \end{macrocode}
-% \end{RSframed}
-%
-%
-%
-% \subsubsection{Swedish}
-%
-% \begin{macro}{\RSswedish}
-% \changes{v0.2}{2003/07/30}{Add Swedish language support}
-% Bj\"{o}rn Thors \texttt{<\,bjorn.thors AT alfvenlab DOT kth DOT se>}
-% provided the definitions for Swedish.
-% \begin{RSframed}
-% \begin{macrocode}
-%%-- SWEDISH ------------------------------------
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand\RSswedish{%
- \def\RSrngtxt{\space till~}%
- \def\RSlsttwotxt{\space och~}%
- \def\RSlsttxt{\space och~}%
- \def\RSparttxt{del~}%
- \def\RSpartstxt{del~}%
- \def\RSParttxt{Del~}%
- \def\RSPartstxt{Del~}%
- \def\RSappendixname{appendix~}%
- \def\RSappendicesname{appendix~}%
- \def\RSAppendixname{Appendix~}%
- \def\RSAppendicesname{Appendix~}%
- \def\RSchaptername{kapitel~}%
- \def\RSchaptersname{kapitel~}%
- \def\RSChaptername{Kapitel~}%
- \def\RSChaptersname{Kapitel~}%
- \def\RSsectxt{sektion~}%
- \def\RSsecstxt{sektion~}%
- \def\RSSectxt{Sektion~}%
- \def\RSSecstxt{Sektion~}%
- \def\RSeqtxt{ekvation~}%
- \def\RSeqstxt{ekvation~}%
- \def\RSEqtxt{Ekvation~}%
- \def\RSEqstxt{Ekvation~}%
- \def\RSfigtxt{figur~}%
- \def\RSfigstxt{figur~}%
- \def\RSFigtxt{Figur~}%
- \def\RSFigstxt{Figur~}%
- \def\RStabtxt{tabell~}%
- \def\RStabstxt{tabell~}%
- \def\RSTabtxt{Tabell~}%
- \def\RSTabstxt{Tabell~}%
- \def\RSfootntxt{fotnot~}%
- \def\RSfootnstxt{fotnot~}%
- \def\RSFootntxt{Fotnot~}%
- \def\RSFootnstxt{Fotnot~}%
-}
-% \end{macrocode}
-% \end{RSframed}
-% \end{macro}
-% \noindent Options
-% \begin{RSframed}
-% \begin{macrocode}
-\DeclareLangOpt{swedish}{\RSswedish}
-% \end{macrocode}
-% \end{RSframed}
-%
-%
-%
-%
-% \subsection{Templates for the \RS Package}
-%
-% The user can also define his or her own templates and put it
-% in a separate configuration file to ensure uniformity
-% of reference formats in your documents.
-%
-% \subsubsection{Parts}
-%
-% References to parts are usually straight forward, except that the
-% document division ``Part'' must be distinguished from the normal
-% usage of the word ``part'' in a sentence. A personal preference
-% is to use small caps.
-%
-% \begin{RSframed}
-% \begin{macrocode}
-%%-- TEMPLATE FOR PARTS -------------------------
-% \end{macrocode}
-% \begin{macrocode}
- \newref{part}{%
- name = \RSparttxt,
- names = \RSpartstxt,
- Name = \RSPparttxt,
- Names = \RSPartstxt,
- rngtxt = \RSrngtxt,
- lsttxt = \RSlsttxt}
-% \end{macrocode}
-% \end{RSframed}
-%
-%
-%
-% \subsubsection{Chapters and Appendices}
-%
-% A major problem with a reference to a chapter is that at the time
-% when the reference label, |\label|\marg{chap-label}, is created,
-% it is unknown whether it would eventually ends up in the main
-% matter or the appendix part of a book or report.
-%
-% A simple solution is to use the prefix to the \meta{chapter}
-% counter, |\p@chapter|, to write the definition of |\@chapapp| to
-% the auxiliary file (|.aux|) together with information of the
-% label. The command |\@chapapp| expands to either |\chaptername| or
-% |\appendixname| depending on whether the reference label is
-% defined in the main matter or after the |\appendix| was called.
-% (Note that |\@chapapp| is not defined in the AMS book class.)
-%
-% \begin{Ipara}
-% |\renewcommand*{\p@chapter}{\string\chname{\@chapapp}}|\\
-% |\newcommand*{\chname}[1]{}%<-make it harmless |\\
-% |\newcommand*{\chapref}[1]{{\renewcommand*{\chname}[1]{##1~}\ref{#1}}}|
-% \end{Ipara}
-%
-% \noindent The reference to a chapter, |\chapref|\marg{chap-label},
-% will then be prefixed with |\chaptername| or |\appendixname| and
-% it does not matter where it was defined or where it was called.
-%
-% To utilize the full functionality of the \RS package for
-% references to chapters and appendices, a complex form of
-% \cmd{\newref} needs to be implemented.
-% The following is a template for a book or report classes.
-%
-%
-% \begin{RSframed}
-% \begin{macrocode}
-%%-- TEMPLATE FOR CHAPTERS & APPENDIXES ---------
-% \end{macrocode}
-% Prevent crashes for non-book type classes.
-% \begin{macrocode}
-\providecommand*{\p@chapter}{}
-% \end{macrocode}
-% Add \cmd{\@chapapp} to \cmd{\p@chapter} for writeout to auxiliary file.
-% If an AMS book class is loaded, then \cmd{\chaptername} must
-% be used.
-% \begin{macrocode}
-\AtBeginDocument{%
- \RS@ifundefined{chapter}{}{%
- \RS@ifundefined{@chapapp}%
- {\renewcommand*{\p@chapter}{\string\chpname{\chaptername}}}%AMS
- {\renewcommand*{\p@chapter}{\string\chpname{\@chapapp}}}% Normal
- }%
- }
-% \end{macrocode}
-% Define \cmd{\chpname} to gobble its contents outside the
-% reference commands.
-% \begin{macrocode}
-\newcommand*{\chpname}[1]{}
-% \end{macrocode}
-% Define the \cmd{\RSchpname} to typeset all the different
-% perturbations of chapter and appendix names.
-% Use the conditionals to switch between the
-% different options.
-%
-% \begin{macrocode}
-\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}
-% \end{macrocode}
-% Define the \cmd{\newref} for chapters.
-% \begin{macrocode}
- \newref{chap}{%
- refcmd = {{\let\chpname=\RS@chpname\ref{#1}}},
- rngtxt = \RSrngtxt,
- lsttwotxt = \RSlsttwotxt,
- lsttxt = \RSlsttxt}
-% \end{macrocode}
-% \end{RSframed}
-%
-%
-% \subsubsection{Sections and paragraphs}\seclabel{secTempl}
-%
-% A template for references to sections is given below. References
-% to paragraphs are similar and is left as an exercise to the users.
-%
-% \begin{RSframed}
-% \begin{macrocode}
-%%-- TEMPLATE FOR SECTIONS ----------------------
-% \end{macrocode}
-% \begin{macrocode}
- \newref{sec}{%
- name = \RSsectxt,
- names = \RSsecstxt,
- Name = \RSSectxt,
- Names = \RSSecstxt,
- refcmd = {\S\ref{#1}},
- rngtxt = \RSrngtxt,
- lsttwotxt = \RSlsttwotxt,
- lsttxt = \RSlsttxt}
-% \end{macrocode}
-% \end{RSframed}
-%
-% \subsubsection{Equations}\seclabel{EqTempl}
-%
-% The equation number in references to equations are traditionally
-% written in an upright text, irrespective of the surrounding text.
-%
-% \begin{RSframed}
-% \begin{macrocode}
-%%-- TEMPLATE FOR EQUATIONS ---------------------
-% \end{macrocode}
-% The standard equation ref format if \pkg{amsmath.sty} is not loaded.
-% \begin{macrocode}
-\newcommand*{\RSeqrefform}[1]{\textup{(\ref{#1})}}
-% \end{macrocode}
-% If \pkg{amsmath.sty} is loaded, store \cmd{\eqref}
-% and then undefine it before the template is created.
-% \begin{macrocode}
-\@ifpackageloaded{amsmath}%
- {\let\AMSeqref\eqref
- \let\eqref\relax}%
- {}
-% \end{macrocode}
-% \begin{macrocode}
-\newref{eq}{%
- name = \RSeqtxt,
- names = \RSeqstxt,
- Name = \RSEqtxt,
- Names = \RSEqstxt,
- refcmd = \RSeqrefform{#1},
- rngtxt = \RSrngtxt,
- lsttwotxt = \RSlsttwotxt,
- lsttxt = \RSlsttxt}
-% \end{macrocode}
-% Make way for \pkg{amsmath.sty} definitions
-% \begin{macrocode}
-\let\RSeqref\eqref
-\let\eqref\relax
-% \end{macrocode}
-% Some footwork to bring the AMS definition of
-% \cmd{\eqref} back if \pkg{amsmath.sty} is loaded
-% afterwards.
-% \begin{macrocode}
-\AtBeginDocument{%
- \@ifpackageloaded{amsmath}%
- {\RS@ifundefined{AMSeqref}{\let\AMSeqref\eqref}{}%
- \let\RSeqrefform\AMSeqref}%
- {}%
- \let\eqref=\RSeqref
- }
-% \end{macrocode}
-% \end{RSframed}
-%
-%
-% \subsubsection{Figures and Tables}\seclabel{tabtemp}
-% References to figures and tables are usually
-% straight forward.
-% \begin{RSframed}
-% \begin{macrocode}
-%%-- TEMPLATE FOR FIGURES -----------------------
-% \end{macrocode}
-% \begin{macrocode}
- \newref{fig}{%
- name = \RSfigtxt,
- names = \RSfigstxt,
- Name = \RSFigtxt,
- Names = \RSFigstxt,
- rngtxt = \RSrngtxt,
- lsttwotxt = \RSlsttwotxt,
- lsttxt = \RSlsttxt}
-% \end{macrocode}
-% \end{RSframed}
-%
-% \begin{RSframed}
-% \begin{macrocode}
-%%-- TEMPLATE FOR TABLES ------------------------
-% \end{macrocode}
-% \begin{macrocode}
- \newref{tab}{%
- name = \RStabtxt,
- names = \RStabstxt,
- Name = \RSTabtxt,
- Names = \RSTabstxt,
- rngtxt = \RSrngtxt,
- lsttwotxt = \RSlsttwotxt,
- lsttxt = \RSlsttxt}
-% \end{macrocode}
-% \end{RSframed}
-%
-% \pagebreak[2]
-% \subsubsection{Footnotes}\seclabel{fnTempl}
-%
-% A reference to a footnote differs from other references in that
-% it is only defined inside the footnote definition itself:
-% \begin{Ipara}
-% |\footnote{This is a footnote with ... \label{fn:xx}}|
-% \end{Ipara}
-% It can then be referred to with |\ref{fn:xx}|.
-%
-% A useful application of the \RS package is for references to
-% footnotes, were you need a duplicate footnote mark that refers to
-% a previously defined footnote.\footnote{^^A
-% This is a footnote with \cmd{\fnlabel}\texttt{\{xx\}} ...\fnlabel{xx}}
-% You can use the stared form of the reference
-% command to format the reference as a footnote mark, while the
-% reference commands without a star behave as normal.
-% \begin{Itabb}
-% \hspace*{2cm}\=\kill
-% |\fnref*{xx}| \ArTab \fnref*{xx}\\
-% |\fnref{xx}| \ArTab \fnref{xx}\\
-% \end{Itabb}
-%
-% \begin{RSframed}
-% \begin{macrocode}
-%%-- TEMPLATE FOR FOOTNOTES ---------------------
-% \end{macrocode}
-% Define the \cmd{\RSfnmark} to reproduce the footnote mark.
-% Use the |\ifRSstar| conditional to switch between a superscripted
-% and a normal reference.
-% \begin{macrocode}
- \newcommand{\RSfnmark}[1]{%
- \begingroup
- \unrestored@protected@xdef\@thefnmark{\ref{#1}}%
- \endgroup
- \@footnotemark}
-% \end{macrocode}
-% \begin{macrocode}
- \newref{fn}{%
- name = \RSfootntxt,
- names = \RSfootnstxt,
- Name = \RSFootntxt,
- Names = \RSFootnstxt,
- refcmd = {\ifRSstar\RSfnmark{#1}\else(\ref{#1})\fi},
- rngtxt = \RSrngtxt,
- lsttwotxt = \RSlsttwotxt,
- lsttxt = \RSlsttxt}
-% \end{macrocode}
-% \end{RSframed}
-%
-% \subsubsection{Enumerated lists}
-%
-% A reference to an item in an enumerated list can be obtained
-% by placing the labelling command after the \cmd{\item} command
-% inside the list. The second level numbering of the \cmd{\ref}
-% label in the standard \LaTeX{} is: 2a, 2b, etc.
-%
-% If you want to change the reference labels to 2(a), 2(b),
-% etc., without effecting the display in the \env{enumerate}
-% environment, you can make the following redefinition:
-% \begin{Ipara}
-% |\makeatletter|\\
-% |\renewcommand{\p@enumii}{\expandafter\p@@enumii}|\\
-% |\newcommand{\p@@enumii}[1]{\theenumi(#1)}|\\
-% |\makeatother|
-% \end{Ipara}
-% The contents of the \cmd{\@currentlable} is then
-% \begin{Ipara}
-% |{\expandafter\p@@enumii\theenumii}| ~$\rightarrow$~
-% |{\theenumi(\theenumii)}|
-% \end{Ipara}
-%
-% Writing a template for enumerated lists is left to the user.
-%
-%
-% \subsubsection{Theorems, lemmas, etc.}\seclabel{Thm}
-%
-% There exists many perturbations to the theorem environment such
-% as, Theorem, Lemma, Exercise, etc., and it is left to the user as
-% an exercise to construct his or her own templates.
-%
-% As an example to add reference for theorems to an exiting setup:
-%
-% \begin{Ipara}
-% |\usepackage{refstyle} |\\
-% |\newref{thm}{ |\\
-% | name = {theorem~}, |\\
-% | names = {theorems~},|\\
-% | Name = {Theorem~}, |\\
-% | Names = {Theorems~},|\\
-% | rngtxt = \RSrngtxt,|\\
-% | lsttwotxt = \RSlsttxt,|\\
-% | lsttxt = \RSlsttxt}|
-% \end{Ipara}
-%
-% If you want to add it to a specific language setup with \pkg{babel} then
-% you can do the following, for example for a dual language document with
-% English and Norwegian:
-% \begin{Ipara}
-% |\documentclass[english, norwegian]{article}% NB: Languages as global opts! |\\
-% |\usepackage{babel} %Use global languages |\\
-% |\usepackage{varioref} %Use global languages |\\
-% |\usepackage{refstyle} %Use global languages |\\
-% |\RSaddto{\RSnorwegian}{% |\\
-% | \def\RSthmtxt{teorem~}% |\\
-% | \def\RSthmstxt{teorem~}% |\\
-% | \def\RSThmtxt{Teorem~}% |\\
-% | \def\RSThmstxt{Teorem~}} |\\
-% |\RSaddto{\RSenglish}{% |\\
-% | \def\RSthmtxt{theorem~}% |\\
-% | \def\RSthmstxt{theorems~}% |\\
-% | \def\RSThmtxt{Theorem~}% |\\
-% | \def\RSThmstxt{Theorems~}} |\\
-% |\newref{thm}{ |\\
-% | name = \RSthmtxt, |\\
-% | names = \RSthmstxt, |\\
-% | Name = \RSThmtxt, |\\
-% | Names = \RSThmstxt, |\\
-% | rngtxt = \RSrngtxt, |\\
-% | lsttwotxt = \RSlsttxt, |\\
-% | lsttxt = \RSlsttwotxt} |
-% \end{Ipara}
-%
-% \noindent All \pkg{babel} language changes will then activate
-% the proper code setup. In this example the \pkg{refstyle}
-% mechanism is used where the code is appended to the |\RSenglish|
-% and |\RSnorwegian| container functions. These functions are added
-% by the package
-% to the \pkg{babel} containers |\extrasenglish| and |\extrasnorwegian|,
-% that is called every time a language change occurs.
-% Please see the contents of \pkg{refstyle.cfg} for the names of the
-% \pkg{refstyle} containers associated with the different languages.
-%
-% Note that the extended definitions
-% can also be added directly to the \pkg{babel} containers without using
-% \pkg{refstyle}'s mechanism.
-%
-% \begin{macrocode}
-%</cfg>
-% \end{macrocode}
-%
-% \Finale
-\endinput
+% \iffalse
+%
+% refconfig.dtx
+% Copyright (C) 2002--2024 Danie Els
+%
+% -------------------------------------------------------------------
+% The refstyle package
+% for the formatting of references
+% -------------------------------------------------------------------
+% This work may be distributed and/or modified under the conditions
+% of the LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX
+% version 2008/12/01 or later.
+%
+% This work has the LPPL maintenance status 'maintained'.
+%
+% This Current Maintainer of this work is Danie Els (dnjels@gmail.com)
+%
+% This package consists of the files: refstyle.dtx
+% refconfig.dtx
+% refstyle.ins
+% and the derived files: refstyle.sty
+% refstyle.cfg
+% -------------------------------------------------------------------
+%
+%<*driver>
+\documentclass[a4paper]{ltxdoc}
+ \EnableCrossrefs
+ \CodelineIndex
+ \RecordChanges
+\usepackage{color}
+\usepackage{framed}
+ \setlength{\FrameSep}{1\fboxsep}
+ \definecolor{shadecolor}{gray}{0.9}
+ \newenvironment{RSframed}{\shaded}{\endshaded}
+\usepackage{xspace}
+\usepackage{varioref}
+\usepackage{refstyle}
+
+%-- macrocode env changes ------------------------------
+
+\setlength{\MacroIndent}{1.5em}
+
+%-- Indented environments ------------------------------
+
+\newlength{\tdima}
+\newsavebox{\tboxa}
+\newlength{\mytab}
+\setlength{\mytab}{2\parindent}
+
+\newenvironment{IndentPara}[1][1]
+ {\list{}{\setlength{\leftmargin}{#1\mytab}%
+ \setlength{\labelwidth}{0pt}%
+ \setlength{\labelsep}{0pt}%
+ \setlength{\itemindent}{\parindent}%
+ \setlength{\listparindent}{\parindent}%
+ }\item[]}%
+ {\endlist}
+\newenvironment{Ipara}[1][\small]%
+ {\begin{IndentPara}\noindent#1\ignorespaces}%
+ {\end{IndentPara}}
+\newenvironment{Itabb}[1][\small]%
+ {\begin{IndentPara}#1\ignorespaces\begin{tabbing}\ignorespaces}%
+ {\end{tabbing}\end{IndentPara}}
+
+%-- Additional documenting commands --------------------
+
+\makeatletter
+\def\meta@font@select{\normalfont\slshape}
+\makeatother
+
+\newcommand*{\file}[1]{\texttt{#1}}
+\newcommand*{\pkg}[1]{\textsf{#1}}
+\newcommand*{\env}[1]{\texttt{#1}}
+\newcommand*{\opt}[1]{\texttt{\slshape#1}}
+\newcommand*{\RS}{\pkg{refstyle}\xspace}
+
+\newcommand*{\ArTab}{\>\quad$\rightarrow$\quad}
+
+%-------------------------------------------------------
+
+\setlength\hfuzz{15pt}
+\hbadness=7000
+\begin{document}
+ \DocInput{refconfig.dtx}
+\end{document}
+
+%</driver>
+% \fi
+%
+% \CheckSum{1092}
+%
+% \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 \~}
+%
+% \changes{v0.0}{2002/04/01}{Initial version}
+% \changes{v0.2}{2003/07/30}{Updated version}
+% \changes{v0.3}{2006/09/07}{Documentation update}
+% \changes{v0.4}{2010/10/21}{Add \cmd{\RSlsttwotxt} for lists}
+% \changes{v0.5}{2010/11/02}{Bug fixes}
+% \changes{v0.6}{2024/01/31}{robustification of AMS' \cmd{\eqref}}
+%
+% \DoNotIndex{
+% \",\@chapapp,\@ifpackageloaded,\AtBeginDocument,
+% \begingroup,\def,\edef,\else,\endgroup,
+% \fi,\ifx, \let, \newcommand,\newref,
+% \providecommand,\ProvidesFile,\ref,\relax,
+% \renewcommand,\RS@ifundefined,\RS@tmpa,\RS@tmpb,
+% \S,\space,\ss,\string,\textup,\unrestored@protected@xdef}
+%
+%^^A-- Titling --------------------------------------------
+% \GetFileInfo{refstyle.cfg}
+% \title{\vskip -2em
+% Configuration file for \RS\ package\thanks{
+% This file has version number
+% \fileversion, last revised
+% \filedate.}}
+% \author{Danie Els\\[1ex]
+% \normalsize e-mail: \texttt{dnjels@gmail}}
+% \date{\filedate}
+% \maketitle
+%
+% \tableofcontents
+% \clearpage
+%
+%
+% \section{The \RS\ configuration file}
+%
+% \subsubsection*{Reference templates}
+% The default configuration file, \file{refstyle.cfg}, makes the
+% following reference declarations:
+% \begin{Ipara}
+% |\newref{part}{...}| \quad$\rightarrow$ Parts\\
+% |\newref{chap}{...}| \quad$\rightarrow$ Chapters and Appendices\\
+% |\newref{sec}{...} | \quad$\rightarrow$ Sections\\
+% |\newref{eq}{...} | \quad$\rightarrow$ Equations\\
+% |\newref{fig}{...} | \quad$\rightarrow$ Figures\\
+% |\newref{tab}{...} | \quad$\rightarrow$ Tables\\
+% |\newref{fn}{...} | \quad$\rightarrow$ Footnotes
+% \end{Ipara}
+% If there is a need for more reference types, this standard
+% list can be expanded.
+%
+% \subsubsection*{Language definitions}
+% The \RS\ package also provides the following language definitions
+% options for references, when loaded together with \pkg{babel}:
+% \begin{itemize}
+% \item afrikaans
+% \item danish
+% \item english, USenglish, american, canadian, UKenglish, british
+% \item french
+% \item german, ngerman, austrian, naustrian
+% \item italian
+% \item norwegian, nynorsk, norsk, bokmal\footnote{Norwegian Bokm{\aa}l
+% is not defined in \pkg{babel} yet.}
+% \item portuges, portuguese, brazilian, brazil
+% \item swedish
+% \end{itemize}
+%
+% \noindent See \secref[vref]{Thm} for an example of how to link your
+% own definitions to an exsiting language setup.
+% \StopEventually{\PrintChanges}
+% \clearpage
+% \section{Implementation}
+% \begin{macrocode}
+%<*cfg>
+% \end{macrocode}
+% \subsection{Identification}
+% \begin{RSframed}
+% \begin{macrocode}
+\ProvidesFile{refstyle.cfg}[2024/01/31\space
+ v0.6\space
+ Configuration file for refstyle (DNJ Els)]
+% \end{macrocode}
+% \end{RSframed}
+%
+% \subsection{Language Definitions for \RS\ Package}
+%
+% \subsubsection{English}
+%
+% \begin{macro}{\RSenglish,\RSukenglish}
+% Support provided by the author.
+% \begin{RSframed}
+% \begin{macrocode}
+%%-- ENGLISH ------------------------------------
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand\RSukenglish{%
+ \def\RSrngtxt{\space to~}%........... Range: figures 5 to 6
+ \def\RSlsttwotxt{\space and~}%....... List two: figures 5 and 6
+ \def\RSlsttxt{, and~}%............... List more: figures 5, 6, and 7
+ \def\RSparttxt{Part~}%............... Part lowercase singular
+ \def\RSpartstxt{Parts~}%............. lowercase plural
+ \def\RSParttxt{Part~}%............... uppercase singular (sentence start)
+ \def\RSPartstxt{Parts~}%............. uppercase plural (sentence start)
+ \def\RSappendixname{appendix~}%...... Appendix lowercase singular
+ \def\RSappendicesname{appendices~}%.. lowercase plural
+ \def\RSAppendixname{Appendix~}%...... uppercase singular (sentence start)
+ \def\RSAppendicesname{Appendices~}%.. uppercase plural (sentence start)
+ \def\RSchaptername{chapter~}%........ Chapter lowercase singular
+ \def\RSchaptersname{chapters~}%...... lowercase plural
+ \def\RSChaptername{Chapter~}%........ uppercase singular (sentence start)
+ \def\RSChaptersname{Chapters~}%...... uppercase plural (sentence start)
+ \def\RSsectxt{section~}%............. Section lowercase singular
+ \def\RSsecstxt{sections~}%........... lowercase plural
+ \def\RSSectxt{Section~}%............. uppercase singular (sentence start)
+ \def\RSSecstxt{Sections~}%........... uppercase plural (sentence start)
+ \def\RSeqtxt{equation~}%............. Equation lowercase singular
+ \def\RSeqstxt{equations~}%........... lowercase plural
+ \def\RSEqtxt{Equation~}%............. uppercase singular (sentence start)
+ \def\RSEqstxt{Equations~}%........... uppercase plural (sentence start)
+ \def\RSfigtxt{figure~}%.............. Figure lowercase singular
+ \def\RSfigstxt{figures~}%............ lowercase plural
+ \def\RSFigtxt{Figure~}%.............. uppercase singular (sentence start)
+ \def\RSFigstxt{Figures~}%............ uppercase plural (sentence start)
+ \def\RStabtxt{table~}%............... Table lowercase singular
+ \def\RStabstxt{tables~}%............. lowercase plural
+ \def\RSTabtxt{Table~}%............... uppercase singular (sentence start)
+ \def\RSTabstxt{Tables~}%............. uppercase plural (sentence start)
+ \def\RSfootntxt{footnote~}%.......... Footnote lowercase singular
+ \def\RSfootnstxt{footnotes~}%........ lowercase plural
+ \def\RSFootntxt{Footnote~}%.......... uppercase singular (sentence start)
+ \def\RSFootnstxt{Footnotes~}%........ uppercase plural (sentence start)
+}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand\RSenglish{%
+ \def\RSrngtxt{\space to~}%
+ \def\RSlsttwotxt{\space and~}%
+ \def\RSlsttxt{\space and~}%
+ \def\RSparttxt{Part~}%
+ \def\RSpartstxt{Parts~}%
+ \def\RSParttxt{Part~}%
+ \def\RSPartstxt{Parts~}%
+ \def\RSappendixname{appendix~}%
+ \def\RSappendicesname{appendices~}%
+ \def\RSAppendixname{Appendix~}%
+ \def\RSAppendicesname{Appendices~}%
+ \def\RSchaptername{chapter~}%
+ \def\RSchaptersname{chapters~}%
+ \def\RSChaptername{Chapter~}%
+ \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~}%
+}
+% \end{macrocode}
+% \end{RSframed}
+% \end{macro}
+%
+% \noindent Make English the default.
+% \begin{RSframed}
+% \begin{macrocode}
+\RSenglish% Default
+% \end{macrocode}
+% \end{RSframed}
+%
+% \noindent Options
+% \begin{RSframed}
+% \begin{macrocode}
+\DeclareLangOpt{english}{\RSenglish}
+\DeclareLangOpt{USenglish}{\RSenglish}
+\DeclareLangOpt{american}{\RSenglish}
+\DeclareLangOpt{canadian}{\RSenglish}
+\DeclareLangOpt{UKenglish}{\RSukenglish}
+\DeclareLangOpt{british}{\RSukenglish}
+% \end{macrocode}
+% \end{RSframed}
+%
+%
+% \subsubsection{Afrikaans}
+%
+% \begin{macro}{\RSafrikaans}
+% Support provided by the author.
+% \begin{RSframed}
+% \begin{macrocode}
+%%-- AFRIKAANS ----------------------------------
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand\RSafrikaans{%
+ \def\RSrngtxt{\space tot~}%
+ \def\RSlsttwotxt{\space en~}%
+ \def\RSlsttxt{\space en~}%
+ \def\RSparttxt{Deel~}%
+ \def\RSpartstxt{Dele~}%
+ \def\RSParttxt{Deel~}%
+ \def\RSPartstxt{Dele~}%
+ \def\RSappendixname{bylae~}%
+ \def\RSappendicesname{bylaes~}%
+ \def\RSAppendixname{Bylae~}%
+ \def\RSAppendicesname{Bylaes~}%
+ \def\RSchaptername{hoofstuk~}%
+ \def\RSchaptersname{hoofstukke~}%
+ \def\RSChaptername{Hoofstuk~}%
+ \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~}%
+}
+% \end{macrocode}
+% \end{RSframed}
+% \end{macro}
+%
+% \noindent Options
+% \begin{RSframed}
+% \begin{macrocode}
+\DeclareLangOpt{afrikaans}{\RSafrikaans}
+% \end{macrocode}
+% \end{RSframed}
+%
+%
+% \subsubsection{Danish}
+%
+% \begin{macro}{\RSdanish}
+% \changes{v0.2}{2003/07/30}{Add Danish language support}
+% Thomas Widmann: \texttt{<\,thomas.widmann AT harpercollins DOT co DOT uk>}
+% provided the definitions for Danish.
+% \begin{RSframed}
+% \begin{macrocode}
+%%-- DANISH -------------------------------------
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand\RSdanish{%
+ \def\RSrngtxt{\space til~}%
+ \def\RSlsttwotxt{\space og~}%
+ \def\RSlsttxt{\space og~}%
+ \def\RSparttxt{del~}%
+ \def\RSpartstxt{del~}%
+ \def\RSParttxt{Del~}%
+ \def\RSPartstxt{Del~}%
+ \def\RSappendixname{bilag~}% % 'appendiks' is also possible,
+ \def\RSappendicesname{bilag~}% % but 'bilag' is used in Babel
+ \def\RSAppendixname{Bilag~}%
+ \def\RSAppendicesname{Bilag~}%
+ \def\RSchaptername{kapitel~}%
+ \def\RSchaptersname{kapitel~}%
+ \def\RSChaptername{Kapitel~}%
+ \def\RSChaptersname{Kapitel~}%
+ \def\RSsectxt{afsnit~}%
+ \def\RSsecstxt{afsnit~}%
+ \def\RSSectxt{Afsnit~}%
+ \def\RSSecstxt{Afsnit~}%
+ \def\RSeqtxt{ligning~}%
+ \def\RSeqstxt{ligning~}%
+ \def\RSEqtxt{Ligning~}%
+ \def\RSEqstxt{Ligning~}%
+ \def\RSfigtxt{figur~}%
+ \def\RSfigstxt{figur~}%
+ \def\RSFigtxt{Figur~}%
+ \def\RSFigstxt{Figur~}%
+ \def\RStabtxt{tabel~}%
+ \def\RStabstxt{tablel~}%
+ \def\RSTabtxt{Tabel~}%
+ \def\RSTabstxt{Tabel~}%
+ \def\RSfootntxt{fodnote~}%
+ \def\RSfootnstxt{fodnote~}%
+ \def\RSFootntxt{Fodnote~}%
+ \def\RSFootnstxt{Fodnote~}%
+}
+% \end{macrocode}
+% \end{RSframed}
+% \end{macro}
+%
+% \noindent Options
+% \begin{RSframed}
+% \begin{macrocode}
+\DeclareLangOpt{danish}{\RSdanish}
+% \end{macrocode}
+% \end{RSframed}
+%
+%
+% \subsubsection{French}
+%
+% \begin{macro}{\RSfrench}
+% \changes{v0.4}{2010/10/21}{Add French language support}
+% Jean-Pierre Chr\'etien \texttt{<\,jeanpierre.chretien AT free DOT fr>}
+% provided the definitions for French.
+% \begin{RSframed}
+% \begin{macrocode}
+%%-- FRENCH -------------------------------------
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand\RSfrench{%
+ \def\RSrngtxt{\space \`{a}~}%
+ \def\RSlsttwotxt{\space et~}%
+ \def\RSlsttxt{\space et~}%
+ \def\RSparttxt{partie~}%
+ \def\RSpartstxt{parties~}%
+ \def\RSParttxt{La partie~}%
+ \def\RSPartstxt{Les parties~}%
+ \def\RSappendixname{appendice~}%
+ \def\RSappendicesname{appendices~}%
+ \def\RSAppendixname{L'appendice~}%
+ \def\RSAppendicesname{Les appendices~}%
+ \def\RSchaptername{chapitre~}%
+ \def\RSchaptersname{chapitres~}%
+ \def\RSChaptername{Le chapitre~}%
+ \def\RSChaptersname{Les chapitres~}%
+ \def\RSsectxt{section~}%
+ \def\RSsecstxt{sections~}%
+ \def\RSSectxt{La section~}%
+ \def\RSSecstxt{Les sections~}%
+ \def\RSeqtxt{\'{e}quation~}%
+ \def\RSeqstxt{\'{e}quations~}%
+ \def\RSEqtxt{L'\'{e}quation~}%
+ \def\RSEqstxt{Les \'{e}quations~}%
+ \def\RSfigtxt{figure~}%
+ \def\RSfigstxt{figures~}%
+ \def\RSFigtxt{La figure~}%
+ \def\RSFigstxt{Les figures~}%
+ \def\RStabtxt{tableau~}%
+ \def\RStabstxt{tableaux~}%
+ \def\RSTabtxt{Le tableau~}%
+ \def\RSTabstxt{Les tableaux~}%
+ \def\RSfootntxt{note~}%
+ \def\RSfootnstxt{notes~}%
+ \def\RSFootntxt{La note~}%
+ \def\RSFootnstxt{Les notes~}%
+}
+% \end{macrocode}
+% \end{RSframed}
+% \end{macro}
+%
+% \noindent Options
+% \begin{RSframed}
+% \begin{macrocode}
+\DeclareLangOpt{french}{\RSfrench}
+% \end{macrocode}
+% \end{RSframed}
+%
+%
+%
+% \subsubsection{German}
+%
+% \begin{macro}{\RSgerman}
+% \changes{v0.2}{2003/07/30}{Add German language support}
+% Harald Harders: \texttt{<\,h.harders AT tu-bs DOT de>}
+% provided the definitions for German.
+% \begin{RSframed}
+% \begin{macrocode}
+%%-- GERMAN -------------------------------------
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand\RSgerman{%
+ \def\RSrngtxt{\space bis~}%
+ \def\RSlsttwotxt{\space und~}%
+ \def\RSlsttxt{\space und~}%
+ \def\RSparttxt{Teil~}%
+ \def\RSpartstxt{Teile~}%
+ \def\RSParttxt{Teil~}%
+ \def\RSPartstxt{Teile~}%
+ \def\RSappendixname{Anhang~}%
+ \def\RSappendicesname{Anh\"{a}nge~}%
+ \def\RSAppendixname{Anhang~}%
+ \def\RSAppendicesname{Anh\"{a}nge~}%
+ \def\RSchaptername{Kapitel~}%
+ \def\RSchaptersname{Kapitel~}%
+ \def\RSChaptername{Kapitel~}%
+ \def\RSChaptersname{Kapitel~}%
+ \def\RSsectxt{Abschnitt~}%
+ \def\RSsecstxt{Abschnitt~}%
+ \def\RSSectxt{Abschnitt~}%
+ \def\RSSecstxt{Abschnitt~}%
+ \def\RSeqtxt{Gleichung~}%
+ \def\RSeqstxt{Gleichungen~}%
+ \def\RSEqtxt{Gleichung~}%
+ \def\RSEqstxt{Gleichungen~}%
+ \def\RSfigtxt{Abbildung~}%
+ \def\RSfigstxt{Abbildung~}%
+ \def\RSFigtxt{Abbildung~}%
+ \def\RSFigstxt{Abbildung~}%
+ \def\RStabtxt{Tabelle~}%
+ \def\RStabstxt{Tabellen~}%
+ \def\RSTabtxt{Tabelle~}%
+ \def\RSTabstxt{Tabellen~}%
+ \def\RSfootntxt{Fu\ss note~}%
+ \def\RSfootnstxt{Fu\ss noten~}%
+ \def\RSFootntxt{Fu\ss note~}%
+ \def\RSFootnstxt{Fu\ss noten~}%
+}
+% \end{macrocode}
+% \end{RSframed}
+% \end{macro}
+%
+% \noindent Options
+% \begin{RSframed}
+% \begin{macrocode}
+\DeclareLangOpt{german}{\RSgerman}
+\DeclareLangOpt{ngerman}{\RSgerman}
+\DeclareLangOpt{austrian}{\RSgerman}
+\DeclareLangOpt{naustrian}{\RSgerman}
+% \end{macrocode}
+% \end{RSframed}
+%
+%
+% \subsubsection{Italian}
+%
+% \begin{macro}{\RSitalian}
+% \changes{v0.4}{2010/10/21}{Add Italian language support}
+% Nicola Lunghi: \texttt{<\,nick83ola AT gmail DOT com>}
+% provided the definitions for Italian.
+% \begin{RSframed}
+% \begin{macrocode}
+%%-- ITALIAN ------------------------------------
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand\RSitalian{%
+ \def\RSrngtxt{--}%
+ \def\RSlsttwotxt{\space e~}%
+ \def\RSlsttxt{\space e~}%
+ \def\RSparttxt{Parte~}%
+ \def\RSpartstxt{Parti~}%
+ \def\RSParttxt{Parte~}%
+ \def\RSPartstxt{Parti~}%
+ \def\RSappendixname{l'appendice~}%
+ \def\RSappendicesname{le appendici~}%
+ \def\RSAppendixname{l'Appendice~}%
+ \def\RSAppendicesname{le Appendici~}%
+ \def\RSchaptername{il capitolo~}%
+ \def\RSchaptersname{i capitoli~}%
+ \def\RSChaptername{il Capitolo~}%
+ \def\RSChaptersname{i Capitoli~}%
+ \def\RSsectxt{la sezione~}%
+ \def\RSsecstxt{le sezioni~}%
+ \def\RSSectxt{la Sezione~}%
+ \def\RSSecstxt{la Sezioni~}%
+ \def\RSeqtxt{l'equazione~}%
+ \def\RSeqstxt{le equazioni~}%
+ \def\RSEqtxt{l'Equazione~}%
+ \def\RSEqstxt{le Equazioni~}%
+ \def\RSfigtxt{la figura~}%
+ \def\RSfigstxt{le figure~}%
+ \def\RSFigtxt{la Figura~}%
+ \def\RSFigstxt{le Figure~}%
+ \def\RStabtxt{la tabella~}%
+ \def\RStabstxt{le tabelle~}%
+ \def\RSTabtxt{la Tabella~}%
+ \def\RSTabstxt{le Tabelle~}%
+ \def\RSfootntxt{la nota~}%
+ \def\RSfootnstxt{le note~}%
+ \def\RSFootntxt{la Nota~}%
+ \def\RSFootnstxt{le Note~}%
+}
+% \end{macrocode}
+% \end{RSframed}
+% \end{macro}
+%
+% \noindent Options
+% \begin{RSframed}
+% \begin{macrocode}
+\DeclareLangOpt{italian}{\RSitalian}
+% \end{macrocode}
+% \end{RSframed}
+%
+%
+%
+% \subsubsection{Norwegian}
+%
+% \begin{macro}{\RSnorwegian}
+% \changes{v0.3}{2006/09/07}{Add Norwegian language support}
+% Karl Ove Hufthammer: \texttt{<\,karloh AT mi DOT uib DOT no>}
+% provided the definitions for Norwegian.
+%
+% Norway has two official languages Norwegian Nynorsk and
+% Norwegian Bokm{\aa}l (commonly 'nynorsk' and 'norsk' in LaTeX),
+% but the \pkg{refstyle} definitions are identically in both variants.
+% \begin{RSframed}
+% \begin{macrocode}
+%%-- NORWEGIAN -------------------------------------
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand\RSnorwegian{%
+ \def\RSrngtxt{\space til~}%
+ \def\RSlsttwotxt{\space og~}%
+ \def\RSlsttxt{\space og~}%
+ \def\RSparttxt{del~}%
+ \def\RSpartstxt{del~}%
+ \def\RSParttxt{Del~}%
+ \def\RSPartstxt{Del~}%
+ \def\RSappendixname{tillegg~}%
+ \def\RSappendicesname{tillegg~}%
+ \def\RSAppendixname{Tillegg~}%
+ \def\RSAppendicesname{Tillegg~}%
+ \def\RSchaptername{kapittel~}%
+ \def\RSchaptersname{kapittel~}%
+ \def\RSChaptername{Kapittel~}%
+ \def\RSChaptersname{Kapittel~}%
+ \def\RSsectxt{avsnitt~}%
+ \def\RSsecstxt{avsnitt~}%
+ \def\RSSectxt{Avsnitt~}%
+ \def\RSSecstxt{Avsnitt~}%
+ \def\RSeqtxt{formel~}%
+ \def\RSeqstxt{formel~}%
+ \def\RSEqtxt{Formel~}%
+ \def\RSEqstxt{Formel~}%
+ \def\RSfigtxt{figur~}%
+ \def\RSfigstxt{figur~}%
+ \def\RSFigtxt{Figur~}%
+ \def\RSFigstxt{Figur~}%
+ \def\RStabtxt{tabell~}%
+ \def\RStabstxt{tabell~}%
+ \def\RSTabtxt{Tabell~}%
+ \def\RSTabstxt{Tabell~}%
+ \def\RSfootntxt{fotnote~}%
+ \def\RSfootnstxt{fotnote~}%
+ \def\RSFootntxt{Fotnote~}%
+ \def\RSFootnstxt{Fotnote~}%
+}
+% \end{macrocode}
+% \end{RSframed}
+% \end{macro}
+%
+% \noindent Options
+% \begin{RSframed}
+% \begin{macrocode}
+\DeclareLangOpt{norwegian}{\RSnorwegian}
+\DeclareLangOpt{nynorsk}{\RSnorwegian}
+\DeclareLangOpt{bokmal}{\RSnorwegian}% Not in babel yet
+\DeclareLangOpt{norsk}{\RSnorwegian}
+% \end{macrocode}
+% \end{RSframed}
+%
+%
+% \subsubsection{Portuguese/Brazilian}
+%
+% \begin{macro}{\RSportuguese,\RSbrazilian}
+% \changes{v0.4}{2010/10/21}{Add Portuguese language support}
+% Bernhard Enders and Flavio Costa \texttt{<\,flaviocosta AT yahoo DOT com DOT br>}
+% provided the definitions for Portuguese.
+% \begin{RSframed}
+% \begin{macrocode}
+%%-- PORTUGUESE -----------------------------------
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand\RSportuguese{%
+ \def\RSrngtxt{\space a~}%
+ \def\RSlsttwotxt{\space e~}%
+ \def\RSlsttxt{\space e~}%
+ \def\RSparttxt{Parte~}%
+ \def\RSpartstxt{Partes~}%
+ \def\RSParttxt{Parte~}%
+ \def\RSPartstxt{Partes~}%
+ \def\RSappendixname{ap\^{e}ndice~}%
+ \def\RSappendicesname{ap\^{e}ndices~}%
+ \def\RSAppendixname{Ap\^{e}ndice~}%
+ \def\RSAppendicesname{Ap\^{e}ndices~}%
+ \def\RSchaptername{cap\'{i}tulo~}%
+ \def\RSchaptersname{cap\'{i}tulos~}%
+ \def\RSChaptername{Cap\'{i}tulo~}%
+ \def\RSChaptersname{Cap\'{i}tulos~}%
+ \def\RSsectxt{se\c{c}\~{a}o~}%
+ \def\RSsecstxt{se\c{c}\~{o}es~}%
+ \def\RSSectxt{Se\c{c}\~{a}o~}%
+ \def\RSSecstxt{Se\c{c}\~{o}es~}%
+ \def\RSeqtxt{equa\c{c}\~{a}o~}%
+ \def\RSeqstxt{equa\c{c}\~{o}es~}%
+ \def\RSEqtxt{Equa\c{c}\~{a}o~}%
+ \def\RSEqstxt{Equa\c{c}\~{o}es~}%
+ \def\RSfigtxt{figura~}%
+ \def\RSfigstxt{figuras~}%
+ \def\RSFigtxt{Figura~}%
+ \def\RSFigstxt{Figuras~}%
+ \def\RStabtxt{tabela~}%
+ \def\RStabstxt{tabelas~}%
+ \def\RSTabtxt{Tabela~}%
+ \def\RSTabstxt{Tabelas~}%
+ \def\RSfootntxt{nota de rodap\'{e}~}%
+ \def\RSfootnstxt{notas de rodap\'{e}~}%
+ \def\RSFootntxt{Nota de rodap\'{e}~}%
+ \def\RSFootnstxt{Notas de rodap\'{e}~}%
+}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand\RSbrazilian{%
+ \def\RSrngtxt{\space a~}%
+ \def\RSlsttwotxt{\space e~}%
+ \def\RSlsttxt{\space e~}%
+ \def\RSparttxt{Parte~}%
+ \def\RSpartstxt{Partes~}%
+ \def\RSParttxt{Parte~}%
+ \def\RSPartstxt{Partes~}%
+ \def\RSappendixname{ap\^{e}ndice~}%
+ \def\RSappendicesname{ap\^{e}ndices~}%
+ \def\RSAppendixname{Ap\^{e}ndice~}%
+ \def\RSAppendicesname{Ap\^{e}ndices~}%
+ \def\RSchaptername{cap\'{i}tulo~}%
+ \def\RSchaptersname{cap\'{i}tulos~}%
+ \def\RSChaptername{Cap\'{i}tulo~}%
+ \def\RSChaptersname{Cap\'{i}tulos~}%
+ \def\RSsectxt{sec\c{c}\~{a}o~}%<---------------
+ \def\RSsecstxt{sec\c{c}\~{o}es~}%<-------------
+ \def\RSSectxt{Sec\c{c}\~{a}o~}%<---------------
+ \def\RSSecstxt{Sec\c{c}\~{o}es~}%<-------------
+ \def\RSeqtxt{equa\c{c}\~{a}o~}%
+ \def\RSeqstxt{equa\c{c}\~{o}es~}%
+ \def\RSEqtxt{Equa\c{c}\~{a}o~}%
+ \def\RSEqstxt{Equa\c{c}\~{o}es~}%
+ \def\RSfigtxt{figura~}%
+ \def\RSfigstxt{figuras~}%
+ \def\RSFigtxt{Figura~}%
+ \def\RSFigstxt{Figuras~}%
+ \def\RStabtxt{tabela~}%
+ \def\RStabstxt{tabelas~}%
+ \def\RSTabtxt{Tabela~}%
+ \def\RSTabstxt{Tabelas~}%
+ \def\RSfootntxt{nota de rodap\'{e}~}%
+ \def\RSfootnstxt{notas de rodap\'{e}~}%
+ \def\RSFootntxt{Nota de rodap\'{e}~}%
+ \def\RSFootnstxt{Notas de rodap\'{e}~}%
+}
+% \end{macrocode}
+% \end{RSframed}
+% \end{macro}
+%
+% \noindent Options
+% \begin{RSframed}
+% \begin{macrocode}
+\DeclareLangOpt{portuges}{\RSportuguese}
+\DeclareLangOpt{portuguese}{\RSportuguese}
+\DeclareLangOpt{brazilian}{\RSbrazilian}
+\DeclareLangOpt{brazil}{\RSbrazilian}
+% \end{macrocode}
+% \end{RSframed}
+%
+%
+%
+% \subsubsection{Swedish}
+%
+% \begin{macro}{\RSswedish}
+% \changes{v0.2}{2003/07/30}{Add Swedish language support}
+% Bj\"{o}rn Thors \texttt{<\,bjorn.thors AT alfvenlab DOT kth DOT se>}
+% provided the definitions for Swedish.
+% \begin{RSframed}
+% \begin{macrocode}
+%%-- SWEDISH ------------------------------------
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand\RSswedish{%
+ \def\RSrngtxt{\space till~}%
+ \def\RSlsttwotxt{\space och~}%
+ \def\RSlsttxt{\space och~}%
+ \def\RSparttxt{del~}%
+ \def\RSpartstxt{del~}%
+ \def\RSParttxt{Del~}%
+ \def\RSPartstxt{Del~}%
+ \def\RSappendixname{appendix~}%
+ \def\RSappendicesname{appendix~}%
+ \def\RSAppendixname{Appendix~}%
+ \def\RSAppendicesname{Appendix~}%
+ \def\RSchaptername{kapitel~}%
+ \def\RSchaptersname{kapitel~}%
+ \def\RSChaptername{Kapitel~}%
+ \def\RSChaptersname{Kapitel~}%
+ \def\RSsectxt{sektion~}%
+ \def\RSsecstxt{sektion~}%
+ \def\RSSectxt{Sektion~}%
+ \def\RSSecstxt{Sektion~}%
+ \def\RSeqtxt{ekvation~}%
+ \def\RSeqstxt{ekvation~}%
+ \def\RSEqtxt{Ekvation~}%
+ \def\RSEqstxt{Ekvation~}%
+ \def\RSfigtxt{figur~}%
+ \def\RSfigstxt{figur~}%
+ \def\RSFigtxt{Figur~}%
+ \def\RSFigstxt{Figur~}%
+ \def\RStabtxt{tabell~}%
+ \def\RStabstxt{tabell~}%
+ \def\RSTabtxt{Tabell~}%
+ \def\RSTabstxt{Tabell~}%
+ \def\RSfootntxt{fotnot~}%
+ \def\RSfootnstxt{fotnot~}%
+ \def\RSFootntxt{Fotnot~}%
+ \def\RSFootnstxt{Fotnot~}%
+}
+% \end{macrocode}
+% \end{RSframed}
+% \end{macro}
+% \noindent Options
+% \begin{RSframed}
+% \begin{macrocode}
+\DeclareLangOpt{swedish}{\RSswedish}
+% \end{macrocode}
+% \end{RSframed}
+%
+%
+%
+%
+% \subsection{Templates for the \RS Package}
+%
+% The user can also define his or her own templates and put it
+% in a separate configuration file to ensure uniformity
+% of reference formats in your documents.
+%
+% \subsubsection{Parts}
+%
+% References to parts are usually straight forward, except that the
+% document division ``Part'' must be distinguished from the normal
+% usage of the word ``part'' in a sentence. A personal preference
+% is to use small caps.
+%
+% \begin{RSframed}
+% \begin{macrocode}
+%%-- TEMPLATE FOR PARTS -------------------------
+% \end{macrocode}
+% \begin{macrocode}
+ \newref{part}{%
+ name = \RSparttxt,
+ names = \RSpartstxt,
+ Name = \RSPparttxt,
+ Names = \RSPartstxt,
+ rngtxt = \RSrngtxt,
+ lsttxt = \RSlsttxt}
+% \end{macrocode}
+% \end{RSframed}
+%
+%
+%
+% \subsubsection{Chapters and Appendices}
+%
+% A major problem with a reference to a chapter is that at the time
+% when the reference label, |\label|\marg{chap-label}, is created,
+% it is unknown whether it would eventually ends up in the main
+% matter or the appendix part of a book or report.
+%
+% A simple solution is to use the prefix to the \meta{chapter}
+% counter, |\p@chapter|, to write the definition of |\@chapapp| to
+% the auxiliary file (|.aux|) together with information of the
+% label. The command |\@chapapp| expands to either |\chaptername| or
+% |\appendixname| depending on whether the reference label is
+% defined in the main matter or after the |\appendix| was called.
+% (Note that |\@chapapp| is not defined in the AMS book class.)
+%
+% \begin{Ipara}
+% |\renewcommand*{\p@chapter}{\string\chname{\@chapapp}}|\\
+% |\newcommand*{\chname}[1]{}%<-make it harmless |\\
+% |\newcommand*{\chapref}[1]{{\renewcommand*{\chname}[1]{##1~}\ref{#1}}}|
+% \end{Ipara}
+%
+% \noindent The reference to a chapter, |\chapref|\marg{chap-label},
+% will then be prefixed with |\chaptername| or |\appendixname| and
+% it does not matter where it was defined or where it was called.
+%
+% To utilize the full functionality of the \RS package for
+% references to chapters and appendices, a complex form of
+% \cmd{\newref} needs to be implemented.
+% The following is a template for a book or report classes.
+%
+%
+% \begin{RSframed}
+% \begin{macrocode}
+%%-- TEMPLATE FOR CHAPTERS & APPENDIXES ---------
+% \end{macrocode}
+% Prevent crashes for non-book type classes.
+% \begin{macrocode}
+\providecommand*{\p@chapter}{}
+% \end{macrocode}
+% Add \cmd{\@chapapp} to \cmd{\p@chapter} for writeout to auxiliary file.
+% If an AMS book class is loaded, then \cmd{\chaptername} must
+% be used.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \RS@ifundefined{chapter}{}{%
+ \RS@ifundefined{@chapapp}%
+ {\renewcommand*{\p@chapter}{\string\chpname{\chaptername}}}%AMS
+ {\renewcommand*{\p@chapter}{\string\chpname{\@chapapp}}}% Normal
+ }%
+ }
+% \end{macrocode}
+% Define \cmd{\chpname} to gobble its contents outside the
+% reference commands.
+% \begin{macrocode}
+\newcommand*{\chpname}[1]{}
+% \end{macrocode}
+% Define the \cmd{\RSchpname} to typeset all the different
+% perturbations of chapter and appendix names.
+% Use the conditionals to switch between the
+% different options.
+%
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% Define the \cmd{\newref} for chapters.
+% \begin{macrocode}
+ \newref{chap}{%
+ refcmd = {{\let\chpname=\RS@chpname\ref{#1}}},
+ rngtxt = \RSrngtxt,
+ lsttwotxt = \RSlsttwotxt,
+ lsttxt = \RSlsttxt}
+% \end{macrocode}
+% \end{RSframed}
+%
+%
+% \subsubsection{Sections and paragraphs}\seclabel{secTempl}
+%
+% A template for references to sections is given below. References
+% to paragraphs are similar and is left as an exercise to the users.
+%
+% \begin{RSframed}
+% \begin{macrocode}
+%%-- TEMPLATE FOR SECTIONS ----------------------
+% \end{macrocode}
+% \begin{macrocode}
+ \newref{sec}{%
+ name = \RSsectxt,
+ names = \RSsecstxt,
+ Name = \RSSectxt,
+ Names = \RSSecstxt,
+ refcmd = {\S\ref{#1}},
+ rngtxt = \RSrngtxt,
+ lsttwotxt = \RSlsttwotxt,
+ lsttxt = \RSlsttxt}
+% \end{macrocode}
+% \end{RSframed}
+%
+% \subsubsection{Equations}\seclabel{EqTempl}
+%
+% The equation number in references to equations are traditionally
+% written in an upright text, irrespective of the surrounding text.
+%
+% \begin{RSframed}
+% \begin{macrocode}
+%%-- TEMPLATE FOR EQUATIONS ---------------------
+% \end{macrocode}
+% The standard equation ref format if \pkg{amsmath.sty} is not loaded.
+% \begin{macrocode}
+\newcommand*{\RSeqrefform}[1]{\textup{(\ref{#1})}}
+% \end{macrocode}
+% If \pkg{amsmath.sty} is loaded, store \cmd{\eqref}
+% and then undefine it before the template is created.
+% \begin{macrocode}
+\AddToHook{package/amsmath/after}%
+ {\NewCommandCopy\AMSeqref\eqref
+ \RS@removedef{eqref}}%
+% \end{macrocode}
+% \begin{macrocode}
+\newref{eq}{%
+ name = \RSeqtxt,
+ names = \RSeqstxt,
+ Name = \RSEqtxt,
+ Names = \RSEqstxt,
+ refcmd = \RSeqrefform{#1},
+ rngtxt = \RSrngtxt,
+ lsttwotxt = \RSlsttwotxt,
+ lsttxt = \RSlsttxt}
+% \end{macrocode}
+% Make way for \pkg{amsmath.sty} definitions
+% \begin{macrocode}
+\let\RSeqref\eqref
+\let\eqref\relax
+% \end{macrocode}
+% Some footwork to bring the AMS definition of
+% \cmd{\eqref} back if \pkg{amsmath.sty} is loaded
+% afterwards.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \@ifpackageloaded{amsmath}%
+ {\DeclareCommandCopy\RSeqrefform\AMSeqref}%
+ {}%
+ \let\eqref=\RSeqref
+ }
+% \end{macrocode}
+% \end{RSframed}
+%
+%
+% \subsubsection{Figures and Tables}\seclabel{tabtemp}
+% References to figures and tables are usually
+% straight forward.
+% \begin{RSframed}
+% \begin{macrocode}
+%%-- TEMPLATE FOR FIGURES -----------------------
+% \end{macrocode}
+% \begin{macrocode}
+ \newref{fig}{%
+ name = \RSfigtxt,
+ names = \RSfigstxt,
+ Name = \RSFigtxt,
+ Names = \RSFigstxt,
+ rngtxt = \RSrngtxt,
+ lsttwotxt = \RSlsttwotxt,
+ lsttxt = \RSlsttxt}
+% \end{macrocode}
+% \end{RSframed}
+%
+% \begin{RSframed}
+% \begin{macrocode}
+%%-- TEMPLATE FOR TABLES ------------------------
+% \end{macrocode}
+% \begin{macrocode}
+ \newref{tab}{%
+ name = \RStabtxt,
+ names = \RStabstxt,
+ Name = \RSTabtxt,
+ Names = \RSTabstxt,
+ rngtxt = \RSrngtxt,
+ lsttwotxt = \RSlsttwotxt,
+ lsttxt = \RSlsttxt}
+% \end{macrocode}
+% \end{RSframed}
+%
+% \pagebreak[2]
+% \subsubsection{Footnotes}\seclabel{fnTempl}
+%
+% A reference to a footnote differs from other references in that
+% it is only defined inside the footnote definition itself:
+% \begin{Ipara}
+% |\footnote{This is a footnote with ... \label{fn:xx}}|
+% \end{Ipara}
+% It can then be referred to with |\ref{fn:xx}|.
+%
+% A useful application of the \RS package is for references to
+% footnotes, were you need a duplicate footnote mark that refers to
+% a previously defined footnote.\footnote{^^A
+% This is a footnote with \cmd{\fnlabel}\texttt{\{xx\}} ...\fnlabel{xx}}
+% You can use the stared form of the reference
+% command to format the reference as a footnote mark, while the
+% reference commands without a star behave as normal.
+% \begin{Itabb}
+% \hspace*{2cm}\=\kill
+% |\fnref*{xx}| \ArTab \fnref*{xx}\\
+% |\fnref{xx}| \ArTab \fnref{xx}\\
+% \end{Itabb}
+%
+% \begin{RSframed}
+% \begin{macrocode}
+%%-- TEMPLATE FOR FOOTNOTES ---------------------
+% \end{macrocode}
+% Define the \cmd{\RSfnmark} to reproduce the footnote mark.
+% Use the |\ifRSstar| conditional to switch between a superscripted
+% and a normal reference.
+% \begin{macrocode}
+ \newcommand{\RSfnmark}[1]{%
+ \begingroup
+ \unrestored@protected@xdef\@thefnmark{\ref{#1}}%
+ \endgroup
+ \@footnotemark}
+% \end{macrocode}
+% \begin{macrocode}
+ \newref{fn}{%
+ name = \RSfootntxt,
+ names = \RSfootnstxt,
+ Name = \RSFootntxt,
+ Names = \RSFootnstxt,
+ refcmd = {\ifRSstar\RSfnmark{#1}\else(\ref{#1})\fi},
+ rngtxt = \RSrngtxt,
+ lsttwotxt = \RSlsttwotxt,
+ lsttxt = \RSlsttxt}
+% \end{macrocode}
+% \end{RSframed}
+%
+% \subsubsection{Enumerated lists}
+%
+% A reference to an item in an enumerated list can be obtained
+% by placing the labelling command after the \cmd{\item} command
+% inside the list. The second level numbering of the \cmd{\ref}
+% label in the standard \LaTeX{} is: 2a, 2b, etc.
+%
+% If you want to change the reference labels to 2(a), 2(b),
+% etc., without effecting the display in the \env{enumerate}
+% environment, you can make the following redefinition:
+% \begin{Ipara}
+% |\makeatletter|\\
+% |\renewcommand{\p@enumii}{\expandafter\p@@enumii}|\\
+% |\newcommand{\p@@enumii}[1]{\theenumi(#1)}|\\
+% |\makeatother|
+% \end{Ipara}
+% The contents of the \cmd{\@currentlable} is then
+% \begin{Ipara}
+% |{\expandafter\p@@enumii\theenumii}| ~$\rightarrow$~
+% |{\theenumi(\theenumii)}|
+% \end{Ipara}
+%
+% Writing a template for enumerated lists is left to the user.
+%
+%
+% \subsubsection{Theorems, lemmas, etc.}\seclabel{Thm}
+%
+% There exists many perturbations to the theorem environment such
+% as, Theorem, Lemma, Exercise, etc., and it is left to the user as
+% an exercise to construct his or her own templates.
+%
+% As an example to add reference for theorems to an exiting setup:
+%
+% \begin{Ipara}
+% |\usepackage{refstyle} |\\
+% |\newref{thm}{ |\\
+% | name = {theorem~}, |\\
+% | names = {theorems~},|\\
+% | Name = {Theorem~}, |\\
+% | Names = {Theorems~},|\\
+% | rngtxt = \RSrngtxt,|\\
+% | lsttwotxt = \RSlsttxt,|\\
+% | lsttxt = \RSlsttxt}|
+% \end{Ipara}
+%
+% If you want to add it to a specific language setup with \pkg{babel} then
+% you can do the following, for example for a dual language document with
+% English and Norwegian:
+% \begin{Ipara}
+% |\documentclass[english, norwegian]{article}% NB: Languages as global opts! |\\
+% |\usepackage{babel} %Use global languages |\\
+% |\usepackage{varioref} %Use global languages |\\
+% |\usepackage{refstyle} %Use global languages |\\
+% |\RSaddto{\RSnorwegian}{% |\\
+% | \def\RSthmtxt{teorem~}% |\\
+% | \def\RSthmstxt{teorem~}% |\\
+% | \def\RSThmtxt{Teorem~}% |\\
+% | \def\RSThmstxt{Teorem~}} |\\
+% |\RSaddto{\RSenglish}{% |\\
+% | \def\RSthmtxt{theorem~}% |\\
+% | \def\RSthmstxt{theorems~}% |\\
+% | \def\RSThmtxt{Theorem~}% |\\
+% | \def\RSThmstxt{Theorems~}} |\\
+% |\newref{thm}{ |\\
+% | name = \RSthmtxt, |\\
+% | names = \RSthmstxt, |\\
+% | Name = \RSThmtxt, |\\
+% | Names = \RSThmstxt, |\\
+% | rngtxt = \RSrngtxt, |\\
+% | lsttwotxt = \RSlsttxt, |\\
+% | lsttxt = \RSlsttwotxt} |
+% \end{Ipara}
+%
+% \noindent All \pkg{babel} language changes will then activate
+% the proper code setup. In this example the \pkg{refstyle}
+% mechanism is used where the code is appended to the |\RSenglish|
+% and |\RSnorwegian| container functions. These functions are added
+% by the package
+% to the \pkg{babel} containers |\extrasenglish| and |\extrasnorwegian|,
+% that is called every time a language change occurs.
+% Please see the contents of \pkg{refstyle.cfg} for the names of the
+% \pkg{refstyle} containers associated with the different languages.
+%
+% Note that the extended definitions
+% can also be added directly to the \pkg{babel} containers without using
+% \pkg{refstyle}'s mechanism.
+%
+% \begin{macrocode}
+%</cfg>
+% \end{macrocode}
+%
+% \Finale
+\endinput
diff --git a/macros/latex/contrib/refstyle/refconfig.pdf b/macros/latex/contrib/refstyle/refconfig.pdf
index f4dcb8d15a..c16ae09cca 100644
--- a/macros/latex/contrib/refstyle/refconfig.pdf
+++ b/macros/latex/contrib/refstyle/refconfig.pdf
Binary files differ
diff --git a/macros/latex/contrib/refstyle/refstyle.cfg b/macros/latex/contrib/refstyle/refstyle.cfg
deleted file mode 100644
index 2ca7d62dd2..0000000000
--- a/macros/latex/contrib/refstyle/refstyle.cfg
+++ /dev/null
@@ -1,571 +0,0 @@
-%%
-%% This is file `refstyle.cfg',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% refconfig.dtx (with options: `cfg')
-%%
-%% -------------------------------------------------------------------
-%% The refstyle package
-%% for the formatting of references
-%% -------------------------------------------------------------------
-%% This file may be customized to suit specific user requirements.
-%%
-%% Original by Danie Els <dnjels@sun.ac.za>
-%% -------------------------------------------------------------------
-%%
-\ProvidesFile{refstyle.cfg}[2010/11/02\space
- 0.5\space
- Configuration file for refstyle (DNJ Els)]
-%%-- ENGLISH ------------------------------------
-\newcommand\RSukenglish{%
- \def\RSrngtxt{\space to~}%........... Range: figures 5 to 6
- \def\RSlsttwotxt{\space and~}%....... List two: figures 5 and 6
- \def\RSlsttxt{, and~}%............... List more: figures 5, 6, and 7
- \def\RSparttxt{Part~}%............... Part lowercase singular
- \def\RSpartstxt{Parts~}%............. lowercase plural
- \def\RSParttxt{Part~}%............... uppercase singular (sentence start)
- \def\RSPartstxt{Parts~}%............. uppercase plural (sentence start)
- \def\RSappendixname{appendix~}%...... Appendix lowercase singular
- \def\RSappendicesname{appendices~}%.. lowercase plural
- \def\RSAppendixname{Appendix~}%...... uppercase singular (sentence start)
- \def\RSAppendicesname{Appendices~}%.. uppercase plural (sentence start)
- \def\RSchaptername{chapter~}%........ Chapter lowercase singular
- \def\RSchaptersname{chapters~}%...... lowercase plural
- \def\RSChaptername{Chapter~}%........ uppercase singular (sentence start)
- \def\RSChaptersname{Chapters~}%...... uppercase plural (sentence start)
- \def\RSsectxt{section~}%............. Section lowercase singular
- \def\RSsecstxt{sections~}%........... lowercase plural
- \def\RSSectxt{Section~}%............. uppercase singular (sentence start)
- \def\RSSecstxt{Sections~}%........... uppercase plural (sentence start)
- \def\RSeqtxt{equation~}%............. Equation lowercase singular
- \def\RSeqstxt{equations~}%........... lowercase plural
- \def\RSEqtxt{Equation~}%............. uppercase singular (sentence start)
- \def\RSEqstxt{Equations~}%........... uppercase plural (sentence start)
- \def\RSfigtxt{figure~}%.............. Figure lowercase singular
- \def\RSfigstxt{figures~}%............ lowercase plural
- \def\RSFigtxt{Figure~}%.............. uppercase singular (sentence start)
- \def\RSFigstxt{Figures~}%............ uppercase plural (sentence start)
- \def\RStabtxt{table~}%............... Table lowercase singular
- \def\RStabstxt{tables~}%............. lowercase plural
- \def\RSTabtxt{Table~}%............... uppercase singular (sentence start)
- \def\RSTabstxt{Tables~}%............. uppercase plural (sentence start)
- \def\RSfootntxt{footnote~}%.......... Footnote lowercase singular
- \def\RSfootnstxt{footnotes~}%........ lowercase plural
- \def\RSFootntxt{Footnote~}%.......... uppercase singular (sentence start)
- \def\RSFootnstxt{Footnotes~}%........ uppercase plural (sentence start)
-}
-\newcommand\RSenglish{%
- \def\RSrngtxt{\space to~}%
- \def\RSlsttwotxt{\space and~}%
- \def\RSlsttxt{\space and~}%
- \def\RSparttxt{Part~}%
- \def\RSpartstxt{Parts~}%
- \def\RSParttxt{Part~}%
- \def\RSPartstxt{Parts~}%
- \def\RSappendixname{appendix~}%
- \def\RSappendicesname{appendices~}%
- \def\RSAppendixname{Appendix~}%
- \def\RSAppendicesname{Appendices~}%
- \def\RSchaptername{chapter~}%
- \def\RSchaptersname{chapters~}%
- \def\RSChaptername{Chapter~}%
- \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{english}{\RSenglish}
-\DeclareLangOpt{USenglish}{\RSenglish}
-\DeclareLangOpt{american}{\RSenglish}
-\DeclareLangOpt{canadian}{\RSenglish}
-\DeclareLangOpt{UKenglish}{\RSukenglish}
-\DeclareLangOpt{british}{\RSukenglish}
-%%-- AFRIKAANS ----------------------------------
-\newcommand\RSafrikaans{%
- \def\RSrngtxt{\space tot~}%
- \def\RSlsttwotxt{\space en~}%
- \def\RSlsttxt{\space en~}%
- \def\RSparttxt{Deel~}%
- \def\RSpartstxt{Dele~}%
- \def\RSParttxt{Deel~}%
- \def\RSPartstxt{Dele~}%
- \def\RSappendixname{bylae~}%
- \def\RSappendicesname{bylaes~}%
- \def\RSAppendixname{Bylae~}%
- \def\RSAppendicesname{Bylaes~}%
- \def\RSchaptername{hoofstuk~}%
- \def\RSchaptersname{hoofstukke~}%
- \def\RSChaptername{Hoofstuk~}%
- \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~}%
-}
-\DeclareLangOpt{afrikaans}{\RSafrikaans}
-%%-- DANISH -------------------------------------
-\newcommand\RSdanish{%
- \def\RSrngtxt{\space til~}%
- \def\RSlsttwotxt{\space og~}%
- \def\RSlsttxt{\space og~}%
- \def\RSparttxt{del~}%
- \def\RSpartstxt{del~}%
- \def\RSParttxt{Del~}%
- \def\RSPartstxt{Del~}%
- \def\RSappendixname{bilag~}% % 'appendiks' is also possible,
- \def\RSappendicesname{bilag~}% % but 'bilag' is used in Babel
- \def\RSAppendixname{Bilag~}%
- \def\RSAppendicesname{Bilag~}%
- \def\RSchaptername{kapitel~}%
- \def\RSchaptersname{kapitel~}%
- \def\RSChaptername{Kapitel~}%
- \def\RSChaptersname{Kapitel~}%
- \def\RSsectxt{afsnit~}%
- \def\RSsecstxt{afsnit~}%
- \def\RSSectxt{Afsnit~}%
- \def\RSSecstxt{Afsnit~}%
- \def\RSeqtxt{ligning~}%
- \def\RSeqstxt{ligning~}%
- \def\RSEqtxt{Ligning~}%
- \def\RSEqstxt{Ligning~}%
- \def\RSfigtxt{figur~}%
- \def\RSfigstxt{figur~}%
- \def\RSFigtxt{Figur~}%
- \def\RSFigstxt{Figur~}%
- \def\RStabtxt{tabel~}%
- \def\RStabstxt{tablel~}%
- \def\RSTabtxt{Tabel~}%
- \def\RSTabstxt{Tabel~}%
- \def\RSfootntxt{fodnote~}%
- \def\RSfootnstxt{fodnote~}%
- \def\RSFootntxt{Fodnote~}%
- \def\RSFootnstxt{Fodnote~}%
-}
-\DeclareLangOpt{danish}{\RSdanish}
-%%-- FRENCH -------------------------------------
-\newcommand\RSfrench{%
- \def\RSrngtxt{\space \`{a}~}%
- \def\RSlsttwotxt{\space et~}%
- \def\RSlsttxt{\space et~}%
- \def\RSparttxt{partie~}%
- \def\RSpartstxt{parties~}%
- \def\RSParttxt{La partie~}%
- \def\RSPartstxt{Les parties~}%
- \def\RSappendixname{appendice~}%
- \def\RSappendicesname{appendices~}%
- \def\RSAppendixname{L'appendice~}%
- \def\RSAppendicesname{Les appendices~}%
- \def\RSchaptername{chapitre~}%
- \def\RSchaptersname{chapitres~}%
- \def\RSChaptername{Le chapitre~}%
- \def\RSChaptersname{Les chapitres~}%
- \def\RSsectxt{section~}%
- \def\RSsecstxt{sections~}%
- \def\RSSectxt{La section~}%
- \def\RSSecstxt{Les sections~}%
- \def\RSeqtxt{\'{e}quation~}%
- \def\RSeqstxt{\'{e}quations~}%
- \def\RSEqtxt{L'\'{e}quation~}%
- \def\RSEqstxt{Les \'{e}quations~}%
- \def\RSfigtxt{figure~}%
- \def\RSfigstxt{figures~}%
- \def\RSFigtxt{La figure~}%
- \def\RSFigstxt{Les figures~}%
- \def\RStabtxt{tableau~}%
- \def\RStabstxt{tableaux~}%
- \def\RSTabtxt{Le tableau~}%
- \def\RSTabstxt{Les tableaux~}%
- \def\RSfootntxt{note~}%
- \def\RSfootnstxt{notes~}%
- \def\RSFootntxt{La note~}%
- \def\RSFootnstxt{Les notes~}%
-}
-\DeclareLangOpt{french}{\RSfrench}
-%%-- GERMAN -------------------------------------
-\newcommand\RSgerman{%
- \def\RSrngtxt{\space bis~}%
- \def\RSlsttwotxt{\space und~}%
- \def\RSlsttxt{\space und~}%
- \def\RSparttxt{Teil~}%
- \def\RSpartstxt{Teile~}%
- \def\RSParttxt{Teil~}%
- \def\RSPartstxt{Teile~}%
- \def\RSappendixname{Anhang~}%
- \def\RSappendicesname{Anh\"{a}nge~}%
- \def\RSAppendixname{Anhang~}%
- \def\RSAppendicesname{Anh\"{a}nge~}%
- \def\RSchaptername{Kapitel~}%
- \def\RSchaptersname{Kapitel~}%
- \def\RSChaptername{Kapitel~}%
- \def\RSChaptersname{Kapitel~}%
- \def\RSsectxt{Abschnitt~}%
- \def\RSsecstxt{Abschnitt~}%
- \def\RSSectxt{Abschnitt~}%
- \def\RSSecstxt{Abschnitt~}%
- \def\RSeqtxt{Gleichung~}%
- \def\RSeqstxt{Gleichungen~}%
- \def\RSEqtxt{Gleichung~}%
- \def\RSEqstxt{Gleichungen~}%
- \def\RSfigtxt{Abbildung~}%
- \def\RSfigstxt{Abbildung~}%
- \def\RSFigtxt{Abbildung~}%
- \def\RSFigstxt{Abbildung~}%
- \def\RStabtxt{Tabelle~}%
- \def\RStabstxt{Tabellen~}%
- \def\RSTabtxt{Tabelle~}%
- \def\RSTabstxt{Tabellen~}%
- \def\RSfootntxt{Fu\ss note~}%
- \def\RSfootnstxt{Fu\ss noten~}%
- \def\RSFootntxt{Fu\ss note~}%
- \def\RSFootnstxt{Fu\ss noten~}%
-}
-\DeclareLangOpt{german}{\RSgerman}
-\DeclareLangOpt{ngerman}{\RSgerman}
-\DeclareLangOpt{austrian}{\RSgerman}
-\DeclareLangOpt{naustrian}{\RSgerman}
-%%-- ITALIAN ------------------------------------
-\newcommand\RSitalian{%
- \def\RSrngtxt{--}%
- \def\RSlsttwotxt{\space e~}%
- \def\RSlsttxt{\space e~}%
- \def\RSparttxt{Parte~}%
- \def\RSpartstxt{Parti~}%
- \def\RSParttxt{Parte~}%
- \def\RSPartstxt{Parti~}%
- \def\RSappendixname{l'appendice~}%
- \def\RSappendicesname{le appendici~}%
- \def\RSAppendixname{l'Appendice~}%
- \def\RSAppendicesname{le Appendici~}%
- \def\RSchaptername{il capitolo~}%
- \def\RSchaptersname{i capitoli~}%
- \def\RSChaptername{il Capitolo~}%
- \def\RSChaptersname{i Capitoli~}%
- \def\RSsectxt{la sezione~}%
- \def\RSsecstxt{le sezioni~}%
- \def\RSSectxt{la Sezione~}%
- \def\RSSecstxt{la Sezioni~}%
- \def\RSeqtxt{l'equazione~}%
- \def\RSeqstxt{le equazioni~}%
- \def\RSEqtxt{l'Equazione~}%
- \def\RSEqstxt{le Equazioni~}%
- \def\RSfigtxt{la figura~}%
- \def\RSfigstxt{le figure~}%
- \def\RSFigtxt{la Figura~}%
- \def\RSFigstxt{le Figure~}%
- \def\RStabtxt{la tabella~}%
- \def\RStabstxt{le tabelle~}%
- \def\RSTabtxt{la Tabella~}%
- \def\RSTabstxt{le Tabelle~}%
- \def\RSfootntxt{la nota~}%
- \def\RSfootnstxt{le note~}%
- \def\RSFootntxt{la Nota~}%
- \def\RSFootnstxt{le Note~}%
-}
-\DeclareLangOpt{italian}{\RSitalian}
-%%-- NORWEGIAN -------------------------------------
-\newcommand\RSnorwegian{%
- \def\RSrngtxt{\space til~}%
- \def\RSlsttwotxt{\space og~}%
- \def\RSlsttxt{\space og~}%
- \def\RSparttxt{del~}%
- \def\RSpartstxt{del~}%
- \def\RSParttxt{Del~}%
- \def\RSPartstxt{Del~}%
- \def\RSappendixname{tillegg~}%
- \def\RSappendicesname{tillegg~}%
- \def\RSAppendixname{Tillegg~}%
- \def\RSAppendicesname{Tillegg~}%
- \def\RSchaptername{kapittel~}%
- \def\RSchaptersname{kapittel~}%
- \def\RSChaptername{Kapittel~}%
- \def\RSChaptersname{Kapittel~}%
- \def\RSsectxt{avsnitt~}%
- \def\RSsecstxt{avsnitt~}%
- \def\RSSectxt{Avsnitt~}%
- \def\RSSecstxt{Avsnitt~}%
- \def\RSeqtxt{formel~}%
- \def\RSeqstxt{formel~}%
- \def\RSEqtxt{Formel~}%
- \def\RSEqstxt{Formel~}%
- \def\RSfigtxt{figur~}%
- \def\RSfigstxt{figur~}%
- \def\RSFigtxt{Figur~}%
- \def\RSFigstxt{Figur~}%
- \def\RStabtxt{tabell~}%
- \def\RStabstxt{tabell~}%
- \def\RSTabtxt{Tabell~}%
- \def\RSTabstxt{Tabell~}%
- \def\RSfootntxt{fotnote~}%
- \def\RSfootnstxt{fotnote~}%
- \def\RSFootntxt{Fotnote~}%
- \def\RSFootnstxt{Fotnote~}%
-}
-\DeclareLangOpt{norwegian}{\RSnorwegian}
-\DeclareLangOpt{nynorsk}{\RSnorwegian}
-\DeclareLangOpt{bokmal}{\RSnorwegian}% Not in babel yet
-\DeclareLangOpt{norsk}{\RSnorwegian}
-%%-- PORTUGUESE -----------------------------------
-\newcommand\RSportuguese{%
- \def\RSrngtxt{\space a~}%
- \def\RSlsttwotxt{\space e~}%
- \def\RSlsttxt{\space e~}%
- \def\RSparttxt{Parte~}%
- \def\RSpartstxt{Partes~}%
- \def\RSParttxt{Parte~}%
- \def\RSPartstxt{Partes~}%
- \def\RSappendixname{ap\^{e}ndice~}%
- \def\RSappendicesname{ap\^{e}ndices~}%
- \def\RSAppendixname{Ap\^{e}ndice~}%
- \def\RSAppendicesname{Ap\^{e}ndices~}%
- \def\RSchaptername{cap\'{i}tulo~}%
- \def\RSchaptersname{cap\'{i}tulos~}%
- \def\RSChaptername{Cap\'{i}tulo~}%
- \def\RSChaptersname{Cap\'{i}tulos~}%
- \def\RSsectxt{se\c{c}\~{a}o~}%
- \def\RSsecstxt{se\c{c}\~{o}es~}%
- \def\RSSectxt{Se\c{c}\~{a}o~}%
- \def\RSSecstxt{Se\c{c}\~{o}es~}%
- \def\RSeqtxt{equa\c{c}\~{a}o~}%
- \def\RSeqstxt{equa\c{c}\~{o}es~}%
- \def\RSEqtxt{Equa\c{c}\~{a}o~}%
- \def\RSEqstxt{Equa\c{c}\~{o}es~}%
- \def\RSfigtxt{figura~}%
- \def\RSfigstxt{figuras~}%
- \def\RSFigtxt{Figura~}%
- \def\RSFigstxt{Figuras~}%
- \def\RStabtxt{tabela~}%
- \def\RStabstxt{tabelas~}%
- \def\RSTabtxt{Tabela~}%
- \def\RSTabstxt{Tabelas~}%
- \def\RSfootntxt{nota de rodap\'{e}~}%
- \def\RSfootnstxt{notas de rodap\'{e}~}%
- \def\RSFootntxt{Nota de rodap\'{e}~}%
- \def\RSFootnstxt{Notas de rodap\'{e}~}%
-}
-\newcommand\RSbrazilian{%
- \def\RSrngtxt{\space a~}%
- \def\RSlsttwotxt{\space e~}%
- \def\RSlsttxt{\space e~}%
- \def\RSparttxt{Parte~}%
- \def\RSpartstxt{Partes~}%
- \def\RSParttxt{Parte~}%
- \def\RSPartstxt{Partes~}%
- \def\RSappendixname{ap\^{e}ndice~}%
- \def\RSappendicesname{ap\^{e}ndices~}%
- \def\RSAppendixname{Ap\^{e}ndice~}%
- \def\RSAppendicesname{Ap\^{e}ndices~}%
- \def\RSchaptername{cap\'{i}tulo~}%
- \def\RSchaptersname{cap\'{i}tulos~}%
- \def\RSChaptername{Cap\'{i}tulo~}%
- \def\RSChaptersname{Cap\'{i}tulos~}%
- \def\RSsectxt{sec\c{c}\~{a}o~}%<---------------
- \def\RSsecstxt{sec\c{c}\~{o}es~}%<-------------
- \def\RSSectxt{Sec\c{c}\~{a}o~}%<---------------
- \def\RSSecstxt{Sec\c{c}\~{o}es~}%<-------------
- \def\RSeqtxt{equa\c{c}\~{a}o~}%
- \def\RSeqstxt{equa\c{c}\~{o}es~}%
- \def\RSEqtxt{Equa\c{c}\~{a}o~}%
- \def\RSEqstxt{Equa\c{c}\~{o}es~}%
- \def\RSfigtxt{figura~}%
- \def\RSfigstxt{figuras~}%
- \def\RSFigtxt{Figura~}%
- \def\RSFigstxt{Figuras~}%
- \def\RStabtxt{tabela~}%
- \def\RStabstxt{tabelas~}%
- \def\RSTabtxt{Tabela~}%
- \def\RSTabstxt{Tabelas~}%
- \def\RSfootntxt{nota de rodap\'{e}~}%
- \def\RSfootnstxt{notas de rodap\'{e}~}%
- \def\RSFootntxt{Nota de rodap\'{e}~}%
- \def\RSFootnstxt{Notas de rodap\'{e}~}%
-}
-\DeclareLangOpt{portuges}{\RSportuguese}
-\DeclareLangOpt{portuguese}{\RSportuguese}
-\DeclareLangOpt{brazilian}{\RSbrazilian}
-\DeclareLangOpt{brazil}{\RSbrazilian}
-%%-- SWEDISH ------------------------------------
-\newcommand\RSswedish{%
- \def\RSrngtxt{\space till~}%
- \def\RSlsttwotxt{\space och~}%
- \def\RSlsttxt{\space och~}%
- \def\RSparttxt{del~}%
- \def\RSpartstxt{del~}%
- \def\RSParttxt{Del~}%
- \def\RSPartstxt{Del~}%
- \def\RSappendixname{appendix~}%
- \def\RSappendicesname{appendix~}%
- \def\RSAppendixname{Appendix~}%
- \def\RSAppendicesname{Appendix~}%
- \def\RSchaptername{kapitel~}%
- \def\RSchaptersname{kapitel~}%
- \def\RSChaptername{Kapitel~}%
- \def\RSChaptersname{Kapitel~}%
- \def\RSsectxt{sektion~}%
- \def\RSsecstxt{sektion~}%
- \def\RSSectxt{Sektion~}%
- \def\RSSecstxt{Sektion~}%
- \def\RSeqtxt{ekvation~}%
- \def\RSeqstxt{ekvation~}%
- \def\RSEqtxt{Ekvation~}%
- \def\RSEqstxt{Ekvation~}%
- \def\RSfigtxt{figur~}%
- \def\RSfigstxt{figur~}%
- \def\RSFigtxt{Figur~}%
- \def\RSFigstxt{Figur~}%
- \def\RStabtxt{tabell~}%
- \def\RStabstxt{tabell~}%
- \def\RSTabtxt{Tabell~}%
- \def\RSTabstxt{Tabell~}%
- \def\RSfootntxt{fotnot~}%
- \def\RSfootnstxt{fotnot~}%
- \def\RSFootntxt{Fotnot~}%
- \def\RSFootnstxt{Fotnot~}%
-}
-\DeclareLangOpt{swedish}{\RSswedish}
-%%-- 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,
- lsttwotxt = \RSlsttwotxt,
- lsttxt = \RSlsttxt}
-%%-- TEMPLATE FOR SECTIONS ----------------------
- \newref{sec}{%
- name = \RSsectxt,
- names = \RSsecstxt,
- Name = \RSSectxt,
- Names = \RSSecstxt,
- refcmd = {\S\ref{#1}},
- rngtxt = \RSrngtxt,
- lsttwotxt = \RSlsttwotxt,
- 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,
- lsttwotxt = \RSlsttwotxt,
- 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,
- lsttwotxt = \RSlsttwotxt,
- lsttxt = \RSlsttxt}
-%%-- TEMPLATE FOR TABLES ------------------------
- \newref{tab}{%
- name = \RStabtxt,
- names = \RStabstxt,
- Name = \RSTabtxt,
- Names = \RSTabstxt,
- rngtxt = \RSrngtxt,
- lsttwotxt = \RSlsttwotxt,
- 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,
- lsttwotxt = \RSlsttwotxt,
- lsttxt = \RSlsttxt}
-\endinput
-%%
-%% End of file `refstyle.cfg'.
diff --git a/macros/latex/contrib/refstyle/refstyle.dtx b/macros/latex/contrib/refstyle/refstyle.dtx
index c2c3acab8e..1b5b6509d6 100644
--- a/macros/latex/contrib/refstyle/refstyle.dtx
+++ b/macros/latex/contrib/refstyle/refstyle.dtx
@@ -1,1796 +1,1795 @@
-% \iffalse
-%
-% refstyle.dtx
-% Copyright (C) 2002--2010 Danie Els
-%
-% -------------------------------------------------------------------
-% The refstyle package
-% for the formatting of references
-% -------------------------------------------------------------------
-% This work may be distributed and/or modified under the conditions
-% of the LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later.
-%
-% This work is "maintained" (as per LPPL maintenance status)
-% by Danie Els (dnjels@sun.ac.za).
-%
-% This package consists of the files: refstyle.dtx
-% refconfig.dtx
-% refstyle.ins
-% and the derived files: refstyle.sty
-% refstyle.cfg
-% -------------------------------------------------------------------
-%
-%<*pkg>
-\newcommand*{\RefstyleFileDate}{2010/11/02}
-\newcommand*{\RefstyleFileVersion}{v0.5}
-%</pkg>
-%
-%
-%<*driver>
-\documentclass[a4paper]{ltxdoc}
-\let\RefstyleFileDate\relax
-\let\RefstyleFileVersion\relax
-\usepackage{amsmath}
-\usepackage{amsfonts}
- \DeclareMathSymbol{\square} {\mathord}{AMSa}{"03}
- \DeclareMathSymbol{\blacksquare}{\mathord}{AMSa}{"04}
-\usepackage{calc}
-\usepackage{rotating}
-\usepackage[rounded]{syntax}
-\usepackage{varioref}
-\usepackage{refstyle}
-\usepackage{color}
- \definecolor{hrefcol}{rgb}{0.00,0.00,1.00}
-\usepackage[pdfpagelabels]{hyperref}
-\hypersetup{breaklinks=true,
- linktocpage,
- pdfstartview=FitH,
- colorlinks = true,
- linkcolor = hrefcol,
- urlcolor = hrefcol,
- menucolor = hrefcol,
- filecolor = hrefcol,
- citecolor = hrefcol,
- linkbordercolor = {0.8 0.8 0.8},
- urlbordercolor = {0.8 0.8 0.8},
- menubordercolor = {0.8 0.8 0.8},
- filebordercolor = {0.8 0.8 0.8},
- runbordercolor = {0.8 0.8 0.8},
- citebordercolor = {0.8 0.8 0.8},
- pdftitle={refstyle},
- pdfauthor={Danie Els}}
-
-%---- macrocode env changes -------------------------------
-
-\setlength{\MacroIndent}{1.5em}
-
-%---- Scratches -------------------------------------------
-
-\newlength{\tdima}
-\newsavebox{\tboxa}
-
-%---- Spacing ---------------------------------------------
-
-\newlength{\myskip}
-\setlength{\myskip}{\topsep}
- \addtolength{\myskip}{\parskip}
- \addtolength{\myskip}{\partopsep}
-\newcommand*{\blankline}{\par\addvspace{\myskip}}
-\newlength{\mytab}
-\setlength{\mytab}{2\parindent}
-\newcommand{\tab}{\hspace*{\mytab}}
-
-%---- Indented environments -------------------------------
-
-\newenvironment{IndentPara}[1][1]
- {\list{}{\setlength{\leftmargin}{#1\mytab}%
- \setlength{\labelwidth}{0pt}%
- \setlength{\labelsep}{0pt}%
- \setlength{\itemindent}{\parindent}%
- \setlength{\listparindent}{\parindent}%
- }\item[]}%
- {\endlist}
-\newenvironment{IndentParaX}[1][1]
- {\list{}{\setlength{\leftmargin}{#1\mytab}%
- \setlength{\topsep}{0pt}%
- \setlength{\partopsep}{0pt}%
- \setlength{\labelwidth}{0pt}%
- \setlength{\labelsep}{0pt}%
- \setlength{\itemindent}{\parindent}%
- \setlength{\listparindent}{\parindent}%
- }\item[]}%
- {\endlist}
-\newcommand\bNP{\begin{IndentParaX}}
-\newcommand\eNP{\end{IndentParaX}}
-\newenvironment{Ipara}[1][\small]%
- {\begin{IndentPara}\noindent#1\ignorespaces}%
- {\end{IndentPara}}
-\newenvironment{Itabb}[1][\small]%
- {\begin{IndentPara}#1\ignorespaces\begin{tabbing}\ignorespaces}%
- {\end{tabbing}\end{IndentPara}}
-
-%---- Ruled & colored minipage ----------------------------
-
-\definecolor{shadecolor}{gray}{0.9}
-
-\newenvironment{fminipage}[1][\linewidth]
- {\setlength{\tdima}{#1-2\fboxsep-2\fboxrule}%
- \begin{lrbox}{\tboxa}\begin{minipage}{\tdima}}%
- {\end{minipage}\end{lrbox}\noindent\fbox{\usebox{\tboxa}}}
-\newenvironment{cminipage}[1][\linewidth]
- {\setlength{\tdima}{#1-2\fboxsep-2\fboxrule}%
- \begin{lrbox}{\tboxa}\begin{minipage}{\tdima}}%
- {\end{minipage}\end{lrbox}%
- \noindent\colorbox{shadecolor}{\usebox{\tboxa}}}
-
-%---- Additional documenting commands ---------------------
-
-\def\lcbrack{\symbol{`\{}}
-\def\rcbrack{\symbol{`\}}}
-\makeatletter
-\def\meta@font@select{\normalfont\slshape}
-\makeatother
-\DeclareRobustCommand{\cmeta}[1]{%<- \<xxx>
- \texttt{\bslash}\meta{#1}}
-\DeclareRobustCommand{\cmarg}[1]{%<- {\<xxx>}
- \texttt{\lcbrack}\cmeta{#1}\texttt{\rcbrack}}
-\DeclareRobustCommand{\coarg}[1]{%<- [\<xxx>]
- \texttt{[}\cmeta{#1}\texttt{]}}
-\DeclareRobustCommand{\argcmd}[2]{%<- \<xxx>yyy
- \cmeta{#1}\texttt{#2}}
-\newcommand{\rmeta}[3][]{%
- \texttt{\lcbrack#1}\meta{#2}\texttt{#3\rcbrack}}
-\newcommand{\refmeta}[3][]{\cmd{\brref}\rmeta[#1]{#2}{#3}}
-
-\newcommand*{\file}[1]{\texttt{#1}}
-\newcommand*{\pkg}[1]{\textsf{#1}}
-\newcommand*{\env}[1]{\texttt{#1}}
-\newcommand*{\opt}[1]{\texorpdfstring{\normalfont\texttt{\slshape#1}}{#1}}
-\newcommand*{\RS}{\pkg{refstyle}}
-\newcommand*{\RScfg}{\file{refstyle.cfg}}
-\newcommand*{\rtp}{type}
-\newcommand*{\Rtp}{Type}
-\newcommand*{\okeylst}{\oarg{key\_lst}}
-\newcommand*{\mkeylst}{\marg{key\_lst}}
-
-%---- Special eq tag command ------------------------------
-
-\def\spestag#1{\stepcounter{equation}%
- \gdef\tagextra##1{%
- \makebox[0pt][l]{\small\quad%
- \cmd{\eqlabel}\texttt{\lcbrack##1\rcbrack}}%
- \gdef\tagextra####1{}}%
- \tag{\theequation\tagextra{#1}}\eqlabel{#1}}
-
-%---- other stuff -----------------------------------------
-
-\newcommand*{\ArTab}{\>\quad$\rightarrow$\quad}
-
-%----------------------------------------------------------
-
-\EnableCrossrefs
-\CodelineIndex
-\RecordChanges
-\setlength\hfuzz{15pt}
-\hbadness=7000
-\begin{document}
- \DocInput{refstyle.dtx}
-\end{document}
-
-%</driver>
-% \fi
-%
-% \CheckSum{552}
-%
-% \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 \~}
-%
-% \changes{v0.0}{2002/12/01}{Initial version}
-% \changes{v0.1}{2003/04/01}{First stable version}
-% \changes{v0.2}{2003/07/30}{First updated version}
-% \changes{v0.3}{2006/09/09}{Documentation update}
-% \changes{v0.4}{2010/10/21}{Documentation update}
-% \changes{v0.4}{2010/10/21}{Add \texttt{nokeyprefix} option}
-% \changes{v0.5}{2010/11/02}{Documentation update}
-%
-% \DoNotIndex{
-% \@backslashchar, \@carcube, \@ehc, \@empty, \@firstoftwo,
-% \@ifnextchar, \@ifpackageloaded, \@ifstar, \@ifundefined, \@nil,
-% \@qend, \@qrelax, \@secondoftwo, \@tempa, \@undefined,
-% \AtEndOfPackage, \begingroup, \csname, \CurrentOption,
-% \DeclareOption, \def, \edef, \else, \endcsname, \endgroup,
-% \expandafter, \fi, \gdef, \iffalse, \ifx, \InputIfFileExists,
-% \let, \long, \lowercase, \MakeLowercase, \mbox, \MessageBreak,
-% \NeedsTeXFormat, \newcommand, \newif, \noexpand, \PackageError, \PackageInfo,
-% \PassOptionsToPackage, \RS@pkgname, \ProcessOptions, \protect,
-% \providecommand, \ProvidesPackage, \relax, \renewcommand,
-% \RequirePackage, \reserved@a, \reserved@b, \RS@tmpa,
-% \RS@tmpb, \S, \RS@setkeys, \space, \string, \textsc, \textup,
-% \unrestored@protected@xdef, \unskip, \uppercase,
-% \zap@space}
-%
-%^^A==== Titling ==========================================
-% \GetFileInfo{refstyle.sty}
-% \title{\vspace*{-1cm}
-% The \RS\ package\thanks{This file has version number
-% \fileversion, last revised
-% \filedate.}}
-% \author{Danie Els\\[1ex]
-% \small Department of Mechanical and Mechatronics Engineering\\
-% \small University of Stellenbosch, South Africa.\\
-% \normalsize e-mail: \texttt{\href{mailto:dnjels@sun.ac.za}%
-% {dnjels@sun.ac.za}}}
-% \date{\filedate}
-% \maketitle
-% \begin{center}
-% \textbf{Overview of the \RS\ package}
-% \end{center}
-% \noindent
-% When writing complex documents, often a large number of commands
-% for different type of references are defined, for example:
-% \begin{Ipara}
-% |\newcommand*{\eqref}[1]{eqn~(\ref{#1})}|\\
-% |\newcommand*{\Eqref}[1]{Equation~(\ref{#1})}|
-% \end{Ipara}
-% The \RS\ package was developed to automate this process. The
-% package provides a user interface to define sets of reference
-% and label commands for each referable object such as an equation
-% or a table, etc. When you declare, for example, a set of
-% reference commands to an equation:
-% \begin{Ipara}
-% \cmd{\newref}|{eq}|\mkeylst\
-% \end{Ipara}
-% \noindent
-% a series of commands of the format \cmd{\eq...} and \cmd{\Eq...}
-% are produced. The configuration options are set with a list of
-% key-values. Prefixes, inserts and other options for all the
-% different perturbations such as capitalized first letters,
-% singular and plural from, etc.\ can be defined. The
-% configuration can be changed temporarily with an optional list
-% of key-values when the commands are used. A direct interface to
-% the \pkg{varioref} package is also provided.
-% This enables compact reference formats:
-% \begin{Itabb}
-% \hspace{14em}\=\kill
-% |\eqref{e1} ...| \ArTab\eqref{e1} ...\\
-% |\Eqref[vref]{e1} ...| \ArTab\Eqref[vref]{e1} ...\\
-% |\eqref[s]{e1} and ...| \ArTab\eqref[s]{e1} and ...\\
-% |\eqref[name=eq.~]{e1} ...| \ArTab\eqref[name=eq.~]{e1} ...
-% \end{Itabb}
-% A range or a list of references can also be referred to in a
-% consistent way.
-% \begin{Itabb}
-% \hspace{14em}\=\kill
-% |\eqref{e1,e2,e3} ...| \ArTab\eqref{e1,e2,e3} ...\\
-% |\eqrangeref[vref]{e1}{e3} ...| \ArTab\eqrangeref[vref]{e1}{e3} ...
-% \end{Itabb}
-%
-% Templates for the different reference types and different
-% languages can be loaded with a configuring file.
-%
-% The package is aimed at large projects, enabling a consistent
-% way of producing references throughout a project. Enough
-% flexibility is provided to make local changes to a single
-% reference. For large projects such as a series of books or a
-% multi volume thesis, written as freestanding documents, a
-% facility is provided to interface to the \pkg{xr} package for
-% external document references.
-%
-% \medskip
-%
-% \begin{center}
-% \begin{fminipage}[.6\textwidth]
-% See also \pkg{refconfig.pdf} for setup and examples.
-% \end{fminipage}
-% \end{center}
-
-% \clearpage
-%
-% \tableofcontents
-% \clearpage
-%
-%
-% \section{Loading the \RS\ Package}
-%
-% \subsection{Document preamble}
-%
-% The \RS\ package is loaded in the preamble of the document:
-% \begin{enumerate}
-% \item[(a)] With a config file with \pkg{babel} language support
-% \begin{Ipara}
-% |\usepackage{varioref}[2001/09/04]%|~
-% ${\leftarrow}$ To use the \opt{vref} option\\
-% |\usepackage{refstyle}|
-% \end{Ipara}
-% When the package is loaded, it first searchers for a local user defined
-% configuration file \file{refstyle.def}. If it is not available it
-% looks for the global default config file \RScfg\ provided with this package.
-% These configuration files are loaded before the package options are precess.
-% It can therefore contain option commands using globally defined language
-% options and can interface to \pkg{babel} for language changes. The macro
-% \begin{Ipara}
-% |\DeclareLangOpt{|\meta{language}|}{|\meta{definitions}|}|
-% \end{Ipara}
-% is provided to declare the package option \meta{language} and add
-% \meta{definitions} to the |\extras|\meta{language} token for \pkg{babel}.
-% It can only be used inside \RScfg\ or \file{refstyle.def}.
-%
-% \item[(b)]
-% Or with an existing configuration with language support and addition
-% of your own extensions
-% \begin{Ipara}
-% |\documentclass[norwegian]{article}|\\
-% |\usepackage{babel} |\\
-% |\usepackage{refstyle} |\\
-% |\RSaddto{\RSnorwegian}{% |\\
-% | \def\RSthmtxt{teorem~}% |\\
-% | \def\RSthmstxt{teorem~}% |\\
-% | \def\RSThmtxt{Teorem~}% |\\
-% | \def\RSThmstxt{Teorem~}} |\\
-% |\newref{thm}{ |\\
-% | name = \RSthmtxt, |\\
-% | names = \RSthmstxt, |\\
-% | Name = \RSThmtxt, |\\
-% | Names = \RSThmstxt, |\\
-% | rngtxt = \RSrngtxt, |\\
-% | lsttxt = \RSlsttxt, |\\
-% | lsttwotxt = \RSlsttwotxt} |
-% \end{Ipara}
-%
-% \item[(c)]
-% Or without any configuration file, but by declaring your own
-% reference commands in the preamble.
-% \begin{Itabb}
-% \cmd{\usepackage}|[noconfig]{refstyle}|\\
-% \qquad\cmd{\newref}\marg{reftype$_{\,1}$}\mkeylst \\
-% \qquad\cmd{\newref}\marg{reftype$_{\,2}$}\mkeylst\\
-% \tab$\vdots$
-% \end{Itabb}
-%
-% \item[(d)]
-% Or with your own configuration file (without babel language support) for a specific project:
-% \begin{Itabb}
-% |\usepackage[noconfig]{refstyle}|\\
-% |\input{thisproject.ref}|
-% \end{Itabb}
-%
-% \end{enumerate}
-%
-% \subsection{Package options}
-%
-% \begin{description}
-% \item[\opt{noconfig}] Neither of the user supplied \file{refstyle.def} config
-% file or \file{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 \pkg{babel}'s language
-% changing mechanisms.
-%
-% \item[\opt{nokeyprefix}] Custom labeling commands \argcmd{\rtp}{label} are generated
-% by \pkg{refstyle} for every \meta{type} definition. It defaults to
-% \begin{Itabb}
-% \hspace{5em}\=hspace{5em}\=\kill
-% \argcmd{\rtp}{label}|{abc}|
-% \>\>~ $\rightarrow$ \cmd{\label}\rmeta{type\,:\,}{abc}
-% \end{Itabb}
-% With the \opt{nokeyprefix} option, the prefix is turned of and the
-% labeling commands defaults to
-% \begin{Itabb}
-% \hspace{5em}\=hspace{5em}\=\kill
-% \argcmd{\rtp}{label}|{abc}|
-% \>\>~ $\rightarrow$ \cmd{\label}|{abc}|
-% \end{Itabb}
-% This is useful for old documents with existing labeling commands or
-% where the user prefer not to use the \argcmd{\rtp}{label} commands.
-%
-%
-% \end{description}
-%
-%
-%
-%
-% \subsection{Companion packages}
-%
-% The \RS\ packages is intended for large projects. It is therefore
-% important that it works together with, or has direct interfaces
-% to the following packages:
-% \begin{description}
-% \item[\pkg{varioref}:\footnotemark]
-% \footnotetext{\pkg{varioref} v1.3c, 2001/09/04 or later,
-% because the starred versions of the commands
-% are used.}
-% Produce sophisticated page and page range references.
-%
-% \item[\pkg{hyperref}:\footnotemark]
-% \footnotetext{\pkg{hyperref} v6.72r, 2002/05/27 or later,
-% where a bug for interference with
-% \pkg{varioref} was fixed.}
-% To establish hyper links between the references and the
-% labels.
-%
-% \item[\pkg{xr, xr-hyper}:]
-% To establish references to external documents.
-%
-% \item[\pkg{showkeys}:]
-% To show all the labels and references. This is very useful
-% to find labels in large documents.
-% \end{description}
-%
-% \clearpage
-% \section{User Interface}
-%
-% The \RS\ package has one configuring command, \DescribeMacro{\newref}
-% \cmd{\newref}, that internally creates a series of label and
-% reference commands:
-% \blankline
-%
-% \begin{cminipage}[\linewidth]
-% \newcommand*{\crsi}{\smash{\rule[0pt]{.4pt}{1.25em}\rule[.5ex]{1.5em}{.4pt}}}^^A
-% \newcommand*{\crsl}{\smash{\rule[.5ex]{.4pt}{1.5em}\rule[.5ex]{1.5em}{.4pt}}}^^A
-% \begin{Itabb}
-% \hspace*{2em}\=\hspace{2em}\=\hspace{10em}\=\kill
-% \cmd{\newref}\marg{\rtp}\mkeylst\tab\mbox{}\\[.75ex]
-% \>\crsi \>\argcmd{{\rtp}}{key} \> Reference argument prefix \\[.75ex]
-% \>\crsl \>\argcmd{{\rtp}}{label} \> Custom label \\[.75ex]
-% \>\crsl \>\argcmd{{\rtp}}{ref} \> In text reference \\[.75ex]
-% \>\crsl \>\argcmd{{\Rtp}}{ref} \> Start of sentence reference \\[.75ex]
-% \>\crsl \>\argcmd{{\rtp}}{rangeref} \> In text range reference \\[.75ex]
-% \>\crsl \>\argcmd{{\Rtp}}{rangeref} \> Start of sentence range reference\quad\mbox{}\\[.75ex]
-% \>\crsl \>\argcmd{{\rtp}}{pageref} \> Page reference
-% \end{Itabb}
-% \end{cminipage}
-% \blankline
-%
-% \noindent
-% All the \cmeta{\rtp}... commands, excluding \argcmd{{\rtp}}{key}
-% and \argcmd{{\rtp}}{label} are robust.
-% All the options for the referencing commands are set with a
-% key-value list. \Tabref[vref=far]{refopt} gives a full list of all the
-% key-values and defaults.
-%
-% The \RS\ package do not redefine any internal \LaTeX\ commands and
-% depends only on the \cmd{\label}, \cmd{\ref}, \cmd{\pageref} and
-% the \pkg{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
-% \cmd{\newref} call, can be redefined by calling \cmd{\newref} again
-% with a new set of parameter.
-% If the \pkg{amsmath} package is loaded, and you define
-% \cmd{\newref}|{eq}| for references to equations, you need to
-% undefine \cmd{\eqref} before issuing \cmd{\newref} by
-% \begin{Ipara}
-% \cmd{\let}\cmd{\eqref}|=|\cmd{\relax}
-% \end{Ipara}
-%
-%
-% \section{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
-% \RScfg\ with the
-% \cmd{\newref}|{eq}|\mkeylst. See also \secref{keyvals} for
-% explanations of the key-values.
-%
-% \subsection{The reference key}
-%
-% \begin{cminipage}[\linewidth]
-% \begin{syntdiag}
-% \tok{\argcmd{\rtp}{key}}
-% \end{syntdiag}
-% \end{cminipage}
-% \blankline
-% \noindent
-% The \argcmd{\rtp}{key} command returns the prefix added to the
-% argument of the label and the reference commands, for example:
-%
-% \begin{Itabb}
-% \hspace{10em}\=hspace{5em}\=\kill
-% \cmd{\newref}\marg{\rtp}|{}|
-% \>\>\argcmd{\rtp}{key} $\rightarrow$ \meta{type\,:\,}\\
-% \cmd{\newref}\marg{\rtp}|{key=xxx-}|
-% \>\>\argcmd{\rtp}{key} $\rightarrow$ |xxx-|
-% \end{Itabb}
-%
-% \noindent
-% The \argcmd{\rtp}{key} command is not a general command, but was
-% provided only as a link to the standard \LaTeX{} \cmd{\ref} and
-% \cmd{\pageref} commands:
-%
-% \begin{Itabb}
-% \hspace{10em}\=hspace{5em}\=\kill
-% \cmd{\label}|{|\argcmd{\rtp}{key}| abc}|
-% \>\>~ $\rightarrow$ \cmd{\label}\rmeta{type\,:\,}{abc}\\
-% \cmd{\ref}|{|\argcmd{\rtp}{key}| abc}|
-% \>\>~ $\rightarrow$ \cmd{\ref}\rmeta{type\,:\,}{abc}
-% \end{Itabb}
-% Note if the the \opt{nokeyprefix} option is active then the \argcmd{\rtp}{key}
-% is empty.
-%
-% \blankline
-% \noindent
-% \textbf{\slshape Examples:} equations
-% with \cmd{\newref}|{eq}|\mkeylst:
-%
-% \begin{Itabb}
-% \hspace*{18em}\=\kill
-% |\eqkey| \> \eqkey \\
-% |in eq.~\ref{\eqkey e1} ...| \>in eq.~\ref{\eqkey e1} ... \\
-% |on page \pageref{\eqkey e1} ...|\>on page \pageref{\eqkey e1} ... \\
-% |\vpageref*{\eqkey e1} ... | \>\vpageref*{\eqkey e1} ...
-% \end{Itabb}
-%
-% \subsection{Reference label}
-%
-% \begin{cminipage}[\linewidth]
-% \begin{syntdiag}
-% \tok{\argcmd{\rtp}{label}"{"<lbl>"}"}
-% \end{syntdiag}
-% \end{cminipage}
-% \blankline
-%
-% \noindent
-% The command \argcmd{\rtp}{label} prefix the reference
-% string in the \cmd{\label} with the string \meta{type\,:\,}, or its
-% redefinition with the \opt{key} option.
-%
-% \begin{Itabb}
-% \hspace{10em}\=hspace{5em}\=\kill
-% \argcmd{\rtp}{label}|{abc}|
-% \>\>~ $\rightarrow$ \cmd{\label}\rmeta{type\,:\,}{abc}
-% \end{Itabb}
-% \blankline
-%
-% \noindent
-% \textbf{\slshape Examples:}
-%
-% \begingroup
-% \begin{Ipara}
-% Let $z = x+\mathrm{i} y$ and $\alpha = \beta + \mathrm{i}
-% \gamma$, with $\mathrm{i}^2 = -1$, then
-% \begin{align}
-% &\mathrm{e}^z = \mathrm{e}^x \left(\cos y + \mathrm{i} \sin y \right)
-% \spestag{e1}\\
-% &z^\alpha = \mathrm{e}^{\alpha \ln z}
-% \spestag{e2}\\
-% \intertext{\Eqref{e1,e2} lead to the following interesting results:}
-% &\mathrm{e}^{\mathrm{i} \pi} + 1 = 0 \spestag{e3}\\
-% &\mathrm{i}^\mathrm{i} = \mathrm{e}^{-\pi/2}\spestag{e4}
-% \end{align}
-% \end{Ipara}
-% \endgroup
-%
-%
-% \subsection{Reference commands}
-%
-% \begin{cminipage}[1.05\textwidth]
-% \begin{syntdiag}
-% \tok{\argcmd{\rtp}{ref}}
-% \begin{stack}\\ \tok{$\ast$} \end{stack}
-% \begin{stack}\\ \tok{\okeylst} \end{stack}
-% "{"
-% \begin{rep} \tok{<lbl>} \\ ~,~ \end{rep}
-% "}"
-% \end{syntdiag}
-% \end{cminipage}
-% \smallskip
-%
-% \begin{cminipage}[1.05\textwidth]
-% \begin{syntdiag}
-% \tok{\argcmd{\Rtp}{ref}}
-% \begin{stack}\\ \tok{$\ast$} \end{stack}
-% \begin{stack}\\ \tok{\okeylst} \end{stack}
-% \tok{"{"}
-% \begin{rep} \tok{<lbl>} \\ ~,~ \end{rep}
-% \tok{"}"}
-% \end{syntdiag}
-% \end{cminipage}
-% \blankline
-% \noindent
-% The |*| optional form of the \argcmd{\rtp}{ref} and
-% \argcmd{\Rtp}{ref} commands eliminates the
-% name prefix. The |[s]| optional key-value argument is for the
-% plural form of the name prefix.
-% \blankline
-%
-% \noindent
-% \textbf{\slshape Examples:}
-% \begin{Itabb}
-% \hspace*{21em}\=\kill
-% |in \eqref{e1} ...| \>in \eqref{e1} ... \\
-% |in \eqref[s]{e1}--\eqref*{e4} ...|\>in \eqref[s]{e1}--\eqref*{e4} ...\\
-% |in \eqref[name=eq.~]{e2} ...| \>in \eqref[name=eq.~]{e2} ...
-% \end{Itabb}
-% \pagebreak[1]
-% \noindent
-% A list of references can be used:
-% \begin{Itabb}
-% \hspace*{21em}\=\kill
-% |in \eqref{e1,e2} ...| \>in \eqref{e1,e2} ... \\
-% |in \eqref{e1,e2,e3} ...| \>in \eqref{e1,e2,e3} ... \\
-% |in \eqref[lsttxt={, and~}]{e1,e2,e3} ...| \>in \eqref[lsttxt={, and~}]{e1,e2,e3} ...
-% \end{Itabb}
-% \pagebreak[2]
-% The reference to the page can be included with the \opt{vref} or \opt{vref=far}
-% options that activates the \pkg{varioref} reference.
-% \begin{Itabb}
-% \hspace*{18em}\=\kill
-% |in \eqref[vref]{e1} ...| \>in \eqref[vref]{e1} ...\\
-% |in \eqref[vref=far]{e1} ...| \>in \eqref[vref=far]{e1} ...
-% \end{Itabb}
-% The \argcmd{\Rtp}{ref} command is identical to the
-% \argcmd{\rtp}{ref} command except that it uses the \opt{Name} and
-% \opt{Names} key-value options.
-% \begin{Itabb}
-% \hspace*{18em}\=\kill
-% |\Eqref{e1} is ...| \>\Eqref{e1} is ... \\
-% |\Eqref{e1,e2} are ...| \>\Eqref{e1,e2} are ... \\
-% |\Eqref[lsttxt={\ or~}]{e1,e2,e3}| \>\Eqref[lsttxt={\ or~}]{e1,e2,e3}
-% \end{Itabb}
-% \noindent
-% References to external documents can be added with the \opt{xr}
-% option. Please read the documentation of the \pkg{xr} package.
-%
-% \begin{Itabb}
-% \hspace{10em}\=hspace{5em}\=\kill
-% \cmd{\eqref}|[|\opt{xr}|=A-]{xyz}| \> \>$\rightarrow$~
-% |equation~\ref{A-eq:xyz}|
-% \end{Itabb}
-%
-%
-% \subsection{Range reference commands}
-%
-% \begin{cminipage}[\linewidth]
-% \begin{syntdiag}
-% \tok{\argcmd{\rtp}{rangeref}}
-% \begin{stack}\\ \tok{$\ast$} \end{stack}
-% \begin{stack}\\ \tok{\okeylst} \end{stack}
-% \tok{"{"<lbl>$_1$"}{"<lbl>$_2$"}"}
-% \end{syntdiag}
-% \end{cminipage}
-% \smallskip
-%
-% \begin{cminipage}[\linewidth]
-% \begin{syntdiag}
-% \tok{\argcmd{\Rtp}{rangeref}}
-% \begin{stack}\\ \tok{$\ast$} \end{stack}
-% \begin{stack}\\ \tok{\okeylst} \end{stack}
-% \tok{"{"<lbl>$_1$"}{"<lbl>$_2$"}"}
-% \end{syntdiag}
-% \end{cminipage}
-% \blankline
-%
-% \noindent
-% The \argcmd{\rtp}{rangeref} and \argcmd{\Rtp}{rangeref} commands
-% return a range of references and take two arguments. The |*|
-% optional form again eliminates the name prefix.
-% \blankline
-%
-% \noindent
-% \textbf{\slshape Examples:}
-% \begin{Itabb}
-% \hspace*{19em}\=\kill
-% |in \eqrangeref{e1}{e4} ...| \>in \eqrangeref{e1}{e4} ... \\
-% |... and \eqrangeref*{e1}{e4} ...| \>... and \eqrangeref*{e1}{e4} ... \\
-% |\Eqrangeref{e1}{e4} are ...| \>\Eqrangeref{e1}{e4} are ... \\
-% |\Eqrangeref[vref,rngtxt=--]{e1}{e4}| \>\Eqrangeref[rngtxt=--,vref]{e1}{e4}
-% \end{Itabb}
-%
-%
-% \subsection{Page reference command}\seclabel{PRefCmds}
-%
-% \begin{cminipage}
-% \begin{syntdiag}
-% \tok{\argcmd{\rtp}{pageref}}
-% \begin{stack}\\ \tok{\okeylst} \end{stack}
-% \tok{"{"<lbl>"}"}
-% \end{syntdiag}
-% \end{cminipage}
-% \blankline
-% \noindent
-% The \argcmd{\rtp}{pageref} commands returns the page number of a
-% reference.
-% \blankline
-%
-% \noindent
-% \textbf{\slshape Examples:}
-% \begin{Itabb}
-% \hspace*{18em}\=\kill
-% |it is on page \eqpageref{e1} ...| \>it is on page \eqpageref{e1} ...\\
-% |it is \eqpageref[vref]{e1} ...| \>it is \eqpageref[vref]{e1} ...
-% \end{Itabb}
-%
-%
-%^^A=================================================================
-% \begin{table}
-% \newcommand*{\Q}{\ensuremath{\blacksquare}}^^A
-% \newcommand*{\X}{\ensuremath{\square}}^^A
-% \setlength{\fboxsep}{1em}^^A
-% \centering
-% \caption[The available options and key-value parameters]^^A
-% {The available options and key-value parameters for
-% the label and reference commands of the \RS\ package.}
-% \tablabel{refopt}
-% \blankline
-% \begin{cminipage}[.9\textwidth]
-% \renewcommand{\thempfootnote}{\fnsymbol{mpfootnote}}
-% \renewcommand{\footnoterule}{}
-% \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}llccccccc@{}}
-% & & \multicolumn{7}{c}{Commands\footnote{^^A
-% The commands are obtained by calling the configuring command
-% \cmd{\newref} and setting the default key-values. The
-% active key-values can be changed temporarily inside the
-% commands.}} \\
-% \cline{3-9}
-% Parameter & Default &
-% \begin{turn}{90}\argcmd{{\rtp}}{key}~ \end{turn}&
-% \begin{turn}{90}\argcmd{{\rtp}}{label}~ \end{turn}&
-% \begin{turn}{90}\argcmd{{\rtp}}{ref}~ \end{turn}&
-% \begin{turn}{90}\argcmd{{\Rtp}}{ref}~ \end{turn}&
-% \begin{turn}{90}\argcmd{{\rtp}}{rangeref}~ \end{turn}&
-% \begin{turn}{90}\argcmd{{\Rtp}}{rangeref}~ \end{turn}&
-% \begin{turn}{90}\argcmd{{\rtp}}{pageref}~ \end{turn}\\
-% \hline
-% \noalign{\smallskip}
-% ~$\ast$ & &\X &\X &\Q &\Q &\Q &\Q &\X\\
-% \okeylst & &\X &\X &\Q &\Q &\Q &\Q &\Q\\[1ex]
-% \opt{key} &|={|\meta{\rtp:}|},| &\X &\X &\Q &\Q &\Q &\Q &\Q\\
-% \opt{s} & |={true}|\footnote{^^A
-% Options defaults to \opt{true} but is initialized
-% as \opt{false}. The \argcmd{{\rtp}}{ref}\texttt{[s]}\marg{lbl}
-% command results in the plural: \opt{names}.
-% The same principle is also valid for the \opt{vref}
-% option.\fnlabel{b}}|,|
-% &\X &\X &\Q &\Q &\X &\X &\X\\
-% \opt{vref} &|={true}|\fnref*{b}|,|
-% &\X &\X &\Q &\Q &\Q &\Q &\Q\\
-% \opt{xr} &|={},| &\X &\X &\Q &\Q &\Q &\Q &\Q\\[1ex]
-% \opt{name} &|={},| &\X &\X &\Q &\X &\X &\X &\X\\
-% \opt{names}\footnote{^^A
-% Option depends on the selection of the \texttt{s=true/false}
-% optional key-value for singular or plural.\fnlabel{c}}
-% &|={},| &\X &\X &\Q &\X &\Q &\X &\X\\
-% \opt{Name} &|={},| &\X &\X &\X &\Q &\X &\X &\X\\
-% \opt{Names}\fnref*{c}
-% &|={},| &\X &\X &\X &\Q &\X &\Q &\X\\
-% \opt{lsttwotxt} &|={\space and~},| &\X &\X &\Q &\Q &\X &\X &\X\\
-% \opt{lsttxt} &|={\space and~},| &\X &\X &\Q &\Q &\X &\X &\X\\
-% \opt{rngtxt} &|={\space to~},| &\X &\X &\X &\X &\Q &\Q &\X\\[1ex]
-% \opt{refcmd} &|=\ref{#1},| &\X &\X &\Q &\Q &\Q &\Q &\Q\\
-%
-% \hline
-% \noalign{\smallskip}
-%
-% \footnotesize \Q\ -- \makebox[0pt][l]{\footnotesize Available}\\
-% \footnotesize \X\ -- \makebox[0pt][l]{Not available}
-% \end{tabular*}
-% \end{cminipage}
-% \end{table}
-%^^A=================================================================
-%
-%
-%
-% \clearpage
-% \section{\pkg{Keyval} Optional Arguments}\seclabel{keyvals}
-%
-% Al the options for the referencing commands are set with a key-value
-% list. \Tabref[vref]{refopt} gives a full list of all the key-values and
-% defaults. The options can also be changed locally with the
-% \okeylst\ optional arguments.
-%
-%
-% \subsection{Identifier: \opt{key}}
-%
-% The \opt{key} key-value is the prefix to the reference label
-% of the \cmd{\ref} and \cmd{\pageref} commands.
-% The default is \opt{key=}\meta{type\,:\,}.
-% With the default \RScfg:
-%
-% \begin{Itabb}
-% \tab\=\hspace{3.5cm}\=\hspace{2em}\=\kill
-% \cmd{\newref}|{tab}{...}|\\[1ex]
-% \>|\tablabel{abc}|
-% \>~ $\rightarrow$ |\label{tab:abc}|\\
-% \>|\tabref{abc}|
-% \>~ $\rightarrow$ |table~\ref{tab:abc}|\\[1ex]
-% \cmd{\newref}|{tab}{key=xxx-,...}|\\[1ex]
-% \>|\tablabel{abc}|
-% \>~ $\rightarrow$ |\label{xxx-abc}|\\
-% \>|\tabref{abc}|
-% \>~ $\rightarrow$ |table~\ref{xxx-abc}|
-% \end{Itabb}
-% For existing documents containing labels such as |\label{tab:xx}|,
-% you can use the \opt{nokeyprefix} option which defines \opt{key}|={}|. The
-% normal \cmd{\label} command can then be used and the reference
-% commands defaults to
-% \begin{Itabb}
-% \tab\=\hspace{3.5cm}\=\hspace{2em}\=\kill
-% \>\cmd{\label}|{tab:xx}| \\
-% \>|\tabref{tab:xx}| \>~ $\rightarrow$ |table~\ref{tab:xx}|
-% \end{Itabb}
-%
-%
-% \subsection{Plural form: \opt{s}}
-%
-% The \opt{s} conditional option (\texttt{true/false}) switches the
-% singular/plural form of the reference on and off. The default is
-% \opt{s}\texttt{=true}, but it is initialized to \texttt{false}.
-% \begin{Itabb}
-% \tab\=\hspace{3.5cm}\=\hspace{2em}\=\kill
-% |\tabref{abc}|
-% \>\>~ $\rightarrow$ |table~\ref{tab:abc}|\\
-% |\tabref[s]{abc}|
-% \>\>~ $\rightarrow$ |tables~\ref{tab:abc}|
-% \end{Itabb}
-%
-%
-% \subsection{Extended reference: \opt{vref}}
-%
-% The \opt{vref} conditional option (\texttt{true/far/false}) switches the
-% \pkg{varioref} page referencing on and off. The default is
-% \opt{vref}\texttt{=true}, but it is initialized to \texttt{false}.
-%
-% \begin{Itabb}
-% \tab\=\hspace{3.5cm}\=\hspace{2em}\=\kill
-% |\tabref{abc}|
-% \>\>~ $\rightarrow$ |table~\ref{tab:abc}|\\
-% |\tabref[vref]{abc}|
-% \>\>~ $\rightarrow$ |table~\ref{tab:abc}|
-% |\vpageref[\unskip]{tab:abc}|\\
-% |\tabref[vref=far]{abc}|^^A
-% \>\>~ $\rightarrow$ |table~\ref{tab:abc}|
-% |\reftextfaraway{tab:abc}|
-% \end{Itabb}
-%
-%
-% \subsection{External interfaces: \opt{xr}}
-%
-% The \opt{xr} option is for references to external documents.
-% It inserts a prefix in the reference label, compatible with the
-% \pkg{xr} package. The default is \opt{xr}|={}|.
-%
-% External document can be defined in the preamble with the
-% \pkg{xr} or \pkg{xr-hyper} packages:
-% \begin{Ipara}
-% \cmd{\usepackage}|{xr}|\\
-% \cmd{\externaldocument}\oarg{xr\_key}\marg{filename}
-% \end{Ipara}
-%
-% \noindent
-% If, for example, an external document defined with
-% \meta{xr\_key}\texttt{=\{A-\}}, uses an identical setup (e.g.\ the same
-% \RScfg), then it can be referenced with
-%
-% \begin{Itabb}
-% \tab\=\hspace{3.5cm}\=\hspace{2em}\=\kill
-% |\tabref[xr=A-]{abc}|
-% \>\>~ $\rightarrow$ |table~\ref{A-tab:abc}|
-% \end{Itabb}
-% \noindent or otherwise
-% \begin{Itabb}
-% \tab\=\hspace{3.5cm}\=\hspace{2em}\=\kill
-% |\tabref[xr=A-,key=]{abc}|
-% \>\>~ $\rightarrow$ |table~\ref{A-abc}|
-% \end{Itabb}
-%
-%
-% \subsection{Language parameters: \opt{name}, \opt{names},
-% \opt{Name}, \opt{Names}, \opt{rngtxt}, \opt{lsttwotxt}, \opt{lsttxt}}
-% \seclabel{langopts}
-%
-% This key-values contain the text prefixes and insertions.
-% Every house style or user has his or her own preference for naming the reference types,
-% therefore are there no defaults provided.
-%
-% \begin{Itabb}
-% \hspace*{1.5cm}\=\hspace{7cm}\=\kill
-% \opt{name} \> ---~Inside sentence reference prefix (singular)
-% \> default=|{}|\\
-% \opt{names}\> ---~Inside sentence reference prefix (plural)
-% \> default=|{}|\\
-% \opt{Name} \> ---~First word reference prefix (singular)
-% \> default=|{}|\\
-% \opt{Names}\> ---~First word reference prefix (plural)
-% \> default=|{}|\\
-% \opt{rngtxt}\> ---~Range of references
-% \> default=|{\ to~}|\\
-% \opt{lsttwotxt}\> ---~List of references (two)
-% \> default=|{\ and~}|\\
-% \opt{lsttxt}\> ---~List of references (more than two)
-% \> default=|{\ and~}|
-% \end{Itabb}
-% \noindent
-% Good typographic style manuals recommend the minimum use of
-% capital letters and punctuation that breaks the flow of a sentence
-% or paragraph. For abbreviations, Bringhurst\cite{Bring1996}
-% 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:
-% \begin{Ipara}
-% \opt{name}| ={table~}, |\opt{names}| ={tables~},|\\
-% \opt{Name}| ={Table~}, |\opt{Names}| ={Tables~},|\\
-% \opt{rngtxt}|={\ to~}, |\opt{lsttxt}|={, and~}, |\opt{lsttwotxt}|={\ and~},|
-% \end{Ipara}
-% Note the hardspace after the text. It is needed to keep the text
-% and the reference together on the same line.
-%
-% The \RS\ configuration file can be setup to interface with \pkg{babel}
-% for different languages or for automatic language changes inside a
-% document. The language specific key-values can be added to the
-% \pkg{babel} hook |\extras|\meta{language}. The command
-% \DescribeMacro{\DeclareLangOpt}\cmd{\DeclareLangOpt}\footnote{^^A
-% Only for use in \RScfg\ the default config file}
-% is provided to supply a \meta{language} option to the package
-% and to add the option contents to |\extras|\meta{language}. The
-% default config file contains the following lines for equations:
-% \begin{Ipara}
-% |\newcommand\RSenglish{% |\\
-% | \def\RSeqtxt{equation~}% |\\
-% | \def\RSeqstxt{equations~}%|\\
-% | \def\RSEqtxt{Equation~}% |\\
-% | \def\RSEqstxt{Equations~}%|\\
-% | : |\\
-% | } |\\
-% |\DeclareLangOpt{english}{\RSenglish}|
-% \end{Ipara}
-% \DescribeMacro{\RSaddto}or manually with the \cmd{\RSaddto} command
-% \begin{Ipara}
-% |\RSaddto{\extrasenglish}{\RSenglish}|
-% \end{Ipara}
-% The key-value options for language specific options
-% are then set as:
-% \begin{Ipara}
-% |\newref{eq}{% |\\
-% | name = \RSeqtxt, |\\
-% | names = \RSeqstxt,|\\
-% | Name = \RSEqtxt, |\\
-% | Names = \RSEqstxt,|\\
-% | : |\\
-% | } |
-% \end{Ipara}
-%
-% \noindent\LaTeX{}/\pkg{babel} provides some language specific
-% names that can be utilized.
-%
-% \begin{Ipara}
-% |\chaptername \appendixname|\\
-% |\figurename \tablename|\\
-% |\partname \pagename|
-% \end{Ipara}
-%
-% To setup a multilingual document with \pkg{babel},
-% \emph{always} make the language options global so that other
-% language compliant packages can detect it.
-% A typical setup for an Afrikaans/English document would be:
-% {\makeatletter\def\meta@font@select{\normalfont\ttfamily\slshape}
-% \begin{Ipara}
-% |\documentclass[UKenglish,afrikaans,|\meta{options}|]{|\meta{LaTeX\_class}|}|\\
-% |\usepackage[T1]{fontenc}%..|\texttt{\slshape hyphenation of words with accents}\\
-% |\usepackage{babel}%........|\texttt{\slshape language def's}\\
-% |\usepackage{varioref}%.....|\texttt{\slshape for \opt{vref} option}\\
-% |\usepackage{refstyle}|
-% \end{Ipara}}
-%
-%
-% \subsection{Reference formatting command: \opt{refcmd}}
-%
-% The \opt{refcmd} key-value holds the contents of the internal
-% command that formats the reference. The |#1| parameter
-% passed to the command is the full reference label.
-% For example:
-% \begin{Itabb}
-% \hspace{10em}\=hspace{5em}\=\kill
-% \opt{refcmd}|=(\ref{#1})| \> $\rightarrow$~
-% |(\ref{|\meta{label}|})|
-% \end{Itabb}
-%
-% External commands can be employed. For example, to make references
-% to equations identical to the \AmS\ \cmd{\eqref} command:
-% \begin{Itabb}
-% \opt{refcmd}|={\textup{\tagform@{\ref{#1}}}}%|~~It needs \file{amsmath.sty}
-% \end{Itabb}
-%
-% The \opt{refcmd} can be used in conjuntion with the |\ifRSstar|,
-% |\ifRSnameon|, |\ifRSplural| and |\ifRScapname| internal
-% conditional variables to format the reference. As an example for a
-% reference to a footnote, where a duplicate footnote mark is needed,
-% can the \opt{refcmd} be configured so that the starred form of the
-% reference command produce a superscripted duplicate mark:
-% \begin{Itabb}
-% |\newcommand{\RSfnmark}[1]{%|\\
-% | \begingroup |\\
-% | \unrestored@protected@xdef\@thefnmark{#1}%|\\
-% | \endgroup |\\
-% | \@footnotemark} |\\[1ex]
-% \opt{refcmd}|={\ifRSstar\RSfnmark{\ref{#1}}\else(\ref{#1})\fi}|
-% \end{Itabb}
-% \noindent The second footnote mark, \fnref*[name]{b}, in
-% \tabref[vref]{refopt}, was obtained in this way with the reference
-% |\fnref*{b}|. See \RScfg\ for another
-% example for references to chapters and appendices.
-%
-% The \pkg{nameref} package can easily be incorporated if you need elaborate
-% references which include the section or chapter name:
-% \begin{Ipara}
-% |\Secref[vref, refcmd={\S\ref{#1}, `\nameref{#1}'}]{PRefCmds}|
-% \end{Ipara}
-% gives
-% \begin{Ipara}
-% \Secref[vref, refcmd={\S\ref{#1}, `\nameref{#1}'}]{PRefCmds}
-% \end{Ipara}
-%
-% \section{Default configuration files}
-%
-% The \pkg{refstyle} package first searches for the \file{refstyle.def}
-% configuration file, and if it not found, then it uses the default
-% configuration file \RScfg\ that is supplied with the package.
-%
-% The default configuration file, \RScfg, makes a
-% number of default reference declarations and provides language
-% definitions for the language parameters. See the file
-% \file{refconfig.pdf} for the documentation.
-% \medskip
-%
-% \begin{center}
-% \begin{fminipage}[.55\textwidth]
-% \slshape Any user is welcome to customize the
-% local copy of the \RScfg\ file or copy
-% the relevant contents to your own \file{refstyle.def}
-% configuration file.
-% \end{fminipage}
-% \end{center}
-%
-% \begin{thebibliography}{99}
-% \bibitem{Bring1996}
-% {Bringhurst, R.} (1996), \emph{The elements of typographic style},
-% Hartley \& Marks Publishers, Point Roberts, WA, USA and Vancouver,
-% BC, Canada, second edn.
-% \end{thebibliography}
-%
-% \StopEventually{\PrintChanges\PrintIndex}
-% \clearpage
-%
-% \section{Implementation: \pkg{refstyle.sty}}
-%
-% \subsection{Identification}
-% \begin{macrocode}
-%<*pkg>
-\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-\ProvidesPackage{refstyle}[\RefstyleFileDate\space
- \RefstyleFileVersion\space
- Reference formatting (DNJ Els)]
-\newcommand*{\RS@pkgname}{refstyle}
-% \end{macrocode}
-%
-%
-% \subsection{External packages}
-%
-% Load all the external packages.
-% \begin{macrocode}
-\RequirePackage{keyval}
-% \end{macrocode}
-%
-% \begin{macro}{\RS@setkeys}
-% \changes{v0.3}{2006/09/09}{original \cmd{\setkeys} copy}
-% Note if \pkg{xkeyval} is loaded, it redefines \pkg{keyval}'s
-% macros. To fix this bug, we need the original \cmd{\setkeys}
-% command.
-% \begin{macrocode}
-\def\RS@setkeys#1#2{%
- \def\KV@prefix{KV@#1@}%
- \let\@tempc\relax
- \KV@do#2,\relax,}
-% \end{macrocode}
-% \end{macro}
-%
-% \noindent A small bug-fix for \pkg{showkeys}. Will be removed
-% after release of new version.
-%
-% \begin{macrocode}
-\@ifundefined{vref@space}{\let\vref@space\space}{}
-% \end{macrocode}
-%
-% \begin{macro}{\@safe@activestrue}
-% \changes{v0.5}{2010/11/02}{Add \cmd{\@safe@activesfalse}}
-% \begin{macro}{\@safe@activesfalse}
-% \changes{v0.5}{2010/11/02}{Add \cmd{\@safe@activestrue}}
-% If \pkg{babel} is not loaded, make the following
-% commands inactive.
-% \begin{macrocode}
-\providecommand*{\@safe@activestrue}{}
-\providecommand*{\@safe@activesfalse}{}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \subsection{Utility commands}
-%
-% \begin{macro}{\RS@namelet}
-% \begin{macro}{\RS@nameuse}
-% \begin{macro}{\RS@namedef}
-% \begin{macro}{\RS@robustnamedef}
-% \noindent
-% The following is a list of commands that take a variable \marg{name}
-% as argument. This enables on-the-fly definitions of user commands.
-% \begin{Itabb}
-% Usage:~\=\cmd{\RS@robustnamedef}\marg{name}~\=\kill
-% Usage:
-% \>\cmd{\RS@namelet}\marg{name}
-% \> $\rightarrow$ \cmd{\let}\cmeta{name}\\
-% \>\cmd{\RS@nameuse}\marg{name}
-% \> $\rightarrow$ \cmeta{name}\\
-% \>\cmd{\RS@namedef}\marg{name}
-% \> $\rightarrow$ \cmd{\def}\cmeta{name}\\
-% \>\cmd{\RS@robustnamedef}\marg{name}
-% \> $\rightarrow$
-% \cmd{\def}\cmeta{name}|{\protect|\cmeta{name\textvisiblespace}|}|^^A
-% \cmd{\def}\cmeta{name\textvisiblespace}
-% \end{Itabb}
-% \begin{macrocode}
-\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 }}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\RS@ifundefined}
-% This is an improved definition\footnote{Posted by Markus Kohm
-% on c.t.t. 2002/11/11} for the \LaTeX{} kernel command
-% \cmd{\@ifundefined} that do not leave an undefined command
-% defined as \cmd{\relax} after the test.
-%
-% The usage is:
-% \cmd{\RS@ifundefined}\marg{name}\marg{true}\marg{false} executes
-% the contents of \meta{true} if \cmeta{name} is not defined and
-% \meta{false} if defined.
-% \begin{macrocode}
-\def\RS@ifundefined#1{%
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname#1\endcsname\relax
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\RS@removedef}
-% The command removes the definition of a command, including
-% robust definitions.
-% \begin{macrocode}
-\newcommand*{\RS@removedef}[1]{%
- \RS@namelet{#1}\@undefined%
- \RS@ifundefined{#1 }{}{\RS@namelet{#1 }\@undefined}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\RS@testednamedef}
-% \begin{macro}{\RS@testedrobustnamedef}
-% These command are identical to \cmd{\RS@namedef} and
-% \cmd{\RS@robustnamedef}, but only define the \cmeta{name}
-% command if it is legal. Otherwise an error message
-% is written to the log file and the program is terminated.
-% \begin{macrocode}
-\newcommand*{\RS@testednamedef}[1]{%
- \RS@ifnamedefinable{#1}\RS@namedef{#1}}
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand*{\RS@testedrobustnamedef}[1]{%
- \RS@ifnamedefinable{#1}\RS@robustnamedef{#1}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\RS@ifnamedefinable}
-% A modified version of the \LaTeX{} kernel command
-% (from ltdefns.dtx).
-% \begin{macrocode}
-\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}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\RS@notdefinable}
-% The error message when an illegal definition is attempted.
-% \begin{macrocode}
-\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.}%
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\RS@setbool}
-% The command\footnote{Taken from the \pkg{ifthen} package.}
-% \cmd{\RS@setbool}\marg{conditional}\marg{true/false}
-% sets the \meta{conditional} to |true| or |false|.
-% \begin{Itabb}
-% Usage:~\=
-% \cmd{\RS@setbool}|{RSplural}{false}|\quad\=$\rightarrow$\quad
-% |\RSpluralfalse|\\
-% \>\cmd{\RS@setbool}|{RSplural}{true}|\quad\>$\rightarrow$\quad
-% |\RSpluraltrue|
-% \end{Itabb}
-%
-% \begin{macrocode}
-\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}}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsection{First character case changes}
-%
-% \begin{macro}{\RS@firstcap}
-% This macro\footnote{Posted by Dan Luecking on c.t.t.} change the
-% first character of a string to uppercase and returns the result
-% in \cmd{\RS@cap}.
-% \begin{Ipara}
-% Usage:~|\RS@fistcap xxxx\@nil| then |\RS@cap| $\rightarrow$ |Xxxx|
-% \end{Ipara}
-% \begin{macrocode}
-\def\RS@firstcap#1#2\@nil{%
- \iffalse{\fi
- \uppercase{\edef\RS@cap{\iffalse}\fi#1}#2}}%
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-% \subsection{Reference building commands}
-%
-% \begin{macro}{\ifRS@keyactive}
-% \changes{v0.4}{2010/10/21}{Add \opt{nokeyprefix} to turn of the key prefix}
-% We need to peek into the options list for the \opt{nokeyprefix} option
-% before the options are processed to find out if the key prefix must be
-% included in the |\|\meta{key}|label| command. Make \opt{nokeyprefix}
-% not used afterwards.
-% \begin{macrocode}
-\newif\ifRS@keyactive
-\@ifpackagewith{\@currname}{nokeyprefix}%
- {\RS@keyactivefalse}%
- {\RS@keyactivetrue}
-\DeclareOption{nokeyprefix}{\OptionNotUsed}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\ifRSstar}
-% \begin{macro}{\ifRSnameon}
-% \begin{macro}{\ifRScapname}
-% \begin{macro}{\ifRSplural}
-% \begin{macro}{\ifRSlsttwo}
-% \changes{v0.4}{2010/10/21}{Add \cmd{\ifRSlsttwo} test for list containing only two parameter}
-% The |\if| conditional values that are set by the reference commands.
-% These values can be accessed by user defined key-values.
-% \begin{macrocode}
-\newif\ifRSstar\RSstarfalse
-\newif\ifRSnameon\RSnameontrue
-\newif\ifRScapname\RScapnamefalse
-\newif\ifRSplural\RSpluralfalse
-\newif\ifRSlsttwo\RSlsttwofalse
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macro}{\newref}
-% The main user interface for template setup. It take the |#1| or
-% \meta{key} parameter and make it lowercase before passing it on to
-% \cmd{\RS@newref}.
-%
-%
-% \begin{macrocode}
-\newcommand*{\newref}[1]{%
- \lowercase{\def\RS@tempa{#1}}%
- \expandafter\RS@newref\expandafter{\RS@tempa}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\RS@newref}
-% \changes{v0.4}{2010/10/21}{Ad \texttt{lsttwotxt} option}
-% This command configures a new template.
-% \begin{macrocode}
-\newcommand*{\RS@newref}[2]{%
-% \end{macrocode}
-% \bNP[2.0]\noindent Clears an existing template before defining a new one.\eNP
-% \begin{macrocode}
- \RS@clearref{#1}%
-% \end{macrocode}
-% \bNP[2.0]\noindent Create |\ifRS@|\meta{key}|vref| conditional \eNP
-% \begin{macrocode}
-% \expandafter\newif\csname ifRS@#1vref\endcsname%
-% \end{macrocode}
-% \bNP[2.0]\noindent Creates a series of key-values for every template
-% that stores the setup for the specific template.\eNP
-% \begin{macrocode}
- \ifRS@keyactive
- \define@key{RS@#1}{key}[#1:]{\RS@namedef{RS@#1@key}{##1}}%
- \else
- \define@key{RS@#1}{key}[]{\RS@namedef{RS@#1@key}{##1}}%
- \fi
- \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}{lsttwotxt}[\space and~]{\RS@namedef{RS@#1@lsttwotxt}{##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}}%
-% \end{macrocode}
-% \bNP[2.0]\noindent Set default key-value parameters.\eNP
-% \begin{macrocode}
- \RS@setkeys{RS@#1}{key,
- s=false,
- name,names,Name,Names,
- rngtxt,lsttwotxt,lsttxt,
- refcmd,
- xr,
- vref=false}%
-% \end{macrocode}
-% \bNP[2.0]\noindent Set key-values according to user definitions.\eNP
-% \begin{macrocode}
- \RS@setkeys{RS@#1}{#2}%
-% \end{macrocode}
-% \bNP[2.0]\noindent Build the reference commands.\eNP
-% \begin{macrocode}
- \RS@buildref{#1}%
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\RS@clearref}
-% Clear a reference template for redefinition. It check
-% if the template already exists and clear it if it does.
-%
-% \begin{macrocode}
-\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}%
- }%
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\RS@buildref}
-% Build the reference commands. See \tabref{refopt} for the list of
-% commands. The \cmd{\RS@buildref}\marg{key} build commands to
-% call \cmd{\RS@cmd}\marg{cmd}\marg{key}, for example:
-% \begin{Ipara}
-% \cmeta{key}|ref| \quad$\rightarrow$\quad
-% |{\RScapnamefalse\RS@cmd{ref}|\marg{key}|}|
-% \end{Ipara}
-% \changes{v0.2}{2003/07/30}{Remove robust def of \argcmd{{\rtp}}{label}}
-% \begin{macrocode}
-\newcommand*{\RS@buildref}[1]{%
- \RS@firstcap#1\@nil
- \RS@testednamedef{#1key}{\RS@nameuse{RS@#1@key}}
- \RS@testednamedef{#1label}##1{\label{\RS@nameuse{RS@#1@key}##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}}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\RS@cmd}
-% \begin{macro}{\RS@@cmd}
-% The command \cmd{\RS@cmd}\marg{cmd}\marg{key} calls the final
-% reference formatting commands.
-% It checks for the starred form and set the conditionals
-% |\ifRSstar| and |\ifRSnameon| accordingly.
-% It also extracts the optional key-value list.
-% \begin{Itabb}
-% \hspace*{4.5cm}\=\kill
-% \cmd{\RS@cmd}|{ref}|\marg{key} \>$\rightarrow$\quad
-% |\RS@ref|\marg{key}\okeylst\\
-% \cmd{\RS@cmd}|{rangeref}|\marg{key} \>$\rightarrow$\quad
-% |\RS@rangeref|\marg{key}\okeylst\\
-% \cmd{\RS@cmd}|{pageref}|\marg{key} \>$\rightarrow$\quad
-% |\RS@pageref|\marg{key}\okeylst
-% \end{Itabb}
-% \begin{macrocode}
-\newcommand*{\RS@cmd}[2]{%
- \@ifstar{\RSstartrue\RSnameonfalse\RS@@cmd{#1}{#2}}%
- {\RSstarfalse\RSnameontrue\RS@@cmd{#1}{#2}}}
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand*{\RS@@cmd}[2]{%
- \@ifnextchar[%
- {\RS@nameuse{RS@#1}{#2}}%
- {\RS@nameuse{RS@#1}{#2}[]}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-%
-% \subsection{Reference formatting commands}
-%
-% \begin{macro}{\RS@ref}
-% \changes{v0.5}{2010/11/02}{Add \cmd{\@safe@activestrue} to avoid active chars is ref list}
-% \begin{macro}{\RS@@ref}
-% \begin{macro}{\RS@@@ref}
-% \changes{v0.4}{2010/10/21}{Add \cmd{\ifRSlsttwo} test for list containing only two parameter}
-% The command \cmd{\RS@ref}\marg{key}\okeylst\marg{label\_lst}
-% typeset the references to the comma-separated reference
-% label list according to the configuration for \meta{key}.
-%
-% First of all, remove all spaces for the reference label list.
-% \begin{macrocode}
-\def\RS@ref#1[#2]#3{%
- \begingroup
- \RS@setkeys{RS@#1}{#2}%
- \@safe@activestrue%
- \edef\RS@tmpa{\zap@space#3 \@empty}%
- \@safe@activesfalse%
- \edef\RS@tmpa{\noexpand\RS@@ref{#1} \RS@tmpa,\relax\noexpand\@eolst}%
- \RS@tmpa%
- \endgroup}
-% \end{macrocode}
-% \end{macro}
-% Check if there is a single or multiple references in the
-% reference label list. If a single reference label then use the
-% form set by the \opt{s} key-value. If multiple reference labels
-% the use the plural form of the name prefix.\footnote{
-% The list of reference commands came from the \pkg{typedref} package.}
-%
-% \begin{macrocode}
-\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%
- \RSlsttwotrue%
- \RS@@@ref{#1} #3\@eolst%
- \fi}
-% \end{macrocode}
-% \end{macro}
-% For more than one reference in the reference list, typeset the
-% rest of the references.
-% \begin{macrocode}
-\def\RS@@@ref#1 #2,#3\@eolst{%
- \ifx\relax#3\relax
- \ifRSlsttwo
- \RS@nameuse{RS@#1@lsttwotxt}%
- \else
- \RS@nameuse{RS@#1@lsttxt}%
- \fi
- \RS@makeref{#1}{#2}%
- \RS@makevpageref{#1}{#2}%
- \else
- \RSlsttwofalse%
- \unskip,\space%
- \RS@makeref{#1}{#2}%
- \RS@makevpageref{#1}{#2}%
- \RS@@@ref{#1} #3\@eolst%
- \fi}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\RS@rangeref}
-% The command \cmd{\RS@rangeref}\marg{key}\okeylst\marg{lbl1}\marg{lbl2}
-% typeset the references as a range.
-% \begin{macrocode}
-\def\RS@rangeref#1[#2]#3#4{%
- \begingroup
- \RS@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}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\RS@pageref}
-% The command \cmd{\RS@pageref}\marg{key}\okeylst\marg{lbl} type
-% the page where \marg{lbl} was defined.
-% \begin{macrocode}
-\def\RS@pageref#1[#2]#3{%
- \begingroup%
- \RS@setkeys{RS@#1}{#2}%
- \RS@ifvref{#1}%
- {\mbox{}\vpageref*{\RS@lbl{#1}{#3}}}%
- {\reftextfaraway{\RS@lbl{#1}{#3}}}%
- {\pageref{\RS@lbl{#1}{#3}}}%
- \endgroup}
-% \end{macrocode}
-% \end{macro}
-%
-% \changes{v0.2}{2003/07/30}{Remove redundant \cmd{\RS@label}}
-%
-% \begin{macrocode}
-\newcommand*{\RS@true}{true}
-\newcommand*{\RS@false}{false}
-\newcommand*{\RS@far}{far}
-% \end{macrocode}
-%
-% \begin{macro}{\RS@ifvref}
-% The command \cmd{\RS@ifvref}\marg{key}\marg{true}\marg{faraway}\marg{false}
-% executes the contents of \meta{true} if the \opt{vref} option for
-% the \meta{key} reference type is true and \meta{false} otherwise.
-% \begin{macrocode}
-\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}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\RS@makename}
-% The command \cmd{\RS@makename}\marg{key} build the prefix
-% to the reference commands.
-% \begin{macrocode}
-\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
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\RS@lbl}
-% This command builds the full label string for the \cmd{\ref}
-% command.
-% \begin{Ipara}
-% \cmd{\RS@lbl}\marg{key}\marg{label} \quad$\rightarrow$\quad
-% |{|\meta{xr_key}\meta{key}\meta{label}|}|
-% \end{Ipara}
-% \begin{macrocode}
-\newcommand*{\RS@lbl}[2]{%
- \RS@nameuse{RS@#1@xr}\RS@nameuse{RS@#1@key}#2%
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\RS@makeref}
-% The command \cmd{\RS@makeref}\marg{key}\marg{label} formats
-% the \cmd{\ref} output
-% \begin{Ipara}
-% \cmd{\RS@makeref}\marg{key}\marg{label} \quad$\rightarrow$\quad
-% \cmeta{rcmd}|{\ref{|\meta{xr_key}\meta{key}\meta{label}|}}|
-% \end{Ipara}
-% \begin{macrocode}
-\newcommand{\RS@makeref}[2]{%
- \RS@nameuse{RS@#1@rcmd}{\RS@lbl{#1}{#2}}%
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\RS@makevpageref}
-% The command \cmd{\RS@makevpageref}\marg{key}\marg{label} adds the
-% \pkg{varioref} page reference if the \opt{vref} option is true.
-% \begin{macrocode}
-\newcommand{\RS@makevpageref}[2]{%
- \RS@ifvref{#1}%
- {\vpageref[\unskip]{\RS@lbl{#1}{#2}}}%
- { \reftextfaraway{\RS@lbl{#1}{#2}}}%
- {}%
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\RS@makevpagerefrange}
-% The command \cmd{\RS@makevpagerefrange}\marg{key}\marg{lbl1}\marg{lbl1}
-% adds the \pkg{varioref} page range reference if the \opt{vref}
-% option is true.
-% \begin{macrocode}
-\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}}}%
- {}%
- }
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsection{\pkg{varioref} command predefinitions}
-%
-% \begin{macrocode}
-\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}}
- }
-% \end{macrocode}
-%
-%
-% \subsection{Support for language option inclusions in config file}
-%
-% \begin{macro}{\RSaddto}
-% \changes{v0.2}{2003/07/30}{Rename \cmd{\RS@addto} to \cmd{\RSaddto}}
-% Command from the \pkg{varioref} package is used to add
-% language definitions to the |\extras|\meta{language} token
-% for \pkg{babel}.
-% \begin{macrocode}
-\def\RSaddto#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}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\DeclareLangOpt}
-% \changes{v0.5}{2010/11/02}{Add \cmd{\extras}\meta{language} to beginning of document.}
-% Command to declare a language option and add
-% language definitions to the |\extras|\meta{language} token
-% for \pkg{babel}.
-% \begin{macrocode}
-\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}{%
- \AtBeginDocument{\expandafter\RSaddto\csname extras#1\endcsname #2}}}%
- }
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-% \subsection{Configuration files}
-%
-% \begin{macro}{\RS@cfgfile,\RS@reffile}
-% \changes{v0.4}{2010/10/21}{Ad alternative definition file \cmd{refstyle.def}}
-% Define the config file and alternate definition file names.
-% \begin{macrocode}
-\newcommand*{\RS@cfgfile}{refstyle.cfg}
-\newcommand*{\RS@reffile}{refstyle.def}
-% \end{macrocode}
-% \end{macro}
-%
-% 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
-% \cmd{\ProcessOptions}. Make \opt{noconfig} not used
-% afterwards.
-%
-% We first test for a local config file \file{refstyle.def}
-% and then for the global config file \file{refstyle.cfg}.
-% \begin{macrocode}
-\@ifpackagewith{\@currname}{noconfig}%
- {\PackageInfo{\RS@pkgname}{No config file loaded}}%
- {\InputIfFileExists{\RS@reffile}%
- {\PackageInfo{\RS@pkgname}{Local config file \RS@reffile\space used}}
- {\InputIfFileExists{\RS@cfgfile}%
- {\PackageInfo{\RS@pkgname}{Config file \RS@cfgfile\space used}}%
- {\PackageInfo{\RS@pkgname}{No config file found}}}}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\DeclareOption{noconfig}{\OptionNotUsed}%
-% \end{macrocode}
-%
-% Process the options, including options in config file.
-% \begin{macrocode}
-\ProcessOptions*\relax
-% \end{macrocode}
-%
-% The end of this package.
-% \begin{macrocode}
-%</pkg>
-% \end{macrocode}
-%
-% \Finale
-\endinput
+% \iffalse
+%
+% refstyle.dtx
+% Copyright (C) 2002--2024 Danie Els
+%
+% -------------------------------------------------------------------
+% The refstyle package
+% for the formatting of references
+% -------------------------------------------------------------------
+% This work may be distributed and/or modified under the conditions
+% of the LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX
+% version 2008/12/01 or later.
+%
+% This work has the LPPL maintenance status 'maintained'.
+%
+% This Current Maintainer of this work is Danie Els (dnjels@gmail.com)
+%
+% This package consists of the files: refstyle.dtx
+% refconfig.dtx
+% refstyle.ins
+% and the derived files: refstyle.sty
+% refstyle.cfg
+% -------------------------------------------------------------------
+%
+%<*pkg>
+\newcommand*{\RefstyleFileDate}{2024/01/31}
+\newcommand*{\RefstyleFileVersion}{v0.6}
+%</pkg>
+%
+%
+%<*driver>
+\documentclass[a4paper]{ltxdoc}
+\let\RefstyleFileDate\relax
+\let\RefstyleFileVersion\relax
+\usepackage{amsmath}
+\usepackage{amsfonts}
+ \DeclareMathSymbol{\square} {\mathord}{AMSa}{"03}
+ \DeclareMathSymbol{\blacksquare}{\mathord}{AMSa}{"04}
+\usepackage{calc}
+\usepackage{rotating}
+\usepackage[rounded]{syntax}
+\usepackage{varioref}
+\usepackage{refstyle}
+\usepackage{color}
+ \definecolor{hrefcol}{rgb}{0.00,0.00,1.00}
+\usepackage[pdfpagelabels]{hyperref}
+\hypersetup{breaklinks=true,
+ linktocpage,
+ pdfstartview=FitH,
+ colorlinks = true,
+ linkcolor = hrefcol,
+ urlcolor = hrefcol,
+ menucolor = hrefcol,
+ filecolor = hrefcol,
+ citecolor = hrefcol,
+ linkbordercolor = {0.8 0.8 0.8},
+ urlbordercolor = {0.8 0.8 0.8},
+ menubordercolor = {0.8 0.8 0.8},
+ filebordercolor = {0.8 0.8 0.8},
+ runbordercolor = {0.8 0.8 0.8},
+ citebordercolor = {0.8 0.8 0.8},
+ pdftitle={refstyle},
+ pdfauthor={Danie Els}}
+
+%---- macrocode env changes -------------------------------
+
+\setlength{\MacroIndent}{1.5em}
+
+%---- Scratches -------------------------------------------
+
+\newlength{\tdima}
+\newsavebox{\tboxa}
+
+%---- Spacing ---------------------------------------------
+
+\newlength{\myskip}
+\setlength{\myskip}{\topsep}
+ \addtolength{\myskip}{\parskip}
+ \addtolength{\myskip}{\partopsep}
+\newcommand*{\blankline}{\par\addvspace{\myskip}}
+\newlength{\mytab}
+\setlength{\mytab}{2\parindent}
+\newcommand{\tab}{\hspace*{\mytab}}
+
+%---- Indented environments -------------------------------
+
+\newenvironment{IndentPara}[1][1]
+ {\list{}{\setlength{\leftmargin}{#1\mytab}%
+ \setlength{\labelwidth}{0pt}%
+ \setlength{\labelsep}{0pt}%
+ \setlength{\itemindent}{\parindent}%
+ \setlength{\listparindent}{\parindent}%
+ }\item[]}%
+ {\endlist}
+\newenvironment{IndentParaX}[1][1]
+ {\list{}{\setlength{\leftmargin}{#1\mytab}%
+ \setlength{\topsep}{0pt}%
+ \setlength{\partopsep}{0pt}%
+ \setlength{\labelwidth}{0pt}%
+ \setlength{\labelsep}{0pt}%
+ \setlength{\itemindent}{\parindent}%
+ \setlength{\listparindent}{\parindent}%
+ }\item[]}%
+ {\endlist}
+\newcommand\bNP{\begin{IndentParaX}}
+\newcommand\eNP{\end{IndentParaX}}
+\newenvironment{Ipara}[1][\small]%
+ {\begin{IndentPara}\noindent#1\ignorespaces}%
+ {\end{IndentPara}}
+\newenvironment{Itabb}[1][\small]%
+ {\begin{IndentPara}#1\ignorespaces\begin{tabbing}\ignorespaces}%
+ {\end{tabbing}\end{IndentPara}}
+
+%---- Ruled & colored minipage ----------------------------
+
+\definecolor{shadecolor}{gray}{0.9}
+
+\newenvironment{fminipage}[1][\linewidth]
+ {\setlength{\tdima}{#1-2\fboxsep-2\fboxrule}%
+ \begin{lrbox}{\tboxa}\begin{minipage}{\tdima}}%
+ {\end{minipage}\end{lrbox}\noindent\fbox{\usebox{\tboxa}}}
+\newenvironment{cminipage}[1][\linewidth]
+ {\setlength{\tdima}{#1-2\fboxsep-2\fboxrule}%
+ \begin{lrbox}{\tboxa}\begin{minipage}{\tdima}}%
+ {\end{minipage}\end{lrbox}%
+ \noindent\colorbox{shadecolor}{\usebox{\tboxa}}}
+
+%---- Additional documenting commands ---------------------
+
+\def\lcbrack{\symbol{`\{}}
+\def\rcbrack{\symbol{`\}}}
+\makeatletter
+\def\meta@font@select{\normalfont\slshape}
+\makeatother
+\DeclareRobustCommand{\cmeta}[1]{%<- \<xxx>
+ \texttt{\bslash}\meta{#1}}
+\DeclareRobustCommand{\cmarg}[1]{%<- {\<xxx>}
+ \texttt{\lcbrack}\cmeta{#1}\texttt{\rcbrack}}
+\DeclareRobustCommand{\coarg}[1]{%<- [\<xxx>]
+ \texttt{[}\cmeta{#1}\texttt{]}}
+\DeclareRobustCommand{\argcmd}[2]{%<- \<xxx>yyy
+ \cmeta{#1}\texttt{#2}}
+\newcommand{\rmeta}[3][]{%
+ \texttt{\lcbrack#1}\meta{#2}\texttt{#3\rcbrack}}
+\newcommand{\refmeta}[3][]{\cmd{\brref}\rmeta[#1]{#2}{#3}}
+
+\newcommand*{\file}[1]{\texttt{#1}}
+\newcommand*{\pkg}[1]{\textsf{#1}}
+\newcommand*{\env}[1]{\texttt{#1}}
+\newcommand*{\opt}[1]{\texorpdfstring{\normalfont\texttt{\slshape#1}}{#1}}
+\newcommand*{\RS}{\pkg{refstyle}}
+\newcommand*{\RScfg}{\file{refstyle.cfg}}
+\newcommand*{\rtp}{type}
+\newcommand*{\Rtp}{Type}
+\newcommand*{\okeylst}{\oarg{key\_lst}}
+\newcommand*{\mkeylst}{\marg{key\_lst}}
+
+%---- Special eq tag command ------------------------------
+
+\def\spestag#1{\stepcounter{equation}%
+ \gdef\tagextra##1{%
+ \makebox[0pt][l]{\small\quad%
+ \cmd{\eqlabel}\texttt{\lcbrack##1\rcbrack}}%
+ \gdef\tagextra####1{}}%
+ \tag{\theequation\tagextra{#1}}\eqlabel{#1}}
+
+%---- other stuff -----------------------------------------
+
+\newcommand*{\ArTab}{\>\quad$\rightarrow$\quad}
+
+%----------------------------------------------------------
+
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\setlength\hfuzz{15pt}
+\hbadness=7000
+\begin{document}
+ \DocInput{refstyle.dtx}
+\end{document}
+
+%</driver>
+% \fi
+%
+% \CheckSum{552}
+%
+% \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 \~}
+%
+% \changes{v0.0}{2002/12/01}{Initial version}
+% \changes{v0.1}{2003/04/01}{First stable version}
+% \changes{v0.2}{2003/07/30}{First updated version}
+% \changes{v0.3}{2006/09/09}{Documentation update}
+% \changes{v0.4}{2010/10/21}{Documentation update}
+% \changes{v0.4}{2010/10/21}{Add \texttt{nokeyprefix} option}
+% \changes{v0.5}{2010/11/02}{Documentation update}
+%
+% \DoNotIndex{
+% \@backslashchar, \@carcube, \@ehc, \@empty, \@firstoftwo,
+% \@ifnextchar, \@ifpackageloaded, \@ifstar, \@ifundefined, \@nil,
+% \@qend, \@qrelax, \@secondoftwo, \@tempa, \@undefined,
+% \AtEndOfPackage, \begingroup, \csname, \CurrentOption,
+% \DeclareOption, \def, \edef, \else, \endcsname, \endgroup,
+% \expandafter, \fi, \gdef, \iffalse, \ifx, \InputIfFileExists,
+% \let, \long, \lowercase, \MakeLowercase, \mbox, \MessageBreak,
+% \NeedsTeXFormat, \newcommand, \newif, \noexpand, \PackageError, \PackageInfo,
+% \PassOptionsToPackage, \RS@pkgname, \ProcessOptions, \protect,
+% \providecommand, \ProvidesPackage, \relax, \renewcommand,
+% \RequirePackage, \reserved@a, \reserved@b, \RS@tmpa,
+% \RS@tmpb, \S, \RS@setkeys, \space, \string, \textsc, \textup,
+% \unrestored@protected@xdef, \unskip, \uppercase,
+% \zap@space}
+%
+%^^A==== Titling ==========================================
+% \GetFileInfo{refstyle.sty}
+% \title{\vspace*{-1cm}
+% The \RS\ package\thanks{This file has version number
+% \fileversion, last revised
+% \filedate.}}
+% \author{Danie Els\\[1ex]
+% \normalsize e-mail: \texttt{\href{mailto:dnjels@gmail.com}%
+% {dnjels@gmail.com}}}
+% \date{\filedate}
+% \maketitle
+% \begin{center}
+% \textbf{Overview of the \RS\ package}
+% \end{center}
+% \noindent
+% When writing complex documents, often a large number of commands
+% for different type of references are defined, for example:
+% \begin{Ipara}
+% |\newcommand*{\eqref}[1]{eqn~(\ref{#1})}|\\
+% |\newcommand*{\Eqref}[1]{Equation~(\ref{#1})}|
+% \end{Ipara}
+% The \RS\ package was developed to automate this process. The
+% package provides a user interface to define sets of reference
+% and label commands for each referable object such as an equation
+% or a table, etc. When you declare, for example, a set of
+% reference commands to an equation:
+% \begin{Ipara}
+% \cmd{\newref}|{eq}|\mkeylst\
+% \end{Ipara}
+% \noindent
+% a series of commands of the format \cmd{\eq...} and \cmd{\Eq...}
+% are produced. The configuration options are set with a list of
+% key-values. Prefixes, inserts and other options for all the
+% different perturbations such as capitalized first letters,
+% singular and plural from, etc.\ can be defined. The
+% configuration can be changed temporarily with an optional list
+% of key-values when the commands are used. A direct interface to
+% the \pkg{varioref} package is also provided.
+% This enables compact reference formats:
+% \begin{Itabb}
+% \hspace{14em}\=\kill
+% |\eqref{e1} ...| \ArTab\eqref{e1} ...\\
+% |\Eqref[vref]{e1} ...| \ArTab\Eqref[vref]{e1} ...\\
+% |\eqref[s]{e1} and ...| \ArTab\eqref[s]{e1} and ...\\
+% |\eqref[name=eq.~]{e1} ...| \ArTab\eqref[name=eq.~]{e1} ...
+% \end{Itabb}
+% A range or a list of references can also be referred to in a
+% consistent way.
+% \begin{Itabb}
+% \hspace{14em}\=\kill
+% |\eqref{e1,e2,e3} ...| \ArTab\eqref{e1,e2,e3} ...\\
+% |\eqrangeref[vref]{e1}{e3} ...| \ArTab\eqrangeref[vref]{e1}{e3} ...
+% \end{Itabb}
+%
+% Templates for the different reference types and different
+% languages can be loaded with a configuring file.
+%
+% The package is aimed at large projects, enabling a consistent
+% way of producing references throughout a project. Enough
+% flexibility is provided to make local changes to a single
+% reference. For large projects such as a series of books or a
+% multi volume thesis, written as freestanding documents, a
+% facility is provided to interface to the \pkg{xr} package for
+% external document references.
+%
+% \medskip
+%
+% \begin{center}
+% \begin{fminipage}[.6\textwidth]
+% See also \pkg{refconfig.pdf} for setup and examples.
+% \end{fminipage}
+% \end{center}
+
+% \clearpage
+%
+% \tableofcontents
+% \clearpage
+%
+%
+% \section{Loading the \RS\ Package}
+%
+% \subsection{Document preamble}
+%
+% The \RS\ package is loaded in the preamble of the document:
+% \begin{enumerate}
+% \item[(a)] With a config file with \pkg{babel} language support
+% \begin{Ipara}
+% |\usepackage{varioref}[2001/09/04]%|~
+% ${\leftarrow}$ To use the \opt{vref} option\\
+% |\usepackage{refstyle}|
+% \end{Ipara}
+% When the package is loaded, it first searchers for a local user defined
+% configuration file \file{refstyle.def}. If it is not available it
+% looks for the global default config file \RScfg\ provided with this package.
+% These configuration files are loaded before the package options are precess.
+% It can therefore contain option commands using globally defined language
+% options and can interface to \pkg{babel} for language changes. The macro
+% \begin{Ipara}
+% |\DeclareLangOpt{|\meta{language}|}{|\meta{definitions}|}|
+% \end{Ipara}
+% is provided to declare the package option \meta{language} and add
+% \meta{definitions} to the |\extras|\meta{language} token for \pkg{babel}.
+% It can only be used inside \RScfg\ or \file{refstyle.def}.
+%
+% \item[(b)]
+% Or with an existing configuration with language support and addition
+% of your own extensions
+% \begin{Ipara}
+% |\documentclass[norwegian]{article}|\\
+% |\usepackage{babel} |\\
+% |\usepackage{refstyle} |\\
+% |\RSaddto{\RSnorwegian}{% |\\
+% | \def\RSthmtxt{teorem~}% |\\
+% | \def\RSthmstxt{teorem~}% |\\
+% | \def\RSThmtxt{Teorem~}% |\\
+% | \def\RSThmstxt{Teorem~}} |\\
+% |\newref{thm}{ |\\
+% | name = \RSthmtxt, |\\
+% | names = \RSthmstxt, |\\
+% | Name = \RSThmtxt, |\\
+% | Names = \RSThmstxt, |\\
+% | rngtxt = \RSrngtxt, |\\
+% | lsttxt = \RSlsttxt, |\\
+% | lsttwotxt = \RSlsttwotxt} |
+% \end{Ipara}
+%
+% \item[(c)]
+% Or without any configuration file, but by declaring your own
+% reference commands in the preamble.
+% \begin{Itabb}
+% \cmd{\usepackage}|[noconfig]{refstyle}|\\
+% \qquad\cmd{\newref}\marg{reftype$_{\,1}$}\mkeylst \\
+% \qquad\cmd{\newref}\marg{reftype$_{\,2}$}\mkeylst\\
+% \tab$\vdots$
+% \end{Itabb}
+%
+% \item[(d)]
+% Or with your own configuration file (without babel language support) for a specific project:
+% \begin{Itabb}
+% |\usepackage[noconfig]{refstyle}|\\
+% |\input{thisproject.ref}|
+% \end{Itabb}
+%
+% \end{enumerate}
+%
+% \subsection{Package options}
+%
+% \begin{description}
+% \item[\opt{noconfig}] Neither of the user supplied \file{refstyle.def} config
+% file or \file{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 \pkg{babel}'s language
+% changing mechanisms.
+%
+% \item[\opt{nokeyprefix}] Custom labeling commands \argcmd{\rtp}{label} are generated
+% by \pkg{refstyle} for every \meta{type} definition. It defaults to
+% \begin{Itabb}
+% \hspace{5em}\=hspace{5em}\=\kill
+% \argcmd{\rtp}{label}|{abc}|
+% \>\>~ $\rightarrow$ \cmd{\label}\rmeta{type\,:\,}{abc}
+% \end{Itabb}
+% With the \opt{nokeyprefix} option, the prefix is turned of and the
+% labeling commands defaults to
+% \begin{Itabb}
+% \hspace{5em}\=hspace{5em}\=\kill
+% \argcmd{\rtp}{label}|{abc}|
+% \>\>~ $\rightarrow$ \cmd{\label}|{abc}|
+% \end{Itabb}
+% This is useful for old documents with existing labeling commands or
+% where the user prefer not to use the \argcmd{\rtp}{label} commands.
+%
+%
+% \end{description}
+%
+%
+%
+%
+% \subsection{Companion packages}
+%
+% The \RS\ packages is intended for large projects. It is therefore
+% important that it works together with, or has direct interfaces
+% to the following packages:
+% \begin{description}
+% \item[\pkg{varioref}:\footnotemark]
+% \footnotetext{\pkg{varioref} v1.3c, 2001/09/04 or later,
+% because the starred versions of the commands
+% are used.}
+% Produce sophisticated page and page range references.
+%
+% \item[\pkg{hyperref}:\footnotemark]
+% \footnotetext{\pkg{hyperref} v6.72r, 2002/05/27 or later,
+% where a bug for interference with
+% \pkg{varioref} was fixed.}
+% To establish hyper links between the references and the
+% labels.
+%
+% \item[\pkg{xr, xr-hyper}:]
+% To establish references to external documents.
+%
+% \item[\pkg{showkeys}:]
+% To show all the labels and references. This is very useful
+% to find labels in large documents.
+% \end{description}
+%
+% \clearpage
+% \section{User Interface}
+%
+% The \RS\ package has one configuring command, \DescribeMacro{\newref}
+% \cmd{\newref}, that internally creates a series of label and
+% reference commands:
+% \blankline
+%
+% \begin{cminipage}[\linewidth]
+% \newcommand*{\crsi}{\smash{\rule[0pt]{.4pt}{1.25em}\rule[.5ex]{1.5em}{.4pt}}}^^A
+% \newcommand*{\crsl}{\smash{\rule[.5ex]{.4pt}{1.5em}\rule[.5ex]{1.5em}{.4pt}}}^^A
+% \begin{Itabb}
+% \hspace*{2em}\=\hspace{2em}\=\hspace{10em}\=\kill
+% \cmd{\newref}\marg{\rtp}\mkeylst\tab\mbox{}\\[.75ex]
+% \>\crsi \>\argcmd{{\rtp}}{key} \> Reference argument prefix \\[.75ex]
+% \>\crsl \>\argcmd{{\rtp}}{label} \> Custom label \\[.75ex]
+% \>\crsl \>\argcmd{{\rtp}}{ref} \> In text reference \\[.75ex]
+% \>\crsl \>\argcmd{{\Rtp}}{ref} \> Start of sentence reference \\[.75ex]
+% \>\crsl \>\argcmd{{\rtp}}{rangeref} \> In text range reference \\[.75ex]
+% \>\crsl \>\argcmd{{\Rtp}}{rangeref} \> Start of sentence range reference\quad\mbox{}\\[.75ex]
+% \>\crsl \>\argcmd{{\rtp}}{pageref} \> Page reference
+% \end{Itabb}
+% \end{cminipage}
+% \blankline
+%
+% \noindent
+% All the \cmeta{\rtp}... commands, excluding \argcmd{{\rtp}}{key}
+% and \argcmd{{\rtp}}{label} are robust.
+% All the options for the referencing commands are set with a
+% key-value list. \Tabref[vref=far]{refopt} gives a full list of all the
+% key-values and defaults.
+%
+% The \RS\ package do not redefine any internal \LaTeX\ commands and
+% depends only on the \cmd{\label}, \cmd{\ref}, \cmd{\pageref} and
+% the \pkg{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
+% \cmd{\newref} call, can be redefined by calling \cmd{\newref} again
+% with a new set of parameter.
+% If the \pkg{amsmath} package is loaded, and you define
+% \cmd{\newref}|{eq}| for references to equations, you need to
+% undefine \cmd{\eqref} before issuing \cmd{\newref} by
+% \begin{Ipara}
+% \cmd{\let}\cmd{\eqref}|=|\cmd{\relax}
+% \end{Ipara}
+%
+%
+% \section{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
+% \RScfg\ with the
+% \cmd{\newref}|{eq}|\mkeylst. See also \secref{keyvals} for
+% explanations of the key-values.
+%
+% \subsection{The reference key}
+%
+% \begin{cminipage}[\linewidth]
+% \begin{syntdiag}
+% \tok{\argcmd{\rtp}{key}}
+% \end{syntdiag}
+% \end{cminipage}
+% \blankline
+% \noindent
+% The \argcmd{\rtp}{key} command returns the prefix added to the
+% argument of the label and the reference commands, for example:
+%
+% \begin{Itabb}
+% \hspace{10em}\=hspace{5em}\=\kill
+% \cmd{\newref}\marg{\rtp}|{}|
+% \>\>\argcmd{\rtp}{key} $\rightarrow$ \meta{type\,:\,}\\
+% \cmd{\newref}\marg{\rtp}|{key=xxx-}|
+% \>\>\argcmd{\rtp}{key} $\rightarrow$ |xxx-|
+% \end{Itabb}
+%
+% \noindent
+% The \argcmd{\rtp}{key} command is not a general command, but was
+% provided only as a link to the standard \LaTeX{} \cmd{\ref} and
+% \cmd{\pageref} commands:
+%
+% \begin{Itabb}
+% \hspace{10em}\=hspace{5em}\=\kill
+% \cmd{\label}|{|\argcmd{\rtp}{key}| abc}|
+% \>\>~ $\rightarrow$ \cmd{\label}\rmeta{type\,:\,}{abc}\\
+% \cmd{\ref}|{|\argcmd{\rtp}{key}| abc}|
+% \>\>~ $\rightarrow$ \cmd{\ref}\rmeta{type\,:\,}{abc}
+% \end{Itabb}
+% Note if the the \opt{nokeyprefix} option is active then the \argcmd{\rtp}{key}
+% is empty.
+%
+% \blankline
+% \noindent
+% \textbf{\slshape Examples:} equations
+% with \cmd{\newref}|{eq}|\mkeylst:
+%
+% \begin{Itabb}
+% \hspace*{18em}\=\kill
+% |\eqkey| \> \eqkey \\
+% |in eq.~\ref{\eqkey e1} ...| \>in eq.~\ref{\eqkey e1} ... \\
+% |on page \pageref{\eqkey e1} ...|\>on page \pageref{\eqkey e1} ... \\
+% |\vpageref*{\eqkey e1} ... | \>\vpageref*{\eqkey e1} ...
+% \end{Itabb}
+%
+% \subsection{Reference label}
+%
+% \begin{cminipage}[\linewidth]
+% \begin{syntdiag}
+% \tok{\argcmd{\rtp}{label}"{"<lbl>"}"}
+% \end{syntdiag}
+% \end{cminipage}
+% \blankline
+%
+% \noindent
+% The command \argcmd{\rtp}{label} prefix the reference
+% string in the \cmd{\label} with the string \meta{type\,:\,}, or its
+% redefinition with the \opt{key} option.
+%
+% \begin{Itabb}
+% \hspace{10em}\=hspace{5em}\=\kill
+% \argcmd{\rtp}{label}|{abc}|
+% \>\>~ $\rightarrow$ \cmd{\label}\rmeta{type\,:\,}{abc}
+% \end{Itabb}
+% \blankline
+%
+% \noindent
+% \textbf{\slshape Examples:}
+%
+% \begingroup
+% \begin{Ipara}
+% Let $z = x+\mathrm{i} y$ and $\alpha = \beta + \mathrm{i}
+% \gamma$, with $\mathrm{i}^2 = -1$, then
+% \begin{align}
+% &\mathrm{e}^z = \mathrm{e}^x \left(\cos y + \mathrm{i} \sin y \right)
+% \spestag{e1}\\
+% &z^\alpha = \mathrm{e}^{\alpha \ln z}
+% \spestag{e2}\\
+% \intertext{\Eqref{e1,e2} lead to the following interesting results:}
+% &\mathrm{e}^{\mathrm{i} \pi} + 1 = 0 \spestag{e3}\\
+% &\mathrm{i}^\mathrm{i} = \mathrm{e}^{-\pi/2}\spestag{e4}
+% \end{align}
+% \end{Ipara}
+% \endgroup
+%
+%
+% \subsection{Reference commands}
+%
+% \begin{cminipage}[1.05\textwidth]
+% \begin{syntdiag}
+% \tok{\argcmd{\rtp}{ref}}
+% \begin{stack}\\ \tok{$\ast$} \end{stack}
+% \begin{stack}\\ \tok{\okeylst} \end{stack}
+% "{"
+% \begin{rep} \tok{<lbl>} \\ ~,~ \end{rep}
+% "}"
+% \end{syntdiag}
+% \end{cminipage}
+% \smallskip
+%
+% \begin{cminipage}[1.05\textwidth]
+% \begin{syntdiag}
+% \tok{\argcmd{\Rtp}{ref}}
+% \begin{stack}\\ \tok{$\ast$} \end{stack}
+% \begin{stack}\\ \tok{\okeylst} \end{stack}
+% \tok{"{"}
+% \begin{rep} \tok{<lbl>} \\ ~,~ \end{rep}
+% \tok{"}"}
+% \end{syntdiag}
+% \end{cminipage}
+% \blankline
+% \noindent
+% The |*| optional form of the \argcmd{\rtp}{ref} and
+% \argcmd{\Rtp}{ref} commands eliminates the
+% name prefix. The |[s]| optional key-value argument is for the
+% plural form of the name prefix.
+% \blankline
+%
+% \noindent
+% \textbf{\slshape Examples:}
+% \begin{Itabb}
+% \hspace*{21em}\=\kill
+% |in \eqref{e1} ...| \>in \eqref{e1} ... \\
+% |in \eqref[s]{e1}--\eqref*{e4} ...|\>in \eqref[s]{e1}--\eqref*{e4} ...\\
+% |in \eqref[name=eq.~]{e2} ...| \>in \eqref[name=eq.~]{e2} ...
+% \end{Itabb}
+% \pagebreak[1]
+% \noindent
+% A list of references can be used:
+% \begin{Itabb}
+% \hspace*{21em}\=\kill
+% |in \eqref{e1,e2} ...| \>in \eqref{e1,e2} ... \\
+% |in \eqref{e1,e2,e3} ...| \>in \eqref{e1,e2,e3} ... \\
+% |in \eqref[lsttxt={, and~}]{e1,e2,e3} ...| \>in \eqref[lsttxt={, and~}]{e1,e2,e3} ...
+% \end{Itabb}
+% \pagebreak[2]
+% The reference to the page can be included with the \opt{vref} or \opt{vref=far}
+% options that activates the \pkg{varioref} reference.
+% \begin{Itabb}
+% \hspace*{18em}\=\kill
+% |in \eqref[vref]{e1} ...| \>in \eqref[vref]{e1} ...\\
+% |in \eqref[vref=far]{e1} ...| \>in \eqref[vref=far]{e1} ...
+% \end{Itabb}
+% The \argcmd{\Rtp}{ref} command is identical to the
+% \argcmd{\rtp}{ref} command except that it uses the \opt{Name} and
+% \opt{Names} key-value options.
+% \begin{Itabb}
+% \hspace*{18em}\=\kill
+% |\Eqref{e1} is ...| \>\Eqref{e1} is ... \\
+% |\Eqref{e1,e2} are ...| \>\Eqref{e1,e2} are ... \\
+% |\Eqref[lsttxt={\ or~}]{e1,e2,e3}| \>\Eqref[lsttxt={\ or~}]{e1,e2,e3}
+% \end{Itabb}
+% \noindent
+% References to external documents can be added with the \opt{xr}
+% option. Please read the documentation of the \pkg{xr} package.
+%
+% \begin{Itabb}
+% \hspace{10em}\=hspace{5em}\=\kill
+% \cmd{\eqref}|[|\opt{xr}|=A-]{xyz}| \> \>$\rightarrow$~
+% |equation~\ref{A-eq:xyz}|
+% \end{Itabb}
+%
+%
+% \subsection{Range reference commands}
+%
+% \begin{cminipage}[\linewidth]
+% \begin{syntdiag}
+% \tok{\argcmd{\rtp}{rangeref}}
+% \begin{stack}\\ \tok{$\ast$} \end{stack}
+% \begin{stack}\\ \tok{\okeylst} \end{stack}
+% \tok{"{"<lbl>$_1$"}{"<lbl>$_2$"}"}
+% \end{syntdiag}
+% \end{cminipage}
+% \smallskip
+%
+% \begin{cminipage}[\linewidth]
+% \begin{syntdiag}
+% \tok{\argcmd{\Rtp}{rangeref}}
+% \begin{stack}\\ \tok{$\ast$} \end{stack}
+% \begin{stack}\\ \tok{\okeylst} \end{stack}
+% \tok{"{"<lbl>$_1$"}{"<lbl>$_2$"}"}
+% \end{syntdiag}
+% \end{cminipage}
+% \blankline
+%
+% \noindent
+% The \argcmd{\rtp}{rangeref} and \argcmd{\Rtp}{rangeref} commands
+% return a range of references and take two arguments. The |*|
+% optional form again eliminates the name prefix.
+% \blankline
+%
+% \noindent
+% \textbf{\slshape Examples:}
+% \begin{Itabb}
+% \hspace*{19em}\=\kill
+% |in \eqrangeref{e1}{e4} ...| \>in \eqrangeref{e1}{e4} ... \\
+% |... and \eqrangeref*{e1}{e4} ...| \>... and \eqrangeref*{e1}{e4} ... \\
+% |\Eqrangeref{e1}{e4} are ...| \>\Eqrangeref{e1}{e4} are ... \\
+% |\Eqrangeref[vref,rngtxt=--]{e1}{e4}| \>\Eqrangeref[rngtxt=--,vref]{e1}{e4}
+% \end{Itabb}
+%
+%
+% \subsection{Page reference command}\seclabel{PRefCmds}
+%
+% \begin{cminipage}
+% \begin{syntdiag}
+% \tok{\argcmd{\rtp}{pageref}}
+% \begin{stack}\\ \tok{\okeylst} \end{stack}
+% \tok{"{"<lbl>"}"}
+% \end{syntdiag}
+% \end{cminipage}
+% \blankline
+% \noindent
+% The \argcmd{\rtp}{pageref} commands returns the page number of a
+% reference.
+% \blankline
+%
+% \noindent
+% \textbf{\slshape Examples:}
+% \begin{Itabb}
+% \hspace*{18em}\=\kill
+% |it is on page \eqpageref{e1} ...| \>it is on page \eqpageref{e1} ...\\
+% |it is \eqpageref[vref]{e1} ...| \>it is \eqpageref[vref]{e1} ...
+% \end{Itabb}
+%
+%
+%^^A=================================================================
+% \begin{table}
+% \newcommand*{\Q}{\ensuremath{\blacksquare}}^^A
+% \newcommand*{\X}{\ensuremath{\square}}^^A
+% \setlength{\fboxsep}{1em}^^A
+% \centering
+% \caption[The available options and key-value parameters]^^A
+% {The available options and key-value parameters for
+% the label and reference commands of the \RS\ package.}
+% \tablabel{refopt}
+% \blankline
+% \begin{cminipage}[.9\textwidth]
+% \renewcommand{\thempfootnote}{\fnsymbol{mpfootnote}}
+% \renewcommand{\footnoterule}{}
+% \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}llccccccc@{}}
+% & & \multicolumn{7}{c}{Commands\footnote{^^A
+% The commands are obtained by calling the configuring command
+% \cmd{\newref} and setting the default key-values. The
+% active key-values can be changed temporarily inside the
+% commands.}} \\
+% \cline{3-9}
+% Parameter & Default &
+% \begin{turn}{90}\argcmd{{\rtp}}{key}~ \end{turn}&
+% \begin{turn}{90}\argcmd{{\rtp}}{label}~ \end{turn}&
+% \begin{turn}{90}\argcmd{{\rtp}}{ref}~ \end{turn}&
+% \begin{turn}{90}\argcmd{{\Rtp}}{ref}~ \end{turn}&
+% \begin{turn}{90}\argcmd{{\rtp}}{rangeref}~ \end{turn}&
+% \begin{turn}{90}\argcmd{{\Rtp}}{rangeref}~ \end{turn}&
+% \begin{turn}{90}\argcmd{{\rtp}}{pageref}~ \end{turn}\\
+% \hline
+% \noalign{\smallskip}
+% ~$\ast$ & &\X &\X &\Q &\Q &\Q &\Q &\X\\
+% \okeylst & &\X &\X &\Q &\Q &\Q &\Q &\Q\\[1ex]
+% \opt{key} &|={|\meta{\rtp:}|},| &\X &\X &\Q &\Q &\Q &\Q &\Q\\
+% \opt{s} & |={true}|\footnote{^^A
+% Options defaults to \opt{true} but is initialized
+% as \opt{false}. The \argcmd{{\rtp}}{ref}\texttt{[s]}\marg{lbl}
+% command results in the plural: \opt{names}.
+% The same principle is also valid for the \opt{vref}
+% option.\fnlabel{b}}|,|
+% &\X &\X &\Q &\Q &\X &\X &\X\\
+% \opt{vref} &|={true}|\fnref*{b}|,|
+% &\X &\X &\Q &\Q &\Q &\Q &\Q\\
+% \opt{xr} &|={},| &\X &\X &\Q &\Q &\Q &\Q &\Q\\[1ex]
+% \opt{name} &|={},| &\X &\X &\Q &\X &\X &\X &\X\\
+% \opt{names}\footnote{^^A
+% Option depends on the selection of the \texttt{s=true/false}
+% optional key-value for singular or plural.\fnlabel{c}}
+% &|={},| &\X &\X &\Q &\X &\Q &\X &\X\\
+% \opt{Name} &|={},| &\X &\X &\X &\Q &\X &\X &\X\\
+% \opt{Names}\fnref*{c}
+% &|={},| &\X &\X &\X &\Q &\X &\Q &\X\\
+% \opt{lsttwotxt} &|={\space and~},| &\X &\X &\Q &\Q &\X &\X &\X\\
+% \opt{lsttxt} &|={\space and~},| &\X &\X &\Q &\Q &\X &\X &\X\\
+% \opt{rngtxt} &|={\space to~},| &\X &\X &\X &\X &\Q &\Q &\X\\[1ex]
+% \opt{refcmd} &|=\ref{#1},| &\X &\X &\Q &\Q &\Q &\Q &\Q\\
+%
+% \hline
+% \noalign{\smallskip}
+%
+% \footnotesize \Q\ -- \makebox[0pt][l]{\footnotesize Available}\\
+% \footnotesize \X\ -- \makebox[0pt][l]{Not available}
+% \end{tabular*}
+% \end{cminipage}
+% \end{table}
+%^^A=================================================================
+%
+%
+%
+% \clearpage
+% \section{\pkg{Keyval} Optional Arguments}\seclabel{keyvals}
+%
+% Al the options for the referencing commands are set with a key-value
+% list. \Tabref[vref]{refopt} gives a full list of all the key-values and
+% defaults. The options can also be changed locally with the
+% \okeylst\ optional arguments.
+%
+%
+% \subsection{Identifier: \opt{key}}
+%
+% The \opt{key} key-value is the prefix to the reference label
+% of the \cmd{\ref} and \cmd{\pageref} commands.
+% The default is \opt{key=}\meta{type\,:\,}.
+% With the default \RScfg:
+%
+% \begin{Itabb}
+% \tab\=\hspace{3.5cm}\=\hspace{2em}\=\kill
+% \cmd{\newref}|{tab}{...}|\\[1ex]
+% \>|\tablabel{abc}|
+% \>~ $\rightarrow$ |\label{tab:abc}|\\
+% \>|\tabref{abc}|
+% \>~ $\rightarrow$ |table~\ref{tab:abc}|\\[1ex]
+% \cmd{\newref}|{tab}{key=xxx-,...}|\\[1ex]
+% \>|\tablabel{abc}|
+% \>~ $\rightarrow$ |\label{xxx-abc}|\\
+% \>|\tabref{abc}|
+% \>~ $\rightarrow$ |table~\ref{xxx-abc}|
+% \end{Itabb}
+% For existing documents containing labels such as |\label{tab:xx}|,
+% you can use the \opt{nokeyprefix} option which defines \opt{key}|={}|. The
+% normal \cmd{\label} command can then be used and the reference
+% commands defaults to
+% \begin{Itabb}
+% \tab\=\hspace{3.5cm}\=\hspace{2em}\=\kill
+% \>\cmd{\label}|{tab:xx}| \\
+% \>|\tabref{tab:xx}| \>~ $\rightarrow$ |table~\ref{tab:xx}|
+% \end{Itabb}
+%
+%
+% \subsection{Plural form: \opt{s}}
+%
+% The \opt{s} conditional option (\texttt{true/false}) switches the
+% singular/plural form of the reference on and off. The default is
+% \opt{s}\texttt{=true}, but it is initialized to \texttt{false}.
+% \begin{Itabb}
+% \tab\=\hspace{3.5cm}\=\hspace{2em}\=\kill
+% |\tabref{abc}|
+% \>\>~ $\rightarrow$ |table~\ref{tab:abc}|\\
+% |\tabref[s]{abc}|
+% \>\>~ $\rightarrow$ |tables~\ref{tab:abc}|
+% \end{Itabb}
+%
+%
+% \subsection{Extended reference: \opt{vref}}
+%
+% The \opt{vref} conditional option (\texttt{true/far/false}) switches the
+% \pkg{varioref} page referencing on and off. The default is
+% \opt{vref}\texttt{=true}, but it is initialized to \texttt{false}.
+%
+% \begin{Itabb}
+% \tab\=\hspace{3.5cm}\=\hspace{2em}\=\kill
+% |\tabref{abc}|
+% \>\>~ $\rightarrow$ |table~\ref{tab:abc}|\\
+% |\tabref[vref]{abc}|
+% \>\>~ $\rightarrow$ |table~\ref{tab:abc}|
+% |\vpageref[\unskip]{tab:abc}|\\
+% |\tabref[vref=far]{abc}|^^A
+% \>\>~ $\rightarrow$ |table~\ref{tab:abc}|
+% |\reftextfaraway{tab:abc}|
+% \end{Itabb}
+%
+%
+% \subsection{External interfaces: \opt{xr}}
+%
+% The \opt{xr} option is for references to external documents.
+% It inserts a prefix in the reference label, compatible with the
+% \pkg{xr} package. The default is \opt{xr}|={}|.
+%
+% External document can be defined in the preamble with the
+% \pkg{xr} or \pkg{xr-hyper} packages:
+% \begin{Ipara}
+% \cmd{\usepackage}|{xr}|\\
+% \cmd{\externaldocument}\oarg{xr\_key}\marg{filename}
+% \end{Ipara}
+%
+% \noindent
+% If, for example, an external document defined with
+% \meta{xr\_key}\texttt{=\{A-\}}, uses an identical setup (e.g.\ the same
+% \RScfg), then it can be referenced with
+%
+% \begin{Itabb}
+% \tab\=\hspace{3.5cm}\=\hspace{2em}\=\kill
+% |\tabref[xr=A-]{abc}|
+% \>\>~ $\rightarrow$ |table~\ref{A-tab:abc}|
+% \end{Itabb}
+% \noindent or otherwise
+% \begin{Itabb}
+% \tab\=\hspace{3.5cm}\=\hspace{2em}\=\kill
+% |\tabref[xr=A-,key=]{abc}|
+% \>\>~ $\rightarrow$ |table~\ref{A-abc}|
+% \end{Itabb}
+%
+%
+% \subsection{Language parameters: \opt{name}, \opt{names},
+% \opt{Name}, \opt{Names}, \opt{rngtxt}, \opt{lsttwotxt}, \opt{lsttxt}}
+% \seclabel{langopts}
+%
+% This key-values contain the text prefixes and insertions.
+% Every house style or user has his or her own preference for naming the reference types,
+% therefore are there no defaults provided.
+%
+% \begin{Itabb}
+% \hspace*{1.5cm}\=\hspace{7cm}\=\kill
+% \opt{name} \> ---~Inside sentence reference prefix (singular)
+% \> default=|{}|\\
+% \opt{names}\> ---~Inside sentence reference prefix (plural)
+% \> default=|{}|\\
+% \opt{Name} \> ---~First word reference prefix (singular)
+% \> default=|{}|\\
+% \opt{Names}\> ---~First word reference prefix (plural)
+% \> default=|{}|\\
+% \opt{rngtxt}\> ---~Range of references
+% \> default=|{\ to~}|\\
+% \opt{lsttwotxt}\> ---~List of references (two)
+% \> default=|{\ and~}|\\
+% \opt{lsttxt}\> ---~List of references (more than two)
+% \> default=|{\ and~}|
+% \end{Itabb}
+% \noindent
+% Good typographic style manuals recommend the minimum use of
+% capital letters and punctuation that breaks the flow of a sentence
+% or paragraph. For abbreviations, Bringhurst\cite{Bring1996}
+% 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:
+% \begin{Ipara}
+% \opt{name}| ={table~}, |\opt{names}| ={tables~},|\\
+% \opt{Name}| ={Table~}, |\opt{Names}| ={Tables~},|\\
+% \opt{rngtxt}|={\ to~}, |\opt{lsttxt}|={, and~}, |\opt{lsttwotxt}|={\ and~},|
+% \end{Ipara}
+% Note the hardspace after the text. It is needed to keep the text
+% and the reference together on the same line.
+%
+% The \RS\ configuration file can be setup to interface with \pkg{babel}
+% for different languages or for automatic language changes inside a
+% document. The language specific key-values can be added to the
+% \pkg{babel} hook |\extras|\meta{language}. The command
+% \DescribeMacro{\DeclareLangOpt}\cmd{\DeclareLangOpt}\footnote{^^A
+% Only for use in \RScfg\ the default config file}
+% is provided to supply a \meta{language} option to the package
+% and to add the option contents to |\extras|\meta{language}. The
+% default config file contains the following lines for equations:
+% \begin{Ipara}
+% |\newcommand\RSenglish{% |\\
+% | \def\RSeqtxt{equation~}% |\\
+% | \def\RSeqstxt{equations~}%|\\
+% | \def\RSEqtxt{Equation~}% |\\
+% | \def\RSEqstxt{Equations~}%|\\
+% | : |\\
+% | } |\\
+% |\DeclareLangOpt{english}{\RSenglish}|
+% \end{Ipara}
+% \DescribeMacro{\RSaddto}or manually with the \cmd{\RSaddto} command
+% \begin{Ipara}
+% |\RSaddto{\extrasenglish}{\RSenglish}|
+% \end{Ipara}
+% The key-value options for language specific options
+% are then set as:
+% \begin{Ipara}
+% |\newref{eq}{% |\\
+% | name = \RSeqtxt, |\\
+% | names = \RSeqstxt,|\\
+% | Name = \RSEqtxt, |\\
+% | Names = \RSEqstxt,|\\
+% | : |\\
+% | } |
+% \end{Ipara}
+%
+% \noindent\LaTeX{}/\pkg{babel} provides some language specific
+% names that can be utilized.
+%
+% \begin{Ipara}
+% |\chaptername \appendixname|\\
+% |\figurename \tablename|\\
+% |\partname \pagename|
+% \end{Ipara}
+%
+% To setup a multilingual document with \pkg{babel},
+% \emph{always} make the language options global so that other
+% language compliant packages can detect it.
+% A typical setup for an Afrikaans/English document would be:
+% {\makeatletter\def\meta@font@select{\normalfont\ttfamily\slshape}
+% \begin{Ipara}
+% |\documentclass[UKenglish,afrikaans,|\meta{options}|]{|\meta{LaTeX\_class}|}|\\
+% |\usepackage[T1]{fontenc}%..|\texttt{\slshape hyphenation of words with accents}\\
+% |\usepackage{babel}%........|\texttt{\slshape language def's}\\
+% |\usepackage{varioref}%.....|\texttt{\slshape for \opt{vref} option}\\
+% |\usepackage{refstyle}|
+% \end{Ipara}}
+%
+%
+% \subsection{Reference formatting command: \opt{refcmd}}
+%
+% The \opt{refcmd} key-value holds the contents of the internal
+% command that formats the reference. The |#1| parameter
+% passed to the command is the full reference label.
+% For example:
+% \begin{Itabb}
+% \hspace{10em}\=hspace{5em}\=\kill
+% \opt{refcmd}|=(\ref{#1})| \> $\rightarrow$~
+% |(\ref{|\meta{label}|})|
+% \end{Itabb}
+%
+% External commands can be employed. For example, to make references
+% to equations identical to the \AmS\ \cmd{\eqref} command:
+% \begin{Itabb}
+% \opt{refcmd}|={\textup{\tagform@{\ref{#1}}}}%|~~It needs \file{amsmath.sty}
+% \end{Itabb}
+%
+% The \opt{refcmd} can be used in conjuntion with the |\ifRSstar|,
+% |\ifRSnameon|, |\ifRSplural| and |\ifRScapname| internal
+% conditional variables to format the reference. As an example for a
+% reference to a footnote, where a duplicate footnote mark is needed,
+% can the \opt{refcmd} be configured so that the starred form of the
+% reference command produce a superscripted duplicate mark:
+% \begin{Itabb}
+% |\newcommand{\RSfnmark}[1]{%|\\
+% | \begingroup |\\
+% | \unrestored@protected@xdef\@thefnmark{#1}%|\\
+% | \endgroup |\\
+% | \@footnotemark} |\\[1ex]
+% \opt{refcmd}|={\ifRSstar\RSfnmark{\ref{#1}}\else(\ref{#1})\fi}|
+% \end{Itabb}
+% \noindent The second footnote mark, \fnref*[name]{b}, in
+% \tabref[vref]{refopt}, was obtained in this way with the reference
+% |\fnref*{b}|. See \RScfg\ for another
+% example for references to chapters and appendices.
+%
+% The \pkg{nameref} package can easily be incorporated if you need elaborate
+% references which include the section or chapter name:
+% \begin{Ipara}
+% |\Secref[vref, refcmd={\S\ref{#1}, `\nameref{#1}'}]{PRefCmds}|
+% \end{Ipara}
+% gives
+% \begin{Ipara}
+% \Secref[vref, refcmd={\S\ref{#1}, `\nameref{#1}'}]{PRefCmds}
+% \end{Ipara}
+%
+% \section{Default configuration files}
+%
+% The \pkg{refstyle} package first searches for the \file{refstyle.def}
+% configuration file, and if it not found, then it uses the default
+% configuration file \RScfg\ that is supplied with the package.
+%
+% The default configuration file, \RScfg, makes a
+% number of default reference declarations and provides language
+% definitions for the language parameters. See the file
+% \file{refconfig.pdf} for the documentation.
+% \medskip
+%
+% \begin{center}
+% \begin{fminipage}[.55\textwidth]
+% \slshape Any user is welcome to customize the
+% local copy of the \RScfg\ file or copy
+% the relevant contents to your own \file{refstyle.def}
+% configuration file.
+% \end{fminipage}
+% \end{center}
+%
+% \begin{thebibliography}{99}
+% \bibitem{Bring1996}
+% {Bringhurst, R.} (1996), \emph{The elements of typographic style},
+% Hartley \& Marks Publishers, Point Roberts, WA, USA and Vancouver,
+% BC, Canada, second edn.
+% \end{thebibliography}
+%
+% \StopEventually{\PrintChanges\PrintIndex}
+% \clearpage
+%
+% \section{Implementation: \pkg{refstyle.sty}}
+%
+% \subsection{Identification}
+% \begin{macrocode}
+%<*pkg>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{refstyle}[\RefstyleFileDate\space
+ \RefstyleFileVersion\space
+ Reference formatting (DNJ Els)]
+\newcommand*{\RS@pkgname}{refstyle}
+% \end{macrocode}
+%
+%
+% \subsection{External packages}
+%
+% Load all the external packages.
+% \begin{macrocode}
+\RequirePackage{keyval}
+% \end{macrocode}
+%
+% \begin{macro}{\RS@setkeys}
+% \changes{v0.3}{2006/09/09}{original \cmd{\setkeys} copy}
+% Note if \pkg{xkeyval} is loaded, it redefines \pkg{keyval}'s
+% macros. To fix this bug, we need the original \cmd{\setkeys}
+% command.
+% \begin{macrocode}
+\def\RS@setkeys#1#2{%
+ \def\KV@prefix{KV@#1@}%
+ \let\@tempc\relax
+ \KV@do#2,\relax,}
+% \end{macrocode}
+% \end{macro}
+%
+% \noindent A small bug-fix for \pkg{showkeys}. Will be removed
+% after release of new version.
+%
+% \begin{macrocode}
+\@ifundefined{vref@space}{\let\vref@space\space}{}
+% \end{macrocode}
+%
+% \begin{macro}{\@safe@activestrue}
+% \changes{v0.5}{2010/11/02}{Add \cmd{\@safe@activesfalse}}
+% \begin{macro}{\@safe@activesfalse}
+% \changes{v0.5}{2010/11/02}{Add \cmd{\@safe@activestrue}}
+% If \pkg{babel} is not loaded, make the following
+% commands inactive.
+% \begin{macrocode}
+\providecommand*{\@safe@activestrue}{}
+\providecommand*{\@safe@activesfalse}{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Utility commands}
+%
+% \begin{macro}{\RS@namelet}
+% \begin{macro}{\RS@nameuse}
+% \begin{macro}{\RS@namedef}
+% \begin{macro}{\RS@robustnamedef}
+% \noindent
+% The following is a list of commands that take a variable \marg{name}
+% as argument. This enables on-the-fly definitions of user commands.
+% \begin{Itabb}
+% Usage:~\=\cmd{\RS@robustnamedef}\marg{name}~\=\kill
+% Usage:
+% \>\cmd{\RS@namelet}\marg{name}
+% \> $\rightarrow$ \cmd{\let}\cmeta{name}\\
+% \>\cmd{\RS@nameuse}\marg{name}
+% \> $\rightarrow$ \cmeta{name}\\
+% \>\cmd{\RS@namedef}\marg{name}
+% \> $\rightarrow$ \cmd{\def}\cmeta{name}\\
+% \>\cmd{\RS@robustnamedef}\marg{name}
+% \> $\rightarrow$
+% \cmd{\def}\cmeta{name}|{\protect|\cmeta{name\textvisiblespace}|}|^^A
+% \cmd{\def}\cmeta{name\textvisiblespace}
+% \end{Itabb}
+% \begin{macrocode}
+\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 }}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\RS@ifundefined}
+% This is an improved definition\footnote{Posted by Markus Kohm
+% on c.t.t. 2002/11/11} for the \LaTeX{} kernel command
+% \cmd{\@ifundefined} that do not leave an undefined command
+% defined as \cmd{\relax} after the test.
+%
+% The usage is:
+% \cmd{\RS@ifundefined}\marg{name}\marg{true}\marg{false} executes
+% the contents of \meta{true} if \cmeta{name} is not defined and
+% \meta{false} if defined.
+% \begin{macrocode}
+\def\RS@ifundefined#1{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname#1\endcsname\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\RS@removedef}
+% The command removes the definition of a command, including
+% robust definitions.
+% \begin{macrocode}
+\newcommand*{\RS@removedef}[1]{%
+ \RS@namelet{#1}\@undefined%
+ \RS@ifundefined{#1 }{}{\RS@namelet{#1 }\@undefined}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\RS@testednamedef}
+% \begin{macro}{\RS@testedrobustnamedef}
+% These command are identical to \cmd{\RS@namedef} and
+% \cmd{\RS@robustnamedef}, but only define the \cmeta{name}
+% command if it is legal. Otherwise an error message
+% is written to the log file and the program is terminated.
+% \begin{macrocode}
+\newcommand*{\RS@testednamedef}[1]{%
+ \RS@ifnamedefinable{#1}\RS@namedef{#1}}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*{\RS@testedrobustnamedef}[1]{%
+ \RS@ifnamedefinable{#1}\RS@robustnamedef{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\RS@ifnamedefinable}
+% A modified version of the \LaTeX{} kernel command
+% (from ltdefns.dtx).
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\RS@notdefinable}
+% The error message when an illegal definition is attempted.
+% \begin{macrocode}
+\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.}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\RS@setbool}
+% The command\footnote{Taken from the \pkg{ifthen} package.}
+% \cmd{\RS@setbool}\marg{conditional}\marg{true/false}
+% sets the \meta{conditional} to |true| or |false|.
+% \begin{Itabb}
+% Usage:~\=
+% \cmd{\RS@setbool}|{RSplural}{false}|\quad\=$\rightarrow$\quad
+% |\RSpluralfalse|\\
+% \>\cmd{\RS@setbool}|{RSplural}{true}|\quad\>$\rightarrow$\quad
+% |\RSpluraltrue|
+% \end{Itabb}
+%
+% \begin{macrocode}
+\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}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{First character case changes}
+%
+% \begin{macro}{\RS@firstcap}
+% This macro\footnote{Posted by Dan Luecking on c.t.t.} change the
+% first character of a string to uppercase and returns the result
+% in \cmd{\RS@cap}.
+% \begin{Ipara}
+% Usage:~|\RS@fistcap xxxx\@nil| then |\RS@cap| $\rightarrow$ |Xxxx|
+% \end{Ipara}
+% \begin{macrocode}
+\def\RS@firstcap#1#2\@nil{%
+ \iffalse{\fi
+ \uppercase{\edef\RS@cap{\iffalse}\fi#1}#2}}%
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Reference building commands}
+%
+% \begin{macro}{\ifRS@keyactive}
+% \changes{v0.4}{2010/10/21}{Add \opt{nokeyprefix} to turn of the key prefix}
+% We need to peek into the options list for the \opt{nokeyprefix} option
+% before the options are processed to find out if the key prefix must be
+% included in the |\|\meta{key}|label| command. Make \opt{nokeyprefix}
+% not used afterwards.
+% \begin{macrocode}
+\newif\ifRS@keyactive
+\@ifpackagewith{\@currname}{nokeyprefix}%
+ {\RS@keyactivefalse}%
+ {\RS@keyactivetrue}
+\DeclareOption{nokeyprefix}{\OptionNotUsed}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\ifRSstar}
+% \begin{macro}{\ifRSnameon}
+% \begin{macro}{\ifRScapname}
+% \begin{macro}{\ifRSplural}
+% \begin{macro}{\ifRSlsttwo}
+% \changes{v0.4}{2010/10/21}{Add \cmd{\ifRSlsttwo} test for list containing only two parameter}
+% The |\if| conditional values that are set by the reference commands.
+% These values can be accessed by user defined key-values.
+% \begin{macrocode}
+\newif\ifRSstar\RSstarfalse
+\newif\ifRSnameon\RSnameontrue
+\newif\ifRScapname\RScapnamefalse
+\newif\ifRSplural\RSpluralfalse
+\newif\ifRSlsttwo\RSlsttwofalse
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\newref}
+% The main user interface for template setup. It take the |#1| or
+% \meta{key} parameter and make it lowercase before passing it on to
+% \cmd{\RS@newref}.
+%
+%
+% \begin{macrocode}
+\newcommand*{\newref}[1]{%
+ \lowercase{\def\RS@tempa{#1}}%
+ \expandafter\RS@newref\expandafter{\RS@tempa}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\RS@newref}
+% \changes{v0.4}{2010/10/21}{Ad \texttt{lsttwotxt} option}
+% This command configures a new template.
+% \begin{macrocode}
+\newcommand*{\RS@newref}[2]{%
+% \end{macrocode}
+% \bNP[2.0]\noindent Clears an existing template before defining a new one.\eNP
+% \begin{macrocode}
+ \RS@clearref{#1}%
+% \end{macrocode}
+% \bNP[2.0]\noindent Create |\ifRS@|\meta{key}|vref| conditional \eNP
+% \begin{macrocode}
+% \expandafter\newif\csname ifRS@#1vref\endcsname%
+% \end{macrocode}
+% \bNP[2.0]\noindent Creates a series of key-values for every template
+% that stores the setup for the specific template.\eNP
+% \begin{macrocode}
+ \ifRS@keyactive
+ \define@key{RS@#1}{key}[#1:]{\RS@namedef{RS@#1@key}{##1}}%
+ \else
+ \define@key{RS@#1}{key}[]{\RS@namedef{RS@#1@key}{##1}}%
+ \fi
+ \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}{lsttwotxt}[\space and~]{\RS@namedef{RS@#1@lsttwotxt}{##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}}%
+% \end{macrocode}
+% \bNP[2.0]\noindent Set default key-value parameters.\eNP
+% \begin{macrocode}
+ \RS@setkeys{RS@#1}{key,
+ s=false,
+ name,names,Name,Names,
+ rngtxt,lsttwotxt,lsttxt,
+ refcmd,
+ xr,
+ vref=false}%
+% \end{macrocode}
+% \bNP[2.0]\noindent Set key-values according to user definitions.\eNP
+% \begin{macrocode}
+ \RS@setkeys{RS@#1}{#2}%
+% \end{macrocode}
+% \bNP[2.0]\noindent Build the reference commands.\eNP
+% \begin{macrocode}
+ \RS@buildref{#1}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\RS@clearref}
+% Clear a reference template for redefinition. It check
+% if the template already exists and clear it if it does.
+%
+% \begin{macrocode}
+\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}%
+ }%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\RS@buildref}
+% Build the reference commands. See \tabref{refopt} for the list of
+% commands. The \cmd{\RS@buildref}\marg{key} build commands to
+% call \cmd{\RS@cmd}\marg{cmd}\marg{key}, for example:
+% \begin{Ipara}
+% \cmeta{key}|ref| \quad$\rightarrow$\quad
+% |{\RScapnamefalse\RS@cmd{ref}|\marg{key}|}|
+% \end{Ipara}
+% \changes{v0.2}{2003/07/30}{Remove robust def of \argcmd{{\rtp}}{label}}
+% \begin{macrocode}
+\newcommand*{\RS@buildref}[1]{%
+ \RS@firstcap#1\@nil
+ \RS@testednamedef{#1key}{\RS@nameuse{RS@#1@key}}
+ \RS@testednamedef{#1label}##1{\label{\RS@nameuse{RS@#1@key}##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}}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\RS@cmd}
+% \begin{macro}{\RS@@cmd}
+% The command \cmd{\RS@cmd}\marg{cmd}\marg{key} calls the final
+% reference formatting commands.
+% It checks for the starred form and set the conditionals
+% |\ifRSstar| and |\ifRSnameon| accordingly.
+% It also extracts the optional key-value list.
+% \begin{Itabb}
+% \hspace*{4.5cm}\=\kill
+% \cmd{\RS@cmd}|{ref}|\marg{key} \>$\rightarrow$\quad
+% |\RS@ref|\marg{key}\okeylst\\
+% \cmd{\RS@cmd}|{rangeref}|\marg{key} \>$\rightarrow$\quad
+% |\RS@rangeref|\marg{key}\okeylst\\
+% \cmd{\RS@cmd}|{pageref}|\marg{key} \>$\rightarrow$\quad
+% |\RS@pageref|\marg{key}\okeylst
+% \end{Itabb}
+% \begin{macrocode}
+\newcommand*{\RS@cmd}[2]{%
+ \@ifstar{\RSstartrue\RSnameonfalse\RS@@cmd{#1}{#2}}%
+ {\RSstarfalse\RSnameontrue\RS@@cmd{#1}{#2}}}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*{\RS@@cmd}[2]{%
+ \@ifnextchar[%
+ {\RS@nameuse{RS@#1}{#2}}%
+ {\RS@nameuse{RS@#1}{#2}[]}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \subsection{Reference formatting commands}
+%
+% \begin{macro}{\RS@ref}
+% \changes{v0.5}{2010/11/02}{Add \cmd{\@safe@activestrue} to avoid active chars is ref list}
+% \begin{macro}{\RS@@ref}
+% \begin{macro}{\RS@@@ref}
+% \changes{v0.4}{2010/10/21}{Add \cmd{\ifRSlsttwo} test for list containing only two parameter}
+% The command \cmd{\RS@ref}\marg{key}\okeylst\marg{label\_lst}
+% typeset the references to the comma-separated reference
+% label list according to the configuration for \meta{key}.
+%
+% First of all, remove all spaces for the reference label list.
+% \begin{macrocode}
+\def\RS@ref#1[#2]#3{%
+ \begingroup
+ \RS@setkeys{RS@#1}{#2}%
+ \@safe@activestrue%
+ \edef\RS@tmpa{\zap@space#3 \@empty}%
+ \@safe@activesfalse%
+ \edef\RS@tmpa{\noexpand\RS@@ref{#1} \RS@tmpa,\relax\noexpand\@eolst}%
+ \RS@tmpa%
+ \endgroup}
+% \end{macrocode}
+% \end{macro}
+% Check if there is a single or multiple references in the
+% reference label list. If a single reference label then use the
+% form set by the \opt{s} key-value. If multiple reference labels
+% the use the plural form of the name prefix.\footnote{
+% The list of reference commands came from the \pkg{typedref} package.}
+%
+% \begin{macrocode}
+\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%
+ \RSlsttwotrue%
+ \RS@@@ref{#1} #3\@eolst%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+% For more than one reference in the reference list, typeset the
+% rest of the references.
+% \begin{macrocode}
+\def\RS@@@ref#1 #2,#3\@eolst{%
+ \ifx\relax#3\relax
+ \ifRSlsttwo
+ \RS@nameuse{RS@#1@lsttwotxt}%
+ \else
+ \RS@nameuse{RS@#1@lsttxt}%
+ \fi
+ \RS@makeref{#1}{#2}%
+ \RS@makevpageref{#1}{#2}%
+ \else
+ \RSlsttwofalse%
+ \unskip,\space%
+ \RS@makeref{#1}{#2}%
+ \RS@makevpageref{#1}{#2}%
+ \RS@@@ref{#1} #3\@eolst%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\RS@rangeref}
+% The command \cmd{\RS@rangeref}\marg{key}\okeylst\marg{lbl1}\marg{lbl2}
+% typeset the references as a range.
+% \begin{macrocode}
+\def\RS@rangeref#1[#2]#3#4{%
+ \begingroup
+ \RS@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}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\RS@pageref}
+% The command \cmd{\RS@pageref}\marg{key}\okeylst\marg{lbl} type
+% the page where \marg{lbl} was defined.
+% \begin{macrocode}
+\def\RS@pageref#1[#2]#3{%
+ \begingroup%
+ \RS@setkeys{RS@#1}{#2}%
+ \RS@ifvref{#1}%
+ {\mbox{}\vpageref*{\RS@lbl{#1}{#3}}}%
+ {\reftextfaraway{\RS@lbl{#1}{#3}}}%
+ {\pageref{\RS@lbl{#1}{#3}}}%
+ \endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v0.2}{2003/07/30}{Remove redundant \cmd{\RS@label}}
+%
+% \begin{macrocode}
+\newcommand*{\RS@true}{true}
+\newcommand*{\RS@false}{false}
+\newcommand*{\RS@far}{far}
+% \end{macrocode}
+%
+% \begin{macro}{\RS@ifvref}
+% The command \cmd{\RS@ifvref}\marg{key}\marg{true}\marg{faraway}\marg{false}
+% executes the contents of \meta{true} if the \opt{vref} option for
+% the \meta{key} reference type is true and \meta{false} otherwise.
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\RS@makename}
+% The command \cmd{\RS@makename}\marg{key} build the prefix
+% to the reference commands.
+% \begin{macrocode}
+\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
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\RS@lbl}
+% This command builds the full label string for the \cmd{\ref}
+% command.
+% \begin{Ipara}
+% \cmd{\RS@lbl}\marg{key}\marg{label} \quad$\rightarrow$\quad
+% |{|\meta{xr_key}\meta{key}\meta{label}|}|
+% \end{Ipara}
+% \begin{macrocode}
+\newcommand*{\RS@lbl}[2]{%
+ \RS@nameuse{RS@#1@xr}\RS@nameuse{RS@#1@key}#2%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\RS@makeref}
+% The command \cmd{\RS@makeref}\marg{key}\marg{label} formats
+% the \cmd{\ref} output
+% \begin{Ipara}
+% \cmd{\RS@makeref}\marg{key}\marg{label} \quad$\rightarrow$\quad
+% \cmeta{rcmd}|{\ref{|\meta{xr_key}\meta{key}\meta{label}|}}|
+% \end{Ipara}
+% \begin{macrocode}
+\newcommand{\RS@makeref}[2]{%
+ \RS@nameuse{RS@#1@rcmd}{\RS@lbl{#1}{#2}}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\RS@makevpageref}
+% The command \cmd{\RS@makevpageref}\marg{key}\marg{label} adds the
+% \pkg{varioref} page reference if the \opt{vref} option is true.
+% \begin{macrocode}
+\newcommand{\RS@makevpageref}[2]{%
+ \RS@ifvref{#1}%
+ {\vpageref[\unskip]{\RS@lbl{#1}{#2}}}%
+ { \reftextfaraway{\RS@lbl{#1}{#2}}}%
+ {}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\RS@makevpagerefrange}
+% The command \cmd{\RS@makevpagerefrange}\marg{key}\marg{lbl1}\marg{lbl1}
+% adds the \pkg{varioref} page range reference if the \opt{vref}
+% option is true.
+% \begin{macrocode}
+\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}}}%
+ {}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{\pkg{varioref} command predefinitions}
+%
+% \begin{macrocode}
+\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}}
+ }
+% \end{macrocode}
+%
+%
+% \subsection{Support for language option inclusions in config file}
+%
+% \begin{macro}{\RSaddto}
+% \changes{v0.2}{2003/07/30}{Rename \cmd{\RS@addto} to \cmd{\RSaddto}}
+% Command from the \pkg{varioref} package is used to add
+% language definitions to the |\extras|\meta{language} token
+% for \pkg{babel}.
+% \begin{macrocode}
+\def\RSaddto#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}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareLangOpt}
+% \changes{v0.5}{2010/11/02}{Add \cmd{\extras}\meta{language} to beginning of document.}
+% Command to declare a language option and add
+% language definitions to the |\extras|\meta{language} token
+% for \pkg{babel}.
+% \begin{macrocode}
+\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}{%
+ \AtBeginDocument{\expandafter\RSaddto\csname extras#1\endcsname #2}}}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Configuration files}
+%
+% \begin{macro}{\RS@cfgfile,\RS@reffile}
+% \changes{v0.4}{2010/10/21}{Ad alternative definition file \cmd{refstyle.def}}
+% Define the config file and alternate definition file names.
+% \begin{macrocode}
+\newcommand*{\RS@cfgfile}{refstyle.cfg}
+\newcommand*{\RS@reffile}{refstyle.def}
+% \end{macrocode}
+% \end{macro}
+%
+% 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
+% \cmd{\ProcessOptions}. Make \opt{noconfig} not used
+% afterwards.
+%
+% We first test for a local config file \file{refstyle.def}
+% and then for the global config file \file{refstyle.cfg}.
+% \begin{macrocode}
+\@ifpackagewith{\@currname}{noconfig}%
+ {\PackageInfo{\RS@pkgname}{No config file loaded}}%
+ {\InputIfFileExists{\RS@reffile}%
+ {\PackageInfo{\RS@pkgname}{Local config file \RS@reffile\space used}}
+ {\InputIfFileExists{\RS@cfgfile}%
+ {\PackageInfo{\RS@pkgname}{Config file \RS@cfgfile\space used}}%
+ {\PackageInfo{\RS@pkgname}{No config file found}}}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareOption{noconfig}{\OptionNotUsed}%
+% \end{macrocode}
+%
+% Process the options, including options in config file.
+% \begin{macrocode}
+\ProcessOptions*\relax
+% \end{macrocode}
+%
+% The end of this package.
+% \begin{macrocode}
+%</pkg>
+% \end{macrocode}
+%
+% \Finale
+\endinput
diff --git a/macros/latex/contrib/refstyle/refstyle.ins b/macros/latex/contrib/refstyle/refstyle.ins
index ced9ef9722..5d69497509 100644
--- a/macros/latex/contrib/refstyle/refstyle.ins
+++ b/macros/latex/contrib/refstyle/refstyle.ins
@@ -1,97 +1,92 @@
-% refstyle.ins
-% Copyright (C) 2002--2010 Danie Els
-%
-% -------------------------------------------------------------------
-% The refstyle package
-% for the formatting of references
-% -------------------------------------------------------------------
-% This work may be distributed and/or modified under the conditions
-% of the LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later.
-%
-% This work is "maintained" (as per LPPL maintenance status)
-% by Danie Els (dnjels@sun.ac.za).
-%
-% This package consists of the files: refstyle.dtx
-% refconfig.dtx
-% refstyle.ins
-% and the derived files: refstyle.sty
-% refstyle.cfg
-% -------------------------------------------------------------------
-% This file will generate fast loadable files and documentation
-% driver files from the doc files in this package when run through
-% LaTeX or TeX.
-% -------------------------------------------------------------------
-
-\def\batchfile{refstyle.ins}
-\def\filedate{2010/10/21}
-\input docstrip.tex
-\keepsilent
-
-\declarepreamble\package
-
-Copyright (C) 2002--2010 Danie Els
-
--------------------------------------------------------------------
- The refstyle package
- for the formatting of references
--------------------------------------------------------------------
-This work may be distributed and/or modified under the conditions
-of the LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX
-version 2005/12/01 or later.
-
-This work is "maintained" (as per LPPL maintenance status)
-by Danie Els (dnjels@sun.ac.za).
--------------------------------------------------------------------
-
-\endpreamble
-
-\generate{%
- \askforoverwritefalse
- \usepreamble\package
- \file{refstyle.sty}{\from{refstyle.dtx}{pkg}}}
-
-
-
-
-\declarepreamble\config
-
--------------------------------------------------------------------
- The refstyle package
- for the formatting of references
--------------------------------------------------------------------
-This file may be customized to suit specific user requirements.
-
-Original by Danie Els <dnjels@sun.ac.za>
--------------------------------------------------------------------
-
-\endpreamble
-\generate{%
- \askforoverwritefalse
- \usepreamble\config
- \file{refstyle.cfg}{\from{refconfig.dtx}{cfg}}}
-
-
-\obeyspaces
-\Msg{**********************************************************}
-\Msg{* *}
-\Msg{* To finish the installation you have to move the *}
-\Msg{* following files into a directory searched by TeX: *}
-\Msg{* *}
-\Msg{* refstyle.sty *}
-\Msg{* refstyle.cfg *}
-\Msg{* *}
-\Msg{* To produce the documentation run the file ustitle.dtx *}
-\Msg{* through LaTeX. *}
-\Msg{* *}
-\Msg{* Happy TeXing! *}
-\Msg{**********************************************************}
-\endbatchfile
+% refstyle.ins
+% Copyright (C) 2002--2024 Danie Els
+%
+% -------------------------------------------------------------------
+% The refstyle package
+% for the formatting of references
+% -------------------------------------------------------------------
+% This work may be distributed and/or modified under the conditions
+% of the LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX
+% version 2008/12/01 or later.
+%
+% This work has the LPPL maintenance status 'maintained'.
+%
+% This Current Maintainer of this work is Danie Els (dnjels@gmail.com)
+%
+% This package consists of the files: refstyle.dtx
+% refconfig.dtx
+% refstyle.ins
+% and the derived files: refstyle.sty
+% refstyle.cfg
+% -------------------------------------------------------------------
+
+\def\batchfile{refstyle.ins}
+\def\filedate{2024/01/31}
+\input docstrip.tex
+\keepsilent
+
+\declarepreamble\package
+
+Copyright (C) 2002--2024 Danie Els
+
+-------------------------------------------------------------------
+ The refstyle package
+ for the formatting of references
+-------------------------------------------------------------------
+This work may be distributed and/or modified under the conditions
+of the LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX
+version 2008/12/01 or later.
+
+This work has the LPPL maintenance status 'maintained'.
+
+This Current Maintainer of this work is Danie Els (dnjels@gmail.com)
+-------------------------------------------------------------------
+
+\endpreamble
+
+\generate{%
+ \askforoverwritefalse
+ \usepreamble\package
+ \file{refstyle.sty}{\from{refstyle.dtx}{pkg}}}
+
+
+\declarepreamble\config
+
+-------------------------------------------------------------------
+ The refstyle package
+ for the formatting of references
+-------------------------------------------------------------------
+This file may be customized to suit specific user requirements.
+
+Original by Danie Els (dnjels@gmail.com)
+-------------------------------------------------------------------
+
+\endpreamble
+\generate{%
+ \askforoverwritefalse
+ \usepreamble\config
+ \file{refstyle.cfg}{\from{refconfig.dtx}{cfg}}}
+
+
+\obeyspaces
+\Msg{*************************************************************}
+\Msg{* To finish the installation you have to move the *}
+\Msg{* following files into a directory searched by TeX: *}
+\Msg{* refstyle.sty *}
+\Msg{* refstyle.cfg *}
+\Msg{* *}
+\Msg{* To produce the documentation run through LaTeX the files: *}
+\Msg{* refstyle.dtx *}
+\Msg{* refconfig.dtx *}
+\Msg{* *}
+\Msg{* Happy TeXing! *}
+\Msg{*************************************************************}
+\endbatchfile
diff --git a/macros/latex/contrib/refstyle/refstyle.pdf b/macros/latex/contrib/refstyle/refstyle.pdf
index 0e94b7db28..a7bc463295 100644
--- a/macros/latex/contrib/refstyle/refstyle.pdf
+++ b/macros/latex/contrib/refstyle/refstyle.pdf
Binary files differ
diff --git a/macros/latex/contrib/refstyle/refstyle.sty b/macros/latex/contrib/refstyle/refstyle.sty
deleted file mode 100644
index 11f0c3606b..0000000000
--- a/macros/latex/contrib/refstyle/refstyle.sty
+++ /dev/null
@@ -1,327 +0,0 @@
-%%
-%% This is file `refstyle.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% refstyle.dtx (with options: `pkg')
-%%
-%% Copyright (C) 2002--2010 Danie Els
-%%
-%% -------------------------------------------------------------------
-%% The refstyle package
-%% for the formatting of references
-%% -------------------------------------------------------------------
-%% This work may be distributed and/or modified under the conditions
-%% of the LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX
-%% version 2005/12/01 or later.
-%%
-%% This work is "maintained" (as per LPPL maintenance status)
-%% by Danie Els (dnjels@sun.ac.za).
-%% -------------------------------------------------------------------
-%%
-\newcommand*{\RefstyleFileDate}{2010/11/02}
-\newcommand*{\RefstyleFileVersion}{v0.5}
-
-\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-\ProvidesPackage{refstyle}[\RefstyleFileDate\space
- \RefstyleFileVersion\space
- Reference formatting (DNJ Els)]
-\newcommand*{\RS@pkgname}{refstyle}
-\RequirePackage{keyval}
-\def\RS@setkeys#1#2{%
- \def\KV@prefix{KV@#1@}%
- \let\@tempc\relax
- \KV@do#2,\relax,}
-\@ifundefined{vref@space}{\let\vref@space\space}{}
-\providecommand*{\@safe@activestrue}{}
-\providecommand*{\@safe@activesfalse}{}
-\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\ifRS@keyactive
-\@ifpackagewith{\@currname}{nokeyprefix}%
- {\RS@keyactivefalse}%
- {\RS@keyactivetrue}
-\DeclareOption{nokeyprefix}{\OptionNotUsed}
-\newif\ifRSstar\RSstarfalse
-\newif\ifRSnameon\RSnameontrue
-\newif\ifRScapname\RScapnamefalse
-\newif\ifRSplural\RSpluralfalse
-\newif\ifRSlsttwo\RSlsttwofalse
-\newcommand*{\newref}[1]{%
- \lowercase{\def\RS@tempa{#1}}%
- \expandafter\RS@newref\expandafter{\RS@tempa}}
-\newcommand*{\RS@newref}[2]{%
- \RS@clearref{#1}%
- \ifRS@keyactive
- \define@key{RS@#1}{key}[#1:]{\RS@namedef{RS@#1@key}{##1}}%
- \else
- \define@key{RS@#1}{key}[]{\RS@namedef{RS@#1@key}{##1}}%
- \fi
- \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}{lsttwotxt}[\space and~]{\RS@namedef{RS@#1@lsttwotxt}{##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}}%
- \RS@setkeys{RS@#1}{key,
- s=false,
- name,names,Name,Names,
- rngtxt,lsttwotxt,lsttxt,
- refcmd,
- xr,
- vref=false}%
- \RS@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@testednamedef{#1label}##1{\label{\RS@nameuse{RS@#1@key}##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
- \RS@setkeys{RS@#1}{#2}%
- \@safe@activestrue%
- \edef\RS@tmpa{\zap@space#3 \@empty}%
- \@safe@activesfalse%
- \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%
- \RSlsttwotrue%
- \RS@@@ref{#1} #3\@eolst%
- \fi}
-\def\RS@@@ref#1 #2,#3\@eolst{%
- \ifx\relax#3\relax
- \ifRSlsttwo
- \RS@nameuse{RS@#1@lsttwotxt}%
- \else
- \RS@nameuse{RS@#1@lsttxt}%
- \fi
- \RS@makeref{#1}{#2}%
- \RS@makevpageref{#1}{#2}%
- \else
- \RSlsttwofalse%
- \unskip,\space%
- \RS@makeref{#1}{#2}%
- \RS@makevpageref{#1}{#2}%
- \RS@@@ref{#1} #3\@eolst%
- \fi}
-\def\RS@rangeref#1[#2]#3#4{%
- \begingroup
- \RS@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%
- \RS@setkeys{RS@#1}{#2}%
- \RS@ifvref{#1}%
- {\mbox{}\vpageref*{\RS@lbl{#1}{#3}}}%
- {\reftextfaraway{\RS@lbl{#1}{#3}}}%
- {\pageref{\RS@lbl{#1}{#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\RSaddto#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}{%
- \AtBeginDocument{\expandafter\RSaddto\csname extras#1\endcsname #2}}}%
- }
-\newcommand*{\RS@cfgfile}{refstyle.cfg}
-\newcommand*{\RS@reffile}{refstyle.def}
-\@ifpackagewith{\@currname}{noconfig}%
- {\PackageInfo{\RS@pkgname}{No config file loaded}}%
- {\InputIfFileExists{\RS@reffile}%
- {\PackageInfo{\RS@pkgname}{Local config file \RS@reffile\space used}}
- {\InputIfFileExists{\RS@cfgfile}%
- {\PackageInfo{\RS@pkgname}{Config file \RS@cfgfile\space used}}%
- {\PackageInfo{\RS@pkgname}{No config file found}}}}
-\DeclareOption{noconfig}{\OptionNotUsed}%
-\ProcessOptions*\relax
-\endinput
-%%
-%% End of file `refstyle.sty'.
diff --git a/macros/latex/contrib/schooldocs/schooldocs-examples.pdf b/macros/latex/contrib/schooldocs/schooldocs-examples.pdf
index e4277bbdbe..1d653303b0 100644
--- a/macros/latex/contrib/schooldocs/schooldocs-examples.pdf
+++ b/macros/latex/contrib/schooldocs/schooldocs-examples.pdf
Binary files differ
diff --git a/macros/latex/contrib/schooldocs/schooldocs-examples.tex b/macros/latex/contrib/schooldocs/schooldocs-examples.tex
new file mode 100644
index 0000000000..0c35f10b7a
--- /dev/null
+++ b/macros/latex/contrib/schooldocs/schooldocs-examples.tex
@@ -0,0 +1,327 @@
+
+\documentclass[a4paper,11pt]{article}
+
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage[english]{babel}
+\usepackage{times,lmodern,charter}
+\usepackage{schooldocs}
+\usepackage{enumerate}
+\usepackage{multicol}
+\usepackage{centeredline}
+\usepackage{hyperref}
+\usepackage{lipsum}
+
+\definecolor{darkbrown}{rgb}{0.5,0.1,0.1}
+
+\pagestyle{collection}
+\title{The schooldocs package}
+\subject{Example file for titles and styles}
+\author{Antoine Missier}
+\institute{Royal College of Pataphysics}
+\date{December 28, 2023}
+\renewcommand{\titlestyle}{\Huge} %\sffamily
+\hypersetup{colorlinks, linkcolor=blue}
+%\setcounter{tocdepth}{0}
+
+\begin{document}
+
+\maketitle
+
+On the following pages we showcase various title formatting options
+and the different styles.
+This initial page has been created using the \textbf{collection} style, for which
+the main title style has been redefined through
+\verb|\renewcommand{\titlestyle}{\Huge}|.
+
+
+\medskip
+In most examples (dated may 4, 2020), we have utilized
+the \textsf{lmodern} package font, which pairs well with a sans-serif title style.
+To achieve this, simply redefine the title style using
+\smallskip
+\centeredline{\verb|\renewcommand\titelstyle{\LARGE\bfseries\sffamily}|.}
+
+\smallskip
+For examples dated january 25 or december 28, 2023, we have opted
+for the \textsf{charter}, or \textsf{times} fonts.
+For these fonts, the default title style setting
+\verb|\LARGE\bfseries| is suitable.
+
+
+\seprule
+
+\begin{center} \Large \color{darkbrown}
+\bfseries Table of contents
+\end{center}
+
+\bigskip
+
+\begin{multicols}{2}
+\begin{enumerate}[\bfseries 1.]
+ \item \hyperlink{schooldocs-example-center}{\bfseries The standard title}
+ \item \hyperlink{schooldocs-example-left}{\bfseries A left-aligned title}
+ \item \hyperlink{schooldocs-example-right}{\bfseries A right-aligned title}
+ \item \hyperlink{schooldocs-example-norule}{\bfseries
+ The standard title without rule}
+ \item \hyperlink{schooldocs-example-boxed}{\bfseries A title in boxed shape}
+ \item \hyperlink{schooldocs-example-seprule}{\bfseries
+ The \texttt{\textbackslash seprule} and \texttt{\textbackslash correct} macros}
+ \item \hyperlink{schooldocs-example-small}{\bfseries A ``small'' title}
+ \item \hyperlink{schooldocs-example-classic}{\bfseries The classic style layout}
+ \item \hyperlink{schooldocs-example-elegant}{\bfseries The elegant style layout}
+ \item \hyperlink{schooldocs-example-modern}{\bfseries The modern style layout}
+ \item \hyperlink{schooldocs-example-soft}{\bfseries The soft style layout}
+ \item \hyperlink{schooldocs-example-exam}{\bfseries The exam style layout}
+ \item \hyperlink{schooldocs-example-examcorrect}{\bfseries
+ Exam style with the \texttt{\textbackslash correct} macro}
+ \item \hyperlink{schooldocs-example-collection}{\bfseries The collection style layout}
+ \item \hyperlink{schooldocs-example-identity}{\bfseries
+ The identity style in collection}
+ \item \hyperlink{schooldocs-example-small-identity}{\bfseries
+ A ``small'' title with identity}
+ \item \hyperlink{schooldocs-example-modern-small-identity}{\bfseries
+ Small title, identity and modern style}
+ \item \hyperlink{schooldocs-example-left-identity}{\bfseries
+ A left-aligned title with identity}
+\end{enumerate}
+\end{multicols}
+
+\newpage
+\hypertarget{schooldocs-example-center}{}
+\addcontentsline{toc}{section}{The standard title}
+
+\fontfamily{lmr}\selectfont
+\pagestyle{empty}
+\lfoot{}
+\cfoot{}
+\rfoot{}
+\renewcommand{\subjectstyle}{}
+\renewcommand{\authorstyle}{}
+\renewcommand{\datestyle}{}
+\renewcommand{\titlestyle}{\LARGE\bfseries\sffamily}
+\renewcommand\subjectstyle{\large}
+\setlength{\titletopskip}{-1.32cm}
+\setlength\titlesep{2\medskipamount}
+\schooldocstitles
+\title{The standard title}
+\subject[Pathography / M2A]{Pathography / Master 2A}
+\date{May 4, 2020}
+
+\maketitle
+\lipsum[1]
+
+\newpage
+\hypertarget{schooldocs-example-left}{}
+\addcontentsline{toc}{section}{A left-aligned title}
+
+\renewcommand{\titleflush}{flushleft}
+\title{A left-aligned title}
+\maketitle
+\lipsum[1]
+
+\newpage
+\hypertarget{schooldocs-example-right}{}
+
+\renewcommand{\titleflush}{flushright}
+\title{A right-aligned title}
+\maketitle
+\lipsum[1]
+
+\newpage
+\hypertarget{schooldocs-example-norule}{}
+
+\renewcommand{\titleflush}{center}
+\title{The standard title without rule}
+\maketitle[0pt]
+\lipsum[1]
+
+\newpage
+\hypertarget{schooldocs-example-boxed}{}
+
+\renewcommand{\titlestyle}{\LARGE\sffamily\bfseries\boxedshape}
+\title{A title in boxed shape}
+\maketitle
+\lipsum[1]
+
+\newpage
+\hypertarget{schooldocs-example-seprule}{}
+
+\renewcommand{\titlestyle}{\LARGE\bfseries\sffamily}
+\title{The \textbackslash seprule and \textbackslash correct macros}
+\correct
+\maketitle
+\lipsum[1]\seprule\lipsum[2]\seprule\lipsum[3]
+
+\newpage
+\hypertarget{schooldocs-example-small}{}
+
+\fontfamily{bch}\selectfont
+\title{A ``small'' title}
+\date{January 25, 2023}
+\makesmalltitle
+\lipsum[1]
+
+\newpage
+\hypertarget{schooldocs-example-classic}{}
+
+\fontfamily{lmr}\selectfont
+\setcounter{page}{1}
+\pagestyle{classic}
+\title[The classic style]{The classic style layout}
+\date{May 4, 2020}
+\maketitle
+\section*{Pellentesque a nulla}
+\lipsum[1-3]
+\section*{Vestibulum lectus}
+\lipsum[5-9]
+
+\newpage
+\hypertarget{schooldocs-example-elegant}{}
+
+\setcounter{page}{1}
+\setcounter{section}{0}
+\addtolength{\headheight}{-\baselineskip}
+\pagestyle{elegant}
+\title[The elegant style]{The elegant style layout}
+\schooldocstitles
+\maketitle
+\section*{Pellentesque a nulla}
+\lipsum[1-3]
+\section*{Vestibulum lectus}
+\lipsum[5-9]
+
+\newpage
+\hypertarget{schooldocs-example-modern}{}
+
+\setcounter{page}{1}
+\setcounter{section}{0}
+\renewcommand{\headrulewidth}{0.4pt}
+\pagestyle{modern}
+\title[The modern style]{The modern style layout}
+\maketitle
+\section*{Pellentesque a nulla}
+\lipsum[1-3]
+\section*{Vestibulum lectus}
+\lipsum[5-9]
+
+\newpage
+\hypertarget{schooldocs-example-soft}{}
+
+\setcounter{page}{1}
+\setcounter{section}{0}
+\pagestyle{soft}
+\title[The soft style]{The soft style layout}
+\maketitle
+\section*{Pellentesque a nulla}
+\lipsum[1-3]
+\section*{Vestibulum lectus}
+\lipsum[5-9]
+
+\newpage
+\hypertarget{schooldocs-example-exam}{}
+
+\setcounter{page}{1}
+\setcounter{section}{0}
+\fontfamily{ptm}\selectfont
+\pagestyle{exam}
+\title[The exam style]{The exam style layout}
+\date{December 28, 2023}
+\subtitle{Duration of the test: 2\,h}
+\maketitle
+\section*{Pellentesque a nulla}
+\lipsum[1-3]
+\section*{Vestibulum lectus}
+\lipsum[5-9]
+
+\newpage
+\hypertarget{schooldocs-example-examcorrect}{}
+
+\setcounter{page}{1}
+\setcounter{section}{0}
+\correct
+\maketitle
+\section*{Pellentesque a nulla}
+\lipsum[1-3]
+\section*{Vestibulum lectus}
+\lipsum[5-9]
+
+\newpage
+\hypertarget{schooldocs-example-collection}{}
+
+\setcounter{page}{1}
+\setcounter{section}{0}
+\fontfamily{bch}\selectfont
+\pagestyle{collection}
+\title[The collection style]{The collection style layout}
+\date{December 28, 2023}
+\subtitle{Duration of the test: 2\,h}
+\maketitle
+\section*{Ultrices bibendum}
+\lipsum
+\lipsum[1-3]
+\section*{Etiam facilisis}
+\lipsum[1-5]
+
+\newpage
+\hypertarget{schooldocs-example-identity}{}
+
+\thispagestyle{identity}
+Here we present a single page with the \textbf{identity} style
+within a document using the collection style.
+\par\medskip
+\textbf{Question:} Analyze the previous text and provide a written summary of its content.
+
+\newpage
+\lfoot{}
+\cfoot{\thepage}
+\rfoot{}
+\renewcommand{\subjectstyle}{}
+\renewcommand{\authorstyle}{}
+\renewcommand{\datestyle}{}
+\hypertarget{schooldocs-example-small-identity}{}
+
+\setcounter{page}{1}
+\renewcommand{\titlestyle}{\LARGE\bfseries}
+\renewcommand\subjectstyle{\large}
+\renewcommand{\headrulewidth}{0pt}
+\setlength{\titletopskip}{-1.32cm}
+\setlength\titlesep{2\medskipamount}
+\title{A ``small'' title}
+\date{January 25, 2023}
+\thispagestyle{identity}
+\schooldocstitles
+\makesmalltitle
+\lipsum[1]
+
+\newpage
+\hypertarget{schooldocs-example-modern-small-identity}{}
+
+\setcounter{page}{1}
+\setcounter{section}{0}
+\title[The modern style]{The modern style layout}
+\pagestyle{modern}
+\thispagestyle{identity}
+\makesmalltitle
+\section*{Pellentesque a nulla}
+\lipsum[1-3]
+\section*{Vestibulum lectus}
+\lipsum[5-6]
+
+\newpage
+\hypertarget{schooldocs-example-left-identity}{}
+
+\setcounter{page}{1}
+\lfoot{}
+\cfoot{}
+\rfoot{}
+\renewcommand{\titleflush}{flushleft}
+\title{A left-aligned title}
+\pagestyle{empty}
+\thispagestyle{identity}
+\schooldocstitles
+\maketitle
+\lipsum[1]
+
+\setcounter{page}{2} % for the lastpage field in headers or footers
+\end{document}
diff --git a/macros/latex/contrib/schooldocs/schooldocs.dtx b/macros/latex/contrib/schooldocs/schooldocs.dtx
index d1cd9a484b..4b1f1c451e 100644
--- a/macros/latex/contrib/schooldocs/schooldocs.dtx
+++ b/macros/latex/contrib/schooldocs/schooldocs.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2020-2023 by Antoine Missier <antoine.missier@ac-toulouse.fr>
+% Copyright (C) 2020-2024 by Antoine Missier <antoine.missier@ac-toulouse.fr>
% ----------------------------------------------------------------------
%
% This file may be distributed and/or modified under the
@@ -22,7 +22,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
%<package>\ProvidesPackage{schooldocs}
%<*package>
- [2023/12/28 v1.4 .dtx Layout styles for school documents]
+ [2024/01/31 v1.5 .dtx Layout styles for school documents]
%</package>
%
%<*driver>
@@ -80,7 +80,7 @@
%</driver>
% \fi
%
-% \CheckSum{805}
+% \CheckSum{863}
%
% \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
@@ -110,11 +110,15 @@
% - sffamily discarded from the default titlestyle
% - smalltitletopskip changed from -2.0cm to -1.32cm}
% \changes{v1.2}{2023/01/24}{
-% Small changes in the documentation (charter font is now used)
+% - Small changes in the documentation (charter font is now used)
% and the examples file (with several fonts)}
% \changes{v1.3}{2023/08/28}{English corrections in the documentation}
% \changes{v1.4}{2023/12/28}{
-% headtitlestyle in exam and collection styles set to scshape instead of MakeUppercase}
+% - Headtitlestyle in exam and collection styles set to scshape instead of MakeUppercase}
+% \changes{v1.5}{2024/01/30}{
+% - Possibility to call maketitle several times with different information fields
+% that can be changed outside the preamble
+% - The schooldocs-examples.pdf file is now generated in a single compilation}
%
% \GetFileInfo{schooldocs.dtx}
%
@@ -675,20 +679,30 @@
% \medskip
% \subsection{Information fields}
%
+% The PDF information fields are automatically filled in using the information macros,
+% but this only works in the preamble, hence the test |\ifx@onlypreamble@notprerr|.
+% This allows using these macros outside the preamble, which is the normal behavior
+% for |\title|, |\date|, |\author|, etc. with the 'article' class.
+%
% Once defined, information fields are initially set to empty
% to ensure that tests for empty fields work correctly.
+
%
% \begin{macrocode}
\renewcommand{\title}[2][]{\long\def\@title{#2}
\ifthenelse{\equal{#1}{}}{\def\@headtitle{#2}}{\def\@headtitle{#1}}
- \@ifpackageloaded{hyperref}{\hypersetup{pdftitle={\@headtitle}}}{}
+ \ifx\@onlypreamble\@notprerr\else
+ \@ifpackageloaded{hyperref}{\hypersetup{pdftitle={\@headtitle}}}{}
+ \fi
}
\title{}
\author{}
\newcommand\school[1]{\long\def\@school{#1}
- \@ifpackageloaded{hyperref}{
- \hypersetup{pdfauthor={\@author\ (\@school)}}}{}
+ \ifx\@onlypreamble\@notprerr\else
+ \@ifpackageloaded{hyperref}{
+ \hypersetup{pdfauthor={\@author\ (\@school)}}}{}
+ \fi
}
\school{}
\newcommand{\institute}{\school}
@@ -696,7 +710,9 @@
\let\subject\relax
\newcommand{\subject}[2][]{\long\def\@subject{#2}
\ifthenelse{\equal{#1}{}}{\def\@headsubject{#2}}{\def\@headsubject{#1}}
- \@ifpackageloaded{hyperref}{\hypersetup{pdfsubject={\@headsubject}}}{}
+ \ifx\@onlypreamble\@notprerr\else
+ \@ifpackageloaded{hyperref}{\hypersetup{pdfsubject={\@headsubject}}}{}
+ \fi
}
\def\@subject{}
\def\@headsubject{}
@@ -764,55 +780,64 @@
%
% \subsection{Title composition}
%
+% The first macro, |\schooldocstitles|, aims to define the default composition of titles.
+% Several styles redefine their own title composition.
+% This macro allows, when using |\maketitle| multiple times at different places
+% in the document, to revert to the default definition when a style has modified
+% the title definition.
% \begin{macrocode}
-\renewcommand{\maketitle}[1][\seprulelength]{
- \mbox{}\par\vspace{\titletopskip}
- \begin{\titleflush}
- {\color{titlecolor}
- {\titlestyle{\@title}}
- \ifx\@subject\@empty\else
- \par\vspace{\titlesep}\subjectstyle\@subject
- \fi
- \ifthenelse{\equal{\@date}{}}{}{%
- \par\vspace{0.5\titlesep} \datestyle\@date}
- \par\vspace{0.5\titlesep}
- }
- \ifthenelse{\lengthtest{#1 > 0cm}}{\rule{#1}{\seprulewidth}}{}
- \end{\titleflush}
- \vspace{\titlebottomskip}
-}
+\newcommand{\schooldocstitles}{
+ \renewcommand{\maketitle}[1][\seprulelength]{
+ \newpage\mbox{}\par\vspace{\titletopskip}
+ \begin{\titleflush}
+ {\color{titlecolor}
+ {\titlestyle{\@title}}
+ \ifx\@subject\@empty\else
+ \par\vspace{\titlesep}\subjectstyle\@subject
+ \fi
+ \ifthenelse{\equal{\@date}{}}{}{%
+ \par\vspace{0.5\titlesep} \datestyle\@date}
+ \par\vspace{0.5\titlesep}
+ }
+ \ifthenelse{\lengthtest{##1 > 0cm}}{\rule{##1}{\seprulewidth}}{}
+ \end{\titleflush}
+ \vspace{\titlebottomskip}
+ }
-\newcommand{\makesmalltitle}{
- \mbox{}\par\vspace{\smalltitletopskip}
- \begin{center}
- {\color{titlecolor}
- {\titlestyle{\@title}}
- \hfill \subjectstyle\@subject
- \ifthenelse{\equal{\@date}{}}{}{%
- \enskip --\enskip \smalltitledatestyle\@date}
- }
- \rule{\linewidth}{\seprulewidth}
- \end{center}
- \vspace{\titlebottomskip}
-}
+ \let\makesmalltitle\relax
+ \newcommand{\makesmalltitle}{
+ \newpage\mbox{}\par\vspace{\smalltitletopskip}
+ \begin{center}
+ {\color{titlecolor}
+ {\titlestyle{\@title}}
+ \hfill \subjectstyle\@subject
+ \ifthenelse{\equal{\@date}{}}{}{%
+ \enskip --\enskip \smalltitledatestyle\@date}
+ }
+ \rule{\linewidth}{\seprulewidth}
+ \end{center}
+ \vspace{\titlebottomskip}
+ }
-\newcommand\correct{%
- \let\@originalheadtitle\@headtitle
- \def\@headtitle{\@originalheadtitle ~--~\correctname}
- \@ifpackageloaded{hyperref}{%
- \AtBeginDocument{\hypersetup{pdftitle={\@headtitle}}}}{}
- \let\@originaltitle\@title
- \def\@title{\@originaltitle ~--~\correctname}
+ \let\correct\relax
+ \newcommand\correct{%
+ \let\@originalheadtitle\@headtitle
+ \def\@headtitle{\@originalheadtitle ~--~\correctname}
+ \ifx\@onlypreamble\@notprerr\else
+ \@ifpackageloaded{hyperref}{%
+ \AtBeginDocument{\hypersetup{pdftitle={\@headtitle}}}}{}
+ \fi
+ \let\@originaltitle\@title
+ \def\@title{\@originaltitle ~--~\correctname}
+ }
}
+\schooldocstitles
\newcommand{\seprule}[1][\seprulelength]{\begin{center}
\raisebox{0.25\baselineskip}{\rule{#1}{\seprulewidth}}\end{center}}
% \end{macrocode}
-% The use of |\AtBeginDocument| is necessary in the |\correct| macro because
-% |\correctname| could be redefined by \textsf{babel} at |\begin{document}|.
%
-% \bigskip
% \subsection{Basic styles}
%
% In the \textbf{classic} style, the header is displayed on two lines,
@@ -832,7 +857,7 @@
\cfoot{\footstyle \thepage /\pageref{LastPage}}
\setlength{\titletopskip}{-0.67cm}
\renewcommand{\maketitle}[1][\seprulelength]{%
- \mbox{}\par\vspace{\titletopskip}
+ \newpage\mbox{}\par\vspace{\titletopskip}
\begin{\titleflush}
{\color{titlecolor}\titlestyle{\@title}}
\par\vspace{0.5\titlesep}
@@ -841,7 +866,7 @@
\vspace{\titlebottomskip}
}
\renewcommand{\makesmalltitle}{
- \mbox{}\par\vspace{\smalltitletopskip}
+ \newpage\mbox{}\par\vspace{\smalltitletopskip}
\begin{center}
{\color{titlecolor}
{\titlestyle{\@title}}
@@ -879,7 +904,7 @@
\headdatestyle\@date\ignorespaces}{}
}
\renewcommand{\maketitle}[1][\seprulelength]{%
- \mbox{}\par\vspace{\titletopskip}
+ \newpage\mbox{}\par\vspace{\titletopskip}
\begin{\titleflush}
{\color{titlecolor}
{\titlestyle{\@title}}
@@ -893,7 +918,7 @@
\vspace{\titlebottomskip}
}
\renewcommand{\makesmalltitle}{
- \mbox{}\par\vspace{\smalltitletopskip}
+ \newpage\mbox{}\par\vspace{\smalltitletopskip}
\begin{center}
{\color{titlecolor}
{\titlestyle{\@title}}
@@ -922,7 +947,7 @@
}
\setlength{\titletopskip}{-0.67cm}
\renewcommand{\maketitle}[1][\seprulelength]{%
- \mbox{}\par\vspace{\titletopskip}
+ \newpage\mbox{}\par\vspace{\titletopskip}
\begin{\titleflush}
{\color{titlecolor}\titlestyle{\@title}}
\par\vspace{0.5\titlesep}
@@ -931,7 +956,7 @@
\vspace{\titlebottomskip}
}
\renewcommand{\makesmalltitle}{
- \mbox{}\par\vspace{\smalltitletopskip}
+ \newpage\mbox{}\par\vspace{\smalltitletopskip}
\begin{center}
{\color{titlecolor}
{\titlestyle{\@title}}
@@ -973,18 +998,22 @@
\setlength{\titlesep}{2\bigskipamount}
\renewcommand{\titlestyle}{\LARGE\MakeUppercase}
\renewcommand{\subjectstyle}{\Large\bfseries}
+ \let\subtitlestyle\relax
\newcommand{\subtitlestyle}{\large\slshape}
+ \let\titlecorrectstyle\relax
\newcommand*{\titlecorrectstyle}{\color{red}\large\scshape}
\renewcommand\correct{%
\let\@originalheadtitle\@headtitle
\def\@headtitle{\@originalheadtitle ~--~\correctname}
- \@ifpackageloaded{hyperref}{%
- \AtBeginDocument{\hypersetup{pdftitle={\@headtitle}}}}{}
+ \ifx\@onlypreamble\@notprerr\else
+ \@ifpackageloaded{hyperref}{%
+ \AtBeginDocument{\hypersetup{pdftitle={\@headtitle}}}}{}
+ \fi
\renewcommand{\subtitlestyle}{\titlecorrectstyle}
\subtitle{\correctname}
}
\renewcommand{\maketitle}[1][\seprulelength]{%
- \mbox{}\par\vspace{\titletopskip}
+ \newpage\mbox{}\par\vspace{\titletopskip}
\begin{center}
{\color{titlecolor}
{\titlestyle{\@title}}
@@ -1004,7 +1033,11 @@
\fancypagestyle{collection}{%
\lhead{\headstyle\headtitlestyle\@headtitle}
- \AtBeginDocument{\renewcommand{\sectionmark}[1]{\markboth{##1}{}}}
+ \ifx\@onlypreamble\@notprerr
+ \renewcommand{\sectionmark}[1]{\markboth{##1}{}}
+ \else
+ \AtBeginDocument{\renewcommand{\sectionmark}[1]{\markboth{##1}{}}}
+ \fi
\rhead{\headstyle\headsubjectstyle\leftmark} %\@section
\lfoot{\footstyle\schoolstyle \@school}
\cfoot{}
@@ -1017,7 +1050,7 @@
\renewcommand{\datestyle}{\Large}
\renewcommand{\maketitle}[1][\seprulelength]{%
\thispagestyle{empty}
- \mbox{}\par\vspace{\titletopskip}
+ \newpage\mbox{}\par\vspace{\titletopskip}
\begin{center}
{\color{titlecolor}
{\titlestyle{\@title}}
diff --git a/macros/latex/contrib/schooldocs/schooldocs.ins b/macros/latex/contrib/schooldocs/schooldocs.ins
index ec68fae155..4a6e0784ac 100644
--- a/macros/latex/contrib/schooldocs/schooldocs.ins
+++ b/macros/latex/contrib/schooldocs/schooldocs.ins
@@ -1,5 +1,5 @@
%%
-%% Copyright (C) 2020-2023 by Antoine Missier <antoine.missier@ac-toulouse.fr>
+%% Copyright (C) 2020-2024 by Antoine Missier <antoine.missier@ac-toulouse.fr>
%%
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.3 of this license
@@ -21,7 +21,7 @@
This is a generated file.
-Copyright (C) 2020-2023 by Antoine Missier <antoine.missier@ac-toulouse.fr>
+Copyright (C) 2020-2024 by Antoine Missier <antoine.missier@ac-toulouse.fr>
This file may be distributed and/or modified under the conditions of
the LaTeX Project Public License, either version 1.3 of this license
diff --git a/macros/latex/contrib/schooldocs/schooldocs.pdf b/macros/latex/contrib/schooldocs/schooldocs.pdf
index 18ba710bac..760002f3c5 100644
--- a/macros/latex/contrib/schooldocs/schooldocs.pdf
+++ b/macros/latex/contrib/schooldocs/schooldocs.pdf
Binary files differ