summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/cleveref
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-12-21 23:43:20 +0000
committerKarl Berry <karl@freefriends.org>2011-12-21 23:43:20 +0000
commite9250f00ffb6069748594707c033a97104a3c7b9 (patch)
treeaf0ff27bdbbba2bb71aadeaea5cec8510e93f929 /Master/texmf-dist/source/latex/cleveref
parent7a7ec94b4428ad90afb90bd853d2cc8861e6313a (diff)
cleveref (20dec11)
git-svn-id: svn://tug.org/texlive/trunk@24896 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/cleveref')
-rw-r--r--Master/texmf-dist/source/latex/cleveref/cleveref.dtx7099
1 files changed, 4661 insertions, 2438 deletions
diff --git a/Master/texmf-dist/source/latex/cleveref/cleveref.dtx b/Master/texmf-dist/source/latex/cleveref/cleveref.dtx
index d4652bc0a79..23bcbccf9ed 100644
--- a/Master/texmf-dist/source/latex/cleveref/cleveref.dtx
+++ b/Master/texmf-dist/source/latex/cleveref/cleveref.dtx
@@ -1,3 +1,5 @@
+\def\packagedate{2011/10/24}
+\def\packageversion{0.18}
% \iffalse meta-comment
%
% Package 'cleveref' to use with LaTeX2e
@@ -21,32 +23,24 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{cleveref}
-%<package> [2011/03/22 v0.17.9 Intelligent cross-referencing]
+%<package> [\packagedate{} v\packageversion{} Intelligent cross-referencing]
%
%<*driver>
\documentclass{ltxdoc}
%\documentclass[draft]{ltxdoc}
\usepackage{url}
\usepackage{pifont} % FIXME: find nicer line-continuation symbol than \ding{229}
-% \usepackage{hyperref} % breaks index
+\usepackage[colorlinks=true,linktocpage=true]{hyperref}
\usepackage[capitalise]{cleveref}
\DisableCrossrefs
\CodelineIndex
\RecordChanges
\setcounter{IndexColumns}{2}
%%\newcommand{\package}[1]{\texttt{#1.sty}}
-\newcommand{\package}[1]{\texttt{#1}}
+\newcommand{\package}{\texttt}
\newcommand{\file}{\texttt}
\newcommand{\option}{\texttt}
\makeatletter
-%% Command for writing code descriptions
-\def\packeddescr{%
- \begin{list}{}{\leftmargin0.5cm
- \labelwidth\z@\itemindent-\leftmargin
- \topsep=0pt\itemsep=0.05cm\parsep=0.05cm
-% \let\makelabel\nlabel
- }}
-\def\endpackeddescr{\end{list}}
%% Commands for referring to code lines
\def\codelabel#1{\@bsphack
\protected@write\@auxout{}{\string\newlabel{#1}{{\number\the
@@ -62,7 +56,7 @@
%</driver>
% \fi
%
-% \CheckSum{14751}
+% \CheckSum{18238}
%% \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
@@ -147,7 +141,7 @@
% \package{babel} support for Dutch.}
% \changes{v0.15.2}{2009/12/07}{Fixed bug in \textbackslash{}appendix
% that produced badly formed prefix data for labels that aren't reset
-% by other counters (e.g. tables and figures in most document
+% by other counters (e.g.\ tables and figures in most document
% classes). Fixed bug in \package{hyperref} \option{poorman} code that
% caused all label names to be lower-cased in the sed script. Fixed
% spacing bugs in the \package{cleveref} versions of the
@@ -195,7 +189,7 @@
% \textbackslash{}foreignlanguage commands. Fixed typos in
% \option{poorman} \textbackslash{}foreignlanguage code. Fixed bug in
% the \package{amsmath} multline environment's support for the optional
-% argument to \textbackslash{}label\dots again. Added
+% argument to \textbackslash{}label\dots{} again. Added
% \textbackslash{}labelcref command.}
% \changes{v0.17.2}{2010/07/24}{Removed unneeded argument from
% \textbackslash{}@footnotetext redefinition, to improve compatibility
@@ -236,17 +230,37 @@
% seems to be more standard for temporary macros, to mitigate against
% similar (though less likely) conflicts, and also save a minuscule
% amount of \TeX{} memory.}
+% \changes{v0.17.10}{2011/04/16}{Fixed bug in
+% \textbackslash{}@cref@stack@insert caused by a temporary macro name
+% clash.}
+% \changes{v0.18}{2011/10/24}{Implemented clever page referencing via
+% \textbackslash{}cpageref et al.\ commands, which supports
+% multi-references, including sorting and page range collapsing.
+% Improved \package{varioref} support, combining \package{varioref} and
+% (new) \package{cleveref} page-referencing features. Removed
+% \option{legacyvarioref} option. Fixed bug in
+% \textbackslash{}newtheorem support. Documented \package{mathtools}
+% \option{showonlyrefs} incompatibility. Fixed some of the Spanish and
+% German translations. Implemented \option{nameinlink} option, to
+% include cross-reference names in hyperlinks when using
+% \package{hyperref}. Implemented \option{noabbrev} option to disable
+% all use of abbreviations in default cross-reference names. Added
+% support for a \file{cleveref.cfg} file, which is loaded after the
+% rest of \package{cleveref} has loaded. Made cross-references to
+% sections work correctly when using the \package{revtex4} or
+% \package{revtex4-1} docclasses. Fixed \package{subfig} and
+% \package{caption} compatibility with optional argument to
+% \textbackslash{}label.}
%
% \GetFileInfo{cleveref.sty}
%
-% \def\fileversion{0.17.9}
-% \def\filedate{22/03/2011}
%
% \title{The \package{cleveref} package\thanks{This document
-% corresponds to \textsf{cleveref}~\fileversion, dated
-% \filedate.}}
-% \author{Toby Cubitt \\ \texttt{toby-cleveref@dr-qubit.org}}
-% \date{\filedate}
+% corresponds to \textsf{cleveref}~\packageversion, dated
+% \packagedate.}}
+% \author{Toby Cubitt \\
+% \href{mailto:toby-cleveref@dr-qubit.org}{toby-cleveref@dr-qubit.org}}
+% \date{\packagedate}
%
% \maketitle
%
@@ -257,7 +271,7 @@
% (equation, section, etc.) and the context in which the
% cross-reference is used. The formatting for each cross-reference type
% can be fully customised in the preamble of your document. In
-% addition, \package{cleveref} can type-set cross-references to lists
+% addition, \package{cleveref} can typeset cross-references to lists
% of multiple labels, automatically formatting them according to their
% types, sorting them, and compressing sequences of numerically
% consecutive labels. Again, the multiple-reference formatting is fully
@@ -265,68 +279,129 @@
%
% Normally, the latest version of the \package{cleveref} package is
% available via CTAN.\ Occasionally, slightly newer ``pre-release''
-% versions are available at \url{www.dr-qubit.irg/latex.php#cleveref} a
+% versions are available at \url{www.dr-qubit.org/latex.php#cleveref} a
% little bit before they make their way onto CTAN.
% \end{abstract}
%
+% \clearpage
% \tableofcontents
% \clearpage
%
%
% \section{Introduction}
% When ``clever'' is used in the name of a computer program, it usually
-% signifies that the programmer is overly smug about his own
-% achievements! But at the heart of the \LaTeX{} philosophy is the idea
-% that it is clever to delegate as much of the type-setting as possible
-% to the computer, in order to achieve a beautiful --- and above all
-% consistent --- visual appearance.
-%
-% Both these probably apply to the \package{cleveref} package. Its goals
-% are two-fold: to exploit everything that \LaTeX{} inherently knows
-% about labels as intelligently as possible (clever processing); and to
-% enable you to produce an attractive, consistent formatting of
-% cross-references throughout your document, with the minimum of effort
-% (you'd be clever to use it!).
+% indicates that the programmer is overly smug about his own
+% achievements! But at the heart of the \LaTeX{} philosophy also lies the
+% idea that it is clever to delegate as much of the typesetting as
+% possible to the computer, in order to achieve a beautiful --- and above
+% all consistent --- visual appearance.
+%
+% Both of these probably apply to the \package{cleveref} package. Its
+% goals are two-fold: to exploit all the information that \LaTeX{}
+% inherently already has about labels as intelligently as possible
+% (clever processing); and to enable you to produce an attractive,
+% consistent formatting of cross-references throughout your document,
+% with the minimum of effort (you'd be clever to use it!).
%
% The \package{cleveref} package enhances \LaTeX{}'s cross-referencing
% facilities by allowing cross-references to be formatted automatically
% according to the type of thing they refer to (chapter, section,
% equation, theorem, etc.) and the context in which the cross-reference
% is used. It can automatically format cross-references to multiple
-% labels, sort lists of multiple cross-references, compress
-% cross-references to consecutive labels into a reference range, and all
-% kinds of other clever wizardry.
+% labels, sort lists of multiple cross-references, compress references to
+% consecutive labels into a reference range, and all kinds of other
+% clever wizardry. It also does similar things with page references.
%
% In standard \LaTeX{}, you have almost certainly found yourself writing
% things like |Eq.~(\ref{eq1})| and |Theorems~\ref{thm1} to~\ref{thm3}|
% over and over again. Tedium isn't the only downside to this. What
-% happens if you later decide you want equation references to be type-set
+% happens if you later decide you want equation references to be typeset
% as |Equation~\ref{eq1}| instead (i.e.\ without the abbreviation and
% without the brackets)? What happens if you decide to change the theorem
% labelled |thm1| into a lemma? What if you move |thm3| so that it
-% appears (and is numbered) before |thm1|, so that references to the
-% sequence of theorems 1 through 3 should be ordered
+% appears (and is numbered) before |thm1|, meaning that references to the
+% sequence of theorems 1 through 3 should now be ordered
% |Theorems~\ref{thm3} to~\ref{thm1}| (i.e.\ the other way around)? What
% if you decide you prefer references to multiple theorems to be written
-% as |Theorems~\ref{thm1}--\ref{thm3}|? You have to search through the
-% entire \LaTeX{} source of your document, modifying all references to
-% equations, updating all references to |thm1|, re-ordering all
-% references to |thm1| and |thm3|, and changing all the formatting of
-% references to multiple theorems!
-%
-% The \package{cleveref} package allows you to define the format for
-% cross-references once-and-for-all in the preamble of your document. If
-% you later decide to change the format of equation references, you only
-% have to change one preamble definition. If you change a theorem into a
-% lemma, you don't need to change any cross-references at all, because
-% \package{cleveref} will automatically type-set cross-references to it
-% using the appropriate formatting. This makes it far easier to type-set
+% as |Theorems~\ref{thm1}--\ref{thm3}|? Any such change requires you to
+% search through the entire \LaTeX{} source of your document, modifying
+% all references to equations, updating all references to |thm1|,
+% re-ordering all references to |thm1| and |thm3|, and changing all the
+% formatting of references to multiple theorems!
+%
+% The \package{cleveref} package allows you to define the format for the
+% different types of cross-references once-and-for-all in the preamble of
+% your document. (Of course, sane default formats are provided, so you
+% only have to redefine the format if you don't like the default for a
+% particular cross-reference type.) If you later decide to change the
+% format of equation references, you only have to change one preamble
+% definition. If you change a theorem into a lemma, you don't need to
+% change any cross-references at all, because \package{cleveref} will
+% automatically use the appropriate name when typesetting any
+% cross-references to it. This makes it far easier to typeset
% cross-references uniformly across your whole document, as well as
% avoiding repetitively typing similar text for each and every
% cross-reference.
%
-% Given how useful this is, there are naturally a number of other
-% packages with similar goals, most notably \package{varioref},
+%
+%
+% \section{Usage}
+% The \package{cleveref} package is loaded in the usual way, by putting
+% the line
+% \begin{quote}
+% |\usepackage{cleveref}|
+% \end{quote}
+% in your document's preamble. However, care must be taken when using
+% \package{cleveref} in conjunction with other packages that modify
+% \LaTeX{}'s referencing system (see
+% \cref{sec:other_packages}). Basically, \package{cleveref} must be
+% loaded \emph{last}.
+%
+% If you just want to get going quickly with \package{cleveref}, and come
+% back later to read up on all the features it provides in more detail,
+% here's what you need to do. Wherever you would previously have used
+% |\ref|, use |\cref| instead. (Except at the beginning of a sentence,
+% where you should use |\Cref|.) You no longer need to put the name of
+% the thing you're referencing in front of the |\cref| command, because
+% \package{cleveref} will sort that out for you: i.e.\ use |\cref{eq1}|
+% instead of |eq.~(\ref{eq1})|. If you want to refer to a range of
+% labels, use the |\crefrange| command: |\crefrange{eq1}{eq5}| gives
+% |eqs.~(1) to~(5)|. If you want to refer to multiple things at once, you
+% can simply throw them all into one cross-reference and leave
+% \package{cleveref} to sort it out: e.g.\
+% |\cref{eq2,eq1,eq3,eq5,thm2,def1}| produces:%
+% |eqs.~(1) to~(3) and~(5),| |theorem~5, and definition~1|. Finally, if
+% you want a page reference, use |\cpageref| (and don't write ``page'' in
+% front), if you want a page range, use |\cpagerefrange|, and if you want
+% to refer to multiple pages, simply throw them all into a single
+% |\cpageref|, just as with |\cref| (above), and \package{cleveref} will
+% sort it all out.
+%
+% \package{Cleveref} supports a number of languages other than English,
+% and also supports the \package{babel} package for those languages.
+% Either pass the desired language as an option to \package{cleveref}, or
+% pass it as a global option to |\documentclass|. Note that if you're
+% writing in a language in which nouns decline, the |\cref| and
+% |\cpageref| commands may be less useful, as they always produce the
+% cross-reference name in the nominative case.\footnote{Trying to
+% determine the appropriate case automatically would be tantamount to
+% solving the full natural-language processing problem in
+% \package{cleveref}. Check back in a century or so. Providing separate
+% variants of the \package{cleveref} commands for each noun case quickly
+% becomes more cumbersome than just typing the cross-reference name by
+% hand.} In such languages, you may instead prefer to use the
+% |\labelcref| and |\labelcpageref| commands. Unlike |\cref| and
+% |\cpageref|, these don't produce the name in front of the
+% cross-reference, so you must supply it (in the appropriate case)
+% yourself. But they do still cope with multi-references, so you still
+% gain some benefit from using \package{cleveref}.
+%
+%
+%
+% \section{Comparison with Other Packages}
+% Given how useful automated cross-reference typesetting is, there are
+% naturally a number of other packages with similar goals to
+% \package{cleveref}, most notably \package{varioref},
% \package{fancyref}, \package{hyperref}'s |\autoref| command, and (for
% theorem-like environments) \package{ntheorem} (with the \option{thref}
% option). (There are many others, but these come closest to providing
@@ -336,11 +411,14 @@
% The \package{fancyref} package doesn't automatically determine the type
% of thing being referred to. Instead, it relies on you adhering to a
% naming convention for labels. This is usually a good idea in any case,
-% but it can be inconvenient. For example, if you change a theorem into a
-% lemma, you have to change the label name, and therefore also all
-% cross-references to it. So you are back to searching and replacing
-% through the entire document, not to mention missing out on all the
-% other \package{cleveref} features.
+% but it can occasionally be inconvenient. For example, if you change a
+% theorem into a lemma, you have to change the label name, and therefore
+% also all cross-references to it. So with \package{varioref}, you will
+% at times be back to searching and replacing through the entire
+% document. Not to mention missing out on all the other
+% \package{cleveref} features, such as automatic sorting and compressing
+% of consecutive references, \package{ntheorem} and \package{amsthm}
+% support, precise control over hyperlinks, etc.
%
% The enhanced referencing feature provided by the \package{varioref}
% package's\linebreak[4] |\labelformat| command decides how to format
@@ -350,105 +428,82 @@
% in which they are referenced, which can sometimes be very useful. For
% example, if you want cross-references at the beginning of a sentence
% formatted any other way than by capitalising the first letter of the
-% cross-reference text, it is impossible using \package{varioref}.
-% Perhaps even more significantly, it makes it impossible to type-set
-% multiple references automatically; you are back to typing
-% |Eqs.~(\ref{eq1}) to~(\ref{eq3})| by hand. Not to mention missing out
-% on automatic sorting and compressing of consecutive references,
-% \package{ntheorem} support, precise control over hyper-links, etc.
+% cross-reference text, it is impossible using \package{varioref}. For
+% example, you may want to use the abbreviation ``eq.'', but revert to
+% ``Equation'' at the beginning of sentences (words at the start of
+% sentences shouldn't be abbreviated in English). This is not possible
+% with \package{varioref}. Perhaps even more significantly,
+% \package{varioref}'s |\labelformat| implementation makes it impossible
+% to typeset multiple references automatically; if you want to refer to
+% equations |eq1| through |eq3|, with \package{varioref} you are back to
+% typing |Eqs.~(\ref{eq1}) to~(\ref{eq3})| by hand. Not to mention
+% missing out on all the other \package{cleveref} features. In fact,
% \package{cleveref} fully supports \package{varioref}, taking over
-% responsibility for type-setting cross-references, whilst retaining all
+% responsibility for typesetting cross-references, whilst retaining all
% the \package{varioref} page-referencing magic.
%
-% The \package{hyperref} package's |\autoref| command type-sets a name
+% The \package{hyperref} package's |\autoref| command typesets a name
% before a cross-reference, determined by the cross-reference type. This
% is less flexible than \package{cleveref}'s fully customisable
-% cross-reference formatting but, when combined with \package{varioref},
-% the two packages working together come close. However, even with
-% \package{hyperref}, it is impossible to customise precisely which part
-% of the cross-reference is made into a hyper-link in PDF documents; this
-% is very easy with \package{cleveref}. And it still remains impossible
-% to type-set multiple references, have consecutive references sorted and
-% compressed automatically, etc.
+% cross-reference formatting, but, when combined with \package{varioref},
+% the two packages working together come pretty close. But surprisingly,
+% even with \package{hyperref}, it is impossible to customise precisely
+% which part of the cross-reference is made into a hyperlink in PDF
+% documents; this is simple with \package{cleveref}. And it still remains
+% impossible to typeset multiple references, have consecutive references
+% sorted and compressed automatically, etc.
%
% The \package{ntheorem} package (with the \option{thref} option) does
-% things right with regards how and when the format is defined\ldots
+% things right with regards to how and when the format is defined\ldots
% except that it only works for theorem-like environments. It is possible
% to use it for other environments, but only in a bastardized form, by
% manually supplying an optional argument to |\label| commands that
-% specifies the label type. \package{cleveref} works equally well when
+% specifies the label type. \package{Cleveref} works equally well when
% referencing any type of thing, as well as fully supporting
-% \package{ntheorem}. And again, \package{cleveref} also provides a
-% number additional features over \package{ntheorem}, such as multiple
-% cross-references, automatic sorting and compressing of consecutive
-% cross-references, control over the placement of hyper-links, etc.
+% \package{ntheorem}. And again, \package{cleveref} provides a number of
+% additional features over \package{ntheorem}, such as multi-references,
+% automatic sorting and compressing of consecutive cross-references,
+% control over the placement of hyperlinks, etc.
%
%
%
-% \section{Usage}
-% The \package{cleveref} package is loaded in the usual way, by putting
-% the line
-% \begin{quote}
-% |\usepackage{cleveref}|
-% \end{quote}
-% in your document's preamble. However, care must be taken when using
-% \package{cleveref} in conjunction with other packages that modify
-% \LaTeX{}'s referencing system (see
-% \cref{sec:other_packages}). Basically, \package{cleveref} must be
-% loaded \emph{last}.
-%
-% If you just want to get going quickly with \package{cleveref}, and come
-% back later to read up on all the features it provides in more detail,
-% here's what you need to do. Wherever you would previously have used
-% |\ref|, use |\cref| instead. (Except at the beginning of a sentence,
-% where you should use |\Cref|.) You no longer need to put the name of
-% the thing you're referencing in front of the |\cref| command, because
-% \package{cleveref} will sort that out for you: i.e.\ use |\cref{eq1}|
-% instead of |eq.~(\ref{eq1})|. If you want to refer to a range of
-% labels, use the |\crefrange| command: |\crefrange{eq1}{eq5}| gives
-% |eqs.~(1) to~(5)|. Finally, if you want to refer to multiple things at
-% once, you can now combine them all into one cross-reference and leave
-% \package{cleveref} to sort it out: e.g.\
-% |\cref{eq2,eq1,eq3,eq5,thm2,def1}| produces:%
-% |eqs.~(1) to~(3) and~(5),|\linebreak[4] |theorem~5, and definition~1|.
-%
-%
-% \section{Type-Setting Cross-References}
+% \section{Typesetting Cross-References}
% \label{sec:typesetting}
% \DescribeMacro\cref
-% To automatically type-set a cross-reference according to the type of
-% thing referred to, simply refer to it using |\cref{|\meta{label}|}|.
+% To automatically typeset a cross-reference according to the type of
+% thing referred to, simply refer to it using |\cref|\marg{label}.
% \package{cleveref} imposes just one extra restriction on the names of
% labels: they are no longer allowed to contain commas ``,''. These are
-% instead used to type-set multiple cross-references (see below).
+% instead used to typeset multiple cross-references (see below).
%
% \DescribeMacro\Cref
% As it is very difficult\footnote{Actually, very likely impossible!} for
% \LaTeX{} to determine whether a cross-reference appears at the
% beginning of a sentence or not, a beginning-of-sentence variant exists:
-% |\Cref{|\meta{label}|}|. By default, this type-sets the cross-reference
-% with the first letter capitalised, and without using an abbreviation in
+% |\Cref|\marg{label}. By default, this typesets the cross-reference with
+% the first letter capitalised, and without using an abbreviation in
% those cases where the standard variant does use one. (However, the
% formatting of the |\cref| and |\Cref| forms can be fully and
% independently customised, see \cref{sec:customising}.)
%
% \DescribeMacro\crefrange
% \DescribeMacro\Crefrange
-% To type-set a cross-reference range, e.g. |Eqs.~(1.1) to~(1.5)|,
+% To typeset a cross-reference range, e.g.\ |Eqs.~(1.1) to~(1.5)|,
% use\linebreak[4] |\crefrange| or |\Crefrange| (depending on the
% capitalisation you require), which take the beginning and end of the
% range as arguments:
% \begin{quote}
-% |\crefrange{|\meta{label1}|}{|\meta{label2}|}|
+% |\crefrange|\marg{label1}\marg{label2}
% \end{quote}
%
% \DescribeMacro\cref
% \DescribeMacro\Cref
-% To type-set multiple cross-references, simply list the lables inside
-% the |\cref| or |\Cref| command, separated by commas (you are not
-% allowed to use commas in label names when using \package{cleveref}):
+% To typeset multiple cross-references, simply list the labels inside
+% the |\cref| or |\Cref| command, separated by commas (recall that you
+% are not allowed to use commas in label names when using
+% \package{cleveref}):
% \begin{quote}
-% |\cref{|\meta{label1}|,|\meta{label2}|,|\meta{label3}|,...}|
+% |\cref{|\meta{label1}|,|\meta{label2}|,|\meta{label3}|,|\dots|}|
% \end{quote}
%
% \DescribeMacro{\cref*}
@@ -459,22 +514,41 @@
% package (see \cref{sec:customising,sec:other_packages}), additional
% starred variants of all the referencing commands are available. The
% standard referencing commands will make cross-references into
-% hyper-links; the starred variants prevent this, producing the same
-% type-set text but without creating hyper-links.
+% hyperlinks; the starred variants prevent this, producing the same
+% typeset text but without creating hyperlinks.
+%
+% \DescribeMacro\cpageref
+% \DescribeMacro\Cpageref
+% To typeset a page reference, use |\cpageref|\marg{label}, which is
+% typeset e.g.\ as ``page~3''. At the beginning of a sentence, use
+% |\Cpageref| instead. Since page references are always references to,
+% well\dots pages, this doesn't gain you so much over |\pageref|. Where
+% |\cpageref| comes into its own is in referring to multiple pages:
+% \begin{quote}
+% |\cpageref{|\meta{label1}|,|\meta{label2}|,|\meta{label3}|,|\dots|}|
+% \end{quote}
+% \DescribeMacro\cpagerefrange
+% \DescribeMacro\Cpagerefrange
+% Predictably enough, |\cpagerefrange| and |\Cpagerefrange| are used to
+% typeset references to page ranges:
+% \begin{quote}
+% |\cpagerefrange|\marg{label1}\marg{label2}
+% \end{quote}
%
% \DescribeMacro\ref
-% \package{cleveref} does \emph{not} modify the standard |\ref| command,
-% so you can still use it to type-set the formatted label counter alone,
-% without any additional text or formatting.
+% \DescribeMacro\pageref
+% \package{cleveref} does \emph{not} modify the standard |\ref| or
+% |\pageref| commands, so you can still use them to typeset the
+% formatted label counter or page number alone, without any additional
+% text or formatting.
%
-% \pagebreak
% \DescribeMacro{\namecref}
% \DescribeMacro{\nameCref}
% \DescribeMacro{\lcnamecref}
% \DescribeMacro{\namecrefs}
% \DescribeMacro{\nameCrefs}
% \DescribeMacro{\lcnamecrefs}
-% Occasinally, it's useful to produce just the name of a reference,
+% Occasionally, it's useful to produce just the name of a reference,
% without the label itself. For example, if you want to refer to ``this
% section'', but you're not sure whether you might later change the
% section into a chapter, it might be useful to produce just the name
@@ -484,24 +558,13 @@
% \begin{quote}
% |\namecref{sec1}|
% \end{quote}
-% is type-set as ``section'' (assuming |sec1| labels a section). The
-% |\namecref| and |\nameCrefs| commands produce the plural forms. The
+% is typeset as ``section'' (assuming |sec1| labels a section). The
+% |\namecrefs| and |\nameCrefs| commands produce the plural forms. The
% |\lcnamecref| and |\lcnamecrefs| commands force the reference name to
% lowercase, for use when the \option{capitalise} option is enabled (see
% \cref{sec:capitalise}). (When that option is set, |\namecref| produces
% an uppercase reference name.)
%
-% \DescribeMacro{\labelcref}
-% Conversely, it is occasionally useful to produce just the label part of
-% a reference, without the cross-reference name. For example, this could
-% be useful when type-setting cross-references in a language for which
-% the ending of the cross-reference name changes depending on where it is
-% used in a sentence. The |\labelcref| command does exactly this, and can
-% also cope with multi-references, processing them just as |\cref| does.
-% However, since it type-sets a multi-reference without any name,
-% \emph{all} labels in a |\labelcref| multi-reference \emph{must} be of
-% the same type.
-%
% There is a slight pitfall that you should be aware of when using the
% |\namecref| commands. They get the reference name from the names
% defined for the label's reference type using |\crefname| or |\Crefname|
@@ -514,25 +577,43 @@
% that type. You can fix the error by adding explicit |\crefname|
% definitions for these types.
%
-% The |\labelcref| command will type-set cross-reference labels using the
+% \DescribeMacro{\labelcref}
+% Conversely, it is occasionally convenient to produce just the label
+% part of a reference, without the cross-reference name. For example,
+% this can be useful when writing in a language in which nouns decline.
+% The |\labelcref| command does exactly this, and can also cope with
+% multi-references, processing them just as |\cref| does. However, since
+% it typesets a multi-reference without any name, \emph{all} labels in a
+% |\labelcref| multi-reference \emph{must} be of the same type.
+%
+% The |\labelcref| command will typeset cross-reference labels using the
% default label format if no type-specific format is defined using
% |\creflabelformat| (see
-% \cref{sec:global_customisation,sec:individual_customisation}). However,
-% if you customise reference formats using the lower-level commands, you
-% may want to also explicitly define the |\labelcref| formats to match,
-% using the |\labelcrefformat| etc.\ commands (see
+% \cref{sec:global_customisation,sec:individual_customisation}). Note
+% that, if you customise reference formats using the low-level commands,
+% you may want to also explicitly define the |\labelcref| formats to
+% match, using the |\labelcrefformat| etc.\ commands (see
% \cref{sec:low-level_customisation}).
%
+% \DescribeMacro{\labelcpageref}
+% Similarly, |\labelcpageref| typesets the page numbers alone, without
+% inserting ``page'' in front. Like |\cpageref|, it also handles
+% multi-references. Like |\labelcref|, by default |\labelcpageref|
+% typesets the page numbers using the default label format, customised
+% using |\crefdefaultlabelformat|. If you want to define a separate
+% format for |\labelcpageref|, use |\creflabelformat| to customise the
+% label format for the ``page'' cross-reference type. (see
+% \cref{sec:low-level_customisation}).
%
%
%
% \section{Sorting and Compressing}
% \label{sec:sort&compress}
-% When \package{cleveref} type-sets lists of multiple cross-references,
-% the default behaviour is to automatically sort the list and compress
-% sequences of consecutive cross-references into a reference range. You
-% can change this behaviour by supplying one of the following package
-% options:
+% When \package{cleveref} typesets lists of multiple cross-references or
+% page-references, the default behaviour is to automatically sort the
+% list and compress sequences of consecutive cross-references or page
+% numbers into a reference range. You can change this behaviour by
+% supplying one of the following package options:
% \begin{description}
% \item[\option{sort}] Sort lists of cross-references, but don't compress
% consecutive references.
@@ -554,7 +635,7 @@
% \begin{quote}
% |\cref{eq1,eq2,eq3,,eq4}|
% \end{quote}
-% will be type-set as
+% will be typeset as
% \begin{quote}
% eqs.~(1) to~(3) and (4)
% \end{quote}
@@ -562,7 +643,7 @@
% \begin{quote}
% |\cref{eq1,eq2,,eq3,eq4,eq5,,eq6,eq7,eq8}|
% \end{quote}
-% will be type-set as
+% will be typeset as
% \begin{quote}
% eqs.~(1), (2), (3) to~(5) and (6) to~(8)
% \end{quote}
@@ -578,25 +659,27 @@
% reference, and will prevent it being compressed with any subsequent
% consecutive cross-references. In other words, an empty reference
% ensures that the preceding reference will appear explicitly in the
-% final, type-set cross-reference:
+% final, typeset cross-reference:
% \begin{quote}
% |\cref{eq3,,eq2,eq1,eq6,eq4,eq5}|
% \end{quote}
-% will be type-set as
+% will be typeset as
% \begin{quote}
% eqs.~(1) to~(3) and (4) to~(6)
% \end{quote}
%
%
%
-% \section{Capitalising All Cross-Reference Names}
+% \section{Options that Modify the Cross-Reference Format}
+%
+% \subsection{Capitalising All Cross-Reference Names}
% \label{sec:capitalise}
-% \DescribeMacro{capitalise} Many authors prefer to always capitalise
-% cross-reference names, regardless of where they appear in the sentence,
-% writing Theorem~1 and Equation~3 (as opposed to theorem~1 and
-% equation~3). If you count yourself among this group, you can pass the
-% \option{capitalise} option to the \package{cleveref} package
-% (\option{capitalize} also works).
+% \DescribeMacro{capitalise}
+% Many authors prefer to always capitalise cross-reference names,
+% regardless of where they appear in the sentence, writing Theorem~1 and
+% Equation~3 (as opposed to theorem~1 and equation~3). If you count
+% yourself among this group, you can pass the \option{capitalise} option
+% to the \package{cleveref} package (\option{capitalize} also works).
%
% All the default cross-reference formats will then have the first letter
% capitalised, as will the automatically generated |\cref| variants (see
@@ -613,23 +696,67 @@
% mind and remove the \option{capitalise} option.
%
%
-%
-% \pagebreak
-% \section{Customising the Cross-Reference Format}
+% \subsection{Including Names in Hyperlink Targets}
+% \label{sec:nameinlink}
+% \DescribeMacro{nameinlink}
+% When using the \package{hyperref} package, \package{cleveref}
+% automatically makes all cross-references into hyperlinks to the
+% corresponding reference. By default, only the label itself forms part
+% of the hyperlink target (i.e.\ the text you can click on to navigate to
+% the cross-reference). The cross-reference name is not part of the
+% hyperlink. By contrast, \package{hyperref}'s |\autoref| command
+% \emph{does} includes the name as part of the hyperlink. If you prefer
+% to include the names in the hyperlinks when using \package{cleveref},
+% you can pass the \option{nameinlink} option to the \package{cleveref}
+% package. (For even more control over the placement of the hyperlink
+% target, use the commands for customising the cross-reference format.
+% See \cref{sec:customising}.)
+%
+% However, use of this option is discouraged on stylistic grounds.
+% Firstly, when producing PDF output \package{hyperref} by default
+% surrounds hyperlinks with red boxes, which looks particularly ugly when
+% the entire cross-reference name is surrounded by a red box (though this
+% unfortunate default can be changed using \package{hyperref} package
+% options; see the \package{hyperref} documentation for details).
+% Secondly, and more significantly, when using multi-references only the
+% first reference in a group can include the cross-reference name as part
+% of its hyperlink target, for obvious reasons. The hyperlink targets for
+% the other references in the group will necessarily be just the labels.
+% This makes for somewhat non-uniform typesetting of hyperlinks, with the
+% first cross-reference in a multi-reference having a much larger
+% hyperlink target than the others.
+%
+%
+% \subsection{Avoiding Abbreviations in Cross-Reference Names}
+% \label{sec:noabbrev}
+% \DescribeMacro{noabbrev}
+% The default cross-reference names for some languages use common
+% abbreviations for some of the names (e.g.\ in the default English
+% format, |\cref{eq1}| will be typeset as |eq.~(1)|). Some authors may
+% prefer to always use the full name, rather than an abbreviation
+% (|equation~(1)| instead of |eq.~(1)|). To disable all use of
+% abbreviations in the default cross-reference names, pass the
+% \option{noabbrev} option to the \package{cleveref} package.
+%
+%
+%
+%
+% \section{Customising the Cross-Reference Formats}
% \label{sec:customising}
% The \package{cleveref} package allows you to take full control of the
-% type-setting of cross-references, by allowing the formatting to be
+% typesetting of cross-references, by allowing the formatting to be
% customised. Defaults appropriate for English documents are provided for
% the standard label types,\footnote{For any pedantic classics scholars
% out there: ``lemmas'' is recognised as a valid plural form of ``lemma''
% in all current versions of the Oxford English Dictionary. ``Lemmata''
% was last heard in a mathematical debate that took place in a pub just
% around the corner from Hadrian's wall\dots a few years before the
-% Romans pulled out of Britain. \package{cleveref} might have ``clever''
+% Romans pulled out of Britain. \package{Cleveref} might have ``clever''
% in its name, but even that doesn't make it pretentious enough to use
-% ``lemmata''.} and support for a number of languages is provided via
-% package options (see \cref{sec:language_babel}). But if you don't like
-% the defaults, or are writing in a different language,\footnote{Any
+% ``lemmata'' for the plural of ``lemma''.} and support for a number of
+% languages is provided via package options (see
+% \cref{sec:language_babel}). But if you don't like the defaults, or are
+% writing in a language that is not supported yet,\footnote{Any
% contributions of translations for missing languages are very welcome!
% See \cref{sec:code:babel} for information on how to contribute
% translations.} or you need to refer to something for which no default
@@ -638,9 +765,9 @@
%
% If \package{cleveref} encounters a cross-reference to a type it does
% not know, it will produce a ``reference type undefined'' warning, and
-% type-set the cross-reference as
+% typeset the cross-reference as
% \begin{quote}
-% {\bf ??}~|\ref{|\meta{label}|}|
+% {\bf ??}~|\ref|\marg{label}
% \end{quote}
% i.e.\ the label counter preceded by a double question mark. The error
% message indicates the name of the unknown cross-reference type, which
@@ -655,6 +782,12 @@
% customisation: you can either customise the components, or you can take
% full control and override the component-derived format entirely.
%
+% \package{cleveref} treats page references, as produced e.g.\ by
+% |\cpageref|, as cross-references with the type ``page''. Therefore, all
+% of the mechanisms for customising cross-references apply equally well
+% to page references, simply by using ``page'' as the cross-reference
+% type.
+%
%
% \subsection{Customising the Cross-Reference Components}
% \label{sec:component_customisation}
@@ -668,20 +801,26 @@
% The format for the label counter itself can be customised globally
% using
% \begin{quote}
-% |\crefdefaultlabelformat{|\meta{format}|}|
+% |\crefdefaultlabelformat|\marg{format}
% \end{quote}
% The \meta{format} argument can be any valid \LaTeX{} code, though you
% will need to |\protect| fragile commands. It can (and almost certainly
% should!) contain three arguments, |#1|, |#2| and |#3|. The first
% argument is the formatted version of the label counter (e.g.\
% |\theequation|). The other two are used to mark the beginning and end
-% of the part of the cross-reference that should form the hyper-link when
+% of the part of the cross-reference that should form the hyperlink when
% the \package{hyperref} package is used (see
-% \cref{sec:other_packages}). The hyper-link arguments |#2| and |#3|
-% \emph{must} appear in that order. (Leaving them out completely will not
-% cause an error, but in that case no hyper-link will be created when
-% \package{hyperref} is used, and there are better ways to achieve
-% this. See \cref{sec:typesetting,sec:other_packages}.)
+% \cref{sec:other_packages}). For example, if you wanted to surround all
+% labels with square brackets, without the square brackets themselves
+% being part of the hyperlink, you would need:
+% \begin{quote}
+% |\crefdefaultlabelformat{[#2#1#3]}|
+% \end{quote}
+% The hyperlink arguments |#2| and |#3| \emph{must} appear in that
+% order. (Leaving them out completely will not cause an error, but in
+% that case no hyperlink will be created when \package{hyperref} is
+% used, and there are better ways to achieve this. See
+% \cref{sec:typesetting,sec:other_packages}.)
%
% Note that the default format for equation cross-references already
% overrides |\crefdefaultlabelformat| in order to surround the label
@@ -694,13 +833,13 @@
% The conjunction used in a reference range can be customised by
% defining |\crefrangeconjunction|:
% \begin{quote}
-% |\newcommand{\crefrangeconjunction}{|\meta{conjunction}|}|
+% |\newcommand{\crefrangeconjunction}|\marg{conjunction}
% \end{quote}
% It does not have to be an actual conjunction in the linguistic sense,
-% e.g.\ it is perfectly reasonable to define it to be an emdash
+% e.g.\ it is perfectly reasonable to define it to be an endash
% ``|--|''. |\crefrangeconjunction| is used directly between the start
% and end references in a reference range, without any additional space
-% surrounding it, e.g.\ |\crefrange{thm1}{thm2}| is type-set as
+% surrounding it, e.g.\ |\crefrange{thm1}{thm2}| is typeset as
% \begin{quote}
% |theorems~\ref{thm1}\crefrangeconjunction\ref{thm2}|
% \end{quote}
@@ -722,7 +861,7 @@
% |\crefrangepreconjunction| and |\crefrangepostconjunction|, which
% insert text before the first label defining the range, and after the
% second label, respectively. For example, when these commands are
-% defined, |\crefrange{thm1}{thm2}| is type-set as
+% defined, |\crefrange{thm1}{thm2}| is typeset as
% \begin{quote}
% |theorems~\crefrangepreconjunction\ref{thm1}|\\
% | |\ding{229} |\crefrangeconjunction\ref{thm2}\crefrangepostconjunction|
@@ -742,9 +881,9 @@
% customised by defining the commands |\crefpairconjunction|,
% |\crefmiddleconjunction| and |\creflastconjunction|:
% \begin{quote}
-% |\newcommand{\crefpairconjunction}{|\meta{conjunction}|}|\\
-% |\newcommand{\crefmiddleconjunction}{|\meta{conjunction}|}|\\
-% |\newcommand{\creflastconjunction}{|\meta{conjunction}|}|
+% |\newcommand{\crefpairconjunction}|\marg{conjunction}\\
+% |\newcommand{\crefmiddleconjunction}|\marg{conjunction}\\
+% |\newcommand{\creflastconjunction}|\marg{conjunction}
% \end{quote}
% |\crefpairconjunction| is used when there are only two cross-references
% in the list, |\creflastconjunction| is used between the penultimate and
@@ -777,7 +916,7 @@
% \begin{quote}
% |\cref{eq1,eq2,eq3,thm1,thm2,fig1,thm3}|
% \end{quote}
-% is type-set as
+% is typeset as
% \begin{quote}
% eqs.~(1)|\crefrangeconjunction|(3)|\crefmiddlegroupconjunction|%\\
% theorems~1|\crefpairconjunction|2|\crefmiddlegroupconjunction|%\\
@@ -792,8 +931,8 @@
% The cross-reference name for a given cross-reference type is customised
% using the |\crefname| and |\Crefname| commands:
% \begin{quote}
-% |\crefname{|\meta{type}|}{|\meta{singular}|}{|\meta{plural}|}|\\
-% |\Crefname{|\meta{type}|}{|\meta{singular}|}{|\meta{plural}|}|
+% |\crefname|\marg{type}\marg{singular}\marg{plural}\\
+% |\Crefname|\marg{type}\marg{singular}\marg{plural}
% \end{quote}
% used by the |\cref| and |\Cref| commands, respectively. You must supply
% both \meta{singular} and \meta{plural} forms of the name. If the
@@ -814,11 +953,12 @@
% the environment (equation, chapter, section, etc.). The exceptions are
% appendices, labels whose type has been overridden explicitly by
% supplying an optional argument (see \cref{sec:label_type}), and
-% theorem-like environments when the \package{ntheorem} package is
-% loaded, for which \meta{type} should instead be the environment name
-% (lemma, corollary, definition, etc.) even when different environments
-% are part of the same numbering sequence. (\package{ntheorem} provides
-% extra information about the environment when different theorem-like
+% theorem-like environments when the \package{ntheorem} of
+% \package{amsthm} packages are loaded, for which \meta{type} should
+% instead be the environment name (lemma, corollary, definition, etc.)
+% even when different environments are part of the same numbering
+% sequence. (\package{ntheorem} and \package{amsthm} provide extra
+% information about the environment when different theorem-like
% environments share a common counter, which \package{cleveref} makes use
% of to distinguish between them automatically.) In the case of
% appendices, the \meta{type} is ``appendix'' for the top-level
@@ -842,7 +982,7 @@
% differ from the global format set by |\crefdefaultlabelformat| (see
% \cref{sec:global_customisation}). You can do this using
% \begin{quote}
-% |\creflabelformat{|\meta{type}|}{|\meta{format}|}|
+% |\creflabelformat|\marg{type}\marg{format}
% \end{quote}
% The \meta{type} argument is the cross-reference type to customise, and
% the \meta{format} argument defines the label format for
@@ -850,25 +990,25 @@
% |\crefdefaultlabelformat|, the latter should contain the three
% arguments |#1|, |#2| and |#3|, the first being the formatted version of
% the label counter, the others determining the beginning and end of the
-% portion that becomes a hyper-link when the \package{hyperref} package
+% portion that becomes a hyperlink when the \package{hyperref} package
% is loaded (see \cref{sec:other_packages}). |#2| and |#3| \emph{must}
% appear in that order.
%
% \DescribeMacro\crefrangelabelformat
% Normally, the start and end references in a reference range are
-% type-set using the usual label format (as defined by
+% typeset using the usual label format (as defined by
% |\crefdefaultlabelformat| or |\creflabelformat|) separated by
% |\crefrangeconjunction| (\cref{sec:global_customisation}). You can
% override this for a given cross-reference type using
% \begin{quote}
-% |\crefrangelabelformat{|\meta{type}|}{|\meta{format}|}|
+% |\crefrangelabelformat|\marg{type}\marg{format}
% \end{quote}
% The \meta{format} argument should contain six arguments: |#1|, |#2|,
% |#3|, |#4|, |#5|, |#6|. The first two (|#1| and |#2|) are the formatted
% versions of the two label counters defining the reference range. The
-% next two (|#3| and |#4|) denote the beginning and end of the hyper-link
-% for the first reference, the final two (|#5| and |#6|) the hyper-link
-% for the second reference. The hyper-link arguments \emph{must} appear
+% next two (|#3| and |#4|) denote the beginning and end of the hyperlink
+% for the first reference, the final two (|#5| and |#6|) the hyperlink
+% for the second reference. The hyperlink arguments \emph{must} appear
% in order. For example,
% \begin{quote}
% |\crefrangelabelformat{equation}{(#3#1#4) to~(#5#2#6)}|
@@ -896,10 +1036,10 @@
% speaker, it probably won't even occur to you to claim that plurals can
% reliably be constructed automatically!} Therefore, if the plural form
% is ever required, \package{cleveref} will produce a ``reference type
-% undefined'' warning, and type-set the cross-reference where the plural
+% undefined'' warning, and typeset the cross-reference where the plural
% form is required as:
% \begin{quote}
-% {\bf ??}~|\ref{|\meta{label}|}| \dots
+% {\bf ??}~|\ref|\marg{label} \dots
% \end{quote}
% In this case, you will have to provide an explicit |\crefname| or
% |\Crefname| definition yourself, to define the plural form as well as
@@ -934,7 +1074,7 @@
% this way. If you change any of them using the low-level customisation
% commands, but still want them to be grouped together, then you must
% ensure that the formats are \emph{identical}. (It is \emph{not}
-% sufficient for the formats to produce identical type-set text; the
+% sufficient for the formats to produce identical typeset text; the
% format definitions must contain identical \LaTeX{} code.)
%
% Note that if you use the low-level customisation commands, you might
@@ -947,29 +1087,28 @@
% \DescribeMacro\crefformat
% \DescribeMacro\Crefformat
% Cross-reference formats for \emph{single} cross-references are defined
-% or redefined using the\linebreak[4] |\crefformat| and |\Crefformat|
-% commands, which are used by the |\cref| and |\Cref| commands
-% respectively. These take two arguments: the cross-reference type, and
-% the formatting code:
+% or redefined using the |\crefformat| and |\Crefformat| commands, which
+% are used by the |\cref| and |\Cref| commands respectively. These take
+% two arguments: the cross-reference type, and the formatting code:
% \begin{quote}
-% |\crefformat{|\meta{type}|}{|\meta{format}|}|\\
-% |\Crefformat{|\meta{type}|}{|\meta{format}|}|
+% |\crefformat|\marg{type}\marg{format}\\
+% |\Crefformat|\marg{type}\marg{format}
% \end{quote}
% The \meta{type} is usually the name of the counter, except for labels
% whose type has been overridden explicitly (see \cref{sec:label_type}),
-% theorem-like environments when \package{ntheorem} is loaded, in which
-% case it is the environment name, and appendices. For the latter, the
-% \meta{type} is ``appendix'' for the top-level sectioning command
-% (|\chapter| or |\section|, depending on the document class),
-% ``subappendix'' for the sectioning command one level below (|\section|
-% or |subsection|), ``subsubappendix'' for the next level of sectioning
-% command, etc.
+% theorem-like environments when \package{ntheorem} or \package{amsthm}
+% are loaded, in which case it is the environment name, and appendices.
+% For the latter, the \meta{type} is ``appendix'' for the top-level
+% sectioning command (|\chapter| or |\section|, depending on the document
+% class), ``subappendix'' for the sectioning command one level below
+% (|\section| or |subsection|), ``subsubappendix'' for the next level of
+% sectioning command, etc.
%
% As in the case of the |\crefname| and |\Crefname| commands, if the
% corresponding |\Crefformat| is undefined when |\crefformat| is called,
% it will define the |\Crefformat| to produce a capitalised version of
% |\crefformat|, using |\MakeUppercase|. Conversely, if the corresponding
-% |\crefformat| is undefined whe |\Crefformat| is called, it will define
+% |\crefformat| is undefined when |\Crefformat| is called, it will define
% the |\crefformat| to produce a lower-case version of |\Crefformat|,
% using |\MakeLowercase|. Obviously, this will only work properly if the
% format starts with a letter, and letter constructs (such as accented
@@ -981,26 +1120,26 @@
% arguments, |#1|, |#2| and |#3|. The first argument is the formatted
% version of the label counter (e.g.\ |\theequation|). The other two are
% used to mark the beginning and end of the part of the cross-reference
-% that forms the hyper-link when the \package{hyperref} package is used,
+% that forms the hyperlink when the \package{hyperref} package is used,
% and \emph{must} appear in that order (see \cref{sec:other_packages}).
%
% As an example,
% \begin{quote}
% |\crefformat{equation}{Eq.~(#2#1#3)}|
% \end{quote}
-% will type-set equation references as
+% will typeset equation references as
% \begin{quote}
% Eq.~(\meta{counter})
% \end{quote}
-% with the counter (excluding the brackets) forming the hyper-link.
+% with the counter (excluding the brackets) forming the hyperlink.
%
-% Note that the hyper-link arguments are \emph{not} letters, so if |#2|
+% Note that the hyperlink arguments are \emph{not} letters, so if |#2|
% appears at the beginning of \meta{format}, \package{cleveref} will not
% be able to automatically define the other capitalisation variant
% automatically using |\MakeUppercase| or |\MakeLowercase|. In this case,
% you will have to define both variants separately. For example, if you
-% wanted to the ``Eq.'' to be part of the hyper-link, you would have to
-% define:
+% wanted the ``Eq.''\ to be part of the hyperlink, you would have to
+% explicitly define:
% \begin{quote}
% |\crefformat{equation}{#2eq.~(#1)#3}|\\
% |\Crefformat{equation}{#2Eq.~(#1)#3}|
@@ -1016,32 +1155,33 @@
% |\Crefformat|, the commands take two arguments: the cross-reference
% type, and the formatting code.
% \begin{quote}
-% |\crefrangeformat{|\meta{type}|}{|\meta{format}|}|\\
-% |\Crefrangeformat{|\meta{type}|}{|\meta{format}|}|
+% |\crefrangeformat|\marg{type}\marg{format}\\
+% |\Crefrangeformat|\marg{type}\marg{format}
% \end{quote}
% The same comments apply as in the case of single cross-references: the
% \meta{type} is usually the name of the counter, except for appendices,
% labels with explicitly overridden types, and theorem-like environments
-% when \package{ntheorem} is loaded. Again, if the other-capitalisation
-% variant is not already defined, it will be defined automatically.
+% when \package{ntheorem} or \package{amsthm} are loaded. Again, if the
+% other-capitalisation variant is not already defined, it will be defined
+% automatically.
%
% The \meta{format} argument can again be any valid \LaTeX{} code, with
% fragile commands |\protect|ed. However, this time it should contain
% \emph{six} arguments, |#1|--|#6|. The first two (|#1| and |#2|) are the
% formatted versions of the label counters, the next two (|#3| and |#4|)
-% are used to mark the beginning and end of the hyper-link for the first
+% are used to mark the beginning and end of the hyperlink for the first
% cross-reference, and the final two (|#5| and |#6|) mark the beginning
-% and end of the second cross-reference's hyper-link.
+% and end of the second cross-reference's hyperlink.
%
% As an example,
% \begin{quote}
% |\crefrangeformat{equation}{eqs.~(#3#1#4) to~(#5#2#6)}|
% \end{quote}
-% would type-set equation reference ranges as
+% would typeset equation reference ranges as
% \begin{quote}
% eqs.~(\meta{counter1}) to~(\meta{counter2})
% \end{quote}
-% with the counters (excluding the brackets) forming the hyper-links.
+% with the counters (excluding the brackets) forming the hyperlinks.
%
%
% \subsubsection{Multiple Cross-References}
@@ -1065,14 +1205,14 @@
% cross-references in a list of more than two, and the format for the
% last cross-reference in a list of more than two.
% \begin{quote}
-% |\crefmultiformat{|\meta{type}|}{|\meta{first}|}{|\meta{second}|}{|\meta{middle}|}{|\meta{last}|}|\\
-% |\Crefmultiformat{|\meta{type}|}{|\meta{first}|}{|\meta{second}|}{|\meta{middle}|}{|\meta{last}|}|\\
-% |\crefrangemultiformat{|\meta{type}|}{|\meta{first}|}{|\meta{second}|}{|\meta{middle}|}{|\meta{last}|}|\\
-% |\Crefrangemultiformat{|\meta{type}|}{|\meta{first}|}{|\meta{second}|}{|\meta{middle}|}{|\meta{last}|}|
+% |\crefmultiformat|\marg{type}\marg{first}\marg{second}\marg{middle}\marg{last}\\
+% |\Crefmultiformat|\marg{type}\marg{first}\marg{second}\marg{middle}\marg{last}\\
+% |\crefrangemultiformat|\marg{type}\marg{first}\marg{second}\marg{middle}\marg{last}\\
+% |\Crefrangemultiformat|\marg{type}\marg{first}\marg{second}\marg{middle}\marg{last}
% \end{quote}
%
% The \meta{type} is, as ever, the counter name, except for appendices,
-% explicitly overridden label types, and theorem-like environments then
+% explicitly overridden label types, and theorem-like environments when
% the \package{ntheorem} or \package{amsthm} packages are loaded. The
% same considerations apply to the formatting arguments \meta{first},
% \meta{second}, \meta{middle} and \meta{last} as for the \meta{format}
@@ -1087,7 +1227,7 @@
%
% Be careful to get the spaces at the beginning and end of the formatting
% code correct: the \meta{first} and \meta{second}, or \meta{first},
-% \meta{middle} and \meta{last}, \LaTeX{} code is type-set one after
+% \meta{middle} and \meta{last}, \LaTeX{} code is typeset one after
% another in a multi-reference, with no space separating them. You may or
% may not want spaces at the beginning and end of the formatting code,
% depending on the formatting you desire. For example, in the default
@@ -1113,7 +1253,7 @@
% |\crefmultiformat| or |\crefrangemultiformat| command. Typically, the
% |\labelcref| formats should be defined identically to the standard
% |\cref| formats, except for the \meta{first} part, which should leave
-% off the cross-reference name.
+% off the cross-reference name. This is not enforced, however.
%
%
%
@@ -1124,9 +1264,40 @@
% yet.\footnote{Contributions of translations for missing languages are
% very welcome! See \cref{sec:code:babel} for information on how to
% contribute translations.} The \package{babel} package is also supported
-% when it is loaded, allowing you to change language using the
-% \package{babel} language switching commands such as |\selectlanguage|
-% and |\foreignlanguage|.
+% when it is loaded, allowing you to change the language used in
+% cross-references using the \package{babel} language switching commands,
+% such as |\selectlanguage| and |\foreignlanguage|.
+%
+% Note that, even when using \package{babel}, you still need to tell
+% \package{cleveref} which language it should use for the default
+% cross-reference formats. It is \emph{not} sufficient to pass the
+% language option to \package{babel} alone. You \emph{must} also
+% \emph{either} pass the desired language option to the
+% \package{cleveref} package directly when loading it:
+% \begin{quote}
+% |\usepackage|\oarg{language}|{cleveref}|
+% \end{quote}
+% \emph{or} specify the desired language globally as a document class
+% option:
+% \begin{quote}
+% |\documentclass|\oarg{language}\marg{class}\\
+% |\usepackage{babel}|\\
+% |\usepackage{cleveref}|\\
+% \end{quote}
+% The latter method is strongly recommended. \LaTeX{} automatically
+% passes document class options to \emph{every} loaded package. So
+% specifying the language as a global option causes the appropriate
+% language support to be enabled automatically in every package that
+% supports it.
+%
+% When writing multi-language documents, you may need to specify multiple
+% language options in order to load \package{babel} support for all of
+% them. In this case, \package{babel} sets the initial document language
+% to the \emph{last} language option. (See the \package{babel}
+% documentation for more details.) \package{Cleveref} does the same: the
+% last language in the option list determines the language for the
+% initial cross-reference format definitions; all other language options
+% are ignored by \package{cleveref}.
%
% The \package{babel} support works by redefining the cross-reference
% names and conjunctions for the default cross-reference types. Any
@@ -1145,7 +1316,7 @@
% documentation.)
%
% If you have defined formats for new cross-reference types for which no
-% defaults are provided, then you're on your own. \package{cleveref} will
+% defaults are provided, then you're on your own. \package{Cleveref} will
% not know how to redefine them for other languages, and again you will
% have to take care of it yourself, either by explicitly redefining them
% in your document after each language switch, or by hooking the
@@ -1166,7 +1337,7 @@
% and |\makeatother| to access them.)
%
% For example, if you wanted to redefine the equation format so that the
-% cross-reference name (``equation'') was also part of the hyper-link,
+% cross-reference name (``equation'') was also part of the hyperlink,
% but you still want to be able to switch language using \package{babel},
% you would need something like:
% \begin{quote}
@@ -1193,13 +1364,13 @@
% As described previously, a label's ``type'' is usually determined by
% its counter, or in the case of \package{ntheorem} or \package{amsthm}
% theorem-like environments by the environment name. However, sometimes
-% it is useful to override the type. \package{cleveref} provides two
+% it is useful to override the type. \package{Cleveref} provides two
% different mechanisms for accomplishing this.
%
% You can alias a counter to a different cross-reference type using the
% |\crefalias| command:
% \begin{quote}
-% |\crefalias{|\meta{counter}|}{|\meta{type}|}|
+% |\crefalias|\marg{counter}\marg{type}
% \end{quote}
% \meta{counter} will then use the cross-reference formatting of
% \meta{type}. This can be useful if you want multiple counters to use
@@ -1209,7 +1380,7 @@
% particular label, one-off. You can do this by supplying the desired
% type as an optional argument to the |\label| command:
% \begin{quote}
-% |\label[|\meta{type}|]{|\meta{label}|}|
+% |\label|\oarg{type}\marg{label}
% \end{quote}
%
% One circumstance in which is useful is when you want to define a
@@ -1261,6 +1432,18 @@
%
%
%
+% \section{The \file{cleveref.cfg} File}
+% If \package{cleveref} finds a \file{cleveref.cfg} file somewhere in the
+% \LaTeX{} search path, it automatically loads any definitions found in
+% that file. (For details of which directories \LaTeX{} searches, consult
+% the documentation for your site's \TeX{} installation.) The main use of
+% \file{cleveref.cfg} is to store any cross-reference format
+% customisations that you want to use in every document you write, so
+% that you don't have to include them explicitly in every document's
+% preamble.
+%
+%
+%
% \section{Poor Man's \package{cleveref}}
% Sometimes you may need to send your \LaTeX{} source to someone who
% can't or won't install the \package{cleveref} package themselves. For
@@ -1271,16 +1454,16 @@
%
% When the \option{poorman} option is supplied, your document will be
% processed as normal. But in addition, a |sed| script will automatically
-% be written, containing rules for replacing all the |\cref| commands
-% with the \LaTeX{} code that they would produce, and using the standard
-% |\ref| command to produce the cross-references themselves. I.e.\ the
-% script rewrites your document as you would have done if you had had to
-% do it manually!
+% be written, containing rules for replacing all the \package{cleveref}
+% commands with the \LaTeX{} code that they would produce, and using the
+% standard |\ref| command to produce the cross-references themselves.
+% I.e.\ the script rewrites your document as you would have done if you
+% had had to do it manually!
%
% The advantage, of course, is that you \emph{don't} have to do it
% manually. Instead, you can use all the features of \package{cleveref},
% and once you've created a version of your document that you want to
-% send elsewere, you can process it through the |sed| script to
+% send elsewhere, you can process it through the |sed| script to
% completely remove the \package{cleveref} dependency. The recipient
% won't even realise you used \package{cleveref}!
%
@@ -1313,13 +1496,16 @@
% case.
%
% Note that the \option{poorman} script cannot fully reproduce the
-% type-setting of the original \package{cleveref} cross-references in all
+% typesetting of the original \package{cleveref} cross-references in all
% cases.\footnote{At least, not without resorting to inserting low-level
% \LaTeX{} code in your document, which would somewhat defeat the purpose
-% of the \option{poorman} option.} In particular, any customisation of
-% hyper-links will be lost, and if you're using \package{varioref} with
-% the \option{legacyvarioref} option (see \cref{sec:other_packages}), the
-% spacing before the |\vref| command will not be correct.
+% of the \option{poorman} option.} In particular, if you're using the
+% \package{hyperref} package (see \cref{sec:other_packages}) to turn
+% cross-references into hyperlinks, any customisation of hyperlinks will
+% be lost. And if you're using the \package{varioref} package (see
+% \cref{sec:other_packages}), you may need to manually tweak the spacing
+% in front of some of the \package{varioref} commands in the document
+% produced by the |sed| script.
%
%
%
@@ -1327,24 +1513,38 @@
% \label{sec:other_packages}
% The \package{cleveref} package \emph{must} be loaded \emph{after} all
% other packages that don't specifically support it,\footnote{At the time
-% of writing, I'm not aware of any that do.} i.e.\ the
+% of writing, the only package I'm aware of that should be loaded after
+% \package{cleveref} is the \package{hypdvips} package.} i.e.\ the
% \begin{quote}
% |\usepackage{cleveref}|
% \end{quote}
-% line should always be the last |\usepackage| command in your document's
-% preamble.
-%
-% Since \package{cleveref} redefines many internal commands involved in
-% \LaTeX{}'s cross-referencing system, it can interact badly with other
-% packages that do the same. \package{cleveref} implements a
-% significantly enhanced version of the features found in the
-% \package{fancyref} package, \package{ntheorem}'s \option{thref} option,
-% and \package{varioref}'s |\labelformat| command. Although these
-% features may (or may not) work correctly alongside \package{cleveref},
-% there is no good reason to use these when using \package{cleveref}, and
-% their use is unsupported. (Note that \package{varioref} \emph{is} fully
-% supported by \package{cleveref}, just that \package{cleveref}'s
-% features supersede \package{varioref}'s |\labelformat| feature.)
+% line should usually be the last |\usepackage| command in your
+% document's preamble.
+%
+% \package{cleveref} tries as far as possible to minimise its impact on
+% the standard \LaTeX{} cross-referencing machinery, allowing it to work
+% alongside many of the other packages that also enhance \LaTeX{}'s
+% cross-referencing features, though it can occasionally interact badly
+% with packages that redefine the same core \LaTeX{} commands. Beyond
+% peacefully co-existing with many packages, \package{cleveref} includes
+% specific support for a number other packages, allowing it to integrate
+% its clever cross-referencing features with the features provided by
+% these packages: \package{babel}, \package{hyperref},
+% \package{varioref}, \package{ntheorem}, \package{amsthm},
+% \package{aliascnt}, \package{subfig}, \package{algorithm},
+% \package{algorithm2e}, \package{listings}.
+%
+% \package{cleveref} implements a significantly enhanced version of the
+% features found in the \package{fancyref} package, \package{ntheorem}'s
+% \option{thref} option, and \package{varioref}'s |\labelformat| command.
+% Although these features may (or may not) work correctly alongside
+% \package{cleveref}, there is no good reason to use them when using
+% \package{cleveref}, and their use is unsupported. (Note that
+% \package{varioref} \emph{is} fully supported by \package{cleveref},
+% just that \package{cleveref}'s features supersede \package{varioref}'s
+% |\labelformat| feature. Similarly, \package{ntheorem} is fully supported
+% and even recommended, only the \option{thref} option is superseded by
+% \package{cleveref}.)
%
% \DescribeMacro{\thref}
% \DescribeMacro{\vref}
@@ -1375,32 +1575,13 @@
% commands, \package{cleveref} seizes the opportunity to get rid of the
% irritating spacing behaviour of the |\vref| and |\Vref| commands,
% instead making it consistent with the other \package{cleveref}
-% cross-referencing commands. This also frees up the starred variants to
-% be used to suppress hyper-links when the \package{hyperref} package is
-% loaded, as usual. (Unfortunately, due to lack of support for this in
-% \package{varioref}, the page references will still be hyper-links, even
-% when using the starred variants. Go bug the \package{varioref}
-% maintainer about this if you don't like it.)
-%
-% \DescribeMacro{legacyvarioref}
-% However, the \package{cleveref} redefinitions break strict
-% compatibility with the original \package{varioref} commands. If you
-% need the original spacing behaviour for compatibility reasons, pass the
-% \option{legacyvarioref} option to \package{cleveref}. If this option is
-% supplied, only the original \package{varioref} commands |\vref|,
-% |\vref*|, |\vrefrange| and |\fullref| will be provided, not any of the
-% additional variants, and the starred variants will change the spacing
-% around the commands as per the original \package{varioref}
-% implementation, rather than supressing hyper-links.
-%
-% \package{cleveref} should now be compatible with the \package{memoir}
-% class, as well as with the \package{titleref}, \package{nameref} and
-% \package{byname} packages, and \package{hyperref}'s \option{backref}
-% option. This support is quite new, however, so expect some niggles and
-% please report any bugs you encounter. Other packages which alter the
-% \LaTeX{} referencing system may or may not work properly with
-% \package{cleveref}. See \cref{sec:known_bugs} for additional
-% information.
+% cross-referencing commands. This also frees up the starred variants of
+% the \package{varioref} commands to be used for suppressing hyperlinks
+% when the \package{hyperref} package is loaded, as usual.
+% (Unfortunately, due to lack of support for this in \package{varioref},
+% the page references will still sometimes be hyperlinks, even when using
+% the starred variants. Go bug the \package{varioref} maintainer about
+% this if you don't like it.)
%
%
%
@@ -1410,12 +1591,18 @@
% \subsection{Known Bugs, Non-Bugs, and Work-Arounds}
% In no particular order:
% \begin{itemize}
-% \item When both the \package{amsmath} \emph{and} \package{hyperref}
-% packages are loaded at the same time, the \package{cleveref}
-% cross-referencing commands do not work when used within section
-% titles. If anyone can figure out why, let me know! As a work-around,
-% use |\ref| within section titles when your document uses both
-% \package{amsmath} and \package{hyperref}.
+% \item If you are using both \package{varioref} and \package{hyperref},
+% \emph{make sure you are loading them in the correct order}, otherwise
+% cross-references will reference completely the wrong thing
+% \emph{without any warning in the \LaTeX{} output or log!} The
+% packages \emph{must} be loaded in the following order:
+% \package{varioref}, \package{hyperref}, \package{cleveref}.
+% \item If you are using \package{babel}, you \emph{must still} pass the
+% appropriate language option to \package{cleveref}, as well as to
+% \package{babel}. Passing it to \package{babel} alone is \emph{not}
+% sufficient (you will get the default English cross-reference
+% formats). The best way to set the document language is as a global
+% option in the |\documentclass| line.
% \item \package{cleveref} will not work properly with the standard
% \LaTeX{} |eqnarray| environment. There is no intention to fix this.
% The |eqnarray| environment is poorly implemented, making it difficult
@@ -1424,48 +1611,70 @@
% |gather|, |align|, |multline| and |split|, which \emph{do} work
% properly with \package{cleveref}. (See
% \url{http://www.tug.org/pracjourn/2006-4/madsen/}).
-% \item \package{cleveref} doesn't include support for all languages yet.
-% Please contribute translations for missing languages!\footnote{See
-% \cref{sec:code:babel} for information on how to contribute
-% translations.}
% \item \package{cleveref} can't cope with active characters being
% present in cross-reference label names. For example, if French
% \package{babel} support is loaded, the commonly used ``:'' in label
% names will often fail, spewing the usual random selection of
% mysterious \TeX{} errors that accompany such deep-seated errors. The
% solution is to avoid using active characters in label names. (You may
-% need to consult e.g.\ the \package{babel} documentation to discover
-% which active characters are defined in your language.)
+% need to consult the \package{babel} documentation to discover which
+% active characters are defined in your language.)
+% \item When both the \package{amsmath} \emph{and} \package{hyperref}
+% packages are loaded at the same time, the \package{cleveref}
+% cross-referencing commands do not work when used within section
+% titles. If anyone can figure out why, let me know! As a work-around,
+% use |\ref| within section titles when your document uses both
+% \package{amsmath} and \package{hyperref}.
+% \item When using \package{varioref} and \package{hyperref} with
+% \package{cleveref}, the \package{cleveref}\linebreak[4]
+% \option{nameinlink} option will not cause the word ``page'' in the
+% page-reference part of a |\vref| (or other \package{varioref})
+% command to be included in the hyperlink, nor will the ``on the
+% previous page'' (or similar) text produced by |\vref| be hyperlinked.
+% This is not strictly speaking a \package{cleveref} issue. It is the
+% normal behaviour of the \package{hyperref}-enhanced version of
+% \package{varioref}'s |\vpageref| command, which \package{cleveref}
+% uses to produce the page references in its enhanced |\vref| command.
+% (This \emph{might} be improved in a future version by partially
+% overriding \package{hyperref}.)
+% \item \package{cleveref} doesn't know about the \package{subfloat}
+% package, so you have to revert to using |\ref| for cross-references
+% to sub-figures. (This will be fixed in a future version.)
+% \item The \package{beamer} document class redefines the |\label|
+% command in a particularly devious way that breaks
+% \package{cleveref}'s optional argument to that command. (This will be
+% fixed in a future version.)
+% \item \package{cleveref} is incompatible with the \option{showonlyrefs}
+% option of the \package{mathtools} package, though it should be
+% compatible with the rest of \package{mathtools}. (This will be fixed
+% in a future version.)
+% \item \package{cleveref} doesn't include support for all languages yet.
+% Please contribute translations for missing languages!\footnote{See
+% \cref{sec:code:babel} for information on how to contribute
+% translations.}
% \item \package{cleveref} assumes that counters are only ever reset by
% the standard sectioning commands (|\chapter|, |\section|, etc.). If
% this is not the case, the automatic compression of consecutive
% cross-references into a reference range may be incorrect. Making this
% more flexible would be a simple task, but so far there doesn't seem
% to be much need for it.
-% \item \package{cleveref} doesn't know about the \package{subfloat}
-% package, so you have to revert to using |\ref| for cross-references
-% to sub-figures. (This should be fixed in a future version.)
-% \item The \package{beamer} document class redefines the |\label|
-% command in a particularly devious way that breaks
-% \package{cleveref}'s optional argument to that command. (This should
-% be fixed in a future version.)
% \item The \option{poorman} |sed| script loses any custom
-% \package{cleveref} hyper-link formatting you might have defined, and
-% does not reproduce the original spacing around the |\vref| command
-% when \package{varioref} is used with the \option{legacyvarioref}
-% option. This is not a bug; it is a side-effect of the intended
-% purpose of the \option{poorman} option. The philosophy behind
-% \option{poorman} is to replace \package{cleveref}'s enhanced
-% cross-referencing with standard \LaTeX{} cross-reference commands
-% that are guaranteed to work with any standard \LaTeX{} installation.
-% Although it would be simple to fix these ``bugs'', it's almost
-% certainly impossible without using low-level \LaTeX{} code that is
-% unlikely to be supported by journals, thereby defeating the whole
-% purpose of the \option{poorman} option.
+% \package{cleveref} hyperlink formatting you might have defined, and
+% does not always reproduce the original spacing around the
+% \package{varioref} commands when \package{varioref} is used. This is
+% not a bug; it is a side-effect of the intended purpose of the
+% \option{poorman} option. The philosophy behind \option{poorman} is to
+% replace \package{cleveref}'s enhanced cross-referencing with standard
+% \LaTeX{} cross-reference commands that are guaranteed to work with
+% any standard \LaTeX{} installation. Although it would be simple to
+% fix these ``bugs'', it's almost certainly impossible without using
+% low-level \LaTeX{} code that is unlikely to be supported by academic
+% journals, for example, thereby defeating the whole purpose of the
+% \option{poorman} option.
% \end{itemize}
%
%
-% \subsection{Possible Improvements}
+% \subsection{Possible New Features and Other Improvements}
% In no particular order:
% \begin{itemize}
% \item The \option{poorman} option could be enhanced to allow a choice
@@ -1487,18 +1696,18 @@
% contributing the \package{amsthm} support code, and to Stefan Pinnow,
% Gonzalo Medina, Massimo Redaelli, Philip H\"olzenspies, Aleksander
% Gorohovski and Benjamin H{\o}yer for contributing translations. Thanks
-% also to Susie Goldschmidt for additional help with some of the
-% translations. Many people have suggested improvements or reported bugs,
-% indeed many have put significant effort into helping investigate and
-% fix them. So thanks (in alphabetical order) to: Alan Munn, Aleksander
-% Gorohovski, Anand Deopurkar, Arne Meier, Bas Ploeger, Dan Luecking,
-% David Gleich, Denis Bitouz\'e, Domenic Denicola, Donald Arsenau,
-% Hendrik Maryns, James Sharam, Jens Mueller, Joel C. Salomon, Joris
-% Pinkse, Kristian Debrabant Leo Shidai Liu, Lev Bishop, Mak Trifkovic,
-% Matej Batic, Matt Gately, Matthew Skala, Michael Barber, Michael
-% Gorven, Michal Kaut, Olivier Roy, Paul Gomme, Ricardo de Aldama
-% S\'anchez, Stefan Pinnow, Ted Pavlic, Thomas Arildsen, and Uwe L\"uck
-% for their help. (If I missed you out, please let me know!)
+% also to Susanna Goldschmidt for additional help with the translations.
+% Many people have suggested improvements or reported bugs, indeed many
+% have put significant effort into helping investigate and fix them. So
+% thanks (in alphabetical order) to: Alan Munn, Aleksander Gorohovski,
+% Anand Deopurkar, Arne Meier, Bas Ploeger, Dan Luecking, David Gleich,
+% Denis Bitouz\'e, Domenic Denicola, Donald Arseneau, Hendrik Maryns,
+% James Sharam, Jens Mueller, Joel C. Salomon, Joris Pinkse, Kristian
+% Debrabant, Leo Shidai Liu, Lev Bishop, Mak Trifkovic, Matej Batic, Matt
+% Gately, Matthew Skala, Michael Barber, Michael Gorven, Michal Kaut,
+% Mico Loretan, Olivier Roy, Paul Gomme, Ricardo de Aldama S\'anchez,
+% Stefan Pinnow, Ted Pavlic, Thomas Arildsen, and Uwe L\"uck for their
+% help. (If I missed you out, please let me know!)
%
%
% \StopEventually{\clearpage\PrintChanges\clearpage\PrintIndex}
@@ -1507,37 +1716,37 @@
% \clearpage
% \section{Implementation}
% Essentially, the core of the implementation consists of causing an
-% extra piece of information -- the label ``type'' -- to be written to
-% the aux file, and defining \cmd{\cref} commands which use this extra
-% information to type-set the reference.
+% extra piece of information --- the label ``type'' --- to be written to
+% the \file{aux} file, and defining \cmd{\cref} commands which use this
+% extra information to typeset the cross-reference.
%
-% The least invasive implementation of this kind of thing seems to be
-% that used by the \package{varioref} package. Namely, to redefine the
-% \cmd{\refstepcounter} command so that the \cmd{\@currentlabel} macro,
-% which usually just contains the type-set version of the counter, now
-% contains the additional type information.
+% The least invasive previous implementation of this kind of thing seems
+% to be that used by the \package{varioref} package. Namely, to redefine
+% the \cmd{\refstepcounter} command so that the \cmd{\@currentlabel}
+% macro, which usually just contains the typeset version of the counter,
+% now contains the additional type information.
%
% However, even less invasive than \package{varioref}'s implementation is
% to leave \cmd{\@currentlabel} alone, and define a new
% \cmd{\cref@currentlabel} macro to hold the extra information. (In fact,
% we store three extra pieces of information: the type, the counter value
% itself, and the value of the counter that causes the label's counter to
-% be reset, which we call the ``prefix'' from now on.)
-% \cmd{\@currentlabel} eventually gets written to the aux file as an
-% argument to \cmd{\newlabel} by the usual \LaTeX{} label mechanisms. In
-% order to get the information in \cmd{\cref@currentlabel} into the aux
-% file, we also have to redefine the \cmd{\label} macro so that it writes
-% \emph{two} \cmd{\newlabel} lines to the aux file for \emph{each} label:
-% the standard one, plus an additional one which contains the extra
-% information in \cmd{\cref@currentlabel}. The additional \cmd{\newlabel}
-% line has the prefix |cref@| added to the label name. Thus the extra
-% information in \cmd{\cref@currentlabel} will end up in
-% \cmd{\r@cref@\meta{label}} when the aux file is re-read on the next
-% pass.
+% be reset, which we call the ``prefix'' from now on.) The standard
+% \cmd{\@currentlabel} contents eventually get written to the \file{aux}
+% file as an argument to \cmd{\newlabel} by the usual \LaTeX{} label
+% mechanisms. In order to also get the information in
+% \cmd{\cref@currentlabel} into the \file{aux} file, we have to redefine
+% the \cmd{\label} macro so that it writes \emph{two} \cmd{\newlabel}
+% lines to the \file{aux} file for \emph{each} label: the standard one,
+% plus an additional one which contains the extra information in
+% \cmd{\cref@currentlabel}. The additional \cmd{\newlabel} line has the
+% prefix |cref@| added to the label name. Thus the extra information in
+% \cmd{\cref@currentlabel} will end up in \cmd{\r@cref@\meta{label}} when
+% the \file{aux} file is re-read on the next pass.
%
% Doing things this way involves less hacking to get everything else
% working again, since the standard cross-reference mechanism and
-% \cmd{\ref} command are left entirely intact. \package{cleveref} can
+% \cmd{\ref} command are left entirely intact. \package{Cleveref} can
% then do what it likes with its own parallel set of labels, without
% getting in the way of other packages that play around with the
% cross-reference mechanism. The only downside is the additional memory
@@ -1545,7 +1754,7 @@
% unlikely to be a problem.
%
%
-% \subsection{Redefinitions of \LaTeX{} kernel macros}
+% \subsection{Redefinitions of \LaTeX{} Kernel Macros}
% \begin{macro}{\refstepcounter}
% \begin{macro}{\cref@currentlabel}
% \begin{macro}{\cref@old@refstepcounter}
@@ -1585,28 +1794,6 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\@footnotetext}
-% \begin{macro}{\@mpfootnotetext}
-% Footnotes don't use the \cmd{\refstepcounter} mechansism, but instead
-% set\linebreak[4] \cmd{\@currentlabel} directly in
-% \cmd{\@footnotetext} or \cmd{\@mpfootnotetext}. We modifiy these to
-% make them also set \cmd{\cref@currentlabel} appropriately.
-% \begin{macrocode}
-\let\cref@old@footnotetext\@footnotetext
-\let\cref@old@mpfootnotetext\@mpfootnotetext
-\def\@footnotetext{%
- \cref@constructprefix{footnote}{\cref@result}%
- \protected@xdef\cref@currentlabel{%
- [footnote][\arabic{footnote}][\cref@result]\p@footnote\@thefnmark}%
- \cref@old@footnotetext}
-\def\@mpfootnotetext#1{%
- \cref@constructprefix{mpfootnote}{\cref@result}%
- \protected@xdef\cref@currentlabel{%
- [footnote][\arabic{mpfootnote}][\cref@result]\p@footnote\@thefnmark}%
- \cref@old@mpfootnotetext{#1}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
%
% \begin{macro}{\label}
% We redefine the \cmd{\label} command to make it define \emph{two}
@@ -1615,11 +1802,11 @@
% label name, which contains the extra information from
% \cmd{cref@currentlabel}. We call the original \cmd{\label} command,
% stored in \cmd{\cref@old@label}, to write the standard label to the
-% aux file. However, to avoid other packages messing around with the
-% content of the parallel set of \package{cleveref}-specific labels, we
-% write those directly to the aux file ourselves. We also allow
-% \cmd{\label} to take an optional argument which overrides the default
-% reference type in \cmd{\cref@currentlabel}.
+% \file{aux} file. However, to avoid other packages messing around with
+% the content of the parallel set of \package{cleveref}-specific
+% labels, we write those directly to the \file{aux} file ourselves. We
+% also allow \cmd{\label} to take an optional argument which overrides
+% the default reference type in \cmd{\cref@currentlabel}.
%
% The redefinition of \cmd{\label} has to be postponed until the
% beginning of the document because some other packages postpone their
@@ -1629,6 +1816,7 @@
\AtBeginDocument{%
\let\cref@old@label\label
\def\label{\@ifnextchar[\label@optarg\label@noarg}%]
+ \let\cref@label\label
\def\label@noarg#1{%
\@bsphack%
\cref@old@label{#1}%
@@ -1643,423 +1831,158 @@
\cref@currentlabel\@nil{#1}}%
\protected@write\@auxout{}%
{\string\newlabel{cref@#2}{{\cref@currentlabel}{\thepage}}}%
- \@esphack}%
+ \@esphack}
+}% end of AtBeginDocument
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{amsmath}
-% \begin{macro}{\label}
-% \begin{macro}{\label@in@display}
-% The \package{amsmath} package redefines the \cmd{\label} command
-% within equation environments, so if it is loaded we have to extend
-% the behaviour to support the optional argument. With
-% \package{amsmath}, the original \cmd{\label} command is stored in
-% \cmd{\ltx@label}, and \cmd{\label@in@display} replaces \cmd{label}
-% inside equations. \cmd{\label@in@display} just saves the label for
-% later, and defining it is left until the end of the equation, when
-% \cmd{\ltx@label} is finally called.
%
-% To allow \cmd{\label} within equations to support an optional
-% argument, we first store the original \cmd{\label@in@display} and the
-% new \cmd{\label} macro we defined above (since \cmd{\label} will be
-% clobbered inside equations). Then we redefine \cmd{label@in@display}
-% so that it wraps all its arguments, including any optional argument,
-% in an extra set of braces. These are stripped away again by
-% \cmd{\ltx@label} before calling the \cmd{\label} macro we defined
-% above (saved in \cmd{\cref@label}).
+% \begin{macro}{\@footnotetext}
+% \begin{macro}{\@mpfootnotetext}
+% Footnotes don't use the \cmd{\refstepcounter} mechanism, but instead
+% set\linebreak[4] \cmd{\@currentlabel} directly in
+% \cmd{\@footnotetext} or \cmd{\@mpfootnotetext}. We modify these to
+% make them also set \cmd{\cref@currentlabel} appropriately.
% \begin{macrocode}
- \@ifpackageloaded{amsmath}{%
- \let\cref@label\label
- \let\cref@old@label@in@display\label@in@display
- \def\label@in@display{%
- \@ifnextchar[\label@in@display@optarg\label@in@display@noarg}%]
- \def\label@in@display@noarg#1{\cref@old@label@in@display{{#1}}}
- \def\label@in@display@optarg[#1]#2{%
- \cref@old@label@in@display{[#1]{#2}}}
- \def\ltx@label#1{\cref@label#1}
+\let\cref@old@footnotetext\@footnotetext
+\let\cref@old@mpfootnotetext\@mpfootnotetext
+\def\@footnotetext{%
+ \cref@constructprefix{footnote}{\cref@result}%
+ \protected@xdef\cref@currentlabel{%
+ [footnote][\arabic{footnote}][\cref@result]%
+ \p@footnote\@thefnmark}%
+ \cref@old@footnotetext}
+\def\@mpfootnotetext#1{%
+ \cref@constructprefix{mpfootnote}{\cref@result}%
+ \protected@xdef\cref@currentlabel{%
+ [footnote][\arabic{mpfootnote}][\cref@result]%
+ \p@footnote\@thefnmark}%
+ \cref@old@mpfootnotetext{#1}}
% \end{macrocode}
% \end{macro}
% \end{macro}
-% \end{macro}
%
-% \begin{macro}{\measure@}
-% \begin{macro}{\gmeasure@}
-% The \package{amsmath} multi-line equation environments scan their
-% bodies twice: once to measure, once to type-set. In the measure
-% phase, the \cmd{\label} command is disabled by letting it to
-% \cmd{\@gobble}. Unfortunately, this won't gobble all the arguments if
-% an optional argument is supplied to \cmd{\label}, so we have to
-% modify the \package{amsmath} measuring commands so that they let
-% \cmd{\label} to \cmd{\@gobble@optarg} instead.
%
-% Unfortunately, \package{amsmath} wasn't designed with redefinitions
-% of \cmd{\label} in mind, so there appears to be no safe way of doing
-% this other than copying the \package{amsmath} definitions and making
-% the modification directly in the macro's code. This is a recipe for
-% future chaos if these commands are ever modified in a new version of
-% \package{amsmath}, but it seems we have no choice. Luckily,
-% \package{amsmath} isn't updated too often!
-% \begin{macrocode}
-\def\measure@#1{%
- \begingroup
- \measuring@true
- \global\eqnshift@\z@
- \global\alignsep@\z@
- \global\let\tag@lengths\@empty
- \global\let\field@lengths\@empty
- \savecounters@
- \global\setbox0\vbox{%
- \let\math@cr@@@\math@cr@@@align@measure
- \everycr{\noalign{\global\tag@false
- \global\let\raise@tag\@empty \global\column@\z@}}%
- \let\label\@gobble@optarg% <<< cleveref modification
- \global\row@\z@
- \tabskip\z@
- \halign{\span\align@preamble\crcr
- #1%
- \math@cr@@@
- \global\column@\z@
- \add@amps\maxfields@\cr
- }%
- }%
- \restorecounters@
- \ifodd\maxfields@
- \global\advance\maxfields@\@ne
- \fi
- \ifnum\xatlevel@=\tw@
- \ifnum\maxfields@<\thr@@
- \let\xatlevel@\z@
- \fi
- \fi
- \setbox\z@\vbox{%
- \unvbox\z@ \unpenalty \global\setbox\@ne\lastbox
- }%
- \global\totwidth@\wd\@ne
- \if@fleqn \global\advance\totwidth@\@mathmargin \fi
- \global\let\maxcolumn@widths\@empty
- \begingroup
- \let\or\relax
- \loop
- \global\setbox\@ne\hbox{%
- \unhbox\@ne \unskip \global\setbox\thr@@\lastbox
- }%
- \ifhbox\thr@@
- \xdef\maxcolumn@widths{ \or \the\wd\thr@@ \maxcolumn@widths}%
- \repeat
- \endgroup
- \dimen@\displaywidth
- \advance\dimen@-\totwidth@
- \ifcase\xatlevel@
- \global\alignsep@\z@
- \let\minalignsep\z@
- \@tempcntb\z@
- \if@fleqn
- \@tempcnta\@ne
- \global\eqnshift@\@mathmargin
- \else
- \@tempcnta\tw@
- \global\eqnshift@\dimen@
- \global\divide\eqnshift@\@tempcnta
- \fi
- \or
- \@tempcntb\maxfields@
- \divide\@tempcntb\tw@
- \@tempcnta\@tempcntb
- \advance\@tempcntb\m@ne
- \if@fleqn
- \global\eqnshift@\@mathmargin
- \global\alignsep@\dimen@
- \global\divide\alignsep@\@tempcnta
- \else
- \global\advance\@tempcnta\@ne
- \global\eqnshift@\dimen@
- \global\divide\eqnshift@\@tempcnta
- \global\alignsep@\eqnshift@
- \fi
- \or
- \@tempcntb\maxfields@
- \divide\@tempcntb\tw@
- \global\advance\@tempcntb\m@ne
- \global\@tempcnta\@tempcntb
- \global\eqnshift@\z@
- \global\alignsep@\dimen@
- \if@fleqn
- \global\advance\alignsep@\@mathmargin\relax
- \fi
- \global\divide\alignsep@\@tempcntb
- \fi
- \ifdim\alignsep@<\minalignsep\relax
- \global\alignsep@\minalignsep\relax
- \ifdim\eqnshift@>\z@
- \if@fleqn\else
- \global\eqnshift@\displaywidth
- \global\advance\eqnshift@-\totwidth@
- \global\advance\eqnshift@-\@tempcntb\alignsep@
- \global\divide\eqnshift@\tw@
- \fi
- \fi
- \fi
- \ifdim\eqnshift@<\z@
- \global\eqnshift@\z@
- \fi
- \calc@shift@align
- \global\tagshift@\totwidth@
- \global\advance\tagshift@\@tempcntb\alignsep@
- \if@fleqn
- \ifnum\xatlevel@=\tw@
- \global\advance\tagshift@-\@mathmargin\relax
- \fi
- \else
- \global\advance\tagshift@\eqnshift@
- \fi
- \iftagsleft@ \else
- \global\advance\tagshift@-\displaywidth
- \fi
- \dimen@\minalignsep\relax
- \global\advance\totwidth@\@tempcntb\dimen@
- \ifdim\totwidth@>\displaywidth
- \global\let\displaywidth@\totwidth@
- \else
- \global\let\displaywidth@\displaywidth
- \fi
- \endgroup
-}
-\def\gmeasure@#1{%
- \begingroup
- \measuring@true
- \totwidth@\z@
- \global\let\tag@lengths\@empty
- \savecounters@
- \setbox\@ne\vbox{%
- \everycr{\noalign{\global\tag@false
- \global\let\raise@tag\@empty \global\column@\z@}}%
- \let\label\@gobble% <<< cleveref modification
- \halign{%
- \setboxz@h{$\m@th\displaystyle{##}$}%
- \ifdim\wdz@>\totwidth@
- \global\totwidth@\wdz@
- \fi
- &\setboxz@h{\strut@{##}}%
- \savetaglength@
- \crcr
- #1%
- \math@cr@@@
- }%
- }%
- \restorecounters@
- \if@fleqn
- \global\advance\totwidth@\@mathmargin
- \fi
- \iftagsleft@
- \ifdim\totwidth@>\displaywidth
- \global\let\gdisplaywidth@\totwidth@
- \else
- \global\let\gdisplaywidth@\displaywidth
- \fi
- \fi
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
+% \begin{macro}{\newtheorem}
+% A \cmd{\newtheorem} command provides sufficient information to
+% automatically define a reasonable cross-reference name for
+% theorem-like environments (\package{ntheorem}'s \option{thmref} does
+% essentially this). So we modify \cmd{\newtheorem} (actually, the
+% lower-level \cmd{\@othm}, \cmd{\@xnthm} and \cmd{\@ynthm} macros) so
+% that it does so. We do this in such a way that default definitions or
+% explicit \cmd{\crefname} definitions for theorem-like environments
+% override those produced automatically by our modified
+% \cmd{\newtheorem}.
%
-% \begin{macro}{\multline@}
-% \begin{macro}{\mmeasure@}
-% \begin{macro}{\label@mmeasure@noarg}
-% \begin{macro}{\label@mmeasure@optarg}
-% The |multline| environment works a bit differently to the other
-% \package{amsmath} environments, in that \cmd{\label} is
-% \emph{disabled} during the type-setting phase, and \emph{enabled}
-% during the measuring phase. To cope with \package{cleveref}'s
-% optional argument, we have to define separate versions of
-% \cmd{\label@in@display} specifically for \cmd{\mmeasure@}.
-% \begin{macrocode}
-\def\multline@#1{%
- \Let@
- \@display@init{\global\advance\row@\@ne \global\dspbrk@lvl\m@ne}%
- \chardef\dspbrk@context\z@
- \restore@math@cr
- \let\tag\tag@in@align
- \global\tag@false \global\let\raise@tag\@empty
- \mmeasure@{#1}%
- \let\tag\gobble@tag \let\label\@gobble@optarg% <<< cleveref modification
- \tabskip \if@fleqn \@mathmargin \else \z@skip \fi
- \totwidth@\displaywidth
- \if@fleqn
- \advance\totwidth@-\@mathmargin
- \fi
- \halign\bgroup
- \hbox to\totwidth@{%
- \if@fleqn
- \hskip \@centering \relax
- \else
- \hfil
- \fi
- \strut@
- $\m@th\displaystyle{}##\endmultline@math
- \hfil
- }% $
- \crcr
- \if@fleqn
- \hskip-\@mathmargin
- \def\multline@indent{\hskip\@mathmargin}%
- \else
- \hfilneg
- \def\multline@indent{\hskip\multlinegap}%
- \fi
- \iftagsleft@
- \iftag@
- \begingroup
- \ifshifttag@
- \rlap{\vbox{%
- \normalbaselines
- \hbox{%
- \strut@
- \make@display@tag
- }%
- \vbox to\lineht@{}%
- \raise@tag
- }}%
- \multline@indent
- \else
- \setbox\z@\hbox{\make@display@tag}%
- \dimen@\@mathmargin \advance\dimen@-\wd\z@
- \ifdim\dimen@<\multlinetaggap
- \dimen@\multlinetaggap
- \fi
- \box\z@ \hskip\dimen@\relax
- \fi
- \endgroup
- \else
- \multline@indent
- \fi
- \else
- \multline@indent
- \fi
- #1%
-}
-\def\mmeasure@#1{%
- \begingroup
- \measuring@true
- \def\label{% <<< cleveref modification
- \@ifnextchar[\label@in@mmeasure@optarg%]
- \label@in@mmeasure@noarg}%
- \def\math@cr@@@{\cr}%
- \let\shoveleft\@iden \let\shoveright\@iden
- \savecounters@
- \global\row@\z@
- \setbox\@ne\vbox{%
- \global\let\df@tag\@empty
- \halign{%
- \setboxz@h{\@lign$\m@th\displaystyle{}##$}%
- \iftagsleft@
- \ifnum\row@=\@ne
- \global\totwidth@\wdz@
- \global\lineht@\ht\z@
- \fi
- \else
- \global\totwidth@\wdz@
- \global\lineht@\dp\z@
- \fi
- \crcr
- #1%
- \crcr
- }%
- }%
- \ifx\df@tag\@empty\else\global\tag@true\fi
- \if@eqnsw\global\tag@true\fi
- \iftag@
- \setboxz@h{%
- \if@eqnsw
- \stepcounter{equation}%
- \tagform@\theequation
- \else
- \df@tag
- \fi
- }%
- \global\tagwidth@\wdz@
- \dimen@\totwidth@
- \advance\dimen@\tagwidth@
- \advance\dimen@\multlinetaggap
- \iftagsleft@\else
- \if@fleqn
- \advance\dimen@\@mathmargin
- \fi
- \fi
- \ifdim\dimen@>\displaywidth
- \global\shifttag@true
- \else
- \global\shifttag@false
- \fi
- \fi
- \restorecounters@
- \endgroup
-}
-\def\label@in@mmeasure@noarg#1{%
- \begingroup%
- \measuring@false%
- \cref@old@label@in@display{{#1}}%
- \endgroup}
-\def\label@in@mmeasure@optarg[#1]#2{%
- \begingroup%
- \measuring@false%
- \cref@old@label@in@display{[#1]{#2}}%
- \endgroup}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
+% The catch is that, although the \cmd{\newtheorem} command provides
+% the singular form, there's no way of reliably deducing the plural
+% form from this. Rather than implement some half-baked attempt at this
+% which will be wrong more often than it's right (especially in
+% languages other than English) and generally cause more trouble than
+% it's worth, we simply define the singular form but leave the plural
+% form undefined. If the latter is ever needed, it will produce a
+% ``undefined cross-reference type'' warning, prompting the author to
+% provide an appropriate \cmd{\crefname} definition themselves.
%
-% \begin{macro}{subequations}
-% In order for |subequations| to be sorted properly, \package{cleveref}
-% needs to know that the |equation| counter is effectively reset by the
-% |parentequation| counter within the |subequations| environment. This
-% isn't how |amsmath| implements subequations (for obvious reasons!),
-% but we harmlessly add the |equation| counter to the |parentequation|
-% counter's reset list \emph{within} |subequations| environments, so
-% that \package{cleveref}'s sorting mechanism can figure things out. We
-% also harmlessly make sure |parentequation| is reset by the same
-% counter as |equation|.
+% \begin{macro}{\@othm}
+% \begin{macro}{\@xnthm}
+% \begin{macro}{\@ynthm}
+% After sorting out its arguments, \cmd{\newtheorem} calls one of
+% \cmd{\@othm}, \cmd{\@xthm} or \cmd{\@ythm}. We add automatic
+% definitions of \cmd{\cref@\meta{type}@name} and\linebreak[4]
+% \cmd{\Cref@\meta{type}@name} to all three of these, and add the
+% theorem-like environment to the list of cross-reference types that
+% need to be defined from components at |\||begin{document}|. Since we
+% want explicit \cmd{\crefname}'s to override these automatic
+% definitions, we store the definitions in
+% \cmd{\cref@\meta{type}@name@preamble}, which are processed at
+% |\||begin{document}|) if they haven't been overridden. The default
+% definitions also get stored in \cmd{\cref@\meta{type}@name@preamble}
+% later on, so they too will override these automatic definitions,
+% which is what we want.
+%
+% All this means that these automatic \cmd{\newtheorem} definitions
+% will only work when \cmd{\newtheorem} is used in the preamble.
+% However, this is also true of (new) cross-reference types defined
+% using \cmd{\crefname}, so it doesn't seem worth the significant
+% effort of getting the automatic definitions to work within the
+% document body.
% \begin{macrocode}
- \let\cref@old@subequations\subequations%
- \let\cref@old@endsubequations\endsubequations%
- \cref@resetby{equation}{\cref@result}%
- \ifx\cref@result\relax\else%
- \@addtoreset{parentequation}{\cref@result}%
+\let\cref@old@othm\@othm
+\def\@othm#1[#2]#3{%
+ \edef\@tempa{\expandafter\noexpand%
+ \csname cref@#1@name@preamble\endcsname}%
+ \edef\@tempb{\expandafter\noexpand%
+ \csname Cref@#1@name@preamble\endcsname}%
+ \def\@tempc{#3}%
+ \ifx\@tempc\@empty\relax%
+ \expandafter\gdef\@tempa{}%
+ \expandafter\gdef\@tempb{}%
+ \else%
+ \if@cref@capitalise%
+ \expandafter\expandafter\expandafter\gdef\expandafter%
+ \@tempa\expandafter{\MakeUppercase #3}%
+ \else%
+ \expandafter\expandafter\expandafter\gdef\expandafter%
+ \@tempa\expandafter{\MakeLowercase #3}%
+ \fi%
+ \expandafter\expandafter\expandafter\gdef\expandafter%
+ \@tempb\expandafter{\MakeUppercase #3}%
\fi%
- \renewenvironment{subequations}{%
- \@addtoreset{equation}{parentequation}%
- \cref@old@subequations%
- }{%
- \gdef\cl@parentequation{}%
- \cref@old@endsubequations%
- \setcounter{parentequation}{0}%
- }%
+ \cref@stack@add{#1}{\cref@label@types}%
+ \cref@old@othm{#1}[#2]{#3}}
+\let\cref@old@xnthm\@xnthm
+\def\@xnthm#1#2[#3]{%
+ \edef\@tempa{\expandafter\noexpand%
+ \csname cref@#1@name@preamble\endcsname}%
+ \edef\@tempb{\expandafter\noexpand%
+ \csname Cref@#1@name@preamble\endcsname}%
+ \def\@tempc{#2}%
+ \ifx\@tempc\@empty\relax%
+ \expandafter\gdef\@tempa{}%
+ \expandafter\gdef\@tempb{}%
+ \else%
+ \if@cref@capitalise%
+ \expandafter\expandafter\expandafter\gdef\expandafter%
+ \@tempa\expandafter{\MakeUppercase #2}%
+ \else%
+ \expandafter\expandafter\expandafter\gdef\expandafter%
+ \@tempa\expandafter{\MakeLowercase #2}%
+ \fi%
+ \expandafter\expandafter\expandafter\gdef\expandafter%
+ \@tempb\expandafter{\MakeUppercase #2}%
+ \fi%
+ \cref@stack@add{#1}{\cref@label@types}%
+ \cref@old@xnthm{#1}{#2}[#3]}
+\let\cref@old@ynthm\@ynthm
+\def\@ynthm#1#2{%
+ \edef\@tempa{\expandafter\noexpand%
+ \csname cref@#1@name@preamble\endcsname}%
+ \edef\@tempb{\expandafter\noexpand%
+ \csname Cref@#1@name@preamble\endcsname}%
+ \def\@tempc{#2}%
+ \ifx\@tempc\@empty\relax%
+ \expandafter\gdef\@tempa{}%
+ \expandafter\gdef\@tempb{}%
+ \else%
+ \if@cref@capitalise%
+ \expandafter\expandafter\expandafter\gdef\expandafter%
+ \@tempa\expandafter{\MakeUppercase #2}%
+ \else%
+ \expandafter\expandafter\expandafter\gdef\expandafter%
+ \@tempa\expandafter{\MakeLowercase #2}%
+ \fi%
+ \expandafter\expandafter\expandafter\gdef\expandafter%
+ \@tempb\expandafter{\MakeUppercase #2}%
+ \fi%
+ \cref@stack@add{#1}{\cref@label@types}%
+ \cref@old@ynthm{#1}{#2}}
% \end{macrocode}
% \end{macro}
-%
-% \begin{macro}{\make@df@tag@@}
-% \begin{macro}{\make@df@tag@@@}
-% We override the internals of the \package{amsmath} \cmd{\tag} command
-% to add the additional information to the label definition. Since
-% labels produced by \cmd{\tag} have no logical ordering when sorting a
-% list of references, we give them a large numerical value so that they
-% get pushed to the end of sorted cross-reference lists.
-% \begin{macrocode}
- \def\make@df@tag@@#1{%
- \gdef\df@tag{\maketag@@@{#1}\def\@currentlabel{#1}%
- \def\cref@currentlabel{[equation][2147483647][]#1}}}
- \def\make@df@tag@@@#1{%
- \gdef\df@tag{\tagform@{#1}%
- \toks@\@xp{\p@equation{#1}}%
- \edef\@currentlabel{\the\toks@}%
- \edef\cref@currentlabel{[equation][2147483647][]\the\toks@}}}
- }{}% end of \@ifpackageloaded{amsmath}
-}% end of AtBeginDocument
-% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
+%
%
% \begin{macro}{\appendix}
% \begin{macro}{\cref@old@appendix}
@@ -2185,9 +2108,10 @@
% \end{macro}
%
%
+%
% \subsection{Utility Macros}
%
-% \subsubsection{miscelaneous}
+% \subsubsection{miscellaneous}
% \begin{macro}{\@gobble@optarg}
% A basic macro that gobbles one argument plus, if present, one
% optional argument.
@@ -2198,63 +2122,68 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\cref@append@toks}
+% A basic utility macro for appending tokens to a token register.
+% \begin{macrocode}
+\def\cref@append@toks#1#2{\toks0={#2}%
+ \edef\act{\noexpand#1={\the#1\the\toks0}}%
+ \act}%
+% \end{macrocode}
+% \end{macro}
%
-% \subsubsection{aux file information}
+%
+% \subsubsection{\file{aux} file information}
% \begin{macro}{\cref@getlabel}
% \begin{macro}{\cref@gettype}
% \begin{macro}{\cref@getcounter}
% \begin{macro}{\cref@getprefix}
% Define some utility macros for extracting label, type, and counter
-% information from the contents of \cmd{\cref@currentlabel}, as written to
-% the aux file and stored in \cmd{\r@cref@\meta{label}} when this is re-read
-% on the next pass. Some other packages commandeer the referencing
-% system to write label information to the aux file for other purposes,
-% and probably use \cmd{\ref} to recover it later. We still want them
-% to work, so our utility macros must cope with the type information
-% being absent. However, since we need them to be fully expandable in
-% various places, and \cmd{\@ifnextchar} is definitely \emph{not} fully
-% expandable, we use the work-around of having the macros store their
-% result in another macro, whose name is passed as the second
-% argument. This other macro \emph{will} then be fully expandable, and
-% can be used e.g.\ inside an \cmd{\edef} or
+% information from the contents of \cmd{\cref@currentlabel}, as written
+% to the \file{aux} file and stored in \cmd{\r@cref@\meta{label}} when
+% this is re-read on the next pass. Some other packages commandeer the
+% referencing system to write label information to the \file{aux} file
+% for other purposes, and probably use \cmd{\ref} to recover it later.
+% We still want them to work, so our utility macros must cope with the
+% type information being absent. However, since we need them to be
+% fully expandable in various places, and \cmd{\@ifnextchar} is
+% definitely \emph{not} fully expandable, we use the work-around of
+% having the macros store their result in another macro, whose name is
+% passed as the second argument. This other macro \emph{will} then be
+% fully expandable, and can be used e.g.\ inside an \cmd{\edef} or
% \cmd{\csname}\ldots\cmd{\endcsname}.
% \begin{macrocode}
-\def\cref@getlabel#1#2{%
- \expandafter\let\expandafter\@tempa\csname r@cref@#1\endcsname%
+\def\cref@getref#1#2{%
+ \expandafter\let\expandafter#2\csname r@cref@#1\endcsname%
\expandafter\expandafter\expandafter\def%
- \expandafter\expandafter\expandafter\@tempa%
+ \expandafter\expandafter\expandafter#2%
+ \expandafter\expandafter\expandafter{%
+ \expandafter\@firstoftwo#2}}
+\def\cref@getpageref#1#2{%
+ \expandafter\let\expandafter#2\csname r@cref@#1\endcsname%
+ \expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\expandafter#2%
\expandafter\expandafter\expandafter{%
- \expandafter\@firstoftwo\@tempa}%
+ \expandafter\@secondoftwo#2}}
+\def\cref@getlabel#1#2{%
+ \cref@getref{#1}{\@tempa}%
\expandafter\@cref@getlabel\@tempa\@nil#2}%
\def\@cref@getlabel{\@ifnextchar[%]
\@@cref@getlabel{\@@cref@getlabel[][][]}}
\def\@@cref@getlabel[#1][#2][#3]#4\@nil#5{\def#5{#4}}
\def\cref@gettype#1#2{%
- \expandafter\let\expandafter\@tempa\csname r@cref@#1\endcsname%
- \expandafter\expandafter\expandafter\def%
- \expandafter\expandafter\expandafter\@tempa%
- \expandafter\expandafter\expandafter{%
- \expandafter\@firstoftwo\@tempa}%
+ \cref@getref{#1}{\@tempa}%
\expandafter\@cref@gettype\@tempa\@nil#2}%
\def\@cref@gettype{\@ifnextchar[%]
\@@cref@gettype{\@@cref@gettype[][][]}}
\def\@@cref@gettype[#1][#2][#3]#4\@nil#5{\def#5{#1}}
\def\cref@getcounter#1#2{%
- \expandafter\let\expandafter\@tempa\csname r@cref@#1\endcsname%
- \expandafter\expandafter\expandafter\def%
- \expandafter\expandafter\expandafter\@tempa%
- \expandafter\expandafter\expandafter{%
- \expandafter\@firstoftwo\@tempa}%
+ \cref@getref{#1}{\@tempa}%
\expandafter\@cref@getcounter\@tempa\@nil#2}
\def\@cref@getcounter{\@ifnextchar[%]
\@@cref@getcounter{\@@cref@getcounter[][][]}}
\def\@@cref@getcounter[#1][#2][#3]#4\@nil#5{\def#5{#2}}
\def\cref@getprefix#1#2{%
- \expandafter\let\expandafter\@tempa\csname r@cref@#1\endcsname%
- \expandafter\expandafter\expandafter\def%
- \expandafter\expandafter\expandafter\@tempa%
- \expandafter\expandafter\expandafter{%
- \expandafter\@firstoftwo\@tempa}%
+ \cref@getref{#1}{\@tempa}%
\expandafter\@cref@getprefix\@tempa\@nil#2}
\def\@cref@getprefix{\@ifnextchar[%]
\@@cref@getprefix{\@@cref@getprefix[][][]}}
@@ -2279,8 +2208,8 @@
% \cmd{\cref@getprefix}). This information consists of the numerical
% value of each counter that's involved in resetting the label's
% counter, i.e.\ it contains the numerical values of the chapter,
-% section, subsection\dots numbers that (ought to) make up the
-% formatted label produced by \cmd{\the\meta{counter}}. E.g. if
+% section, subsection\dots{} numbers that (ought to) make up the
+% formatted label produced by \cmd{\the\meta{counter}}. E.g.\ if
% \cmd{\theequation} produces ``B.1.3'', this utility macro will return
% ``2,1'' (the ``3'' corresponds to the equation number itself, which
% is stored separately in \cmd{\cref@currentlabel}). The first argument
@@ -2315,15 +2244,6 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\cref@append@toks}
-% A basic utility macro for appending tokens to a token register.
-% \begin{macrocode}
-\def\cref@append@toks#1#2{\toks0={#2}%
- \edef\act{\noexpand#1={\the#1\the\toks0}}%
- \act}%
-% \end{macrocode}
-% \end{macro}
-%
%
% \subsubsection{Stack data structures}
% \begin{macro}{\cref@stack@init}
@@ -2336,7 +2256,7 @@
% We treat multiple references, supplied as a comma-separated list to
% \cmd{\cref} or \cmd{\Cref}, as a stack structure. So we define some
% utility macros for manipulating stacks (\cmd{\@nil} is used as an
-% end-of-stack delimeter).
+% end-of-stack delimiter).
% \begin{macrocode}
\def\cref@stack@init#1{\def#1{\@nil}}
\def\cref@stack@top#1{\expandafter\@cref@stack@top#1}
@@ -2430,7 +2350,7 @@
% macro passed in the second argument, which we use later to sort lists
% of references. We use insertion sort despite its $O(n^2)$ scaling
% because it's simpler to code, and because we're very unlikely to
-% encounter lists of more than ten or so referrences, so in practice a
+% encounter lists of more than ten or so references, so in practice a
% more complicated $O(n\log n)$ sorting algorithm will very likely be
% slower anyway in practice.
% \begin{macrocode}
@@ -2516,35 +2436,36 @@
% the sorted stack |#4|.
% \begin{macrocode}
\def\@cref@stack@insert#1#2#3#4{%
- \let\@iterate\relax%
+ \let\cref@iterate\relax%
\cref@isstackempty{#4}%
\if@cref@stackempty%
\cref@stack@push{#1,#2#3}{#4}%
\else%
- \edef\@tempa{\cref@stack@top{#4}}%
- \expandafter\@cmp\expandafter{\@tempa}{#2}{\cref@result}%
+ \edef\cref@elem{\cref@stack@top{#4}}%
+ \expandafter\@cmp\expandafter{\cref@elem}{#2}{\cref@result}%
\ifnum\cref@result=2\relax%
\cref@stack@push{#1,#2#3}{#4}%
\else%
\cref@stack@pop{#4}%
- \edef\@tempa{{\noexpand#1,\@tempa}{\noexpand#2}%
+ \edef\cref@elem{{\noexpand#1,\cref@elem}{\noexpand#2}%
{\noexpand#3}{\noexpand#4}}%
- \expandafter\def\expandafter\@iterate\expandafter%
- {\expandafter\@cref@stack@insert\@tempa}%
+ \expandafter\def\expandafter\cref@iterate\expandafter%
+ {\expandafter\@cref@stack@insert\cref@elem}%
\fi%
\fi%
- \@iterate}
+ \cref@iterate}
% \end{macrocode}
% \end{macro}
%
%
% \subsubsection{Sorting and comparison of counters}
% \begin{macro}{\cref@countercmp}
-% The \cmd{\cref@countercmp} macro compares two sets of counter data,
-% as returned by \cmd{\cref@getcounter}, and \cmd{\chardef}'s its third
-% argument to 0 if they're equal, 1 if the first comes earlier than the
-% second, or 2 if the first comes later than the second. This is used
-% later for sorting references.
+% The \cmd{\cref@countercmp} macro compares two references according to
+% their respective sets of counter data, as returned by
+% \cmd{\cref@getcounter}. It \cmd{\chardef}'s its third argument to 0
+% if they're equal, 1 if the first comes earlier than the second, or 2
+% if the first comes later than the second. This is used later for
+% sorting references.
% \begin{macrocode}
\def\cref@counter@first#1#2\@nil{#1}
\def\cref@counter@rest#1#2\@nil{#2}
@@ -2603,10 +2524,10 @@
\chardef\expandafter#3\expandafter=\cref@result\relax}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\cref@countercmp}
+% \begin{macro}{\@cref@countercmp}
% The \cmd{\@cref@countercmp} macro recursively compares counter
% components until it runs out of components for one of the references,
-% or finds an two corresponding components that are unequel.
+% or finds two corresponding components that are unequal.
% \begin{macrocode}
\def\@cref@countercmp{%
\let\@iterate\relax%
@@ -2642,6 +2563,61 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\cref@pagecmp}
+% The \cmd{\cref@pagecmp} macro compares two references according to
+% their page numbers, as returned by \cmd{\cref@getpage}. It
+% \cmd{\chardef}'s its third argument to 0 if they're equal, 1 if the
+% first comes earlier than the second, or 2 if the first comes later
+% than the second. This is used later for sorting page references.
+% \begin{macrocode}
+\def\cref@pagecmp#1#2#3{%
+ \begingroup%
+ \def\@tempa{#1}%
+% \end{macrocode}
+% In order to ensure empty references end up in the right place when
+% sorting lists of multiple references, we make the comparison macro
+% sort them before a non-empty reference.
+% \begin{macrocode}
+ \ifx\@tempa\@empty%
+ \def\cref@result{1}%
+ \else%
+ \def\@tempa{#2}%
+ \ifx\@tempa\@empty%
+ \def\cref@result{2}%
+ \else%
+% \end{macrocode}
+% Conversely, undefined references come after everything else.
+% \begin{macrocode}
+ \expandafter\ifx\csname r@cref@#1\endcsname\relax%
+ \def\cref@result{2}%
+ \else%
+ \expandafter\ifx\csname r@cref@#2\endcsname\relax%
+ \def\cref@result{1}%
+ \else%
+% \end{macrocode}
+% If both references are non-empty and are defined, we compare their page
+% numbers.
+% \begin{macrocode}
+ \cref@getpageref{#1}{\@tempa}%
+ \cref@getpageref{#2}{\@tempb}%
+ \ifnum\@tempa<\@tempb\relax%
+ \def\cref@result{1}\relax%
+ \else%
+ \ifnum\@tempa>\@tempb\relax%
+ \def\cref@result{2}\relax%
+ \else%
+ \def\cref@result{0}\relax%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \expandafter\endgroup\expandafter%
+ \chardef\expandafter#3\expandafter=\cref@result\relax}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\if@cref@inresetlist}
% \begin{macro}{\cref@isinresetlist}
% \begin{macro}{\cref@resetby}
@@ -2839,12 +2815,13 @@
% \begin{macro}{\if@cref@refconsecutive}
% \begin{macro}{\cref@isrefconsecutive}
% Define a new conditional to test whether two references are
-% consecutive (needed when type-setting reference ranges). This uses the
-% counter and prefix (i.e. formatted version of the counter that resets
-% the label's counter) information provided by \cmd{\r@cref@\meta{label}}
-% (via the aux file) to check if the prefices are identical (i.e. the
-% references come from the same chapter, section or whatever), and that
-% the label counters differ by 0 or 1.
+% consecutive (needed when typesetting reference ranges). This uses
+% the counter and prefix (i.e.\ formatted version of the counter that
+% resets the label's counter) information provided by
+% \cmd{\r@cref@\meta{label}} (via the \file{aux} file) to check if the
+% prefices are identical (i.e.\ the references come from the same
+% chapter, section or whatever), and that the label counters differ
+% by~0 or~1.
% \begin{macrocode}
\newif\if@cref@refconsecutive%
\def\cref@isrefconsecutive#1#2{%
@@ -2873,6 +2850,32 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\cref@ispagerefconsecutive}
+% Similarly, define a test for whether two page references are
+% consecutive (needed when typesetting page ranges). We use the same
+% |\if@cref@refconsecutive| conditional as above.
+% \begin{macrocode}
+\def\cref@ispagerefconsecutive#1#2{%
+ \begingroup%
+ \countdef\refa@counter=0%
+ \countdef\refb@counter=1%
+ \cref@getpageref{#1}{\cref@result}%
+ \refa@counter=\cref@result%
+ \cref@getpageref{#2}{\cref@result}%
+ \refb@counter=\cref@result%
+ \def\@after{\@cref@refconsecutivefalse}%
+ \ifnum\refa@counter=\refb@counter\relax%
+ \def\@after{\@cref@refconsecutivetrue}%
+ \else%
+ \advance\refa@counter 1\relax%
+ \ifnum\refa@counter=\refb@counter\relax%
+ \def\@after{\@cref@refconsecutivetrue}%
+ \fi%
+ \fi%
+ \expandafter\endgroup\@after}
+% \end{macrocode}
+% \end{macro}
+%
%
% \subsubsection{Reference stack processing}
% \begin{macro}{\cref@processgroup}
@@ -3008,7 +3011,7 @@
% the last reference, and sets the counter passed in |#4| to the number
% of consecutive references in the sequence.
% \begin{macrocode}
-\def\cref@processconsecutive#1#2#3#4{%
+\def\cref@processconsecutive#1#2#3#4#5{%
#4=0%
\edef\@nextref{\cref@stack@top{#1}}%
\cref@stack@pop{#1}%
@@ -3055,7 +3058,7 @@
\@cref@refconsecutivefalse%
\else%
\edef\@tempa{{#2}{\@nextref}}%
- \expandafter\cref@isrefconsecutive\@tempa%
+ \expandafter#5\@tempa%
\fi%
\fi%
\fi%
@@ -3094,7 +3097,7 @@
\@cref@refconsecutivefalse%
\else%
\edef\@tempa{{#3}{\@nextref}}%
- \expandafter\cref@isrefconsecutive\@tempa%
+ \expandafter#5\@tempa%
\fi%
\fi%
\fi}%
@@ -3127,24 +3130,23 @@
% The |\if@crefstarred| flag is set within starred variants of
% \package{cleveref} commands. Starred variants are only defined if
% either the \package{hyperref} or \package{varioref} package is
-% loaded, so we only define it in those cases.\footnote{In fact, the
-% flag isn't needed when only \package{varioref} is loaded and the
-% \option{legacyvarioref} is set, \emph{unless} the \option{poorman}
-% option is also set. However, avoiding the redundant
-% \textbackslash{}if in these cases doesn't seem worth the
-% significantly more complicated code that would be required.}
+% loaded, so we only define it in those cases. We need to |\let|
+% |\if@crefstarred| to something even when not using it, otherwise
+% \TeX{} gets confused when parsing code that contains
+% |\if@crefstarred| inside a nested if.
% \begin{macrocode}
\@ifpackageloaded{hyperref}{\newif\if@crefstarred}{%
\@ifpackageloaded{varioref}{\newif\if@crefstarred}{}}
+\let\if@crefstarred\iffalse%
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@cref}
% To save duplicating code, the referencing macros pass an argument
-% determining the variant to an auxilliary macro \cmd{\@cref}, which
+% determining the variant to an auxiliary macro \cmd{\@cref}, which
% does the real work. The \cmd{\@cref} macro is the behemoth at the
% heart of all the clever referencing features. It deals with grouping
-% references by type, type-setting the conjunctions between groups,
+% references by type, typesetting the conjunctions between groups,
% choosing the right formatting macro to use for each reference, and
% compressing consecutive references into ranges.
% \begin{macrocode}
@@ -3154,8 +3156,8 @@
% \end{macrocode}
% Initialise some things, and put all the references into a stack called
% \cmd{\@refstack}. Note that we fully expand the second argument, in
-% case it contains commands that expand to label names rather than label
-% names per se.
+% case it contains commands that \emph{expand to} label names, rather
+% than label names per se.
% \begin{macrocode}
\countdef\count@consecutive=0%
\countdef\count@group=1%
@@ -3182,7 +3184,7 @@
\fi%
% \end{macrocode}
%
-% Type-set appropriate conjunction between groups of reference types.
+% typeset appropriate conjunction between groups of reference types.
% \begin{macrocode}
\ifnum\count@group=1\relax%
\advance\count@group 1%
@@ -3207,6 +3209,7 @@
\if@cref@compress%
\cref@processconsecutive%
{\@refsubstack}{\@beginref}{\@endref}{\count@consecutive}%
+ {\cref@isrefconsecutive}%
\else%
\edef\@beginref{\cref@stack@top{\@refsubstack}}%
\cref@stack@pop{\@refsubstack}%
@@ -3226,7 +3229,7 @@
\count@consecutive=1\relax%
\fi%
% \end{macrocode}
-% If there were no consecutive references, type-set the first reference;
+% If there were no consecutive references, typeset the first reference;
% \begin{macrocode}
\ifnum\count@consecutive=1\relax%
\cref@isstackfull{\@refsubstack}%
@@ -3238,7 +3241,7 @@
\expandafter{\@beginref}{\cref@variant}{}%
\fi%
% \end{macrocode}
-% if there were only two consecutive references, type-set the first one
+% if there were only two consecutive references, typeset the first one
% and return the second to the substack (we add an empty reference
% after it just to make sure there's no further compression);
% \begin{macrocode}
@@ -3249,7 +3252,7 @@
\expandafter\cref@stack@push\expandafter%
{\@endref,}{\@refsubstack}%
% \end{macrocode}
-% otherwise, type-set a reference range.
+% otherwise, typeset a reference range.
% \begin{macrocode}
\else%
\edef\@tempa{{\@beginref}{\@endref}}%
@@ -3271,6 +3274,7 @@
\if@cref@compress%
\cref@processconsecutive%
{\@refsubstack}{\@beginref}{\@endref}{\count@consecutive}%
+ {\cref@isrefconsecutive}%
\else%
\edef\@beginref{\cref@stack@top{\@refsubstack}}%
\cref@stack@pop{\@refsubstack}%
@@ -3290,8 +3294,8 @@
\count@consecutive=1\relax%
\fi%
% \end{macrocode}
-% If the substack is now empty, we will need to type-set an ``end''
-% reference, otherwise we will need to type-set a ``middle''
+% If the substack is now empty, we will need to typeset an ``end''
+% reference, otherwise we will need to typeset a ``middle''
% reference.
% \begin{macrocode}
\cref@isstackempty{\@refsubstack}%
@@ -3305,7 +3309,7 @@
\def\@pos{@middle}%
\fi%
% \end{macrocode}
-% If there were no consecutive references, just type-set the next
+% If there were no consecutive references, just typeset the next
% reference;
% \begin{macrocode}
\ifnum\count@consecutive=1\relax%
@@ -3313,7 +3317,7 @@
\expandafter\@setcref\@tempa%
\else%
% \end{macrocode}
-% if there were only two consecutive references, type-set the first
+% if there were only two consecutive references, typeset the first
% one, and return the second one to the substack,
% \begin{macrocode}
\ifnum\count@consecutive=2\relax%
@@ -3322,7 +3326,7 @@
\expandafter\cref@stack@push\expandafter%
{\@endref}{\@refsubstack}%
% \end{macrocode}
-% otherwise, type-set a reference range.
+% otherwise, typeset a reference range.
% \begin{macrocode}
\else%
\edef\@tempa{{\@beginref}{\@endref}{cref}{\@pos}}%
@@ -3334,8 +3338,8 @@
}% end loop over reference substack
\cref@isstackfull{\@refstack}%
% \end{macrocode}
-% if we're type-setting a \cmd{\labelcref} reference and references in
-% stack have different types, throw a warning and stop processing
+% If we're typesetting a \cmd{\labelcref} reference and references in
+% stack have different types, throw a warning and stop processing.
% \begin{macrocode}
\if@cref@stackfull%
\def\@tempa{#1}\def\@tempb{labelcref}%
@@ -3354,9 +3358,13 @@
%
%
% \begin{macro}{\@setcref}
-% The internal \cmd{\@setcref} macro deals with actually type-setting
+% The internal \cmd{\@setcref} macro deals with actually typesetting
% the reference, by calling the appropriate type-dependent formatting
-% macro defined by \cmd{\crefformat} etc.
+% macro defined by \cmd{\crefformat} etc. |#1| contains the reference
+% itself, |#2| is either ``cref'' or ``Cref'' and determines the
+% capitalisation variant, and |#3| is either empty or one of
+% ``@second'', ``@middle'' or ``@last'', determining the type of
+% reference group to typeset.
% \begin{macrocode}
\def\@setcref#1#2#3{%
\expandafter\ifx\csname r@cref@#1\endcsname\relax%
@@ -3368,8 +3376,8 @@
\cref@getlabel{#1}{\@templabel}% puts label in \@templabel
\expandafter\ifx\csname #2@\@temptype @format#3\endcsname\relax%
% \end{macrocode}
-% If reference format is undefined, but we're type-setting a
-% \cmd{\labelcref}, fall back to default \cmd{\labelcref} formats.
+% If reference format is undefined, but we're typesetting a
+% \cmd{\labelcref}, fall back to default \cmd{\labelcref} format.
% \begin{macrocode}
\edef\@tempa{#2}\def\@tempb{labelcref}%
\ifx\@tempa\@tempb\relax%
@@ -3390,7 +3398,7 @@
% \end{macro}
%
% \begin{macro}{\@@setcref}
-% We separate out the very final type-setting step into a separate
+% We separate out the very final typesetting step into a separate
% macro, in order to make it easier to redefine things later to make
% them work with the \package{hyperref} package.
% \begin{macrocode}
@@ -3399,9 +3407,9 @@
% \end{macro}
%
% \begin{macro}{\@setcrefrange}
-% The internal \cmd{\@setcrefrange} macro deals with type-setting
+% The internal \cmd{\@setcrefrange} macro deals with typesetting
% reference ranges, just as \cmd{\@setcref} does for normal
-% references. The actual type-setting is no more complicated in the
+% references. The actual typesetting is no more complicated in the
% range case; it's the error checking that makes the code so much
% longer. We now have to check whether \emph{two} references are
% undefined, whether \emph{two} reference formats are undefined,
@@ -3448,7 +3456,7 @@
\csname #3range@\@typeb @format#4\endcsname}%
\expandafter\ifx\@formata\relax%
% \end{macrocode}
-% If reference format is undefined, but we're type-setting a
+% If reference format is undefined, but we're typesetting a
% \cmd{\labelcref}, fall back to default \cmd{\labelcref}
% formats.
% \begin{macrocode}
@@ -3464,13 +3472,13 @@
\fi%
\else%
% \end{macrocode}
-% If reference types are identical, type-set reference range,
+% If reference types are identical, typeset reference range,
% otherwise display warning.\\
% (Note: there's no need to check if reference format for second type
% is defined, since if it isn't it will be caught here as a
% non-identical type.)
% \begin{macrocode}
- \ifx\formata\formatb%
+ \ifx\@formata\@formatb%
\expandafter\@@setcrefrange\expandafter{\@formata}{#1}{#2}%
\else%
\protect\G@refundefinedtrue%
@@ -3486,7 +3494,7 @@
% \end{macro}
%
% \begin{macro}{\@@setcrefrange}
-% We again separate out the very final type-setting step into a
+% We again separate out the very final typesetting step into a
% separate macro, in order to make it easier to redefine things later
% to make them work with the \package{hyperref} package.
% \begin{macrocode}
@@ -3498,7 +3506,7 @@
% \end{macro}
%
%
-% The type-setting of conjunctions is also separated out into separate
+% The typesetting of conjunctions is also separated out into separate
% macros, for the same reason.
% \begin{macrocode}
\def\@setcref@pairgroupconjunction{\crefpairgroupconjunction}
@@ -3513,112 +3521,389 @@
% \begin{macro}{\namecrefs}
% \begin{macro}{\nameCrefs}
% \begin{macro}{\lcnamecrefs}
-% Finally, we define a \cmd{\labelcref} that returns just the type-set
-% label part of a (multi-)reference, without the reference name, and
-% conversely \cmd{\namecref}, \cmd{\nameCref}, \cmd{\namecrefs} and
-% \cmd{\nameCrefs} commands that return just the type-set name of a
-% reference, without the reference label. The latter four retrieve the
-% reference name from the corresponding \cmd{\crefname} or
-% \cmd{\Crefname} definition, so they only work when this has been
-% defined. We also define \cmd{\lcnamecref} and \cmd{\lcnamecrefs}
-% commands which force the reference name to lowercase, for use when
-% the \option{capitalise} option is enabled.
+% Finally, we define a \cmd{\labelcref} command that returns just the
+% typeset label part of a (multi-)reference, without the reference
+% name, and conversely \cmd{\namecref}, \cmd{\nameCref},
+% \cmd{\namecrefs} and \cmd{\nameCrefs} commands that return just the
+% typeset name of a reference, without the reference label. The latter
+% four retrieve the reference name from the corresponding
+% \cmd{\crefname} or \cmd{\Crefname} definition, so they only work when
+% this has been defined. We also define \cmd{\lcnamecref} and
+% \cmd{\lcnamecrefs} commands which force the reference name to
+% lowercase, for use when the \option{capitalise} option is enabled.
% \begin{macrocode}
\DeclareRobustCommand{\labelcref}[1]{\@cref{labelcref}{#1}}
\DeclareRobustCommand{\namecref}[1]{%
- \expandafter\ifx\csname r@cref@#1\endcsname\relax%
- \protect\G@refundefinedtrue%
- \nfss@text{\reset@font\bfseries ??}%
- \@latex@warning{Reference `#1' on page \thepage \space undefined}%
- \else%
- \cref@gettype{#1}{\@tempa}%
- \@ifundefined{cref@\@tempa @name}{%
- \protect\G@refundefinedtrue%``
- \nfss@text{\reset@font\bfseries ??}%
- \@latex@warning{Reference name for label type `\@tempa' undefined}%
- }{\csname cref@\@tempa @name\endcsname}%
- \fi}
+ \@setnamecref{cref}{#1}{}{}}
\DeclareRobustCommand{\nameCref}[1]{%
- \expandafter\ifx\csname r@cref@#1\endcsname\relax%
- \protect\G@refundefinedtrue%
- \nfss@text{\reset@font\bfseries ??}%
- \@latex@warning{Reference `#1' on page \thepage \space undefined}%
- \else%
- \cref@gettype{#1}{\@tempa}%
- \@ifundefined{Cref@\@tempa @name}{%
- \protect\G@refundefinedtrue%``
- \nfss@text{\reset@font\bfseries ??}%
- \@latex@warning{Reference name for label type `\@tempa' undefined}%
- }{\csname Cref@\@tempa @name\endcsname}%
- \fi}
+ \@setnamecref{Cref}{#1}{}{}}
\DeclareRobustCommand{\lcnamecref}[1]{%
- \expandafter\ifx\csname r@cref@#1\endcsname\relax%
- \protect\G@refundefinedtrue%
- \nfss@text{\reset@font\bfseries ??}%
- \@latex@warning{Reference `#1' on page \thepage \space undefined}%
- \else%
- \cref@gettype{#1}{\@tempa}%
- \@ifundefined{cref@\@tempa @name}{%
- \protect\G@refundefinedtrue%``
- \nfss@text{\reset@font\bfseries ??}%
- \@latex@warning{Reference name for label type `\@tempa' undefined}%
- }{\expandafter\expandafter\expandafter%
- \MakeLowercase\csname cref@\@tempa @name\endcsname}%
- \fi}
+ \@setnamecref{Cref}{#1}{}{\MakeLowercase}}
\DeclareRobustCommand{\namecrefs}[1]{%
- \expandafter\ifx\csname r@cref@#1\endcsname\relax%
- \protect\G@refundefinedtrue%
- \nfss@text{\reset@font\bfseries ??}%
- \@latex@warning{Reference `#1' on page \thepage \space undefined}%
- \else%
- \cref@gettype{#1}{\@tempa}%
- \@ifundefined{cref@\@tempa @name@plural}{%
- \protect\G@refundefinedtrue%``
- \nfss@text{\reset@font\bfseries ??}%
- \@latex@warning{Reference name for label type `\@tempa' undefined}%
- }{\csname cref@\@tempa @name@plural\endcsname}%
- \fi}
+ \@setnamecref{cref}{#1}{@plural}{}}
\DeclareRobustCommand{\nameCrefs}[1]{%
- \expandafter\ifx\csname r@cref@#1\endcsname\relax%
+ \@setnamecref{Cref}{#1}{@plural}{}}
+\DeclareRobustCommand{\lcnamecrefs}[1]{%
+ \@setnamecref{Cref}{#1}{@plural}{\MakeLowercase}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@setnamecref}
+% \cmd{\@setnamecref} is the real macro underlying all the
+% \cmd{namecref} commands.
+% \begin{macrocode}
+\def\@setnamecref#1#2#3#4{%
+ \expandafter\ifx\csname r@cref@#2\endcsname\relax%
\protect\G@refundefinedtrue%
\nfss@text{\reset@font\bfseries ??}%
\@latex@warning{Reference `#1' on page \thepage \space undefined}%
\else%
- \cref@gettype{#1}{\@tempa}%
- \@ifundefined{Cref@\@tempa @name@plural}{%
+ \cref@gettype{#2}{\@tempa}%
+ \@ifundefined{#1@\@tempa @name#3}{%
\protect\G@refundefinedtrue%``
\nfss@text{\reset@font\bfseries ??}%
- \@latex@warning{Reference name for label type `\@tempa' undefined}%
- }{\csname Cref@\@tempa @name@plural\endcsname}%
+ \@latex@warning{Reference name for
+ label type `\@tempa' undefined}%
+ }{%
+ \edef\@tempa{%
+ \expandafter\noexpand\csname #1@\@tempa @name#3\endcsname}%
+ \expandafter\@@setnamecref\expandafter{\@tempa}{#4}%
+ }%
\fi}
-\DeclareRobustCommand{\lcnamecrefs}[1]{%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@setnamecref}
+% We again separate out the final typesetting step of the
+% \cmd{\namecref} commands.
+% \begin{macrocode}
+\def\@@setnamecref#1#2{%
+ \edef\@tempa{#1}%
+ \expandafter#2\@tempa}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Page-Referencing Commands}
+% \begin{macro}{\cpageref}
+% \begin{macro}{\Cpageref}
+% \begin{macro}{\cpagerefrange}
+% \begin{macro}{\Cpagerefrange}
+% Define the main page referencing command \cmd{\cpageref} and the
+% start-of-sentence variant \cmd{\Cpageref}, along with the
+% \cmd{\cpagerefrange} and \cmd{\Cpagerefrange} page range referencing
+% commands, and \cmd{\labelcpageref} (the counterpart to
+% \cmd{\labelcref}).
+% \begin{macrocode}
+\DeclareRobustCommand{\cpageref}[1]{%
+ \@cpageref{cref}{#1}{\@setcpageref}{\@setcpagerefrange}}
+\DeclareRobustCommand{\Cpageref}[1]{%
+ \@cpageref{Cref}{#1}{\@setcpageref}{\@setcpagerefrange}}
+\DeclareRobustCommand{\cpagerefrange}[2]{%
+ \@setcpagerefrange{#1}{#2}{cref}{}}
+\DeclareRobustCommand{\Cpagerefrange}[2]{%
+ \@setcpagerefrange{#1}{#2}{Cref}{}}
+\DeclareRobustCommand{\labelcpageref}[1]{%
+ \@cpageref{labelcref}{#1}{\@setcpageref}{\@setcpagerefrange}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@cpageref}
+% The \cmd{\@cpageref} macro is the work-horse of the clever page
+% referencing features (analogous to the role of \cmd{\@cref} for
+% cross-references, though slightly simpler as it does not have to deal
+% with grouping references by type, all page references being
+% references to pages!). It deals with typesetting the conjunctions
+% between groups of page references, and any sorting and compressing of
+% the page references. |#1| contains the list of references, |#2| is
+% ``cref'' or ``Cref'' and determines the capitalisation variant, |#3|
+% and |#4| are the macros to use for typesetting page references and
+% page range references, respectively. (The \cmd{\cpageref} and
+% \cmd{\Cpageref} commands always set these to \cmd{\@setcpageref} and
+% \cmd{\@setcpagerangeref}; the \package{varioref} package support uses
+% these arguments to integrate the \package{cleveref} and
+% \package{varioref} page referencing features.)
+% \begin{macrocode}
+\def\@cpageref#1#2#3#4{%
+ \leavevmode%
+ \begingroup%
+% \end{macrocode}
+% Initialise some things, and put all the references into a stack called
+% \cmd{\@refstack}. Note that we fully expand the second argument, in
+% case it contains commands that \emph{expand to} label names, rather
+% than label names per se.
+% \begin{macrocode}
+ \countdef\count@consecutive=0%
+ \countdef\count@group=1%
+ \countdef\@counta=2%
+ \countdef\@countb=3%
+ \count@group=0%
+ \cref@stack@init{\@refstack}%
+ \edef\@tempa{#2}%
+ \expandafter\cref@stack@push\expandafter{\@tempa}{\@refstack}%
+ \if@cref@sort%
+ \cref@stack@sort{\@refstack}{\cref@pagecmp}%
+ \fi%
+% \end{macrocode}
+% Loop until the reference stack is empty.
+% \begin{macrocode}
+ \cref@isstackfull{\@refstack}%
+ \@whilesw\if@cref@stackfull\fi{%
+ \if@cref@compress%
+ \cref@processconsecutive%
+ {\@refstack}{\@beginref}{\@endref}{\count@consecutive}%
+ {\cref@ispagerefconsecutive}%
+ \else%
+ \edef\@beginref{\cref@stack@top{\@refstack}}%
+ \cref@stack@pop{\@refstack}%
+% \end{macrocode}
+% Empty references serve no purpose when we're not compressing
+% consecutive references, so we simply remove them.
+% \begin{macrocode}
+ \@whilesw\ifx\@beginref\@empty\fi{%
+ \cref@stack@pop{\@refstack}%
+ \cref@isstackempty{\@refstack}%
+ \if@cref@stackempty%
+ \let\@beginref\relax%
+ \else%
+ \edef\@beginref{\cref@stack@top{\@refstack}}%
+ \fi}%
+ \let\@endref\relax%
+ \count@consecutive=1\relax%
+ \fi%
+% \end{macrocode}
+% If the start and end pages of a reference range are the same, treat it as
+% a single page reference instead of a page range. If start and end pages
+% of a reference range differ by 1, treat it as a pair of page references
+% instead of a range.
+% \begin{macrocode}
+ \ifx\@endref\relax\else%
+ \expandafter\ifx\csname r@cref@\@beginref\endcsname\relax\else%
+ \expandafter\ifx\csname r@cref@\@endref\endcsname\relax\else%
+ \cref@getpageref{\@beginref}{\@tempa}%
+ \cref@getpageref{\@endref}{\@tempb}%
+ \ifx\@tempa\@tempb\relax%
+ \count@consecutive=1%
+ \let\@endref\relax%
+ \else%
+ \@counta=\@tempa\relax%
+ \@countb=\@tempb\relax%
+ \advance\@counta 1\relax%
+ \ifnum\@counta=\@countb\relax%
+ \count@consecutive=2%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+% \end{macrocode}
+% Determine whereabouts the current group of page references comes in the
+% overall list of page references.
+% \begin{macrocode}
+ \cref@isstackempty{\@refstack}%
+ \if@cref@stackempty%
+ \ifcase\count@group\relax%
+ \ifnum\count@consecutive=2\relax%
+ \def\@pos{@first}%
+ \else%
+ \def\@pos{}%
+ \fi%
+ \or%
+ \ifnum\count@consecutive=2\relax%
+ \def\@pos{@middle}%
+ \else%
+ \def\@pos{@second}%
+ \fi%
+ \else%
+ \def\@pos{@last}%
+ \fi%
+ \else%
+ \ifnum\count@group=0\relax%
+ \def\@pos{@first}%
+ \else%
+ \def\@pos{@middle}%
+ \fi%
+ \fi%
+% \end{macrocode}
+% If there were no consecutive references, just typeset the next
+% reference;
+% \begin{macrocode}
+ \ifnum\count@consecutive=1\relax%
+ \def\@tempa{#3}%
+ \edef\@tempb{{\@beginref}{#1}{\@pos}}%
+ \expandafter\@tempa\@tempb%
+ \else%
+% \end{macrocode}
+% if there were only two consecutive references, typeset the first one
+% and return the second to the substack (we add an empty reference
+% after it just to make sure there's no further compression);
+% \begin{macrocode}
+ \ifnum\count@consecutive=2\relax%
+ \def\@tempa{#3}%
+ \edef\@tempb{{\@beginref}{#1}{\@pos}}%
+ \expandafter\@tempa\@tempb%
+ \expandafter\cref@stack@push\expandafter%
+ {\@endref,}{\@refstack}%
+% \end{macrocode}
+% otherwise, typeset a reference range.
+% \begin{macrocode}
+ \else%
+ \def\@tempa{#4}%
+ \edef\@tempb{{\@beginref}{\@endref}{#1}{\@pos}}%
+ \expandafter\@tempa\@tempb%
+ \fi%
+ \fi%
+ \advance\count@group 1%
+ \cref@isstackfull{\@refstack}%
+ }% end loop over reference stack
+ \endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@setcpageref}
+% The internal \cmd{\@setcpageref} macro deals with actually typesetting
+% the page reference, by calling the appropriate type-dependent
+% formatting macro defined by \cmd{\crefformat} etc. |#1| contains the
+% reference itself, |#2| is either ``cref'' or ``Cref'' and determines
+% the capitalisation variant, and |#3| is either empty or one of
+% ``@second'', ``@middle'' or ``@last'', determining the type of
+% reference group to typeset.
+% \begin{macrocode}
+\def\@setcpageref#1#2#3{%
\expandafter\ifx\csname r@cref@#1\endcsname\relax%
\protect\G@refundefinedtrue%
\nfss@text{\reset@font\bfseries ??}%
\@latex@warning{Reference `#1' on page \thepage \space undefined}%
\else%
- \cref@gettype{#1}{\@tempa}%
- \@ifundefined{cref@\@tempa @name@plural}{%
- \protect\G@refundefinedtrue%``
- \nfss@text{\reset@font\bfseries ??}%
- \@latex@warning{Reference name for label type `\@tempa' undefined}%
- }{\expandafter\expandafter\expandafter%
- \MakeLowercase\csname cref@\@tempa @name@plural\endcsname}%
+ \cref@getpageref{#1}{\@temppage}%
+ \expandafter\ifx\csname #2@page@format#3\endcsname\relax%
+% \end{macrocode}
+% If reference format is undefined, but we're typesetting a
+% \cmd{\labelcpageref}, fall back to default \cmd{\labelcref} format.
+% \begin{macrocode}
+ \edef\@tempa{#2}\def\@tempb{labelcref}%
+ \ifx\@tempa\@tempb\relax%
+ \expandafter\@@setcpageref\expandafter%
+ {\csname #2@default@format#3\endcsname}{#1}%
+ \else%
+ \protect\G@refundefinedtrue%
+ \nfss@text{\reset@font\bfseries ??}~\@temppage%
+ \@latex@warning{#2 \space reference format for
+ page references undefined}%
+ \fi%
+ \else%
+ \expandafter\@@setcpageref\expandafter%
+ {\csname #2@page@format#3\endcsname}{#1}%
+ \fi%
\fi}
% \end{macrocode}
% \end{macro}
+%
+% \begin{macro}{\@@setcpageref}
+% We separate out the very final typesetting step into a separate
+% macro, in order to make it easier to redefine things later to make
+% them work with the \package{hyperref} package.
+% \begin{macrocode}
+\def\@@setcpageref#1#2{%
+ \cref@getpageref{#2}{\@temppage}#1{\@temppage}{}{}}
+% \end{macrocode}
% \end{macro}
+%
+% \begin{macro}{\@setcpagerefrange}
+% The internal \cmd{\@setcpagerefrange} macro deals with typesetting
+% page range references, just as \cmd{\@setcpageref} does for normal
+% page references.
+% \begin{macrocode}
+\def\@setcpagerefrange#1#2#3#4{%
+ \begingroup%
+% \end{macrocode}
+% Check if both references are defined.
+% \begin{macrocode}
+ \expandafter\ifx\csname r@cref@#1\endcsname\relax%
+ \protect\G@refundefinedtrue%
+ \@latex@warning{Reference `#1' on page \thepage \space%
+ undefined}%
+ \expandafter\ifx\csname r@cref@#2\endcsname\relax%
+ \nfss@text{\reset@font\bfseries ??}--%
+ \nfss@text{\reset@font\bfseries ??}%
+ \@latex@warning{Reference `#2' on page \thepage \space%
+ undefined}%
+ \else%
+ \cref@getpageref{#2}{\@pageb}%
+ \nfss@text{\reset@font\bfseries ??}--\@pageb%
+ \fi%
+ \else%
+ \expandafter\ifx\csname r@cref@#2\endcsname\relax%
+ \protect\G@refundefinedtrue%
+ \cref@getpageref{#1}{\@pagea}%
+ \@pagea--\nfss@text{\reset@font\bfseries ??}%
+ \@latex@warning{Reference `#2' on page \thepage %
+ \space undefined}%
+% \end{macrocode}
+% If both references are defined, check that the reference format is
+% defined.
+% \begin{macrocode}
+ \else%
+ \cref@getpageref{#1}{\@pagea}%
+ \cref@getpageref{#2}{\@pageb}%
+ \edef\@format{\expandafter\noexpand%
+ \csname #3range@page@format#4\endcsname}%
+ \expandafter\ifx\@format\relax%
+% \end{macrocode}
+% If page reference format is undefined, but we're typesetting a
+% \cmd{\labelcpageref}, fall back to default \cmd{\labelcref}
+% formats.
+% \begin{macrocode}
+ \edef\@tempa{#3}\def\@tempb{labelcref}%
+ \ifx\@tempa\@tempb\relax%
+ \expandafter\@@setcpagerefrange\expandafter%
+ {\csname #3range@default@format#4\endcsname}{#1}{#2}%
+ \else%
+ \protect\G@refundefinedtrue%
+ \nfss@text{\reset@font\bfseries ??}~\@pagea--\@pageb%
+ \@latex@warning{#3\space reference range format for page
+ references undefined}%
+ \fi%
+ \else%
+% \end{macrocode}
+% typeset page reference range,
+% \begin{macrocode}
+ \expandafter\@@setcpagerefrange\expandafter{\@format}{#1}{#2}%
+ \fi%
+ \fi%
+ \fi%
+ \endgroup}
+% \end{macrocode}
% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
+%
+% \begin{macro}{\@@setcpagerefrange}
+% We again separate out the very final typesetting step into a
+% separate macro, in order to make it easier to redefine things later
+% to make them work with the \package{hyperref} package.
+% \begin{macrocode}
+\def\@@setcpagerefrange#1#2#3{%
+ \cref@getpageref{#2}{\@pagea}%
+ \cref@getpageref{#3}{\@pageb}%
+ #1{\@pagea}{\@pageb}{}{}{}{}}
+% \end{macrocode}
% \end{macro}
%
%
%
% \subsection{Reference Format Customisation Commands}
%
-% \subsubsection{Format Component Commands}
+% \subsubsection{Format component commands}
% \begin{macro}{\cref@label@types}
% The reference formats are usually constructed out of components
% defined by the user-level \cmd{\crefname}, \cmd{\Crefname},
@@ -3627,7 +3912,7 @@
% components have been defined, and therefore need constructing at
% \cmd{\begindocument} (see below).
%
-% FIXME: we don't check if the label type is already in the list, so
+% FIXME: We don't check if the label type is already in the list, so
% some formats may needlessly be redefined identically, multiple times.
%
% \begin{macrocode}
@@ -3727,7 +4012,7 @@
\fi}%
\@tempa#1\@nil%
% \end{macrocode}
-% If the other capitalisation variant is not already defined...
+% If the other capitalisation variant is not already defined\dots
% \begin{macrocode}
\@ifundefined{\@other @#2@name#5}{%
% \end{macrocode}
@@ -3817,6 +4102,18 @@
\csname cref@#1@rangelabel\endcsname%
}%
% \end{macrocode}
+% If we're including names in hyperlinks, define variants of temporary
+% label macros which lack the hyperlink start argument (it will instead
+% be included in the temporary name macros).
+% \begin{macrocode}
+ \if@cref@nameinlink%
+ \expandafter\def\expandafter\@templabel@first\expandafter{%
+ \@templabel{########1}{}{########3}}%
+ \expandafter\def\expandafter\@temprangelabel@first\expandafter{%
+ \@temprangelabel{########1}{########2}%
+ {}{########4}{########5}{########6}}%
+ \fi%
+% \end{macrocode}
% Get the correct number of ``\#'''s into the label format definitions.
% \begin{macrocode}
\expandafter\def\expandafter\@templabel\expandafter{%
@@ -3825,34 +4122,109 @@
\@temprangelabel{########1}{########2}{########3}%
{########4}{########5}{########6}}%
% \end{macrocode}
+% If we're not including names in hyperlinks, define all variants to be
+% the same as standard temporary name macros.
+% \begin{macrocode}
+ \if@cref@nameinlink\else%
+ \let\@templabel@first\@templabel%
+ \let\@temprangelabel@first\@temprangelabel%
+ \fi%
+% \end{macrocode}
+%
+% If including names in hyperlinks, define temporary name macros to
+% include hyperlink start argument.
+% \begin{macrocode}
+ \if@cref@nameinlink%
+ \def\@tempa##1##2{##2##1}%
+% \end{macrocode}
+% Lower-case singular cross-reference name.
+% \begin{macrocode}
+ \expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\expandafter\@tempname%
+ \expandafter\expandafter\expandafter{%
+ \expandafter\@tempa\expandafter%
+ {\csname cref@#1@name\endcsname}{########2}}%
+% \end{macrocode}
+% Upper-case singular cross-reference name.
+% \begin{macrocode}
+ \expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\expandafter\@tempName%
+ \expandafter\expandafter\expandafter{%
+ \expandafter\@tempa\expandafter%
+ {\csname Cref@#1@name\endcsname}{########2}}%
+% \end{macrocode}
+% Lower-case plural cross-reference name.
+% \begin{macrocode}
+ \expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\expandafter\@tempnameplural%
+ \expandafter\expandafter\expandafter{%
+ \expandafter\@tempa\expandafter%
+ {\csname cref@#1@name@plural\endcsname}{########2}}%
+% \end{macrocode}
+% Upper-case plural cross-reference name.
+% \begin{macrocode}
+ \expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\expandafter\@tempNameplural%
+ \expandafter\expandafter\expandafter{%
+ \expandafter\@tempa\expandafter%
+ {\csname Cref@#1@name@plural\endcsname}{########2}}%
+% \end{macrocode}
+% For cross-reference ranges, the hyperlink start argument is \#3 instead
+% of \#2, so we need a different variant of the temporary plural name
+% macros.
+% \begin{macrocode}
+ \expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\expandafter\@tempnameplural@range%
+ \expandafter\expandafter\expandafter{%
+ \expandafter\@tempa\expandafter%
+ {\csname cref@#1@name@plural\endcsname}{########3}}%
+ \expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\expandafter\@tempNameplural@range%
+ \expandafter\expandafter\expandafter{%
+ \expandafter\@tempa\expandafter%
+ {\csname Cref@#1@name@plural\endcsname}{########3}}%
+% \end{macrocode}
+%
+% If we're not including names in hyperlinks, temporary name macros don't
+% include the hyperlink start argument.
+% \begin{macrocode}
+ \else%
+% \end{macrocode}
% Lower-case singular cross-reference name.
% \begin{macrocode}
- \expandafter\def\expandafter\@tempname\expandafter{%
- \csname cref@#1@name\endcsname}%
+ \expandafter\def\expandafter\@tempname\expandafter{%
+ \csname cref@#1@name\endcsname}%
% \end{macrocode}
% Upper-case singular cross-reference name.
% \begin{macrocode}
- \expandafter\def\expandafter\@tempName\expandafter{%
- \csname Cref@#1@name\endcsname}%
+ \expandafter\def\expandafter\@tempName\expandafter{%
+ \csname Cref@#1@name\endcsname}%
% \end{macrocode}
% Lower-case plural cross-reference name.
% \begin{macrocode}
- \expandafter\def\expandafter\@tempnameplural\expandafter{%
- \csname cref@#1@name@plural\endcsname}%
+ \expandafter\def\expandafter\@tempnameplural\expandafter{%
+ \csname cref@#1@name@plural\endcsname}%
% \end{macrocode}
% Upper-case plural cross-reference name.
% \begin{macrocode}
- \expandafter\def\expandafter\@tempNameplural\expandafter{%
- \csname Cref@#1@name@plural\endcsname}%
+ \expandafter\def\expandafter\@tempNameplural\expandafter{%
+ \csname Cref@#1@name@plural\endcsname}%
+% \end{macrocode}
+% Define reference range variants to be identical to normal variants.
+% \begin{macrocode}
+ \let\@tempnameplural@range\@tempnameplural%
+ \let\@tempNameplural@range\@tempNameplural%
+ \fi%
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@crefdefineformat}
% The \cmd{\@crefdefineformat} et al.\ macros construct calls to
-% \cmd{\crefformat} et al.\ for the supplied reference type that define
-% the corresponding formats in terms of the format components. This is
-% mostly just an arduous exercise in controlling macro expansion order.
+% \cmd{\crefformat} et al.\ for the supplied reference type, which
+% define the corresponding formats in terms of the format components.
+% This is mostly just an arduous exercise in controlling macro
+% expansion order.
% \begin{macrocode}
\def\@crefdefineformat#1{%
\begingroup%
@@ -3864,21 +4236,21 @@
% Assemble the arguments for \cmd{\crefformat}, \cmd{\Crefformat} and
% \cmd{\labelcrefformat} from the components.
% \begin{macrocode}
- \expandafter\ifx\@tempname\@empty\relax%
+ \ifx\@tempname\@empty\relax%
\expandafter\def\expandafter\@tempfirst\expandafter{\@templabel}%
\else%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter\@tempfirst%
\expandafter\expandafter\expandafter{%
- \expandafter\@tempname\expandafter\nobreakspace\@templabel}%
+ \expandafter\@tempname\expandafter\nobreakspace\@templabel@first}%
\fi%
- \expandafter\ifx\@tempName\@empty\relax%
+ \ifx\@tempName\@empty\relax%
\expandafter\def\expandafter\@tempFirst\expandafter{\@templabel}%
\else%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter\@tempFirst%
\expandafter\expandafter\expandafter{%
- \expandafter\@tempName\expandafter\nobreakspace\@templabel}%
+ \expandafter\@tempName\expandafter\nobreakspace\@templabel@first}%
\fi%
\expandafter\def\expandafter\@templabel\expandafter{\@templabel}%
% \end{macrocode}
@@ -3913,23 +4285,25 @@
% \cmd{\Crefrangeformat} and\linebreak[4] \cmd{\labelcrefrangeformat}
% from the components.
% \begin{macrocode}
- \expandafter\ifx\@tempname\@empty\relax%
+ \ifx\@tempname\@empty\relax%
\expandafter\def\expandafter\@tempfirst%
\expandafter{\@temprangelabel}%
\else%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter\@tempfirst%
\expandafter\expandafter\expandafter{%
- \expandafter\@tempnameplural\expandafter\nobreakspace\@temprangelabel}%
+ \expandafter\@tempnameplural@range%
+ \expandafter\nobreakspace\@temprangelabel@first}%
\fi%
- \expandafter\ifx\@tempName\@empty\relax%
+ \ifx\@tempName\@empty\relax%
\expandafter\def\expandafter\@tempFirst%
\expandafter{\@temprangelabel}%
\else%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter\@tempFirst%
\expandafter\expandafter\expandafter{%
- \expandafter\@tempNameplural\expandafter\nobreakspace\@temprangelabel}%
+ \expandafter\@tempNameplural@range%
+ \expandafter\nobreakspace\@temprangelabel@first}%
\fi%
\expandafter\def\expandafter\@temprangelabel%
\expandafter{\@temprangelabel}%
@@ -3946,7 +4320,7 @@
% \begin{macrocode}
\@ifundefined{cref@#1@rangelabel}{%
\@ifundefined{cref@#1@label}{\let\@tempa\relax}{\def\@tempa{}}}%
- {\def\@tempa{}}%
+ {\def\@tempa{}}%
\ifx\@tempa\@empty\relax%
\@toksa={\labelcrefrangeformat{#1}}%
\expandafter\the\expandafter\@toksa\expandafter{%
@@ -3970,23 +4344,25 @@
% \cmd{\Crefmultiformat} and\linebreak[4] \cmd{\labelcrefmultiformat}
% from the components.
% \begin{macrocode}
- \expandafter\ifx\@tempnameplural\@empty\relax%
+ \ifx\@tempnameplural\@empty\relax%
\expandafter\def\expandafter\@tempfirst%
\expandafter{\@templabel}%
\else%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter\@tempfirst%
\expandafter\expandafter\expandafter{%
- \expandafter\@tempnameplural\expandafter\nobreakspace\@templabel}%
+ \expandafter\@tempnameplural%
+ \expandafter\nobreakspace\@templabel@first}%
\fi%
- \expandafter\ifx\@tempNameplural\@empty\relax%
+ \ifx\@tempNameplural\@empty\relax%
\expandafter\def\expandafter\@tempFirst%
\expandafter{\@templabel}%
\else%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter\@tempFirst%
\expandafter\expandafter\expandafter{%
- \expandafter\@tempNameplural\expandafter\nobreakspace\@templabel}%
+ \expandafter\@tempNameplural%
+ \expandafter\nobreakspace\@templabel@first}%
\fi%
\expandafter\def\expandafter\@tempsecond\expandafter{%
\expandafter\crefpairconjunction\@templabel}%
@@ -4062,23 +4438,25 @@
% \cmd{\crefrangemultiformat}, \cmd{\Crefrangemultiformat} and
% \cmd{\labelcrefrangemultiformat} from the reference components.
% \begin{macrocode}
- \expandafter\ifx\@tempnameplural\@empty\relax%
+ \ifx\@tempnameplural\@empty\relax%
\expandafter\def\expandafter\@tempfirst%
\expandafter{\@temprangelabel}%
\else%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter\@tempfirst%
\expandafter\expandafter\expandafter{%
- \expandafter\@tempnameplural\expandafter\nobreakspace\@temprangelabel}%
+ \expandafter\@tempnameplural@range%
+ \expandafter\nobreakspace\@temprangelabel@first}%
\fi%
- \expandafter\ifx\@tempNameplural\@empty\relax%
+ \ifx\@tempNameplural\@empty\relax%
\expandafter\def\expandafter\@tempFirst%
\expandafter{\@temprangelabel}%
\else%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter\@tempFirst%
\expandafter\expandafter\expandafter{%
- \expandafter\@tempNameplural\expandafter\nobreakspace\@temprangelabel}%
+ \expandafter\@tempNameplural@range%
+ \expandafter\nobreakspace\@temprangelabel@first}%
\fi%
\expandafter\def\expandafter\@tempsecond\expandafter{%
\expandafter\crefpairconjunction\@temprangelabel}%
@@ -4225,11 +4603,11 @@
\expandafter\cref@append@toks\expandafter\@toksb\expandafter{%
\expandafter{\@temprangelabel}}%
\expandafter\cref@append@toks\expandafter\@toksb\expandafter{%
- \expandafter{\@tempsecond}}%
+ \expandafter{\@temprangesecond}}%
\expandafter\cref@append@toks\expandafter\@toksb\expandafter{%
- \expandafter{\@tempmiddle}}%
+ \expandafter{\@temprangemiddle}}%
\expandafter\cref@append@toks\expandafter\@toksb\expandafter{%
- \expandafter{\@templast}}%
+ \expandafter{\@temprangelast}}%
\@toksa={\labelcrefrangemultiformat{default}}%
\expandafter\the\expandafter\@toksa\the\@toksb%
\endgroup}
@@ -4249,7 +4627,7 @@
% \end{macro}
%
%
-% \subsubsection{Cross-Reference Format Definition Commands}
+% \subsubsection{Format definition commands}
% \label{sec:crefformat}
% \begin{macro}{\crefformat}
% \begin{macro}{\Crefformat}
@@ -4263,7 +4641,7 @@
% control over the format of different reference types. They override
% the component-based formats, simply using the supplied arguments to
% define appropriately named formatting macros, which are called by
-% \cmd{\@setcref}. If the corresponding \cmd{\Crefformat} or
+% \cmd{\@setcref} etc. If the corresponding \cmd{\Crefformat} or
% \cmd{\crefformat} variant is not already defined, they define it to
% be a version with the first letter capitalised or lower-cased.
% \begin{macrocode}
@@ -4341,7 +4719,7 @@
\fi}%
\@tempa#1\@nil%
% \end{macrocode}
-% If the other capitalisation variant is not already defined...
+% If the other capitalisation variant is not already defined\dots
% \begin{macrocode}
\@ifundefined{\@other @#2@format}{%
% \end{macrocode}
@@ -4404,7 +4782,7 @@
\fi}%
\@tempa#1\@nil%
% \end{macrocode}
-% If the other capitalisation variant is not already defined...
+% If the other capitalisation variant is not already defined\dots
% \begin{macrocode}
\@ifundefined{\@other @#2@format}{%
% \end{macrocode}
@@ -4469,7 +4847,7 @@
\@tempa#1\@nil%
% \end{macrocode}
% If the other capitalisation variant of the first part of the
-% multi-format definition is not already defined...
+% multi-format definition is not already defined\dots
% \begin{macrocode}
\@ifundefined{\@other @#2@format@first}{%
% \end{macrocode}
@@ -4565,7 +4943,7 @@
\@tempa#1\@nil%
% \end{macrocode}
% If the other capitalisation variant of the first part of the
-% multi-format definition is not already defined...
+% multi-format definition is not already defined\dots
% \begin{macrocode}
\@ifundefined{\@other @#2@format@first}{%
% \end{macrocode}
@@ -4628,9 +5006,12 @@
% \end{macro}
%
%
-% \subsection{\package{hyperref} Support}
+%
+% \subsection{Support for Other Packages}
+%
+% \subsubsection{\package{hyperref} support}
% \begin{macro}{hyperref}
-% If the \package{hyperref} package is loaded, we add hyper-link
+% If the \package{hyperref} package is loaded, we add hyperlink
% support to \package{cleveref}. Since \package{hyperref} messes around
% with some of the same \LaTeX{} internals as we do, we also have to
% override some of its redefinitions so that they work with
@@ -4638,19 +5019,17 @@
% \begin{macrocode}
\let\if@cref@hyperrefloaded\iffalse
\@ifpackageloaded{hyperref}{%
- \@ifpackagewith{hyperref}{implicit=false}{%
- \let\if@cref@hyperrefloaded\iffalse%
- }{%
+ \@ifpackagewith{hyperref}{implicit=false}{}{%
\let\if@cref@hyperrefloaded\iftrue%
\PackageInfo{cleveref}{`hyperref' support loaded}
% \end{macrocode}
% \begin{macro}{\cref@hyperref}
-% We define a utility macro to extract the hyper-link supplied by
-% \package{hyperref} (via the aux file). Note that \package{hyperref}
-% adds the hyper-link information to the standard \cmd{\newlabel} line
-% in the aux file, so we have to retrieve it from the standard
-% \cmd{r@\meta{label}}, \emph{not} the one prefixed with |cref@| that
-% we've created ourselves.
+% We define a utility macro to extract the hyperlink supplied by
+% \package{hyperref} (via the \file{aux} file). Note that
+% \package{hyperref} adds the hyperlink information to the standard
+% \cmd{\newlabel} line in the \file{aux} file, so we have to retrieve
+% it from the standard \cmd{r@\meta{label}}, \emph{not} the one
+% prefixed with |cref@| that we've created ourselves.
% \begin{macrocode}
\def\cref@hyperref#1{\expandafter\expandafter\expandafter%
\@fourthoffive\csname r@#1\endcsname}
@@ -4823,13 +5202,29 @@
% \begin{macro}{\Cref*}
% \begin{macro}{\crefrange*}
% \begin{macro}{\Crefrange*}
+% \begin{macro}{\cpageref*}
+% \begin{macro}{\Cpageref*}
+% \begin{macro}{\cpagerefrange*}
+% \begin{macro}{\Cpagerefrange*}
+% \begin{macro}{\labelcref*}
+% \begin{macro}{\labelcpageref*}
% \begin{macro}{\@crefstar}
+% \begin{macro}{\@crefnostar}
% \begin{macro}{\@crefrangestar}
% \begin{macro}{\@crefrangenostar}
-% Redefine \cmd{\cref} and all the others to allow starred variants,
-% which don't create hyper-links. The starred variants simply set a
-% flag, which is tested in \cmd{\@@setcref} and \cmd{\@@setrangeref}
-% (below).
+% \begin{macro}{\@cpagerefstar}
+% \begin{macro}{\@cpagerefnostar}
+% \begin{macro}{\@cpagerefrangestar}
+% \begin{macro}{\@cpagerefrangenostar}
+% \begin{macro}{\@labelcrefstar}
+% \begin{macro}{\@labelcrefnostar}
+% \begin{macro}{\@labelcpagerefstar}
+% \begin{macro}{\@labelcpagerefnostar}
+% Redefine \cmd{\cref} and all the others to allow starred variants,
+% which don't create hyperlinks. The starred variants simply set a
+% flag, which is tested in the very final stage of reference
+% typesetting in \cmd{\@@setcref}, \cmd{\@@setcrefrange},
+% \cmd{\@@setcpageref} and \cmd{\@@setcpagerefrange} (below).
% \begin{macrocode}
\DeclareRobustCommand{\cref}{%
\@ifstar{\@crefstar{cref}}{\@crefnostar{cref}}}
@@ -4845,6 +5240,40 @@
\def\@crefrangenostar#1#2#3{\@setcrefrange{#2}{#3}{#1}{}}
\def\@crefrangestar#1#2#3{%
\@crefstarredtrue\@setcrefrange{#2}{#3}{#1}{}\@crefstarredfalse}
+ \DeclareRobustCommand{\cpageref}{%
+ \@ifstar{\@cpagerefstar{cref}}{\@cpagerefnostar{cref}}}
+ \DeclareRobustCommand{\Cpageref}{%
+ \@ifstar{\@cpagerefstar{Cref}}{\@cpagerefnostar{Cref}}}
+ \def\@cpagerefnostar#1#2{%
+ \@cpageref{#1}{#2}{\@setcpageref}{\@setcpagerefrange}}
+ \def\@cpagerefstar#1#2{%
+ \@crefstarredtrue%
+ \@cpageref{#1}{#2}{\@setcpageref}{\@setcpagerefrange}%
+ \@crefstarredfalse}
+ \DeclareRobustCommand{\cpagerefrange}{%
+ \@ifstar{\@cpagerefrangestar{cref}}{\@cpagerefrangenostar{cref}}}
+ \DeclareRobustCommand{\Cpagerefrange}{%
+ \@ifstar{\@cpagerefrangestar{Cref}}{\@cpagerefrangenostar{Cref}}}
+ \def\@cpagerefrangenostar#1#2#3{\@setcpagerefrange{#2}{#3}{#1}{}}
+ \def\@cpagerefrangestar#1#2#3{%
+ \@crefstarredtrue%
+ \@setcpagerefrange{#2}{#3}{#1}{}%
+ \@crefstarredfalse}
+ \DeclareRobustCommand{\labelcref}{%
+ \@ifstar{\@labelcrefstar}{\@labelcrefnostar}}
+ \def\@labelcrefnostar#1{\@cref{labelcref}{#1}}
+ \def\@labelcrefstar#1{%
+ \@crefstarredtrue%
+ \@cref{labelcref}{#1}%
+ \@crefstarredfalse}
+ \DeclareRobustCommand{\labelcpageref}{%
+ \@ifstar{\@labelcpagerefstar}{\@labelcpagerefnostar}}
+ \def\@labelcpagerefnostar#1{%
+ \@cpageref{labelcref}{#1}{\@setcpageref}{\@setcpagerefrange}}
+ \def\@labelcpagerefstar#1{%
+ \@crefstarredtrue%
+ \@cpageref{labelcref}{#1}{\@setcpageref}{\@setcpagerefrange}%
+ \@crefstarredfalse}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -4853,13 +5282,30 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\@@setcref}
% \begin{macro}{\@@setcrefrange}
-% Redefine \cmd{\@@setcref} and \cmd{\@@setrangeref} to create
-% hyper-links (unless the starred flag is set), using the extra
-% arguments supplied in \cmd{\r@cref@\meta{label}} (via the aux file)
-% by \package{hyperref}.
+% \begin{macro}{\@@setcpageref}
+% \begin{macro}{\@@setcpagerefrange}
+% Redefine the final reference typesetting macros to create hyperlinks
+% (unless the starred flag is set), using the extra arguments supplied
+% in \cmd{\r@\meta{label}} (via the \file{aux} file) by
+% \package{hyperref}.
% \begin{macrocode}
\def\@@setcref#1#2{%
\cref@getlabel{#2}{\@templabel}%
@@ -4867,7 +5313,8 @@
#1{\@templabel}{}{}%
\else%
\edef\@templink{\cref@hyperref{#2}}%
- #1{\@templabel}{\hyper@linkstart{link}{\@templink}}{\hyper@linkend}%
+ #1{\@templabel}{\hyper@linkstart{link}{\@templink}}%
+ {\hyper@linkend}%
\fi}
\def\@@setcrefrange#1#2#3{%
\cref@getlabel{#2}{\@labela}%
@@ -4881,183 +5328,483 @@
{\hyper@linkstart{link}{\@linka}}{\hyper@linkend}%
{\hyper@linkstart{link}{\@linkb}}{\hyper@linkend}%
\fi}%
- }% end of false case of \@ifpackagewith{hyperref}{implicit=false}
- }{}% end of \@ifpackageloaded{hyperref}
+ \def\@@setcpageref#1#2{%
+ \cref@getpageref{#2}{\@temppage}%
+ \if@crefstarred%
+ #1{\@temppage}{}{}%
+ \else%
+ \edef\@templink{\cref@hyperref{#2}}%
+ #1{\@temppage}{\hyper@linkstart{link}{\@templink}}%
+ {\hyper@linkend}%
+ \fi}
+ \def\@@setcpagerefrange#1#2#3{%
+ \cref@getpageref{#2}{\@pagea}%
+ \cref@getpageref{#3}{\@pageb}%
+ \if@crefstarred%
+ #1{\@pagea}{\@pageb}{}{}{}{}%
+ \else%
+ \edef\@linka{\cref@hyperref{#2}}%
+ \edef\@linkb{\cref@hyperref{#3}}%
+ #1{\@pagea}{\@pageb}%
+ {\hyper@linkstart{link}{\@linka}}{\hyper@linkend}%
+ {\hyper@linkstart{link}{\@linkb}}{\hyper@linkend}%
+ \fi}%
+ }% end of false case of \@ifpackagewith{hyperref}{implicit=false}
+% \end{macrocode}
+%
+% The \package{revtex4-1} and \package{revtex4-1} document classes use
+% |\H@refstepcounter| to increment section counters, even when
+% \package{hyperref} isn't explicitly loaded. Therefore, for these
+% docclasses we need to redefine |\H@refstepcounter| even when
+% \package{hyperref} is not loaded.
+% \begin{macrocode}
+}{% false case of \@ifpackageloaded{hyperref}
+ \@ifclassloaded{revtex4}{\let\if@cref@hyperrefloaded\iftrue}{}%
+ \@ifclassloaded{revtex4-1}{\let\if@cref@hyperrefloaded\iftrue}{}%
+ \if@cref@hyperrefloaded\relax%
+ \let\cref@old@H@refstepcounter\H@refstepcounter%
+ \def\H@refstepcounter#1{%
+ \cref@old@H@refstepcounter{#1}%
+ \cref@constructprefix{#1}{\cref@result}%
+ \@ifundefined{cref@#1@alias}%
+ {\def\@tempa{#1}}%
+ {\def\@tempa{\csname cref@#1@alias\endcsname}}%
+ \protected@xdef\cref@currentlabel{%
+ [\@tempa][\arabic{#1}][\cref@result]%
+ \csname p@#1\endcsname\csname the#1\endcsname}}%
+ \fi%
+ \let\if@cref@hyperrefloaded\iffalse%
+}% end of \@ifpackageloaded{hyperref}
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \end{macro}
%
%
-% \subsection{\package{ntheorem} Support}
-% \begin{macro}{ntheorem}
-% \begin{macro}{thref}
-% If \package{ntheorem} is loaded, we need to modify its theorem
-% referencing features so that they work with \package{cleveref}.
+%
+% \subsubsection{\package{amsmath} support}
+% \begin{macro}{amsmath}
+% \begin{macro}{\label}
+% \begin{macro}{\label@in@display}
+% The \package{amsmath} package redefines the \cmd{\label} command
+% within equation environments, so if it is loaded we have to extend
+% the behaviour to support the optional argument. With
+% \package{amsmath}, the original \cmd{\label} command is stored in
+% \cmd{\ltx@label}, and \cmd{\label@in@display} replaces \cmd{\label}
+% inside equations. \cmd{\label@in@display} just saves the label for
+% later, and defining it is left until the end of the equation, when
+% \cmd{\ltx@label} is finally called.
+%
+% To allow \cmd{\label} within equations to support an optional
+% argument, we first store the original \cmd{\label@in@display} and the
+% new \cmd{\label} macro we defined above (since \cmd{\label} will be
+% clobbered inside equations). Then we redefine \cmd{label@in@display}
+% so that it wraps all its arguments, including any optional argument,
+% in an extra set of braces. These are stripped away again by
+% \cmd{\ltx@label} before calling the \package{cleveref} \cmd{\label}
+% command we defined previously (saved in \cmd{\cref@label}). As
+% before, we must postpone the redefinition of \cmd{\label} until the
+% beginning of the document, since other packages do so.
% \begin{macrocode}
- \@ifpackageloaded{ntheorem}{%
- \PackageInfo{cleveref}{`ntheorem' support loaded}
- \@ifpackagewith{ntheorem}{thref}{%
- \PackageWarning{cleveref}{`cleveref' supersedes `ntheorem's `thref'
- option}%
- \renewcommand{\thref}{\cref}}{}
+\@ifpackageloaded{amsmath}{%
+ \AtBeginDocument{
+ \let\cref@old@label@in@display\label@in@display
+ \def\label@in@display{%
+ \@ifnextchar[\label@in@display@optarg\label@in@display@noarg}%]
+ \def\label@in@display@noarg#1{\cref@old@label@in@display{{#1}}}
+ \def\label@in@display@optarg[#1]#2{%
+ \cref@old@label@in@display{[#1]{#2}}}
+ \def\ltx@label#1{\cref@label#1}
+ }% end of AtBeginDocument
% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
-% \begin{macro}{\theorem@prework}
-% Newer versions of \package{ntheorem} require a call to
-% \cmd{\theorem@prework} when type-setting theorems. If an older
-% version of \package{ntheorem} is being used, we just \cmd{\let} it to
-% \cmd{\relax} to make sure it's defined.
+% \begin{macro}{\measure@}
+% \begin{macro}{\gmeasure@}
+% The \package{amsmath} multi-line equation environments scan their
+% bodies twice: once to measure, once to typeset. In the measure phase,
+% the \cmd{\label} command is disabled by letting it to \cmd{\@gobble}.
+% But this isn't sufficient to gobble all the arguments any more if an
+% optional argument is supplied to our new \cmd{\label}, so we have to
+% modify the \package{amsmath} measuring commands so that they let
+% \cmd{\label} to \cmd{\@gobble@optarg} instead.
+%
+% Unfortunately, \package{amsmath} wasn't designed with redefinitions
+% of \cmd{\label} in mind, so there appears to be no safe way of doing
+% this other than copying the \package{amsmath} definitions and making
+% the modification directly in the macro's code. This is a recipe for
+% future chaos if these commands are ever modified in a new version of
+% \package{amsmath}, but it seems we have no choice. Luckily,
+% \package{amsmath} isn't updated too often!
% \begin{macrocode}
- \@ifundefined{theorem@prework}{\let\theorem@prework\relax}{}
+ \def\measure@#1{%
+ \begingroup
+ \measuring@true
+ \global\eqnshift@\z@
+ \global\alignsep@\z@
+ \global\let\tag@lengths\@empty
+ \global\let\field@lengths\@empty
+ \savecounters@
+ \global\setbox0\vbox{%
+ \let\math@cr@@@\math@cr@@@align@measure
+ \everycr{\noalign{\global\tag@false
+ \global\let\raise@tag\@empty \global\column@\z@}}%
+ \let\label\@gobble@optarg% <<< cleveref modification
+ \global\row@\z@
+ \tabskip\z@
+ \halign{\span\align@preamble\crcr
+ #1%
+ \math@cr@@@
+ \global\column@\z@
+ \add@amps\maxfields@\cr
+ }%
+ }%
+ \restorecounters@
+ \ifodd\maxfields@
+ \global\advance\maxfields@\@ne
+ \fi
+ \ifnum\xatlevel@=\tw@
+ \ifnum\maxfields@<\thr@@
+ \let\xatlevel@\z@
+ \fi
+ \fi
+ \setbox\z@\vbox{%
+ \unvbox\z@ \unpenalty \global\setbox\@ne\lastbox
+ }%
+ \global\totwidth@\wd\@ne
+ \if@fleqn \global\advance\totwidth@\@mathmargin \fi
+ \global\let\maxcolumn@widths\@empty
+ \begingroup
+ \let\or\relax
+ \loop
+ \global\setbox\@ne\hbox{%
+ \unhbox\@ne \unskip \global\setbox\thr@@\lastbox
+ }%
+ \ifhbox\thr@@
+ \xdef\maxcolumn@widths{ \or \the\wd\thr@@ \maxcolumn@widths}%
+ \repeat
+ \endgroup
+ \dimen@\displaywidth
+ \advance\dimen@-\totwidth@
+ \ifcase\xatlevel@
+ \global\alignsep@\z@
+ \let\minalignsep\z@
+ \@tempcntb\z@
+ \if@fleqn
+ \@tempcnta\@ne
+ \global\eqnshift@\@mathmargin
+ \else
+ \@tempcnta\tw@
+ \global\eqnshift@\dimen@
+ \global\divide\eqnshift@\@tempcnta
+ \fi
+ \or
+ \@tempcntb\maxfields@
+ \divide\@tempcntb\tw@
+ \@tempcnta\@tempcntb
+ \advance\@tempcntb\m@ne
+ \if@fleqn
+ \global\eqnshift@\@mathmargin
+ \global\alignsep@\dimen@
+ \global\divide\alignsep@\@tempcnta
+ \else
+ \global\advance\@tempcnta\@ne
+ \global\eqnshift@\dimen@
+ \global\divide\eqnshift@\@tempcnta
+ \global\alignsep@\eqnshift@
+ \fi
+ \or
+ \@tempcntb\maxfields@
+ \divide\@tempcntb\tw@
+ \global\advance\@tempcntb\m@ne
+ \global\@tempcnta\@tempcntb
+ \global\eqnshift@\z@
+ \global\alignsep@\dimen@
+ \if@fleqn
+ \global\advance\alignsep@\@mathmargin\relax
+ \fi
+ \global\divide\alignsep@\@tempcntb
+ \fi
+ \ifdim\alignsep@<\minalignsep\relax
+ \global\alignsep@\minalignsep\relax
+ \ifdim\eqnshift@>\z@
+ \if@fleqn\else
+ \global\eqnshift@\displaywidth
+ \global\advance\eqnshift@-\totwidth@
+ \global\advance\eqnshift@-\@tempcntb\alignsep@
+ \global\divide\eqnshift@\tw@
+ \fi
+ \fi
+ \fi
+ \ifdim\eqnshift@<\z@
+ \global\eqnshift@\z@
+ \fi
+ \calc@shift@align
+ \global\tagshift@\totwidth@
+ \global\advance\tagshift@\@tempcntb\alignsep@
+ \if@fleqn
+ \ifnum\xatlevel@=\tw@
+ \global\advance\tagshift@-\@mathmargin\relax
+ \fi
+ \else
+ \global\advance\tagshift@\eqnshift@
+ \fi
+ \iftagsleft@ \else
+ \global\advance\tagshift@-\displaywidth
+ \fi
+ \dimen@\minalignsep\relax
+ \global\advance\totwidth@\@tempcntb\dimen@
+ \ifdim\totwidth@>\displaywidth
+ \global\let\displaywidth@\totwidth@
+ \else
+ \global\let\displaywidth@\displaywidth
+ \fi
+ \endgroup
+ }
+ \def\gmeasure@#1{%
+ \begingroup
+ \measuring@true
+ \totwidth@\z@
+ \global\let\tag@lengths\@empty
+ \savecounters@
+ \setbox\@ne\vbox{%
+ \everycr{\noalign{\global\tag@false
+ \global\let\raise@tag\@empty \global\column@\z@}}%
+ \let\label\@gobble% <<< cleveref modification
+ \halign{%
+ \setboxz@h{$\m@th\displaystyle{##}$}%
+ \ifdim\wdz@>\totwidth@
+ \global\totwidth@\wdz@
+ \fi
+ &\setboxz@h{\strut@{##}}%
+ \savetaglength@
+ \crcr
+ #1%
+ \math@cr@@@
+ }%
+ }%
+ \restorecounters@
+ \if@fleqn
+ \global\advance\totwidth@\@mathmargin
+ \fi
+ \iftagsleft@
+ \ifdim\totwidth@>\displaywidth
+ \global\let\gdisplaywidth@\totwidth@
+ \else
+ \global\let\gdisplaywidth@\displaywidth
+ \fi
+ \fi
+ \endgroup
+}
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
-% \begin{macro}{\@thm}
-% We modify \package{ntheorem}'s version of the \cmd{\@thm} macro very
-% slightly, to have it call \cmd{\refstepcounter} with an optional
-% argument containing the theorem type.
+% \begin{macro}{\multline@}
+% \begin{macro}{\mmeasure@}
+% \begin{macro}{\label@mmeasure@noarg}
+% \begin{macro}{\label@mmeasure@optarg}
+% The |multline| environment works a bit differently to the other
+% \package{amsmath} environments, in that \cmd{\label} is
+% \emph{disabled} during the typesetting phase, and \emph{enabled}
+% during the measuring phase. To cope with \package{cleveref}'s
+% optional argument, we have to define separate versions of
+% \cmd{\label@in@display} specifically for \cmd{\mmeasure@}.
% \begin{macrocode}
- \gdef\@thm#1#2#3{%
- \if@thmmarks%
- \stepcounter{end\InTheoType ctr}%
- \fi%
- \renewcommand{\InTheoType}{#1}%
- \if@thmmarks%
- \stepcounter{curr#1ctr}%
- \setcounter{end#1ctr}{0}%
- \fi%
- \refstepcounter[#1]{#2}% <<< cleveref modification
- \theorem@prework%
- \thm@topsepadd \theorempostskipamount%
- \ifvmode \advance\thm@topsepadd\partopsep\fi%
- \trivlist%
- \@topsep \theorempreskipamount%
- \@topsepadd \thm@topsepadd%
- \advance\linewidth -\theorem@indent%
- \advance\@totalleftmargin \theorem@indent%
- \parshape \@ne \@totalleftmargin \linewidth%
- \@ifnextchar[{\@ythm{#1}{#2}{#3}}{\@xthm{#1}{#2}{#3}}%]
+ \def\multline@#1{%
+ \Let@
+ \@display@init{\global\advance\row@\@ne \global\dspbrk@lvl\m@ne}%
+ \chardef\dspbrk@context\z@
+ \restore@math@cr
+ \let\tag\tag@in@align
+ \global\tag@false \global\let\raise@tag\@empty
+ \mmeasure@{#1}%
+ \let\tag\gobble@tag \let\label\@gobble@optarg% <<< cleveref modification
+ \tabskip \if@fleqn \@mathmargin \else \z@skip \fi
+ \totwidth@\displaywidth
+ \if@fleqn
+ \advance\totwidth@-\@mathmargin
+ \fi
+ \halign\bgroup
+ \hbox to\totwidth@{%
+ \if@fleqn
+ \hskip \@centering \relax
+ \else
+ \hfil
+ \fi
+ \strut@
+ $\m@th\displaystyle{}##\endmultline@math
+ \hfil
+ }% $
+ \crcr
+ \if@fleqn
+ \hskip-\@mathmargin
+ \def\multline@indent{\hskip\@mathmargin}%
+ \else
+ \hfilneg
+ \def\multline@indent{\hskip\multlinegap}%
+ \fi
+ \iftagsleft@
+ \iftag@
+ \begingroup
+ \ifshifttag@
+ \rlap{\vbox{%
+ \normalbaselines
+ \hbox{%
+ \strut@
+ \make@display@tag
+ }%
+ \vbox to\lineht@{}%
+ \raise@tag
+ }}%
+ \multline@indent
+ \else
+ \setbox\z@\hbox{\make@display@tag}%
+ \dimen@\@mathmargin \advance\dimen@-\wd\z@
+ \ifdim\dimen@<\multlinetaggap
+ \dimen@\multlinetaggap
+ \fi
+ \box\z@ \hskip\dimen@\relax
+ \fi
+ \endgroup
+ \else
+ \multline@indent
+ \fi
+ \else
+ \multline@indent
+ \fi
+ #1%
}
- }{}% end of \@ifpackageloaded{ntheorem}
+ \def\mmeasure@#1{%
+ \begingroup
+ \measuring@true
+ \def\label{% <<< cleveref modification
+ \@ifnextchar[\label@in@mmeasure@optarg%]
+ \label@in@mmeasure@noarg}%
+ \def\math@cr@@@{\cr}%
+ \let\shoveleft\@iden \let\shoveright\@iden
+ \savecounters@
+ \global\row@\z@
+ \setbox\@ne\vbox{%
+ \global\let\df@tag\@empty
+ \halign{%
+ \setboxz@h{\@lign$\m@th\displaystyle{}##$}%
+ \iftagsleft@
+ \ifnum\row@=\@ne
+ \global\totwidth@\wdz@
+ \global\lineht@\ht\z@
+ \fi
+ \else
+ \global\totwidth@\wdz@
+ \global\lineht@\dp\z@
+ \fi
+ \crcr
+ #1%
+ \crcr
+ }%
+ }%
+ \ifx\df@tag\@empty\else\global\tag@true\fi
+ \if@eqnsw\global\tag@true\fi
+ \iftag@
+ \setboxz@h{%
+ \if@eqnsw
+ \stepcounter{equation}%
+ \tagform@\theequation
+ \else
+ \df@tag
+ \fi
+ }%
+ \global\tagwidth@\wdz@
+ \dimen@\totwidth@
+ \advance\dimen@\tagwidth@
+ \advance\dimen@\multlinetaggap
+ \iftagsleft@\else
+ \if@fleqn
+ \advance\dimen@\@mathmargin
+ \fi
+ \fi
+ \ifdim\dimen@>\displaywidth
+ \global\shifttag@true
+ \else
+ \global\shifttag@false
+ \fi
+ \fi
+ \restorecounters@
+ \endgroup
+ }
+ \def\label@in@mmeasure@noarg#1{%
+ \begingroup%
+ \measuring@false%
+ \cref@old@label@in@display{{#1}}%
+ \endgroup}
+ \def\label@in@mmeasure@optarg[#1]#2{%
+ \begingroup%
+ \measuring@false%
+ \cref@old@label@in@display{[#1]{#2}}%
+ \endgroup}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
-%
-%
-% \subsection{\cmd{\newtheorem} Support}
-% \label{sec:newtheorem}
-% \begin{macro}{\newtheorem}
-% A \cmd{\newtheorem} command provides sufficient information to
-% automatically define a reasonable cross-reference name for
-% theorem-like environments (\package{ntheorem}'s \option{thmref} does
-% essentially this). So we modify \cmd{\newtheorem} (actually, the
-% lower-level \cmd{\@othm}, \cmd{\@xnthm} and \cmd{\@ynthm} macros) so
-% that it does so. We do this in such a way that default definitions or
-% explicit \cmd{\crefname} definitions for theorem-like environments
-% override those produced automatically by our modified
-% \cmd{\newtheorem}.
-%
-% The catch is that, although the \cmd{\newtheorem} command provides
-% the singular form, there's no way of reliably deducing the plural
-% form from this. Rather than implement some half-baked attempt at this
-% which will be wrong more often than it's right (especially in
-% languages other than English) and generally cause more trouble than
-% it's worth, we simply define the singular form but leave the plural
-% form undefined. If the latter is ever needed, it will produce a
-% ``undefined cross-reference type'' warning, prompting the author to
-% provide an appropriate \cmd{\crefname} definition themselves.
-%
-% \begin{macro}{\@othm}
-% \begin{macro}{\@xnthm}
-% \begin{macro}{\@ynthm}
-% After sorting out its arguments, \cmd{\newtheorem} calls one of
-% \cmd{\@othm}, \cmd{\@xthm} or \cmd{\@ythm}. We add automatic
-% definitions of \cmd{\cref@\meta{type}@name} and\linebreak[4]
-% \cmd{\Cref@\meta{type}@name} to all three of these, and add the
-% theorem-like environment to the list of cross-reference types that
-% need to be defined from components at |\||begin{document}|. Since we
-% want explicit \cmd{\crefname}'s to override these automatic
-% definitions, we store the definitions in
-% \cmd{\cref@\meta{type}@name@preamble}, which are processed at
-% |\||begin{document}|) if they haven't been overridden. The default
-% definitions also get stored in \cmd{\cref@\meta{type}@name@preamble}
-% later on, so they too will override these automatic definitions,
-% which is what we want.
-%
-% All this means that these automatic \cmd{\newtheorem} definitions
-% will only work when \cmd{\newtheorem} is used in the preamble.
-% However, this is also true of (new) cross-reference types defined
-% using \cmd{\crefname}, so it doesn't seem worth the significant
-% effort of getting the automatic definitions to work within the
-% document body.
+% \begin{macro}{subequations}
+% In order for |subequations| to be sorted properly, \package{cleveref}
+% needs to know that the |equation| counter is effectively reset by the
+% |parentequation| counter within the |subequations| environment. This
+% isn't how |amsmath| implements subequations (for obvious reasons!),
+% but we harmlessly add the |equation| counter to the |parentequation|
+% counter's reset list \emph{within} |subequations| environments, so
+% that \package{cleveref}'s sorting mechanism can figure things out. We
+% also harmlessly make sure |parentequation| is reset by the same
+% counter as |equation|.
% \begin{macrocode}
-\let\cref@old@othm\@othm
-\def\@othm#1[#2]#3{%
- \edef\@tempa{\expandafter\noexpand%
- \csname cref@#1@name@preamble\endcsname}%
- \edef\@tempb{\expandafter\noexpand%
- \csname Cref@#1@name@preamble\endcsname}%
- \def\@tempc{#3}%
- \ifx\@tempc\@empty\relax%
- \expandafter\gdef\@tempa{}%
- \expandafter\gdef\@tempb{}%
- \else%
- \expandafter\expandafter\expandafter\gdef\expandafter%
- \@tempa\expandafter{\MakeLowercase #3}%
- \expandafter\expandafter\expandafter\gdef\expandafter%
- \@tempa\expandafter{\MakeUppercase #3}%
- \fi%
- \cref@stack@add{#1}{\cref@label@types}%
- \cref@old@othm{#1}[#2]{#3}}
-\let\cref@old@xnthm\@xnthm
-\def\@xnthm#1#2[#3]{%
- \edef\@tempa{\expandafter\noexpand%
- \csname cref@#1@name@preamble\endcsname}%
- \edef\@tempb{\expandafter\noexpand%
- \csname Cref@#1@name@preamble\endcsname}%
- \def\@tempc{#2}%
- \ifx\@tempc\@empty\relax%
- \expandafter\gdef\@tempa{}%
- \expandafter\gdef\@tempb{}%
- \else%
- \expandafter\expandafter\expandafter\gdef\expandafter%
- \@tempa\expandafter{\MakeLowercase #2}%
- \expandafter\expandafter\expandafter\gdef\expandafter%
- \@tempa\expandafter{\MakeUppercase #2}%
- \fi%
- \cref@stack@add{#1}{\cref@label@types}%
- \cref@old@xnthm{#1}{#2}[#3]}
-\let\cref@old@ynthm\@ynthm
-\def\@ynthm#1#2{%
- \edef\@tempa{\expandafter\noexpand%
- \csname cref@#1@name@preamble\endcsname}%
- \edef\@tempb{\expandafter\noexpand%
- \csname Cref@#1@name@preamble\endcsname}%
- \def\@tempc{#2}%
- \ifx\@tempc\@empty\relax%
- \expandafter\gdef\@tempa{}%
- \expandafter\gdef\@tempb{}%
- \else%
- \expandafter\expandafter\expandafter\gdef\expandafter%
- \@tempa\expandafter{\MakeLowercase #2}%
- \expandafter\expandafter\expandafter\gdef\expandafter%
- \@tempa\expandafter{\MakeUppercase #2}%
+ \let\cref@old@subequations\subequations%
+ \let\cref@old@endsubequations\endsubequations%
+ \cref@resetby{equation}{\cref@result}%
+ \ifx\cref@result\relax\else%
+ \@addtoreset{parentequation}{\cref@result}%
\fi%
- \cref@stack@add{#1}{\cref@label@types}%
- \cref@old@ynthm{#1}{#2}}
+ \renewenvironment{subequations}{%
+ \@addtoreset{equation}{parentequation}%
+ \cref@old@subequations%
+ }{%
+ \gdef\cl@parentequation{}%
+ \cref@old@endsubequations%
+ \setcounter{parentequation}{0}%
+ }%
% \end{macrocode}
% \end{macro}
-% \end{macro}
+%
+% \begin{macro}{\make@df@tag@@}
+% \begin{macro}{\make@df@tag@@@}
+% We override the internals of the \package{amsmath} \cmd{\tag} command
+% to add the additional information to the label definition. Since
+% labels produced by \cmd{\tag} have no logical ordering when sorting a
+% list of references, we give them a large numerical value so that they
+% get pushed to the end of sorted cross-reference lists.
+% \begin{macrocode}
+ \def\make@df@tag@@#1{%
+ \gdef\df@tag{\maketag@@@{#1}\def\@currentlabel{#1}%
+ \def\cref@currentlabel{[equation][2147483647][]#1}}}
+ \def\make@df@tag@@@#1{%
+ \gdef\df@tag{\tagform@{#1}%
+ \toks@\@xp{\p@equation{#1}}%
+ \edef\@currentlabel{\the\toks@}%
+ \edef\cref@currentlabel{[equation][2147483647][]\the\toks@}}}
+}{}% end of \@ifpackageloaded{amsmath}
+% \end{macrocode}
% \end{macro}
% \end{macro}
%
%
%
-% \subsection{\package{amsthm} Support}
+% \subsubsection{\package{amsthm} support}
% \begin{macro}{amsthm}
% If \package{amsthm} is loaded, we need to modify its theorem
% referencing features so that they work with \package{cleveref}.
@@ -5162,10 +5909,601 @@
%
%
%
+% \subsubsection{\package{ntheorem} support}
+% \begin{macro}{ntheorem}
+% \begin{macro}{thref}
+% If \package{ntheorem} is loaded, we need to modify its theorem
+% referencing features so that they work with \package{cleveref}.
+% \begin{macrocode}
+ \@ifpackageloaded{ntheorem}{%
+ \PackageInfo{cleveref}{`ntheorem' support loaded}
+ \@ifpackagewith{ntheorem}{thref}{%
+ \PackageWarning{cleveref}{`cleveref' supersedes `ntheorem's `thref'
+ option}%
+ \renewcommand{\thref}{\cref}}{}
+% \end{macrocode}
+%
+% \begin{macro}{\theorem@prework}
+% Newer versions of \package{ntheorem} require a call to
+% \cmd{\theorem@prework} when typesetting theorems. If an older
+% version of \package{ntheorem} is being used, we just \cmd{\let} it to
+% \cmd{\relax} to make sure it's defined.
+% \begin{macrocode}
+ \@ifundefined{theorem@prework}{\let\theorem@prework\relax}{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@thm}
+% We modify \package{ntheorem}'s version of the \cmd{\@thm} macro very
+% slightly, to have it call \cmd{\refstepcounter} with an optional
+% argument containing the theorem type.
+% \begin{macrocode}
+ \gdef\@thm#1#2#3{%
+ \if@thmmarks%
+ \stepcounter{end\InTheoType ctr}%
+ \fi%
+ \renewcommand{\InTheoType}{#1}%
+ \if@thmmarks%
+ \stepcounter{curr#1ctr}%
+ \setcounter{end#1ctr}{0}%
+ \fi%
+ \refstepcounter[#1]{#2}% <<< cleveref modification
+ \theorem@prework%
+ \thm@topsepadd \theorempostskipamount%
+ \ifvmode \advance\thm@topsepadd\partopsep\fi%
+ \trivlist%
+ \@topsep \theorempreskipamount%
+ \@topsepadd \thm@topsepadd%
+ \advance\linewidth -\theorem@indent%
+ \advance\@totalleftmargin \theorem@indent%
+ \parshape \@ne \@totalleftmargin \linewidth%
+ \@ifnextchar[{\@ythm{#1}{#2}{#3}}{\@xthm{#1}{#2}{#3}}%]
+ }
+ }{}% end of \@ifpackageloaded{ntheorem}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \subsubsection{\package{varioref} support}
+% \begin{macro}{varioref}
+% If \package{varioref} is loaded, we redefine its commands to use
+% \cmd{\cref} instead of \cmd{\ref} to produce the reference. Since
+% \cmd{\cref} can cope with multiple references, we extend the page
+% referencing magic of \cmd{\vref} et al.\ to use \cmd{\cpageref}
+% instead, assisted by \cmd{\@setvpageref} and \cmd{\@vpagerefrange}
+% (which typeset page references using \package{varioref} commands).
+% The former takes care of multi-references, the latter take care of
+% the \package{varioref} page referencing magic.
+% \end{macro}
+%
+% \begin{macrocode}
+\@ifpackageloaded{varioref}{%
+ \PackageInfo{cleveref}{`varioref' support loaded}
+ \PackageInfo{cleveref}{`cleveref' supersedes `varioref's %
+ \string\labelformat command}
+% \end{macrocode}
+%
+%
+% \begin{macro}{\cref@@vpageref}
+% We first enhance the core \package{varioref} |\vpageref| macro to
+% allow it to cope with lists of page references. This is done by
+% defining our version in terms of \package{cleveref}'s \cmd{\cpageref}
+% command, which handles multi-references, but telling \cmd{\cpageref}
+% to typeset the actual page references themselves using
+% \package{varioref}'s own page-referencing commands. (The alternative
+% version of \cmd{\vpagerefrange} is there to facilitate later
+% redefinitions.)
+% \begin{macrocode}
+ \def\cref@@vpageref#1[#2]#3{%
+ \@cpageref{cref}{#3}%
+ {\@setvpageref[#1][\vref@space]}{\@setvpagerefrange[#1]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cref@vref}
+% \begin{macro}{\cref@vrefrange}
+% \begin{macro}{\cref@fullref}
+% Now we define \package{cleveref}-enhanced versions of the other
+% \package{varioref} cross-\linebreak[4]referencing commands, which use
+% \cmd{\cref} et al.\ to type set the cross-references, and the
+% \package{cleveref}-enhanced \cmd{\vpageref} et al.\ to typeset page
+% references.
+% \begin{macrocode}
+ \def\cref@vref#1#2{%
+ \leavevmode%
+ \@cref{#1}{#2}\@setcref@space%
+ \cref@@vpageref{\reftextcurrent}[]{#2}}
+ \def\cref@vrefrange#1#2#3{%
+ \@setcrefrange{#2}{#3}{#1}{}\@setcref@space\vpagerefrange{#2}{#3}}
+ \def\cref@fullref#1#2{%
+ \@cref{#1}{#2}\@setcref@space%
+ \@cpageref{cref}{#2}{\@setfullpageref}{\@setfullpagerefrange}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\cref@vpagerefconjunction}
+% When typesetting multi-references, we need to add appropriate
+% conjunctions to the page references produced by the
+% \package{varioref} macros. Since we need this in various different
+% commands, we separate it out into a self-contained macro.
+% \begin{macrocode}
+ \def\cref@vpagerefconjunction#1{%
+ \def\@tempa{#1}%
+ \def\@tempb{@second}%
+ \ifx\@tempa\@tempb\relax%
+ \@setcref@pairconjunction%
+ \else%
+ \def\@tempb{@middle}%
+ \ifx\@tempa\@tempb\relax%
+ \@setcref@middleconjunction%
+ \else%
+ \def\@tempb{@last}%
+ \ifx\@tempa\@tempb\relax%
+ \@setcref@lastconjunction%
+ \fi%
+ \fi%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@setcref@space}
+% We separate out the typesetting of the space between the
+% cross-reference and page-reference into a separate macro, to make it
+% easier to implement the \option{poorman} option.
+% \begin{macrocode}
+ \def\@setcref@space{ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@setvpageref}
+% The \cmd{\@setvpageref} and \cmd{\@setvpagerefrange} macros typeset
+% page references using \package{varioref} commands, tweaked to work
+% with the enhanced \package{cleveref} page-referencing features. They
+% are passed to \cmd{\@cpageref} by the \package{cleveref}-enhanced
+% \cmd{\vpageref} command, thereby combining the \package{cleveref} and
+% \package{varioref} page-referencing features.
+%
+% |#1| and |#2| are \package{varioref} arguments that get passed
+% straight through to the (original) \package{varioref} |\@@vpageref|
+% macro. |#3| is the reference label itself. |#4| is either |cref| or
+% |Cref|, identifying the capitalisation variant, and |#5| is either
+% empty if we're typesetting a single page reference, or one of
+% |@first|, |@second|, |@middle| or |@end|, identifying where the page
+% reference comes in a multi-reference. The arguments in square
+% brackets are passed all the way through from the
+% \package{cleveref}-enhanced \package{varioref} commands. The others
+% are added by |\@cpageref| when it calls |\@setvpageref|.
+% \begin{macrocode}
+ \def\@setvpageref[#1][#2]#3#4#5{%
+% \end{macrocode}
+% Add the appropriate conjunction before the page reference.
+% \begin{macrocode}
+ \cref@vpagerefconjunction{#5}%
+% \end{macrocode}
+% Undefining |\vref@space| prevents the original \package{varioref}
+% |\@@vpageref| macro from |\unskip|ing any preceding space and
+% inserting its own. We definitely don't want it to do that here when
+% we're typesetting anything other than the first group of page
+% references, as any preceding space then is part of the preceding
+% conjunction, and should be strictly respected. But, since we're
+% modifying the \package{varioref} commands anyway, we take this
+% opportunity to get rid of the irritating \package{varioref} spacing
+% behaviour even for the first group of page references.
+% \begin{macrocode}
+ \def\vref@space{}%
+% \end{macrocode}
+% Modify the \package{varioref} |\reftext|\meta{x} commands as
+% appropriate for the page reference we're currently typesetting, then
+% typeset the page reference.
+% \begin{macrocode}
+ \begingroup%
+ \cref@patchreftexts{#5}%
+ \@@setvpageref{#1}[#2]{#3}%
+ \endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@setvpageref}
+% We separate out the final type setting step, as always, to make it
+% easier to redefine things later.
+% \begin{macrocode}
+ \def\@@setvpageref#1[#2]#3{\cref@old@@vpageref{#1}[#2]{#3}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@setvpagerefrange}
+% |\@setvpagerefrange| is similar to |\@setvpageref|, but typesets page
+% ranges. |#1| is a \package{varioref} spacing argument that get passed
+% straight through to the \package{varioref} |\vpagerefrange| macro.
+% |#2| and |#3| are the labels themselves. |#4| is either |cref| or
+% |Cref|, identifying the capitalisation variant, and |#5| is either
+% empty if we're typesetting a single page range, or one of |@first|,
+% |@second|, |@middle| or |@end|, identifying where the page reference
+% comes in a multi-reference. The arguments in square brackets are
+% passed all the way through from the \package{cleveref}-enhanced
+% \package{varioref} commands. The others are added by |\@cpageref|
+% when it calls |\@setvpagerefrange|.
+% \begin{macrocode}
+ \def\@setvpagerefrange[#1]#2#3#4#5{%
+% \end{macrocode}
+% Add the appropriate conjunction before the page range reference.
+% \begin{macrocode}
+ \cref@vpagerefconjunction{#5}%
+% \end{macrocode}
+% Unlike |\vpageref|, \package{varioref}'s |\vpagerefrange| command
+% \emph{doesn't} go in for quite the same space-mangling behaviour. We
+% still undefine \cmd{\vref@space}, though.
+% \begin{macrocode}
+ \let\vref@space\relax%
+% \end{macrocode}
+% Modify the \package{varioref} |\reftext|\meta{x} commands as
+% appropriate for the page range we're currently typesetting, then
+% typeset the page range.
+% \begin{macrocode}
+ \begingroup%
+ \cref@patchreftexts{#5}%
+ \@@setvpagerefrange[#1]{#2}{#3}%
+ \endgroup}
+% \end{macrocode}
+%
+% Again, we separate out the final typesetting step, to aid later
+% redefinition.
+% \begin{macrocode}
+ \def\@@setvpagerefrange[#1]#2#3{\vpagerefrange[#1]{#2}{#3}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@setfullpageref}
+% \begin{macrocode}
+ \def\@setfullpageref#1#2#3{%
+% \end{macrocode}
+% Add the appropriate conjunction before the page reference.
+% \begin{macrocode}
+ \cref@vpagerefconjunction{#3}%
+% \end{macrocode}
+% Modify the \package{varioref} |\reftext|\meta{x} commands as
+% appropriate for the page reference we're currently typesetting, then
+% typeset the page reference.
+% \begin{macrocode}
+ \begingroup%
+ \cref@patchreftexts{#3}%
+ \@@setfullpageref{#1}%
+ \endgroup}
+% \end{macrocode}
+%
+% Separate out the final typesetting step, as usual.
+% \begin{macrocode}
+ \def\@@setfullpageref#1{\reftextfaraway{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@setfullpagerefrange}
+% \begin{macrocode}
+ \def\@setfullpagerefrange#1#2#3#4{%
+% \end{macrocode}
+% Add the appropriate conjunction before the page reference.
+% \begin{macrocode}
+ \cref@vpagerefconjunction{#4}%
+% \end{macrocode}
+% Modify the \package{varioref} |\reftext|\meta{x} commands as
+% appropriate for the page reference we're currently typesetting, then
+% typeset the page reference.
+% \begin{macrocode}
+ \begingroup%
+ \cref@patchreftexts{#4}%
+ \@@setfullpagerefrange{#1}{#2}%
+ \endgroup}
+% \end{macrocode}
+%
+% Separate out the final typesetting step, as usual.
+% \begin{macrocode}
+ \def\@@setfullpagerefrange#1#2{\reftextpagerange{#1}{#2}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\cref@old@@vpageref}
+% Unfortunately, \package{varioref}'s |\@@vpageref| macro calls a
+% |\vref@label| \emph{before} it typesets the page reference. The
+% |\protected@write| within |\vref@label| seems to prevent an |\unskip|
+% command coming after the |\vref@label| from removing any space that
+% was inserted before the |\vref@label|. This means that setting a
+% |\reftext|\meta{x} command to |\unskip| won't work; it won't properly
+% remove any preceding space in the event that the an empty page
+% reference is typeset.
+%
+% This didn't matter in the original \package{varioref} implementation,
+% because it \emph{always} removed any preceding space, then inserted
+% its own space \emph{after} the |\vref@label|, which the |\unskip|
+% could then gobble. But we want to get rid of this irritating
+% always-space-gobbling behaviour here. So we have to redefine
+% |\@@vpageref| (here renamed |\cref@old@@vpageref|) in order to move
+% the |\vref@label| to the end of the macro, after the page reference
+% has been typeset. We also remove the |\unskip| from the start of
+% |\@@vpageref|.
+% \begin{macrocode}
+ \def\cref@old@@vpageref#1[#2]#3{%
+ \leavevmode%\unskip <<<
+ \global\advance\c@vrcnt\@ne
+ \vref@pagenum\@tempa{\the\c@vrcnt @vr}%
+ \vref@pagenum\@tempb{\the\c@vrcnt @xvr}%
+ %\vref@label{\the\c@vrcnt @xvr}% <<<
+ \ifx\@tempa\@tempb\else
+ \vref@err{\noexpand\vref or \noexpand\vpageref at page boundary
+ \@tempb-\@tempa\space (may loop)%
+ }%
+ \fi
+ \vrefpagenum\thevpagerefnum{#3}%
+ \vref@space
+ \ifx\@tempa\thevpagerefnum
+ \def\@tempc{#1}%
+ \ifx\@tempc\@empty
+ \unskip
+ \else
+ #1%
+ \fi
+ \else
+ #2%
+ \is@pos@number\thevpagerefnum
+ {%
+ \is@pos@number\@tempa
+ {\@tempcnta\@tempa
+ \advance\@tempcnta\@ne
+ }%
+ {\@tempcnta\maxdimen}%
+ \ifnum \thevpagerefnum =\@tempcnta
+ \ifodd\@tempcnta
+ \if@twoside
+ \reftextfaceafter
+ \else
+ \reftextafter
+ \fi
+ \else
+ \reftextafter
+ \fi
+ \else
+ \advance\@tempcnta-2
+ \ifnum \thevpagerefnum =\@tempcnta
+ \ifodd\@tempcnta
+ \reftextbefore
+ \else
+ \if@twoside
+ \reftextfacebefore
+ \else
+ \reftextbefore
+ \fi
+ \fi
+ \else
+ \reftextfaraway{#3}%
+ \fi
+ \fi
+ }%
+ {\reftextfaraway{#3}}%
+ \fi
+ \vref@label{\the\c@vrcnt @xvr}% <<<
+ \vref@label{\the\c@vrcnt @vr}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% We save the default \package{varioref} |\reftext|\meta{x} commands as
+% |\creftext|\meta{x}, before the user's had any chance to redefine them.
+% These are used if a |\reftext|\meta{x} is redefined to produce an empty
+% reference, to force a non-empty reference within multi-references.
+% \begin{macrocode}
+ \let\creftextcurrent\reftextcurrent
+ \let\creftextfaceafter\reftextfaceafter
+ \let\creftextfacebefore\reftextfacebefore
+ \let\creftextafter\reftextafter
+ \let\creftextbefore\reftextbefore
+ \let\creftextfaraway\reftextfaraway
+ \let\creftextpagerange\reftextpagerange
+% \end{macrocode}
+%
+% \begin{macro}{\cref@patchreftexts}
+% \begin{macro}{\cref@restorereftexts}
+% The |\cref@patchreftexts| command modifies \package{varioref}
+% |\reftext|\meta{x} commands, for use within |\@setvpageref| and
+% |\@setvpagerefrange|.
+% \begin{macrocode}
+ \def\cref@patchreftexts#1{%
+ \cref@patchreftext{reftextcurrent}{#1}%
+ \cref@patchreftext{reftextfaceafter}{#1}%
+ \cref@patchreftext{reftextfacebefore}{#1}%
+ \cref@patchreftext{reftextafter}{#1}%
+ \cref@patchreftext{reftextbefore}{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\cref@patchreftext}
+% |\cref@patchreftext| does the hard work of modifying the
+% |\reftext|\meta{x} command given in |#1| as appropriate for the
+% |\@setvpageref| or |\@setvpagerefrange| command that it's called
+% from. (It can only be called from within one of those commands.) |#2|
+% is empty if we're typesetting a single page reference, or one of
+% |@first|, |@second|, |@middle| or |@end| when typesetting a
+% multi-reference.
+% \begin{macrocode}
+ \def\cref@patchreftext#1#2{%
+ \def\@tempa{#2}%
+% \end{macrocode}
+% If we're typesetting a single page reference\dots
+% \begin{macrocode}
+ \ifx\@tempa\@empty%
+% \end{macrocode}
+% if the reftext command produces an empty reference, redefine it to
+% be |\unskip|.
+% \begin{macrocode}
+ \def\@tempc{}%
+ \expandafter\ifx\csname #1\endcsname\@tempc\relax%
+ \expandafter\def\csname #1\endcsname{\unskip}%
+ %{\advance\count@group -1\reftextcurrent@orig}%
+ \else%
+ \long\def\@tempc{}%
+ \expandafter\ifx\csname #1\endcsname\@tempc\relax%
+ \expandafter\def\csname #1\endcsname{\unskip}%
+ %{\advance\count@group -1\reftextcurrent@orig}%
+ \fi%
+ \fi%
+% \end{macrocode}
+%
+% If we're typesetting a multi-reference\dots
+% \begin{macrocode}
+ \else%
+% \end{macrocode}
+% if the reftext command produces an empty page reference, patch it
+% to instead use |\creftext|\meta{x}, which always produces a
+% non-empty reference.
+% \begin{macrocode}
+ \long\def\@tempc{\unskip}%
+ \expandafter\ifx\csname #1\endcsname\@tempc\relax%
+ \expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\csname #1\endcsname\expandafter{%
+ \csname c#1\endcsname}%
+ \else%
+ \long\def\@tempc{}%
+ \expandafter\ifx\csname #1\endcsname\@tempc\relax%
+ \expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\csname #1\endcsname\expandafter{%
+ \csname c#1\endcsname}%
+ \else%
+ \def\@tempc{\unskip}%
+ \expandafter\ifx\csname #1\endcsname\@tempc\relax%
+ \expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\csname #1\endcsname\expandafter{%
+ \csname c#1\endcsname}%
+ \else%
+ \def\@tempc{}%
+ \expandafter\ifx\csname #1\endcsname\@tempc\relax%
+ \expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\csname #1\endcsname\expandafter{%
+ \csname c#1\endcsname}%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@setcref@pairconjunction}
+% \begin{macro}{\@setcref@middleconjunction}
+% \begin{macro}{\@setcref@lastconjunction}
+% We also add an extra macro layer for typesetting the conjunctions,
+% for the same reason. (Note that we only needed to do this for the
+% group conjunctions previously, as the other conjunctions are never
+% used directly in the normal \package{cleveref} commands. But
+% |\@setvpageref| and |\@setvpagerefrange| \emph{do} use them directly,
+% so now we do need macros to separate out the final type setting of
+% the rest of the conjunctions.)
+% \begin{macrocode}
+ \def\@setcref@pairconjunction{\crefpairconjunction}
+ \def\@setcref@middleconjunction{\crefmiddleconjunction}
+ \def\@setcref@lastconjunction{\creflastconjunction}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% We now redefine the original \package{varioref} commands to use the
+% \package{cleveref}-enhanced versions. The redefinition of
+% \cmd{\@@vpageref} has to be postponed until the beginning of the
+% document, to make sure it overrides \package{hyperref}'s redefinition
+% (if loaded).
+% \begin{macrocode}
+ \AtBeginDocument{%
+ \def\@@vpageref#1[#2]#3{\cref@@vpageref{#1}[#2]{#3}}
+ }
+% \end{macrocode}
+%
+% \begin{macro}{\vpageref}
+% \begin{macro}{\vref}
+% \begin{macro}{\vref*}
+% \begin{macro}{\Vref}
+% \begin{macro}{\Vref*}
+% \begin{macro}{\vrefrange}
+% \begin{macro}{\vrefrange*}
+% \begin{macro}{\Vrefrange}
+% \begin{macro}{\Vrefrange*}
+% \begin{macro}{\fullref}
+% \begin{macro}{\fullref*}
+% \begin{macro}{\Fullref}
+% \begin{macro}{\Fullref*}
+% Since we're defining the spacing behaviour of \cmd{\vref} et al.\ to
+% be consistent with the other \package{cleveref} referencing commands,
+% this frees up the starred variants to be used to suppress hyperlinks
+% when \package{hyperref} is loaded, as usual.
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macrocode}
+ \if@cref@hyperrefloaded\relax% hyperref loaded
+ \DeclareRobustCommand{\vref}{%
+ \@ifstar{\cref@vrefstar{cref}}{\cref@vref{cref}}}
+ \DeclareRobustCommand{\Vref}{%
+ \@ifstar{\cref@vrefstar{Cref}}{\cref@vref{Cref}}}
+ \DeclareRobustCommand{\vrefrange}{%
+ \@ifstar{\cref@vrefrangestar{cref}}{\cref@vrefrange{cref}}}
+ \DeclareRobustCommand{\Vrefrange}{%
+ \@ifstar{\cref@vrefrangestar{Cref}}{\cref@vrefrange{Cref}}}
+ \DeclareRobustCommand{\fullref}{%
+ \@ifstar{\cref@fullrefstar{cref}}{\cref@fullref{cref}}}
+ \DeclareRobustCommand{\Fullref}{%
+ \@ifstar{\cref@fullrefstar{Cref}}{\cref@fullref{Cref}}}
+ \def\cref@vrefstar#1#2{%
+ \@crefstarredtrue%
+ \cref@vref{#1}{#2}%
+ \@crefstarredfalse}
+ \def\cref@vrefrangestar#1#2#3{%
+ \@crefstarredtrue%
+ \cref@vrefrange{#1}{#2}{#3}%
+ \@crefstarredfalse}
+ \def\cref@fullrefstar#1#2{%
+ \@crefstarredtrue%
+ \cref@fullref{#1}{#2}%
+ \@crefstarredfalse}
+ \else%
+ \DeclareRobustCommand{\vref}{\cref@vref{cref}}
+ \DeclareRobustCommand{\Vref}{\cref@vref{Cref}}
+ \DeclareRobustCommand{\vrefrange}{\cref@vrefrange{cref}}
+ \DeclareRobustCommand{\Vrefrange}{\cref@vrefrange{Cref}}
+ \DeclareRobustCommand{\fullref}{\cref@fullref{cref}}
+ \DeclareRobustCommand{\Fullref}{\cref@fullref{Cref}}
+ \fi% end of test for hyperref
+}{}% end of \@ifpackageloaded{varioref}
+% \end{macrocode}
+%
+%
+%
+% \subsubsection{\package{algorithm} support}
% \begin{macro}{algorithm}
% If \package{algorithm} is loaded, we modify its line numbering
% mechanism so that labels referring to line numbers in algorithms work
% with \package{cleveref}.
+% \end{macro}
% \begin{macrocode}
\@ifpackageloaded{algorithm}{%
\PackageInfo{cleveref}{`algorithm' support loaded}
@@ -5189,10 +6527,10 @@
}{}% end of \@ifpackageloaded{algorithm}
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
%
%
+% \subsubsection{\package{listings} support}
% \begin{macro}{listings}
% The only thing we need to do in order to support cross-references to
% line numbers and listings produced by the \package{listings} package
@@ -5201,14 +6539,16 @@
% types.
% \begin{macrocode}
\@ifpackageloaded{listings}{%
- \PackageInfo{cleveref}{`listings' support loaded}
- \crefalias{lstnumber}{line}%
- \crefalias{lstlisting}{listing}}{}% end of \@ifpackageloaded{listings}
+ \PackageInfo{cleveref}{`listings' support loaded}
+ \crefalias{lstnumber}{line}%
+ \crefalias{lstlisting}{listing}%
+ }{}% end of \@ifpackageloaded{listings}
% \end{macrocode}
% \end{macro}
%
%
%
+% \subsubsection{\package{algorithm2e} support}
% \begin{macro}{algorithm2e}
% Similarly, all we need to do to support the \package{algorithm2e}
% package is to alias \emph{its} counters, \cmd{algocf} and
@@ -5216,14 +6556,16 @@
% types.
% \begin{macrocode}
\@ifpackageloaded{algorithm2e}{%
- \PackageInfo{cleveref}{`algorithm2e' support loaded}
- \crefalias{algocf}{algorithm}%
- \crefalias{algocfline}{line}}{}% end of \@ifpackageloaded{listings}
+ \PackageInfo{cleveref}{`algorithm2e' support loaded}
+ \crefalias{algocf}{algorithm}%
+ \crefalias{algocfline}{line}%
+ }{}% end of \@ifpackageloaded{listings}
% \end{macrocode}
% \end{macro}
%
%
%
+% \subsubsection{\package{subfig} support}
% \begin{macro}{subfig}
% The \package{subfig} package modifies \cmd{\refstepcounter} within
% floats. Most of the time, this isn't a problem for
@@ -5231,14 +6573,17 @@
% \cmd{refstepcounter} calls \package{cleveref}'s version after it's
% done its stuff. However, this breaks support the
% \cmd{\refstepcounter} optional argument, so we fix that here.
+%
+% \package{Subfig} also redefines \cmd{\label} within subfloats,
+% breaking \package{cleveref}'s optional argument. We also fix that.
% \begin{macrocode}
- \@ifpackageloaded{subfig}{%
+\@ifpackageloaded{subfig}{%
\PackageInfo{cleveref}{`subfig' support loaded}
% \end{macrocode}
%
% \begin{macro}{\refsteponlycounter}
% \package{subfig} replaces \cmd{\refstepcounter} with
-% \cmd{\refsteonlycounter} within floats, which calls the saved
+% \cmd{\refsteponlycounter} within floats, which calls the saved
% \package{cleveref} \cmd{\refstepcounter} after doing some extra
% \package{subfig}-related processing. We redefine
% \cmd{refsteponlycounter} so that passing it an optional argument
@@ -5256,14 +6601,126 @@
\@ifnextchar[{\refstepcounter@optarg}%
{\cref@old@refsteponlycounter}%]
}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\sf@sub@label}
+% Inside a subfloat, \package{subfig} captures the current \cmd{\label}
+% definition in \cmd{\sf@oldlabel}, then replaces \cmd{\label} with
+% \cmd{\subfloat@label}, which does additional argument and
+% subfloat-related processing before calling \cmd{\sf@oldlabel}. This
+% breaks \package{cleveref}'s \cmd{\label} optional argument.
+%
+% We need to insert an extra layer of processing into the chain of
+% redefined \cmd{\label} macro calls, to process \package{cleveref}'s
+% optional argument. We do this by redefining \package{subfig}'s
+% \cmd{\sf@sub@label} command to process \package{subfig}'s optional
+% argument (which uses brackets rather than square brackets) as usual,
+% but then have it call \cmd{cref@label} which stores
+% \package{cleveref}'s \cmd{\label} command (recall that we're inside a
+% subfloat here, where \package{subfig} has overridden the \cmd{\label}
+% macro itself), to process \package{cleveref}'s own \cmd{label}
+% optional argument.
+%
+% \cmd{cref@label} would normally call the original \cmd{\label}
+% definition stored in \cmd{\cref@old@label}, whereas here we want it
+% to instead call \cmd{sf@@sub@label}, the next layer of the
+% \package{subfig} \cmd{\label} macro stack, otherwise we bypass the
+% rest of the \package{subfig} processing and break it. So we
+% temporarily let \cmd{\cref@old@label} to \cmd{\sf@@sub@label}, so
+% that \cmd{\cref@label} hands back to \package{subfig}'s \cmd{\label}
+% processing when done. (We're inside a group, so \cmd{cref@old@label}
+% gets restored at the end of the subfloat.)
+%
+% The final issue is that \package{subfig} captures the original
+% \cmd{\label} definition in \cmd{\sf@oldlabel} at the beginning of the
+% subfloat. But this captures \package{cleveref}'s
+% definition,\footnote{Actually, because \package{subfig} always loads
+% the \package{caption} package, it captures \package{cleveref}'s
+% \package{caption}-related redefinition of \cmd{\label}.} instead of
+% the original \cmd{\label} definition that needs to be called after
+% \package{subfig} has finished its stuff. So, we let \cmd{sf@oldlabel}
+% to \cmd{cref@old@label} before redefining the latter, so that the
+% \package{subfig} \cmd{\label} stack calls the right thing once it's
+% done its own processing. Oof!
+% \begin{macrocode}
+ \def\sf@sub@label(#1){%
+ \ifhyperrefloaded
+ \protected@edef\@currentlabelname{%
+ \expandafter\strip@period #1\relax.\relax\@@@}%
+ \fi%
+ \let\sf@oldlabel\cref@old@label%
+ \let\cref@old@label\sf@@sub@label%
+ \cref@label}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
}{}% end of \@ifpackageloaded{subfig}
% \end{macrocode}
% \end{macro}
+%
+%
+%
+% \subsubsection{\package{caption} support}
+% \begin{macro}{caption}
+% The \package{caption} package redefines \cmd{\label} within floats,
+% breaking \package{cleveref}'s optional argument, so we fix this here.
+% \begin{macrocode}
+\@ifpackageloaded{caption}{%
+ \PackageInfo{cleveref}{`caption' support loaded}
+% \end{macrocode}
+%
+% \begin{macro}{\cref@old@caption@xlabel}
+% \begin{macro}{\cref@old@label}
+% \begin{macro}{\cref@ORI@label}
+% \begin{macro}{\caption@ORI@label}
+% We fix the \cmd{\label} argument passing by redefining
+% \cmd{\caption@xlabel}, the macro which \cmd{\label} is let to inside
+% floats, to juggle around the various \package{cleveref} and
+% \package{caption} \cmd{\label}-processing macros so that everything
+% ultimately gets processed correctly.
+%
+% \cmd{\cref@label} stores \package{cleveref}'s \cmd{\label}
+% redefinition (recall that we're inside a float here, where
+% \cmd{\label} itself has been redefined by \package{caption}).
+% \cmd{\cref@label} processes \package{cleveref}'s optional
+% \cmd{\label} argument, if any. It then calls \cmd{\cref@old@label}.
+% But we've let that to \cmd{\cref@old@caption@xlabel}, which stores
+% the original \cmd{\caption@xlabel}. So the net effect is to insert an
+% extra layer of optional argument processing between \cmd{\label} and
+% \cmd{caption@xlabel}, which can then proceed as before.
+%
+% The final issue is that \package{caption} captures the original
+% \cmd{\label} definition in \cmd{\caption@ORI@label}, but this picks
+% up the \package{cleveref} redefinition, which is not what we want. So
+% we let \cmd{\caption@ORI@label} to the original \cmd{\label}
+% definition as captured by \package{cleveref}. Usually, that's stored
+% in \cmd{\cref@old@label}, but we've temporarily redefined that. So we
+% need to save what was originally preserved in \cmd{\cref@old@label}
+% in \cmd{\cref@ORI@old@label}, and make \cmd{\caption@ORI@label} call
+% that. Oof!
+% \begin{macrocode}
+ \let\cref@old@caption@xlabel\caption@xlabel
+ \def\caption@xlabel{%
+ \let\cref@ORI@label\cref@old@label%
+ \let\cref@old@label\cref@old@caption@xlabel%
+ \let\caption@ORI@label\cref@ORI@label%
+ \cref@label}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
% \end{macro}
%
+% \begin{macrocode}
+ }{}% end of \@ifpackageloaded{caption}
+% \end{macrocode}
+% \end{macro}
%
%
-% \subsection{\package{aliascnt} Support}
+%
+% \subsubsection{\package{aliascnt} support}
% \begin{macro}{aliascnt}
% For the \package{aliascnt} trick described in \cref{sec:label_type}
% of the documentation to work, we have to inform \package{cleveref}
@@ -5271,7 +6728,7 @@
% \cmd{\newaliascnt} command doesn't add the aliased counter to any
% reset list, but if the counter it's aliased to gets reset, the
% aliased counter will get reset too. In order for \package{cleveref}
-% to correcly sort cross-references to the aliased counter, we have to
+% to correctly sort cross-references to the aliased counter, we have to
% add that counter to the appropriate reset list, even though that
% isn't necessary to actually reset the counter itself. We add this to
% the \cmd{\newaliascnt} command.
@@ -5293,182 +6750,15 @@
%
%
%
-% \subsection{\package{varioref} Support}
-% \begin{macro}{varioref}
-% If \package{varioref} is loaded, we redefine its commands to use
-% \cmd{\cref} instead of \cmd{\ref} to produce the reference. Since
-% \cmd{\cref} can cope with multiple references, We extend the page
-% referencing magic of \cmd{\vref} et al.\ so that they check whether
-% they need to use \cmd{\vpagerefrange} instead of \cmd{\vpageref}.
-% \end{macro}
-% \begin{macrocode}
-\@ifpackageloaded{varioref}{%
- \PackageInfo{cleveref}{`varioref' support loaded}
- \PackageInfo{cleveref}{`cleveref' supersedes `varioref's %
- \string\labelformat command}
- \AtBeginDocument{%
- \def\cref@vref#1#2{%
-% \end{macrocode}
-% Since we're modifying the \package{varioref} commands anyway, we also
-% (by default) take this opportunity to get rid of the irritating spacing
-% issues of \cmd{\vref} et al. However, this breaks strict compatibility
-% with the original \package{varioref} spacing behaviour, so we also
-% provide a \option{legacyvarioref} option to restore the spacing
-% behaviour, in case full compatibility is required.
-% \begin{macrocode}
- \if@cref@legacyvarioref%
- \leavevmode\unskip\vref@space%
- \fi%
- \@cref{#1}{#2} % space here is deliberate
- \begingroup%
- \def\@tempstack{#2,\@nil}%
- \cref@stack@topandbottom{\@tempstack}{\@firstref}{\@lastref}%
- \ifx\@lastref\@empty%
- \vpageref[\unskip]{#2}%
- \else%
- \edef\@tempa{{\@firstref}{\@lastref}}%
- \expandafter\def\expandafter\@tempa\expandafter{%
- \expandafter[\expandafter\unskip\expandafter]%
- \@tempa}%
- \expandafter\vpagerefrange\@tempa%
- \fi%
- \endgroup}
- \def\cref@vrefrange#1#2#3{%
- \@setcrefrange{#2}{#3}{#1}{} \vpagerefrange[\unskip]{#2}{#3}}
- \def\cref@fullref#1#2{%
- \@cref{#1}{#2} % space here is deliberate
- \begingroup%
- \def\@tempstack{#2,\@nil}%
- \cref@stack@topandbottom{\@tempstack}{\@firstref}{\@lastref}%
- \ifx\@lastref\@empty%
- \reftextfaraway{#2}%
- \else%
- \expandafter\vrefpagenum\expandafter%
- \@tempa\expandafter{\@firstref}%
- \expandafter\vrefpagenum\expandafter%
- \@tempb\expandafter{\@lastref}%
- \ifx\@tempa\@tempb%
- \expandafter\reftextfaraway\expandafter{\@firstref}%
- \else%
- \edef\@tempa{{\@firstref}{\@lastref}}%
- \expandafter\reftextpagerange\@tempa%
- \fi%
- \fi%
- \endgroup}
-% \end{macrocode}
-%
-% \begin{macro}{\vref}
-% \begin{macro}{\vref*}
-% \begin{macro}{\vrefrange}
-% \begin{macro}{\fullref}
-% \begin{macro}{\vr@f}
-% \begin{macro}{\Vr@f}
-% If \option{legacyvarioref} is set, we only modify the original
-% \package{varioref} commands, and don't define any new ones.
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \begin{macrocode}
- \if@cref@legacyvarioref%
- \def\vr@f#1{\cref@vref{cref}{#1}}
- \def\Vr@f#1{\cref@vref{Cref}{#1}}
- \renewcommand\vrefrange[3][\reftextcurrent]{%
- \crefrange{#2}{#3} \vpagerefrange[\unskip]{#2}{#3}}
- \def\fullref#1{\cref@fullref{cref}{#1}}
-% \end{macrocode}
-%
-% \begin{macro}{\vref}
-% \begin{macro}{\vref*}
-% \begin{macro}{\Vref}
-% \begin{macro}{\Vref*}
-% \begin{macro}{\vrefrange}
-% \begin{macro}{\vrefrange*}
-% \begin{macro}{\Vrefrange}
-% \begin{macro}{\Vrefrange*}
-% \begin{macro}{\fullref}
-% \begin{macro}{\fullref*}
-% \begin{macro}{\Fullref}
-% \begin{macro}{\Fullref*}
-% If we're not providing legacy compatibility with \package{varioref},
-% we define \cmd{\vref} et al. to be consistent with the other
-% \package{cleveref} referencing commands. This frees up the starred
-% variants to be used to suppress hyperlinks when \package{hyperref} is
-% loaded, as usual.
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \begin{macrocode}
- \else%
- \if@cref@hyperrefloaded\relax% hyperref loaded
- \DeclareRobustCommand{\vref}{%
- \@ifstar{\cref@vrefstar{cref}}{\cref@vref{cref}}}
- \DeclareRobustCommand{\Vref}{%
- \@ifstar{\cref@vrefstar{Cref}}{\cref@vref{Cref}}}
- \DeclareRobustCommand{\vrefrange}{%
- \@ifstar{\cref@vrefrangestar{cref}}{\cref@vrefrange{cref}}}
- \DeclareRobustCommand{\Vrefrange}{%
- \@ifstar{\cref@vrefrangestar{Cref}}{\cref@vrefrange{Cref}}}
- \DeclareRobustCommand{\fullref}{%
- \@ifstar{\cref@fullrefstar{cref}}{\cref@fullref{cref}}}
- \DeclareRobustCommand{\Fullref}{%
- \@ifstar{\cref@fullrefstar{Cref}}{\cref@fullref{Cref}}}
- \def\cref@vrefstar#1#2{%
- \@crefstarredtrue%
- \cref@vref{#1}{#2}%
- \@crefstarredfalse}
- \def\cref@vrefrangestar#1#2#3{%
- \@crefstarredtrue%
- \cref@vrefrange{#1}{#2}{#3}%
- \@crefstarredfalse}
- \def\cref@fullrefstar#1#2{%
- \@crefstarredtrue%
- \cref@fullref{#1}{#2}%
- \@crefstarredfalse}
- \else%
- \DeclareRobustCommand{\vref}{\cref@vref{cref}}
- \DeclareRobustCommand{\Vref}{\cref@vref{Cref}}
- \DeclareRobustCommand{\vrefrange}{\cref@vrefrange{cref}}
- \DeclareRobustCommand{\Vrefrange}{\cref@vrefrange{Cref}}
- \DeclareRobustCommand{\fullref}{\cref@fullref{cref}}
- \DeclareRobustCommand{\Fullref}{\cref@fullref{Cref}}
- \fi% end of test for hyperref
- \fi%
- }% end of \AtBeginDocument
- }{}% end of \@ifpackageloaded{varioref}
-% \end{macrocode}
-%
-% \begin{macro}{legacyvarioref}
-% The \option{legacyvarioref} option just sets a flag, checked in the
-% redefinitions set up at the beginning of the document, above.
-% \end{macro}
-% \begin{macrocode}
-\let\if@cref@legacyvarioref\iffalse
-\DeclareOption{legacyvarioref}{%
- \PackageInfo{cleveref}{legacy `varioref' compatibility enabled}
- \let\if@cref@legacyvarioref\iftrue}
-% \end{macrocode}
-%
-%
-%
% \subsection{Poor Man's \package{cleveref}}
% \begin{macro}{poorman}
% The \option{poorman} option causes a |sed| script to automatically be
% written. When the original \LaTeX{} source file is processed through
% this script, it strips out all the \package{cleveref} commands,
-% type-setting all the reference formatting explicitly, and using the
-% standard \cmd{\ref} command to produce the references themselves.
+% typesetting all the reference formatting explicitly, and using the
+% standard \cmd{\ref} and \cmd{pageref} commands to produce the
+% references themselves.
+% \end{macro}
% \begin{macrocode}
\DeclareOption{poorman}{%
\PackageInfo{cleveref}{option `poorman' loaded}
@@ -5507,7 +6797,7 @@
%
% We postpone the redefinitions until the beginning of the document not
% only to ensure that they don't get clobbered by other package's
-% redefinitions, but also because we don't want the redefenitions to
+% redefinitions, but also because we don't want the redefinitions to
% take effect until after \package{babel} has called
% \cmd{\selectlanguage} for the main language (remember, the
% substitution rules for this first language block will get written at
@@ -5543,7 +6833,7 @@
% \end{macro}
%
% The final set of substitution rules gets written at the end of the
-% document. This is the only set or rules that gets written if
+% document. This is the only set of rules that gets written if
% \package{babel} is not loaded.
% \begin{macrocode}
\AtEndDocument{%
@@ -5560,7 +6850,7 @@
\begingroup%
% \end{macrocode}
% If |\if@cref@switched@language| hasn't been set, then we must be
-% writing the final set of substitution rules at the end of a document,
+% writing the final set of substitution rules at the end of a document
% in which no language switching command was ever used. In which case,
% the substitution rules don't specify a line-number address.
% \begin{macrocode}
@@ -5717,8 +7007,8 @@
% (easy) way to change the catcodes of the characters appearing here
% before they are tokenised. In one way this is convenient: the catcode
% changes we make don't ``take'' until evaluated, so we can continue to
-% use the standard \TeX characters ($\backslash$, \{, \} etc.) even after
-% the lines containing the catcode commands. But in another, more
+% use the standard \TeX characters (\textbackslash, \{, \} etc.) even
+% after the lines containing the catcode commands. But in another, more
% significant, way, it is very inconvenient: it makes it difficult to
% define the regexp special characters as active characters, since it's
% impossible to directly create tokens with the correct char- and
@@ -5742,7 +7032,7 @@
% \end{macrocode}
% Change catcodes of regexp special characters to make them active
% characters and define them to expand to their escaped forms. Change
-% those of \TeX special characters to make them normal letters.
+% those of \TeX{} special characters to make them normal letters.
% \begin{macrocode}
\catcode`.=13 \catcode`*=13
\catcode`[=13 \catcode`]=13
@@ -5784,7 +7074,7 @@
\immediate\closein\@crefscript%
% \end{macrocode}
% Add some rules to remove other \package{cleveref} commands. We use the
-% \cmd{\lowercase} trick again for writing the $\backslash$, \{ and \}
+% \cmd{\lowercase} trick again for writing the \textbackslash, \{ and \}
% characters. (This could be done in other ways, but since we're in
% \cmd{\lowercase} mood, why not stick with it.)
% \begin{macrocode}
@@ -5868,7 +7158,8 @@
% The \cmd{\cref@writescript} utility macro does the actual writing of
% the substitution rule to the script. The first argument is the
% ``address'', the second argument is the regexp pattern to match,
-% whilst the substitution must be stored in \cmd{\cref@poorman@text}.
+% whilst the substitution text is whatever is currently stored in
+% \cmd{\cref@poorman@text}.
% \begin{macrocode}
\def\cref@getmeaning#1{\expandafter\@cref@getmeaning\meaning#1\@nil}
\def\@cref@getmeaning#1->#2\@nil{#2}
@@ -5887,23 +7178,37 @@
% \begin{macro}{\@crefnostar}
% \begin{macro}{\@crefrangestar}
% \begin{macro}{\@crefrangenostar}
-% Redefine the user-level referencing commands so that they write a
-% substitution rule for the reference to the script, as well as
-% type-setting the reference itself.
-%
-% We use a temporary \cmd{\@tempa} macro that makes use of the fact that
-% the first character of \#1 is ``c'' for lower-case and ``C'' for
-% upper-case in these commands, in order to write out the correct
-% capitalisation in the substitution.
-%
-% FIXME: We only resort to this because |\string\#1| doesn't work. But
-% there \emph{must} be a better way to get a backslash character into
-% the token stream, obviating the need for the ugly \cmd{\@tempa} macro.
+% To make use of all the \option{poorman} infrastructure defined above,
+% we must redefine the \package{cleveref} referencing commands
+% themselves. There are two parts to this: at the very top layer of the
+% cross-referencing macro stack, we redefine the user-level commands to
+% first initialise |\cref@poorman@text| to the empty string, then
+% typeset the reference as usual, and finally write a substitution
+% rule to the |sed| script containing whatever has been accumulated in
+% |\cref@poorman@text|. At the very lowest layer of the macro stack, we
+% redefine the macros that actually typeset the various parts of the
+% references to additionally add a copy of whatever they typeset to
+% |\cref@poorman@test|.
+%
+% We first redefine the user-level referencing commands so that they
+% write a substitution rule for the reference to the script, as well as
+% typesetting the reference itself. Most of the redefinitions differ
+% slightly depending on whether \package{hyperref} is loaded.
% \begin{macrocode}
\if@cref@hyperrefloaded\relax% hyperref loaded
\def\@crefnostar#1#2{%
\gdef\cref@poorman@text{}%
\@cref{#1}{#2}%
+% \end{macrocode}
+% We use a temporary \cmd{\@tempa} macro here, which makes use of the
+% fact that the first character of \#1 is ``c'' for lower-case and ``C''
+% for upper-case in these commands, in order to write out the correct
+% capitalisation in the substitution.
+%
+% FIXME: We only resort to this because |\string\#1| doesn't work. But
+% there \emph{must} be a better way to get a backslash character into the
+% token stream, obviating the need for the ugly \cmd{\@tempa} macro.
+% \begin{macrocode}
\def\@tempa##1##2\@nil{%
\if##1c%
\cref@writescript{}{\string\cref\string{#2\string}}%
@@ -5945,26 +7250,120 @@
\string\Crefrange*\string{#2\string}\string{#3\string}}%
\fi}%
\@tempa#1\@nil}
+ \def\@cpagerefnostar#1#2{%
+ \gdef\cref@poorman@text{}%
+ \@cpageref{#1}{#2}{\@setcpageref}{\@setcpagerefrange}%
+ \def\@tempa##1##2\@nil{%
+ \if##1c%
+ \cref@writescript{}{\string\cpageref\string{#2\string}}%
+ \else%
+ \cref@writescript{}{\string\Cpageref\string{#2\string}}%
+ \fi}%
+ \@tempa#1\@nil}
+ \def\@cpagerefstar#1#2{%
+ \gdef\cref@poorman@text{}%
+ \@crefstarredtrue%
+ \@cpageref{#1}{#2}{\@setcpageref}{\@setcpagerefrange}%
+ \@crefstarredfalse%
+ \def\@tempa##1##2\@nil{%
+ \if##1c%
+ \cref@writescript{}{\string\cpageref*\string{#2\string}}%
+ \else%
+ \cref@writescript{}{\string\Cpageref*\string{#2\string}}%
+ \fi}%
+ \@tempa#1\@nil}
+ \def\@cpagerefrangenostar#1#2#3{%
+ \gdef\cref@poorman@text{}%
+ \@setcpagerefrange{#2}{#3}{#1}{}%
+ \def\@tempa##1##2\@nil{%
+ \if##1c%
+ \cref@writescript{}{%
+ \string\cpagerefrange\string{#2\string}\string{#3\string}}%
+ \else%
+ \cref@writescript{}{%
+ \string\Cpagerefrange\string{#2\string}\string{#3\string}}%
+ \fi}%
+ \@tempa#1\@nil}
+ \def\@cpagerefrangestar#1#2#3{%
+ \gdef\cref@poorman@text{}%
+ \@crefstarredtrue%
+ \@setcpagerefrange{#2}{#3}{#1}{}%
+ \@crefstarredfalse%
+ \def\@tempa##1##2\@nil{%
+ \if##1c%
+ \cref@writescript{}{%
+ \string\cpagerefrange*\string{#2\string}\string{#3\string}}%
+ \else%
+ \cref@writescript{}{%
+ \string\Cpagerefrange*\string{#2\string}\string{#3\string}}%
+ \fi}%
+ \@tempa#1\@nil}
+ \def\@labelcrefnostar#1{%
+ \gdef\cref@poorman@text{}%
+ \@cref{labelcref}{#1}%
+ \cref@writescript{}{\string\labelcref\string{#1\string}}}
+ \def\@labelcrefstar#1{%
+ \gdef\cref@poorman@text{}%
+ \@crefstarredtrue%
+ \@cref{labelcref}{#1}%
+ \@crefstarredfalse%
+ \cref@writescript{}{\string\labelcref*\string{#1\string}}}
+ \def\@labelcpagerefnostar#1{%
+ \gdef\cref@poorman@text{}%
+ \@cpageref{labelcref}{#1}{\@setcpageref}{\@setcpagerefrange}%
+ \cref@writescript{}{\string\labelcpageref\string{#1\string}}}
+ \def\@labelcpagerefstar#1{%
+ \gdef\cref@poorman@text{}%
+ \@crefstarredtrue%
+ \@cpageref{labelcref}{#1}{\@setcpageref}{\@setcpagerefrange}%
+ \@crefstarredfalse%
+ \cref@writescript{}{\string\labelcpageref*\string{#1\string}}}
%
\else% hyperref not loaded
\DeclareRobustCommand{\cref}[1]{%
- \edef\cref@poorman@text{}%
+ \gdef\cref@poorman@text{}%
\@cref{cref}{#1}%
\cref@writescript{}{\string\cref\string{#1\string}}}
\DeclareRobustCommand{\Cref}[1]{%
- \edef\cref@poorman@text{}%
+ \gdef\cref@poorman@text{}%
\@cref{Cref}{#1}%
\cref@writescript{}{\string\Cref\string{#1\string}}}
\DeclareRobustCommand{\crefrange}[2]{%
- \edef\cref@poorman@text{}%
+ \gdef\cref@poorman@text{}%
\@setcrefrange{#1}{#2}{cref}{}%
\cref@writescript{}{%
\string\crefrange\string{#1\string}\string{#2\string}}}
\DeclareRobustCommand{\Crefrange}[2]{%
- \edef\cref@poorman@text{}%
+ \gdef\cref@poorman@text{}%
\@setcrefrange{#1}{#2}{Cref}{}%
\cref@writescript{}{%
\string\Crefrange\string{#1\string}\string{#2\string}}}
+ \DeclareRobustCommand{\cpageref}[1]{%
+ \gdef\cref@poorman@text{}%
+ \@cpageref{cref}{#1}{\@setcpageref}{\@setcpagerefrange}%
+ \cref@writescript{}{\string\cpageref\string{#1\string}}}
+ \DeclareRobustCommand{\Cpageref}[1]{%
+ \gdef\cref@poorman@text{}%
+ \@cpageref{Cref}{#1}{\@setcpageref}{\@setcpagerefrange}%
+ \cref@writescript{}{\string\Cpageref\string{#1\string}}}
+ \DeclareRobustCommand{\cpagerefrange}[2]{%
+ \gdef\cref@poorman@text{}%
+ \@setcpagerefrange{#1}{#2}{cref}{}%
+ \cref@writescript{}{%
+ \string\cpagerefrange\string{#1\string}\string{#2\string}}}
+ \DeclareRobustCommand{\Cpagerefrange}[2]{%
+ \gdef\cref@poorman@text{}%
+ \@setcpagerefrange{#1}{#2}{Cref}{}%
+ \cref@writescript{}{%
+ \string\Cpagerefrange\string{#1\string}\string{#2\string}}}
+ \DeclareRobustCommand{\labelcref}[1]{%
+ \gdef\cref@poorman@text{}%
+ \@cref{labelcref}{#1}%
+ \cref@writescript{}{\string\labelcref\string{#1\string}}}
+ \DeclareRobustCommand{\labelcpageref}[1]{%
+ \gdef\cref@poorman@text{}%
+ \@cpageref{labelcref}{#1}{\@setcpageref}{\@setcpagerefrange}%
+ \cref@writescript{}{\string\labelcpageref\string{#1\string}}}
\fi% end of test for hyperref
% \end{macrocode}
% \end{macro}
@@ -5975,176 +7374,60 @@
% \end{macro}
% \end{macro}
% \end{macro}
-%
-%
-% \begin{macro}{\vref}
-% \begin{macro}{\vref*}
-% \begin{macro}{\Vref}
-% \begin{macro}{\Vref*}
-% \begin{macro}{\vrefrange}
-% \begin{macro}{\vrefrange*}
-% \begin{macro}{\Vrefrange}
-% \begin{macro}{\Vrefrange*}
-% \begin{macro}{\fullref}
-% \begin{macro}{\fullref*}
-% \begin{macro}{\Fullref}
-% \begin{macro}{\Fullref*}
-% If \package{varioref} is loaded, do the same for the \cmd{\vref} et
-% al.\ commands. Note that we now need to set the |\if@crefstarred|
-% flag for the starred variant \cmd{\vref*} even if
-% \option{legacyvarioef} is set and it changes the spacing rather than
-% suppressing hyper-links, so that we can write the correct
-% substitution rule.
-% \begin{macrocode}
- \@ifpackageloaded{varioref}{%
- \AtBeginDocument{%
- \if@cref@legacyvarioref%
- \DeclareRobustCommand{\vref}{%
- \@ifstar{\cref@vrefstar{cref}}{\cref@vref{cref}}}
- \def\cref@vrefstar#1#2{%
- \@crefstarredtrue\cref@vref{#1}{#2}\@crefstarredfalse}
- \fi%
- \def\cref@vref#1#2{%
- \gdef\cref@poorman@text{}%
- \if@cref@legacyvarioref%
- \leavevmode\unskip\vref@space%
- \fi%
- \begingroup%
-% \end{macrocode}
-% If \option{legacyvarioref} is set, \cmd{\vref*} shouldn't suppress
-% hyper-links, so temporarily disable then restore the flag whilst
-% type-setting the cross-reference.
-% \begin{macrocode}
- \let\if@tmp\if@crefstarred%
- \if@cref@legacyvarioref\@crefstarredfalse\fi%
- \@cref{#1}{#2} % space here is deliberate
- \let\if@crefstarred\if@tmp%
- \def\@tempstack{#2,\@nil}%
- \cref@stack@topandbottom{\@tempstack}{\@firstref}{\@lastref}%
- \ifx\@lastref\@empty%
- \vpageref[\unskip]{#2}%
- \g@addto@macro\cref@poorman@text{ \vpageref[\unskip]{#2}}%
- \else%
- \g@addto@macro\cref@poorman@text{ }%
- \edef\@tempa{{\@firstref}{\@lastref}}%
- \expandafter\def\expandafter\@tempa\expandafter{%
- \expandafter[\expandafter\unskip\expandafter]%
- \@tempa}%
- \expandafter\vpagerefrange\@tempa%
- \expandafter\g@addto@macro\expandafter\cref@poorman@text%
- \expandafter{\expandafter\vpagerefrange\@tempa}%
- \fi%
- \def\@tempa##1##2\@nil{%
- \if##1c%
- \if@crefstarred%
- \cref@writescript{}{\string\vref*\string{#2\string}}%
- \else%
- \cref@writescript{}{\string\vref\string{#2\string}}%
- \fi%
- \else%
- \if@crefstarred%
- \cref@writescript{}{\string\Vref*\string{#2\string}}%
- \else%
- \cref@writescript{}{\string\Vref\string{#2\string}}%
- \fi%
- \fi}%
- \@tempa#1\@nil%
- \endgroup}
-%
- \def\cref@vrefrange#1#2#3{%
- \gdef\cref@poorman@text{}%
- \@setcrefrange{#2}{#3}{#1}{} \vpagerefrange[\unskip]{#2}{#3}%
- \g@addto@macro\cref@poorman@text%
- { \vpagerefrange[\unskip]{#2}{#3}}%
- \def\@tempa##1##2\@nil{%
- \if##1c%
- \if@crefstarred%
- \cref@writescript{}{%
- \string\vrefrange*\string{#2\string}\string{#3\string}}%
- \else%
- \cref@writescript{}{%
- \string\vrefrange\string{#2\string}\string{#3\string}}%
- \fi%
- \else%
- \if@crefstarred%
- \cref@writescript{}{%
- \string\Vrefrange*\string{#2\string}\string{#3\string}}%
- \else%
- \cref@writescript{}{%
- \string\Vrefrange\string{#2\string}\string{#3\string}}%
- \fi%
- \fi}%
- \@tempa#1\@nil}
-%
- \def\cref@fullref#1#2{%
- \gdef\cref@poorman@text{}%
- \begingroup%
- \@cref{#1}{#2} % space here is deliberate
- \def\@tempstack{#2,\@nil}%
- \cref@stack@topandbottom{\@tempstack}{\@firstref}{\@lastref}%
- \ifx\@lastref\@empty%
- \reftextfaraway{#2}%
- \def\@pageref{\reftextfaraway{#1}}%
- \else%
- \expandafter\vrefpagenum\expandafter%
- \@tempa\expandafter{\@firstref}%
- \expandafter\vrefpagenum\expandafter%
- \@tempb\expandafter{\@lastref}%
- \ifx\@tempa\@tempb%
- \expandafter\reftextfaraway\expandafter{\@firstref}%
- \expandafter\def\expandafter\@pageref\expandafter{%
- \expandafter\reftextfaraway\expandafter{\@firstref}}%
- \else%
- \edef\@tempa{{\@firstref}{\@lastref}}%
- \expandafter\reftextpagerange\@tempa%
- \expandafter\def\expandafter\@pageref\expandafter{%
- \expandafter\reftextpagerange\@tempa}%
- \fi%
- \fi%
- \g@addto@macro\cref@poorman@text{ }%
- \expandafter\g@addto@macro\expandafter\cref@poorman@text%
- \expandafter{\@pageref}%
- \def\@tempa##1##2\@nil{%
- \if##1c%
- \if@crefstarred%
- \cref@writescript{}{\string\fullref*\string{#2\string}}%
- \else%
- \cref@writescript{}{\string\fullref\string{#2\string}}%
- \fi%
- \else%
- \if@crefstarred%
- \cref@writescript{}{\string\Fullref*\string{#2\string}}%
- \else%
- \cref@writescript{}{\string\Fullref\string{#2\string}}%
- \fi%
- \fi}%
- \@tempa#1\@nil%
- \endgroup}
- }% end of \AtBeginDocument
- }{}% end of \@ifpackageloaded{varioref}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macro}{\@@setcref}
-% \begin{macro}{\@@setcrefrange}
-% Redefine \cmd{\@@setcref} and \cmd{\@@setrangeref}, as well as the
-% conjunction macros \cmd{\@setcref@middlegroupconjunction},
+% \begin{macro}{\namecref}
+% \begin{macro}{\nameCref}
+% \begin{macro}{\lcnamecref}
+% \begin{macro}{\namecrefs}
+% \begin{macro}{\nameCrefs}
+% \begin{macro}{\lcnamecrefs}
+% The \cmd{\namecref} et al.\ commands don't do anything different when
+% \package{hyperref} is loaded, so we don't need to test for
+% \package{hyperref} when redefining them.
+% \begin{macrocode}
+ \DeclareRobustCommand{\namecref}[1]{%
+ \gdef\cref@poorman@text{}%
+ \@setnamecref{cref}{#1}{}{}%
+ \cref@writescript{}{\string\namecref\string{#1\string}}}
+ \DeclareRobustCommand{\nameCref}[1]{%
+ \gdef\cref@poorman@text{}%
+ \@setnamecref{Cref}{#1}{}{}%
+ \cref@writescript{}{\string\nameCref\string{#1\string}}}
+ \DeclareRobustCommand{\lcnamecref}[1]{%
+ \gdef\cref@poorman@text{}%
+ \@setnamecref{Cref}{#1}{}{\MakeLowercase}%
+ \cref@writescript{}{\string\lcnamecref\string{#1\string}}}
+ \DeclareRobustCommand{\namecrefs}[1]{%
+ \gdef\cref@poorman@text{}%
+ \@setnamecref{cref}{#1}{@plural}{}%
+ \cref@writescript{}{\string\namecrefs\string{#1\string}}}
+ \DeclareRobustCommand{\nameCrefs}[1]{%
+ \gdef\cref@poorman@text{}%
+ \@setnamecref{Cref}{#1}{@plural}{}%
+ \cref@writescript{}{\string\nameCrefs\string{#1\string}}}
+ \DeclareRobustCommand{\lcnamecrefs}[1]{%
+ \gdef\cref@poorman@text{}%
+ \@setnamecref{Cref}{#1}{@plural}{\MakeLowercase}%
+ \cref@writescript{}{\string\lcnamecrefs\string{#1\string}}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\@setcref@pairgroupconjunction}
+% \begin{macro}{\@setcref@middlegroupconjunction}
+% \begin{macro}{\@setcref@lastgroupconjunction}
+% Redefine \cmd{\@@setcref}, \cmd{\@@setcrefrange},
+% \cmd{\@@setcpageref} and\linebreak[4] \cmd{\@@setcpagerefrange}, as
+% well as the conjunction macros\linebreak[4]
+% \cmd{\@setcref@middlegroupconjunction},
% \cmd{\@setcref@lastgroupconjunction} and
-% \cmd{\@setcref@pairgroupconjunction}, to append text they type-set
+% \cmd{\@setcref@pairgroupconjunction}, to append text they typeset
% to\linebreak[4] the \cmd{\cref@poorman@text} macro, as well as
-% actually doing the type-setting.
+% actually doing the typesetting.
% \begin{macrocode}
\def\@setcref@pairgroupconjunction{%
\crefpairgroupconjunction%
@@ -6158,59 +7441,265 @@
\creflastgroupconjunction%
\expandafter\g@addto@macro\expandafter\cref@poorman@text%
\expandafter{\creflastgroupconjunction}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\@@setcref}
+% \begin{macro}{\@@setcrefrange}
+% \begin{macro}{\@@setcpageref}
+% \begin{macro}{\@@setcpagerefrange}
+% The necessary redefinitions of most of the cross-referencing commands
+% differ slightly depending on whether \package{hyperref} is loaded or
+% not.
+% \begin{macrocode}
+ \let\old@@setcref\@@setcref
+ \let\old@@setcrefrange\@@setcrefrange
+ \let\old@@setcpageref\@@setcpageref
+ \let\old@@setcpagerefrange\@@setcpagerefrange
\if@cref@hyperrefloaded\relax% hyperref loaded
\def\@@setcref#1#2{%
- \cref@getlabel{#2}{\@templabel}%
+ \old@@setcref{#1}{#2}%
\if@crefstarred%
- #1{\@templabel}{}{}%
\expandafter\g@addto@macro\expandafter\cref@poorman@text%
\expandafter{#1{\ref*{#2}}{}{}}%
\else%
- \edef\@templink{\cref@hyperref{#2}}%
- #1{\@templabel}{\hyper@linkstart{link}{\@templink}}%
- {\hyper@linkend}%
\expandafter\g@addto@macro\expandafter\cref@poorman@text%
\expandafter{#1{\ref{#2}}{}{}}%
\fi}
\def\@@setcrefrange#1#2#3{%
- \cref@getlabel{#2}{\@labela}%
- \cref@getlabel{#3}{\@labelb}%
+ \old@@setcrefrange{#1}{#2}{#3}%
\if@crefstarred%
- #1{\@labela}{\@labelb}{}{}{}{}%
\expandafter\g@addto@macro\expandafter\cref@poorman@text%
\expandafter{#1{\ref*{#2}}{\ref*{#3}}{}{}{}{}}%
\else%
- \edef\@linka{\cref@hyperref{#2}}%
- \edef\@linkb{\cref@hyperref{#3}}%
- #1{\@labela}{\@labelb}%
- {\hyper@linkstart{link}{\@linka}}{\hyper@linkend}%
- {\hyper@linkstart{link}{\@linkb}}{\hyper@linkend}%
\expandafter\g@addto@macro\expandafter\cref@poorman@text%
\expandafter{#1{\ref{#2}}{\ref{#3}}{}{}{}{}}%
\fi}
+ \def\@@setcpageref#1#2{%
+ \old@@setcpageref{#1}{#2}%
+ \if@crefstarred%
+ \expandafter\g@addto@macro\expandafter\cref@poorman@text%
+ \expandafter{#1{\pageref*{#2}}{}{}}%
+ \else%
+ \expandafter\g@addto@macro\expandafter\cref@poorman@text%
+ \expandafter{#1{\pageref{#2}}{}{}}%
+ \fi}
+ \def\@@setcpagerefrange#1#2#3{%
+ \old@@setcpagerefrange{#1}{#2}{#3}%
+ \if@crefstarred%
+ \expandafter\g@addto@macro\expandafter\cref@poorman@text%
+ \expandafter{#1{\pageref*{#2}}{\pageref*{#3}}{}{}{}{}}%
+ \else%
+ \expandafter\g@addto@macro\expandafter\cref@poorman@text%
+ \expandafter{#1{\pageref{#2}}{\pageref{#3}}{}{}{}{}}%
+ \fi}
+%
\else% hyperref not loaded
- \let\old@@setcref\@@setcref%
- \let\old@@setcrefrange\@@setcrefrange%
\def\@@setcref#1#2{%
\old@@setcref{#1}{#2}%
\expandafter\g@addto@macro\expandafter{%
- \expandafter\cref@poorman@text\expandafter}\expandafter{%
- #1{\ref{#2}}{}{}}}
+ \expandafter\cref@poorman@text\expandafter}%
+ \expandafter{#1{\ref{#2}}{}{}}}
\def\@@setcrefrange#1#2#3{%
\old@@setcrefrange{#1}{#2}{#3}%
\expandafter\g@addto@macro%
\expandafter{\expandafter\cref@poorman@text\expandafter}%
\expandafter{#1{\ref{#2}}{\ref{#3}}{}{}{}{}}}
+ \def\@@setcpageref#1#2{%
+ \old@@setcpageref{#1}{#2}%
+ \expandafter\g@addto@macro\expandafter{%
+ \expandafter\cref@poorman@text\expandafter}%
+ \expandafter{#1{\pageref{#2}}{}{}}}
+ \def\@@setcpagerefrange#1#2#3{%
+ \old@@setcpagerefrange{#1}{#2}{#3}%
+ \expandafter\g@addto@macro%
+ \expandafter{\expandafter\cref@poorman@text\expandafter}%
+ \expandafter{#1{\pageref{#2}}{\pageref{#3}}{}{}{}{}}}
\fi% end of hyperref test
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\@@setnamecref}
+% The \cmd{\namecref} et al.\ commands don't do anything different when
+% \package{hyperref} is loaded, so we don't need to test for
+% \package{hyperref} when redefining \cmd{\@@setnamecref}.
+% \begin{macrocode}
+ \let\old@@setnamecref\@@setnamecref
+ \def\@@setnamecref#1#2{%
+ \old@@setnamecref{#1}{#2}%
+ \edef\@tempa{#1}%
+ \def\@tempb{#2}%
+ \expandafter\expandafter\expandafter\g@addto@macro%
+ \expandafter\expandafter\expandafter{%
+ \expandafter\expandafter\expandafter\cref@poorman@text%
+ \expandafter\expandafter\expandafter}%
+ \expandafter\expandafter\expandafter{\expandafter\@tempb\@tempa}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{varioref}
+% If \package{varioref} is loaded, do the same for the
+% \package{varioref} commands.
+% \begin{macrocode}
+ \@ifpackageloaded{varioref}{%
+ \AtBeginDocument{%
+% \end{macrocode}
+%
+% \begin{macro}{\@@vpageref}
+% We redefine \cmd{\@@vpageref} to make it write a substitution rule to
+% the script, as well as typesetting the page reference.
+% \begin{macrocode}
+ \def\@@vpageref#1[#2]#3{%
+ \gdef\cref@poorman@text{}%
+ \cref@@vpageref{#1}[#2]{#3}%
+ \cref@writescript{}{\string\vpageref\string{#3\string}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cref@vref}
+% \cmd{\cref@vref} is similarly redefined to write a substitution rule.
+% \begin{macrocode}
+ \let\old@cref@vref\cref@vref
+ \def\cref@vref#1#2{%
+ \gdef\cref@poorman@text{}%
+ \old@cref@vref{#1}{#2}%
+ \def\@tempa##1##2\@nil{%
+ \if##1c%
+ \if@crefstarred%
+ \cref@writescript{}{\string\vref*\string{#2\string}}%
+ \else%
+ \cref@writescript{}{\string\vref\string{#2\string}}%
+ \fi%
+ \else%
+ \if@crefstarred%
+ \cref@writescript{}{\string\Vref*\string{#2\string}}%
+ \else%
+ \cref@writescript{}{\string\Vref\string{#2\string}}%
+ \fi%
+ \fi}%
+ \@tempa#1\@nil}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cref@fullref}
+% \begin{macro}{\cref@vrefrange}
+% \cmd{\cref@fullref} and \cmd{cref@vrefrange} are also redefined so
+% that they write substitution rules. Strictly speaking, the starred
+% variants of \cmd{\fullref} and \cmd{\vrefrange} are not defined when
+% \package{hyperref} isn't loaded, so we could avoid checking for them
+% in that case. However, the redundant check does no harm, and avoids
+% some code duplication.
+% \begin{macrocode}
+ \let\old@cref@fullref\cref@fullref
+ \def\cref@fullref#1#2{%
+ \gdef\cref@poorman@text{}%
+ \old@cref@fullref{#1}{#2}%
+ \def\@tempa##1##2\@nil{%
+ \if##1c%
+ \if@crefstarred%
+ \cref@writescript{}{\string\fullref*\string{#2\string}}%
+ \else%
+ \cref@writescript{}{\string\fullref\string{#2\string}}%
+ \fi%
+ \else%
+ \if@crefstarred%
+ \cref@writescript{}{\string\Fullref*\string{#2\string}}%
+ \else%
+ \cref@writescript{}{\string\Fullref\string{#2\string}}%
+ \fi%
+ \fi}%
+ \@tempa#1\@nil}
+%
+ \let\old@cref@vrefrange\cref@vrefrange
+ \def\cref@vrefrange#1#2#3{%
+ \gdef\cref@poorman@text{}%
+ \old@cref@vrefrange{#1}{#2}{#3}%
+ \def\@tempa##1##2\@nil{%
+ \if##1c%
+ \if@crefstarred%
+ \cref@writescript{}{%
+ \string\vrefrange*\string{#2\string}\string{#3\string}}%
+ \else%
+ \cref@writescript{}{%
+ \string\vrefrange\string{#2\string}\string{#3\string}}%
+ \fi%
+ \else%
+ \if@crefstarred%
+ \cref@writescript{}{%
+ \string\Vrefrange*\string{#2\string}\string{#3\string}}%
+ \else%
+ \cref@writescript{}{%
+ \string\Vrefrange\string{#2\string}\string{#3\string}}%
+ \fi%
+ \fi}%
+ \@tempa#1\@nil}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@setvpageref}
+% \begin{macro}{\@@setvpagerefrange}
+% In order to get the appropriate substitution for \package{varioref}
+% commands appended to \cmd{\cref@poorman@text}, we have to redefine
+% \cmd{\@@setvpageref} and\linebreak[4] \cmd{\@@setvpagerefrange},
+% which perform the final typesetting of \package{varioref} page
+% references, so that they append an appropriate substitution for the
+% page reference they're typesetting.
+% \begin{macrocode}
+ \def\@@setvpageref#1[#2]#3{%
+ \cref@old@@vpageref{#1}[#2]{#3}%
+ \g@addto@macro\cref@poorman@text{\vpageref{#3}}}
+ \def\@@setvpagerefrange[#1]#2#3{%
+ \vpagerefrange[#1]{#2}{#3}%
+ \g@addto@macro\cref@poorman@text{\vpagerefrange{#2}{#3}}}
+ \def\@@setfullpageref#1{%
+ \reftextfaraway{#1}%
+ \g@addto@macro\cref@poorman@text{\reftextfaraway{#1}}}
+ \def\@@setfullpagerefrange#1#2{%
+ \reftextpagerange{#1}{#2}%
+ \g@addto@macro\cref@poorman@text{\reftextpagerange{#1}{#2}}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@setcref@space}
+% \begin{macro}{\@setcref@pairconjunction}
+% \begin{macro}{\@setcref@middleconjunction}
+% \begin{macro}{\@setcref@lastconjunction}
+% Finally, we make sure the conjunctions also get appended to
+% the\linebreak[4] \cmd{\cref@poorman@text} substitution.
+% \begin{macrocode}
+ \def\@setcref@space{ % space here is deliberate
+ \g@addto@macro\cref@poorman@text{ }}
+ \def\@setcref@pairconjunction{%
+ \crefpairconjunction%
+ \expandafter\g@addto@macro\expandafter\cref@poorman@text%
+ \expandafter{\crefpairconjunction}}
+ \def\@setcref@middleconjunction{%
+ \crefmiddleconjunction%
+ \expandafter\g@addto@macro\expandafter\cref@poorman@text%
+ \expandafter{\crefmiddleconjunction}}
+ \def\@setcref@lastconjunction{%
+ \creflastconjunction%
+ \expandafter\g@addto@macro\expandafter\cref@poorman@text%
+ \expandafter{\creflastconjunction}}
+ }% end of \AtBeginDocument
+ }{}% end of \@ifpackageloaded{varioref}
}% end of poorman option
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
%
%
-% \subsection{Sort and Compress options}
+% \subsection{Sort and Compress Options}
% \begin{macro}{sort}
% \begin{macro}{compress}
% \begin{macro}{nosort}
@@ -6256,11 +7745,11 @@
%
%
%
-% \subsection{Capitalise option}
+% \subsection{Capitalise Option}
% \begin{macro}{capitalise}
% \begin{macro}{\if@cref@capitalise}
% The \option{capitalise} option causes \package{cleveref} to always
-% use the |\Cref|* variants for type-setting cross-references, so that
+% use the |\Cref|* variants for typesetting cross-references, so that
% cross-reference names are always capitalised.
% \begin{macrocode}
\newif\if@cref@capitalise
@@ -6283,6 +7772,54 @@
%
%
%
+% \subsection{Nameinlink Option}
+% \begin{macro}{nameinlink}
+% \begin{macro}{\if@cref@nameinlink}
+% The \option{nameinlink} option causes \package{cleveref} to include
+% the cross-reference name as part of the hyperlink target when the
+% \package{hyperref} package is used.
+% \begin{macrocode}
+\newif\if@cref@nameinlink
+% \end{macrocode}
+% Disabled by default.
+% \begin{macrocode}
+\@cref@nameinlinkfalse
+% \end{macrocode}
+% Option overrides default.
+% \begin{macrocode}
+\DeclareOption{nameinlink}{%
+ \PackageInfo{cleveref}{include cross-reference names in hyperlinks}
+ \@cref@nameinlinktrue}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \subsection{Noabbrev Option}
+% \begin{macro}{noabbrev}
+% \begin{macro}{\if@cref@abbrev}
+% The \option{noabbrev} option causes \package{cleveref} to always use
+% the full cross-reference names, instead of abbreviating some of the
+% more common names in the middle of sentences.
+% \begin{macrocode}
+\newif\if@cref@abbrev
+% \end{macrocode}
+% Enabled by default.
+% \begin{macrocode}
+\@cref@abbrevtrue
+% \end{macrocode}
+% Option overrides default.
+% \begin{macrocode}
+\DeclareOption{noabbrev}{%
+ \PackageInfo{cleveref}{no abbreviation of names}
+ \@cref@abbrevfalse}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
% \subsection{Language and \package{babel} Support}
% \label{sec:code:babel}
% Default reference formats for different languages are supported via
@@ -6297,19 +7834,6 @@
% translations as a plain text file.
%
%
-% \begin{macro}{\crefdefaultlabelformat}
-% \begin{macro}{\creflabelformat}
-% We first define the default label formats, which don't depend on
-% language. We override the default format for equations, to follow the
-% near universal convention of enclosing equation labels in brackets.
-% \begin{macrocode}
-\crefdefaultlabelformat{#2#1#3}
-\creflabelformat{equation}{\textup{(#2#1#3)}}
-\@labelcrefdefinedefaultformats
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
% \begin{macro}{\cref@addto}
% Utility macro to use instead of \package{babel}'s flawed \cmd{\addto}
% (copied and modified from \package{varioref}).
@@ -6330,24 +7854,24 @@
%
%
% Passing a language option to \package{cleveref} defines the
-% cross-reference names and conjunctions as appropriate for that lanauge.
-% We can't make the definitions straight away, since they would prevent
-% the automatic definition of the other capitalisation variant from
-% working if the user chooses to change a default definition in the
+% cross-reference names and conjunctions as appropriate for that
+% language. We can't make the definitions straight away, since they would
+% prevent the automatic definition of the other capitalisation variant
+% from working if the user chooses to change a default definition in the
% preamble, so we postpone them until the beginning of the document.
-% However, if each language option were to simply to define any formats
-% that aren't already defined by the end of the preamble, the
-% \emph{first} language option would override all the others.
-% Unfortunately, the convention in \LaTeX{} and \package{babel} is for
-% the \emph{last} language option to take precedence. So we instead used
-% the \cmd{\crefname@preamble} command to save the definitions in
+% However, if each language option were to simply define any formats that
+% aren't already defined by the end of the preamble, the \emph{first}
+% language option would override all the others. Unfortunately, the
+% convention in \LaTeX{} and \package{babel} is for the \emph{last}
+% language option to take precedence. So we instead used the
+% \cmd{\crefname@preamble} command to save the definitions in
% |\cref@|\meta{type}|@name@preamble| etc., and after all the language
% options have been processed, use the contents of these to set the
% default definitions for any undefined formats.
%
% For \package{babel} support, we add the appropriate redefinitions to
% the\linebreak[4] |\extras|\meta{language} macro, which is called by
-% \package{babel}'s \cmd{\selectlanguage} at al.\ commands. The main
+% \package{babel}'s \cmd{\selectlanguage} et al.\ commands. The main
% language (the last one listed in the options) is set up by an automatic
% call to \cmd{\selectlanguage} at the beginning of the document, which
% would clobber any redefinitions made by the user in the preamble. To
@@ -6367,6 +7891,8 @@
% in order to make the code produced by the poor man's |sed| script
% slightly cleaner.
%
+%
+% \subsubsection{English}
% \begin{macro}{english}
% English definitions (these are used by default).
% \end{macro}
@@ -6393,15 +7919,17 @@
\def\crefpairgroupconjunction@preamble{ and\nobreakspace}%
\def\crefmiddlegroupconjunction@preamble{, }%
\def\creflastgroupconjunction@preamble{, and\nobreakspace}%
+ %
\Crefname@preamble{equation}{Equation}{Equations}%
+ \Crefname@preamble{figure}{Figure}{Figures}%
+ \Crefname@preamble{table}{Table}{Tables}%
+ \Crefname@preamble{page}{Page}{Pages}%
\Crefname@preamble{part}{Part}{Parts}%
\Crefname@preamble{chapter}{Chapter}{Chapters}%
\Crefname@preamble{section}{Section}{Sections}%
\Crefname@preamble{appendix}{Appendix}{Appendices}%
\Crefname@preamble{enumi}{Item}{Items}%
\Crefname@preamble{footnote}{Footnote}{Footnotes}%
- \Crefname@preamble{figure}{Figure}{Figures}%
- \Crefname@preamble{table}{Table}{Tables}%
\Crefname@preamble{theorem}{Theorem}{Theorems}%
\Crefname@preamble{lemma}{Lemma}{Lemmas}%
\Crefname@preamble{corollary}{Corollary}{Corollaries}%
@@ -6414,16 +7942,23 @@
\Crefname@preamble{algorithm}{Algorithm}{Algorithms}%
\Crefname@preamble{listing}{Listing}{Listings}%
\Crefname@preamble{line}{Line}{Lines}%
- \if@cref@capitalise%
- \crefname@preamble{equation}{Eq.}{Eqs.}%
+ %
+ \if@cref@capitalise% capitalise set
+ \if@cref@abbrev%
+ \crefname@preamble{equation}{Eq.}{Eqs.}%
+ \crefname@preamble{figure}{Fig.}{Figs.}%
+ \else%
+ \crefname@preamble{equation}{Equation}{Equations}%
+ \crefname@preamble{figure}{Figure}{Figures}%
+ \fi%
+ \crefname@preamble{page}{Page}{Pages}%
+ \crefname@preamble{table}{Table}{Tables}%
\crefname@preamble{part}{Part}{Parts}%
\crefname@preamble{chapter}{Chapter}{Chapters}%
\crefname@preamble{section}{Section}{Sections}%
\crefname@preamble{appendix}{Appendix}{Appendices}%
\crefname@preamble{enumi}{Item}{Items}%
\crefname@preamble{footnote}{Footnote}{Footnotes}%
- \crefname@preamble{figure}{Fig.}{Figs.}%
- \crefname@preamble{table}{Table}{Tables}%
\crefname@preamble{theorem}{Theorem}{Theorems}%
\crefname@preamble{lemma}{Lemma}{Lemmas}%
\crefname@preamble{corollary}{Corollary}{Corollaries}%
@@ -6436,16 +7971,23 @@
\crefname@preamble{algorithm}{Algorithm}{Algorithms}%
\crefname@preamble{listing}{Listing}{Listings}%
\crefname@preamble{line}{Line}{Lines}%
- \else%
- \crefname@preamble{equation}{eq.}{eqs.}%
+ %
+ \else% capitalise unset
+ \if@cref@abbrev%
+ \crefname@preamble{equation}{eq.}{eqs.}%
+ \crefname@preamble{figure}{fig.}{figs.}%
+ \else%
+ \crefname@preamble{equation}{equation}{equations}%
+ \crefname@preamble{figure}{figure}{figures}%
+ \fi%
+ \crefname@preamble{page}{page}{pages}%
+ \crefname@preamble{table}{table}{tables}%
\crefname@preamble{part}{part}{parts}%
\crefname@preamble{chapter}{chapter}{chapters}%
\crefname@preamble{section}{section}{sections}%
\crefname@preamble{appendix}{appendix}{appendices}%
\crefname@preamble{enumi}{item}{items}%
\crefname@preamble{footnote}{footnote}{footnotes}%
- \crefname@preamble{figure}{fig.}{figs.}%
- \crefname@preamble{table}{table}{tables}%
\crefname@preamble{theorem}{theorem}{theorems}%
\crefname@preamble{lemma}{lemma}{lemmas}%
\crefname@preamble{corollary}{corollary}{corollaries}%
@@ -6462,7 +8004,7 @@
\def\cref@language{english}%
% \end{macrocode}
%
-% Next, we add the definitions to \cmd{\extras}\dots so that
+% Next, we add the definitions to \cmd{\extras}\dots{} so that
% \package{babel}'s \cmd{\selectlanguage} command will change the format
% appropriately.
% \begin{macrocode}
@@ -6476,7 +8018,13 @@
\renewcommand{\crefpairgroupconjunction}{ and\nobreakspace}%
\renewcommand{\crefmiddlegroupconjunction}{, }%
\renewcommand{\creflastgroupconjunction}{, and\nobreakspace}%
+ %
\Crefname{equation}{Equation}{Equations}%
+ \Crefname{figure}{Figure}{Figures}%
+ \Crefname{subfigure}{Figure}{Figures}%
+ \Crefname{table}{Table}{Tables}%
+ \Crefname{subtable}{Table}{Tables}%
+ \Crefname{page}{Page}{Pages}%
\Crefname{part}{Part}{Parts}%
\Crefname{chapter}{Chapter}{Chapters}%
\Crefname{section}{Section}{Sections}%
@@ -6492,10 +8040,6 @@
\Crefname{enumiv}{Item}{Items}%
\Crefname{enumv}{Item}{Items}%
\Crefname{footnote}{Footnote}{Footnotes}%
- \Crefname{figure}{Figure}{Figures}%
- \Crefname{subfigure}{Figure}{Figures}%
- \Crefname{table}{Table}{Tables}%
- \Crefname{subtable}{Table}{Tables}%
\Crefname{theorem}{Theorem}{Theorems}%
\Crefname{lemma}{Lemma}{Lemmas}%
\Crefname{corollary}{Corollary}{Corollaries}%
@@ -6508,8 +8052,20 @@
\Crefname{algorithm}{Algorithm}{Algorithms}%
\Crefname{listing}{Listing}{Listings}%
\Crefname{line}{Line}{Lines}%
- \if@cref@capitalise%
- \crefname{equation}{Eq.}{Eqs.}%
+ %
+ \if@cref@capitalise% capitalise set
+ \if@cref@abbrev%
+ \crefname{equation}{Eq.}{Eqs.}%
+ \crefname{figure}{Fig.}{Figs.}%
+ \crefname{subfigure}{Fig.}{Figs.}%
+ \else%
+ \crefname{equation}{Equation}{Equations}%
+ \crefname{figure}{Figure}{Figures}%
+ \crefname{subfigure}{Figure}{Figures}%
+ \fi%
+ \crefname{page}{Page}{Pages}%
+ \crefname{table}{Table}{Tables}%
+ \crefname{subtable}{Table}{Tables}%
\crefname{part}{Part}{Parts}%
\crefname{chapter}{Chapter}{Chapters}%
\crefname{section}{Section}{Sections}%
@@ -6525,10 +8081,6 @@
\crefname{enumiv}{Item}{Items}%
\crefname{enumv}{Item}{Items}%
\crefname{footnote}{Footnote}{Footnotes}%
- \crefname{figure}{Fig.}{Figs.}%
- \crefname{subfigure}{Fig.}{Figs.}%
- \crefname{table}{Table}{Tables}%
- \crefname{subtable}{Table}{Tables}%
\crefname{theorem}{Theorem}{Theorems}%
\crefname{lemma}{Lemma}{Lemmas}%
\crefname{corollary}{Corollary}{Corollaries}%
@@ -6541,8 +8093,20 @@
\crefname{algorithm}{Algorithm}{Algorithms}%
\crefname{listing}{Listing}{Listings}%
\crefname{line}{Line}{Lines}%
- \else%
- \crefname{equation}{eq.}{eqs.}%
+ %
+ \else% capitalise unset
+ \if@cref@abbrev%
+ \crefname{equation}{eq.}{eqs.}%
+ \crefname{figure}{fig.}{figs.}%
+ \crefname{subfigure}{fig.}{figs.}%
+ \else%
+ \crefname{equation}{equation}{equations}%
+ \crefname{figure}{figure}{figures}%
+ \crefname{subfigure}{figure}{figures}%
+ \fi%
+ \crefname{table}{table}{tables}%
+ \crefname{subtable}{table}{tables}%
+ \crefname{page}{page}{pages}%
\crefname{part}{part}{parts}%
\crefname{chapter}{chapter}{chapters}%
\crefname{section}{section}{sections}%
@@ -6558,10 +8122,6 @@
\crefname{enumiv}{item}{items}%
\crefname{enumv}{item}{items}%
\crefname{footnote}{footnote}{footnotes}%
- \crefname{figure}{fig.}{figs.}%
- \crefname{subfigure}{fig.}{figs.}%
- \crefname{table}{table}{tables}%
- \crefname{subtable}{table}{tables}%
\crefname{theorem}{theorem}{theorems}%
\crefname{lemma}{lemma}{lemmas}%
\crefname{corollary}{corollary}{corollaries}%
@@ -6578,6 +8138,8 @@
}}}
% \end{macrocode}
%
+%
+% \subsubsection{German}
% \begin{macro}{german}
% German translations kindly provided by Stefan Pinnow, with a few
% additions by the package author (so you know to blame the latter for
@@ -6608,18 +8170,20 @@
\def\crefpairgroupconjunction@preamble{ und\nobreakspace}%
\def\crefmiddlegroupconjunction@preamble{, }%
\def\creflastgroupconjunction@preamble{ und\nobreakspace}%
+ %
\Crefname@preamble{equation}{Gleichung}{Gleichungen}%
- \Crefname@preamble{part}{Teil}{Teilen}%
+ \Crefname@preamble{figure}{Abbildung}{Abbildungen}%
+ \Crefname@preamble{table}{Tabelle}{Tabellen}%
+ \Crefname@preamble{page}{Seite}{Seiten}%
+ \Crefname@preamble{part}{Teil}{Teile}%
\Crefname@preamble{chapter}{Kapitel}{Kapitel}%
\Crefname@preamble{section}{Abschnitt}{Abschnitte}%
\Crefname@preamble{appendix}{Anhang}{Anh\"ange}%
\Crefname@preamble{enumi}{Punkt}{Punkte}%
\Crefname@preamble{footnote}{Fu\ss note}{Fu\ss noten}%
- \Crefname@preamble{figure}{Abbildung}{Abbildungen}%
- \Crefname@preamble{table}{Tabelle}{Tabellen}%
- \Crefname@preamble{theorem}{Theorem}{Theoremen}%
+ \Crefname@preamble{theorem}{Theorem}{Theoreme}%
\Crefname@preamble{lemma}{Lemma}{Lemmata}%
- \Crefname@preamble{corollary}{Korollar}{Korollaren}%
+ \Crefname@preamble{corollary}{Korollar}{Korollare}%
\Crefname@preamble{proposition}{Satz}{S\"atze}%
\Crefname@preamble{definition}{Definition}{Definitionen}%
\Crefname@preamble{result}{Ergebnis}{Ergebnisse}%
@@ -6629,55 +8193,33 @@
\Crefname@preamble{algorithm}{Algorithmus}{Algorithmen}%
\Crefname@preamble{listing}{Listing}{Listings}%
\Crefname@preamble{line}{Zeile}{Zeilen}%
- \if@cref@capitalise%
- \crefname@preamble{equation}{Gleichung}{Gleichungen}%
- \crefname@preamble{part}{Teil}{Teilen}%
- \crefname@preamble{chapter}{Kapitel}{Kapitel}%
- \crefname@preamble{section}{Abschnitt}{Abschnitte}%
- \crefname@preamble{appendix}{Anhang}{Anh\"ange}%
- \crefname@preamble{enumi}{Punkt}{Punkte}%
- \crefname@preamble{footnote}{Fu\ss note}{Fu\ss noten}%
- \crefname@preamble{figure}{Abbildung}{Abbildungen}%
- \crefname@preamble{table}{Tabelle}{Tabellen}%
- \crefname@preamble{theorem}{Theorem}{Theoremen}%
- \crefname@preamble{lemma}{Lemma}{Lemmata}%
- \crefname@preamble{corollary}{Korollar}{Korollaren}%
- \crefname@preamble{proposition}{Satz}{S\"atze}%
- \crefname@preamble{definition}{Definition}{Definitionen}%
- \crefname@preamble{result}{Ergebnis}{Ergebnisse}%
- \crefname@preamble{example}{Beispiel}{Beispiele}%
- \crefname@preamble{remark}{Bemerkung}{Bemerkungen}%
- \crefname@preamble{note}{Anmerkung}{Anmerkungen}%
- \crefname@preamble{algorithm}{Algorithmus}{Algorithmen}%
- \crefname@preamble{listing}{Listing}{Listings}%
- \crefname@preamble{line}{Zeile}{Zeilen}%
- \else%
- \crefname@preamble{equation}{Gleichung}{Gleichungen}%
- \crefname@preamble{part}{Teil}{Teilen}%
- \crefname@preamble{chapter}{Kapitel}{Kapitel}%
- \crefname@preamble{section}{Abschnitt}{Abschnitte}%
- \crefname@preamble{appendix}{Anhang}{Anh\"ange}%
- \crefname@preamble{enumi}{Punkt}{Punkte}%
- \crefname@preamble{footnote}{Fu\ss note}{Fu\ss noten}%
- \crefname@preamble{figure}{Abbildung}{Abbildungen}%
- \crefname@preamble{table}{Tabelle}{Tabellen}%
- \crefname@preamble{theorem}{Theorem}{Theoremen}%
- \crefname@preamble{lemma}{Lemma}{Lemmata}%
- \crefname@preamble{corollary}{Korollar}{Korollaren}%
- \crefname@preamble{proposition}{Satz}{S\"atze}%
- \crefname@preamble{definition}{Definition}{Definitionen}%
- \crefname@preamble{result}{Ergebnis}{Ergebnisse}%
- \crefname@preamble{example}{Beispiel}{Beispiele}%
- \crefname@preamble{remark}{Bemerkung}{Bemerkungen}%
- \crefname@preamble{note}{Anmerkung}{Anmerkungen}%
- \crefname@preamble{algorithm}{Algorithmus}{Algorithmen}%
- \crefname@preamble{listing}{Listing}{Listings}%
- \crefname@preamble{line}{Zeile}{Zeilen}%
- \fi%
+ %
+ \crefname@preamble{equation}{Gleichung}{Gleichungen}%
+ \crefname@preamble{figure}{Abbildung}{Abbildungen}%
+ \crefname@preamble{table}{Tabelle}{Tabellen}%
+ \crefname@preamble{page}{Seite}{Seiten}%
+ \crefname@preamble{part}{Teil}{Teile}%
+ \crefname@preamble{chapter}{Kapitel}{Kapitel}%
+ \crefname@preamble{section}{Abschnitt}{Abschnitte}%
+ \crefname@preamble{appendix}{Anhang}{Anh\"ange}%
+ \crefname@preamble{enumi}{Punkt}{Punkte}%
+ \crefname@preamble{footnote}{Fu\ss note}{Fu\ss noten}%
+ \crefname@preamble{theorem}{Theorem}{Theoreme}%
+ \crefname@preamble{lemma}{Lemma}{Lemmata}%
+ \crefname@preamble{corollary}{Korollar}{Korollare}%
+ \crefname@preamble{proposition}{Satz}{S\"atze}%
+ \crefname@preamble{definition}{Definition}{Definitionen}%
+ \crefname@preamble{result}{Ergebnis}{Ergebnisse}%
+ \crefname@preamble{example}{Beispiel}{Beispiele}%
+ \crefname@preamble{remark}{Bemerkung}{Bemerkungen}%
+ \crefname@preamble{note}{Anmerkung}{Anmerkungen}%
+ \crefname@preamble{algorithm}{Algorithmus}{Algorithmen}%
+ \crefname@preamble{listing}{Listing}{Listings}%
+ \crefname@preamble{line}{Zeile}{Zeilen}%
\def\cref@language{german}%
% \end{macrocode}
%
-% Next, we add the definitions to \cmd{\extras}\dots so that
+% Next, we add the definitions to \cmd{\extras}\dots{} so that
% \package{babel}'s \cmd{\selectlanguage} command will change the format
% appropriately.
% \begin{macrocode}
@@ -6691,8 +8233,14 @@
\renewcommand{\crefpairgroupconjunction}{ und\nobreakspace}%
\renewcommand{\crefmiddlegroupconjunction}{, }%
\renewcommand{\creflastgroupconjunction}{ und\nobreakspace}%
+ %
\Crefname{equation}{Gleichung}{Gleichungen}%
- \Crefname{part}{Teil}{Teilen}%
+ \Crefname{figure}{Abbildung}{Abbildungen}%
+ \Crefname{subfigure}{Abbildung}{Abbildungen}%
+ \Crefname{table}{Tabelle}{Tabellen}%
+ \Crefname{subtable}{Tabelle}{Tabellen}%
+ \Crefname{page}{Seite}{Seiten}%
+ \Crefname{part}{Teil}{Teile}%
\Crefname{chapter}{Kapitel}{Kapitel}%
\Crefname{section}{Abschnitt}{Abschnitte}%
\Crefname{subsection}{Abschnitt}{Abschnitte}%
@@ -6707,13 +8255,9 @@
\Crefname{enumiv}{Punkt}{Punkte}%
\Crefname{enumv}{Punkt}{Punkte}%
\Crefname{footnote}{Fu\ss note}{Fu\ss noten}%
- \Crefname{figure}{Abbildung}{Abbildungen}%
- \Crefname{subfigure}{Abbildung}{Abbildungen}%
- \Crefname{table}{Tabelle}{Tabellen}%
- \Crefname{subtable}{Tabelle}{Tabellen}%
- \Crefname{theorem}{Theorem}{Theoremen}%
+ \Crefname{theorem}{Theorem}{Theoreme}%
\Crefname{lemma}{Lemma}{Lemmata}%
- \Crefname{corollary}{Korollar}{Korollaren}%
+ \Crefname{corollary}{Korollar}{Korollare}%
\Crefname{proposition}{Satz}{S\"atze}%
\Crefname{definition}{Definition}{Definitionen}%
\Crefname{result}{Ergebnis}{Ergebnisse}%
@@ -6723,73 +8267,40 @@
\Crefname{algorithm}{Algorithmus}{Algorithmen}%
\Crefname{listing}{Listing}{Listings}%
\Crefname{line}{Zeile}{Zeilen}%
- \if@cref@capitalise%
- \crefname{equation}{Gleichung}{Gleichungen}%
- \crefname{part}{Teil}{Teilen}%
- \crefname{chapter}{Kapitel}{Kapitel}%
- \crefname{section}{Abschnitt}{Abschnitte}%
- \crefname{subsection}{Abschnitt}{Abschnitte}%
- \crefname{subsubsection}{Abschnitt}{Abschnitte}%
- \crefname{appendix}{Anhang}{Anh\"ange}%
- \crefname{subappendix}{Anhang}{Anh\"ange}%
- \crefname{subsubappendix}{Anhang}{Anh\"ange}%
- \crefname{subsubsubappendix}{Anhang}{Anh\"ange}%
- \crefname{enumi}{Punkt}{Punkte}%
- \crefname{enumii}{Punkt}{Punkte}%
- \crefname{enumiii}{Punkt}{Punkte}%
- \crefname{enumiv}{Punkt}{Punkte}%
- \crefname{enumv}{Punkt}{Punkte}%
- \crefname{footnote}{Fu\ss note}{Fu\ss noten}%
- \crefname{figure}{Abbildung}{Abbildungen}%
- \crefname{subfigure}{Abbildung}{Abbildungen}%
- \crefname{table}{Tabelle}{Tabellen}%
- \crefname{subtable}{Tabelle}{Tabellen}%
- \crefname{theorem}{Theorem}{Theoremen}%
- \crefname{lemma}{Lemma}{Lemmata}%
- \crefname{corollary}{Korollar}{Korollaren}%
- \crefname{proposition}{Satz}{S\"atze}%
- \crefname{definition}{Definition}{Definitionen}%
- \crefname{result}{Ergebnis}{Ergebnisse}%
- \crefname{example}{Beispiel}{Beispiele}%
- \crefname{remark}{Bemerkung}{Bemerkungen}%
- \crefname{note}{Anmerkung}{Anmerkungen}%
- \crefname{algorithm}{Algorithmus}{Algorithmen}%
- \crefname{listing}{Listing}{Listings}%
- \crefname{line}{Zeile}{Zeilen}%
- \else%
- \crefname{equation}{Gleichung}{Gleichungen}%
- \crefname{part}{Teil}{Teilen}%
- \crefname{chapter}{Kapitel}{Kapitel}%
- \crefname{section}{Abschnitt}{Abschnitte}%
- \crefname{subsection}{Abschnitt}{Abschnitte}%
- \crefname{subsubsection}{Abschnitt}{Abschnitte}%
- \crefname{appendix}{Anhang}{Anh\"ange}%
- \crefname{subappendix}{Anhang}{Anh\"ange}%
- \crefname{subsubappendix}{Anhang}{Anh\"ange}%
- \crefname{subsubsubappendix}{Anhang}{Anh\"ange}%
- \crefname{enumi}{Punkt}{Punkte}%
- \crefname{enumii}{Punkt}{Punkte}%
- \crefname{enumiii}{Punkt}{Punkte}%
- \crefname{enumiv}{Punkt}{Punkte}%
- \crefname{enumv}{Punkt}{Punkte}%
- \crefname{footnote}{Fu\ss note}{Fu\ss noten}%
- \crefname{figure}{Abbildung}{Abbildungen}%
- \crefname{subfigure}{Abbildung}{Abbildungen}%
- \crefname{table}{Tabelle}{Tabellen}%
- \crefname{subtable}{Tabelle}{Tabellen}%
- \crefname{theorem}{Theorem}{Theoremen}%
- \crefname{lemma}{Lemma}{Lemmata}%
- \crefname{corollary}{Korollar}{Korollaren}%
- \crefname{proposition}{Satz}{S\"atze}%
- \crefname{definition}{Definition}{Definitionen}%
- \crefname{result}{Ergebnis}{Ergebnisse}%
- \crefname{example}{Beispiel}{Beispiele}%
- \crefname{remark}{Bemerkung}{Bemerkungen}%
- \crefname{note}{Anmerkung}{Anmerkungen}%
- \crefname{algorithm}{Algorithmus}{Algorithmen}%
- \crefname{listing}{Listing}{Listings}%
- \crefname{line}{Zeile}{Zeilen}%
- \fi%
+ %
+ \crefname{equation}{Gleichung}{Gleichungen}%
+ \crefname{figure}{Abbildung}{Abbildungen}%
+ \crefname{subfigure}{Abbildung}{Abbildungen}%
+ \crefname{table}{Tabelle}{Tabellen}%
+ \crefname{subtable}{Tabelle}{Tabellen}%
+ \crefname{page}{Seite}{Seiten}%
+ \crefname{part}{Teil}{Teile}%
+ \crefname{chapter}{Kapitel}{Kapitel}%
+ \crefname{section}{Abschnitt}{Abschnitte}%
+ \crefname{subsection}{Abschnitt}{Abschnitte}%
+ \crefname{subsubsection}{Abschnitt}{Abschnitte}%
+ \crefname{appendix}{Anhang}{Anh\"ange}%
+ \crefname{subappendix}{Anhang}{Anh\"ange}%
+ \crefname{subsubappendix}{Anhang}{Anh\"ange}%
+ \crefname{subsubsubappendix}{Anhang}{Anh\"ange}%
+ \crefname{enumi}{Punkt}{Punkte}%
+ \crefname{enumii}{Punkt}{Punkte}%
+ \crefname{enumiii}{Punkt}{Punkte}%
+ \crefname{enumiv}{Punkt}{Punkte}%
+ \crefname{enumv}{Punkt}{Punkte}%
+ \crefname{footnote}{Fu\ss note}{Fu\ss noten}%
+ \crefname{theorem}{Theorem}{Theoreme}%
+ \crefname{lemma}{Lemma}{Lemmata}%
+ \crefname{corollary}{Korollar}{Korollare}%
+ \crefname{proposition}{Satz}{S\"atze}%
+ \crefname{definition}{Definition}{Definitionen}%
+ \crefname{result}{Ergebnis}{Ergebnisse}%
+ \crefname{example}{Beispiel}{Beispiele}%
+ \crefname{remark}{Bemerkung}{Bemerkungen}%
+ \crefname{note}{Anmerkung}{Anmerkungen}%
+ \crefname{algorithm}{Algorithmus}{Algorithmen}%
+ \crefname{listing}{Listing}{Listings}%
+ \crefname{line}{Zeile}{Zeilen}%
}}}
% \end{macrocode}
%
@@ -6817,8 +8328,14 @@
\renewcommand{\crefpairgroupconjunction}{ und\nobreakspace}%
\renewcommand{\crefmiddlegroupconjunction}{, }%
\renewcommand{\creflastgroupconjunction}{ und\nobreakspace}%
+ %
\Crefname{equation}{Gleichung}{Gleichungen}%
- \Crefname{part}{Teil}{Teilen}%
+ \Crefname{figure}{Abbildung}{Abbildungen}%
+ \Crefname{subfigure}{Abbildung}{Abbildungen}%
+ \Crefname{table}{Tabelle}{Tabellen}%
+ \Crefname{subtable}{Tabelle}{Tabellen}%
+ \Crefname{page}{Seite}{Seiten}%
+ \Crefname{part}{Teil}{Teile}%
\Crefname{chapter}{Kapitel}{Kapitel}%
\Crefname{section}{Abschnitt}{Abschnitte}%
\Crefname{subsection}{Abschnitt}{Abschnitte}%
@@ -6833,13 +8350,9 @@
\Crefname{enumiv}{Punkt}{Punkte}%
\Crefname{enumv}{Punkt}{Punkte}%
\Crefname{footnote}{Fu\ss note}{Fu\ss noten}%
- \Crefname{figure}{Abbildung}{Abbildungen}%
- \Crefname{subfigure}{Abbildung}{Abbildungen}%
- \Crefname{table}{Tabelle}{Tabellen}%
- \Crefname{subtable}{Tabelle}{Tabellen}%
- \Crefname{theorem}{Theorem}{Theoremen}%
+ \Crefname{theorem}{Theorem}{Theoreme}%
\Crefname{lemma}{Lemma}{Lemmata}%
- \Crefname{corollary}{Korollar}{Korollaren}%
+ \Crefname{corollary}{Korollar}{Korollare}%
\Crefname{proposition}{Satz}{S\"atze}%
\Crefname{definition}{Definition}{Definitionen}%
\Crefname{result}{Ergebnis}{Ergebnisse}%
@@ -6849,76 +8362,45 @@
\Crefname{algorithm}{Algorithmus}{Algorithmen}%
\Crefname{listing}{Listing}{Listings}%
\Crefname{line}{Zeile}{Zeilen}%
- \if@cref@capitalise%
- \crefname{equation}{Gleichung}{Gleichungen}%
- \crefname{part}{Teil}{Teilen}%
- \crefname{chapter}{Kapitel}{Kapitel}%
- \crefname{section}{Abschnitt}{Abschnitte}%
- \crefname{subsection}{Abschnitt}{Abschnitte}%
- \crefname{subsubsection}{Abschnitt}{Abschnitte}%
- \crefname{appendix}{Anhang}{Anh\"ange}%
- \crefname{subappendix}{Anhang}{Anh\"ange}%
- \crefname{subsubappendix}{Anhang}{Anh\"ange}%
- \crefname{subsubsubappendix}{Anhang}{Anh\"ange}%
- \crefname{enumi}{Punkt}{Punkte}%
- \crefname{enumii}{Punkt}{Punkte}%
- \crefname{enumiii}{Punkt}{Punkte}%
- \crefname{enumiv}{Punkt}{Punkte}%
- \crefname{enumv}{Punkt}{Punkte}%
- \crefname{footnote}{Fu\ss note}{Fu\ss noten}%
- \crefname{figure}{Abbildung}{Abbildungen}%
- \crefname{subfigure}{Abbildung}{Abbildungen}%
- \crefname{table}{Tabelle}{Tabellen}%
- \crefname{subtable}{Tabelle}{Tabellen}%
- \crefname{theorem}{Theorem}{Theoremen}%
- \crefname{lemma}{Lemma}{Lemmata}%
- \crefname{corollary}{Korollar}{Korollaren}%
- \crefname{proposition}{Satz}{S\"atze}%
- \crefname{definition}{Definition}{Definitionen}%
- \crefname{result}{Ergebnis}{Ergebnisse}%
- \crefname{example}{Beispiel}{Beispiele}%
- \crefname{remark}{Bemerkung}{Bemerkungen}%
- \crefname{note}{Anmerkung}{Anmerkungen}%
- \crefname{algorithm}{Algorithmus}{Algorithmen}%
- \crefname{listing}{Listing}{Listings}%
- \crefname{line}{Zeile}{Zeilen}%
- \else%
- \crefname{equation}{Gleichung}{Gleichungen}%
- \crefname{part}{Teil}{Teilen}%
- \crefname{chapter}{Kapitel}{Kapitel}%
- \crefname{section}{Abschnitt}{Abschnitte}%
- \crefname{subsection}{Abschnitt}{Abschnitte}%
- \crefname{subsubsection}{Abschnitt}{Abschnitte}%
- \crefname{appendix}{Anhang}{Anh\"ange}%
- \crefname{subappendix}{Anhang}{Anh\"ange}%
- \crefname{subsubappendix}{Anhang}{Anh\"ange}%
- \crefname{subsubsubappendix}{Anhang}{Anh\"ange}%
- \crefname{enumi}{Punkt}{Punkte}%
- \crefname{enumii}{Punkt}{Punkte}%
- \crefname{enumiii}{Punkt}{Punkte}%
- \crefname{enumiv}{Punkt}{Punkte}%
- \crefname{enumv}{Punkt}{Punkte}%
- \crefname{footnote}{Fu\ss note}{Fu\ss noten}%
- \crefname{figure}{Abbildung}{Abbildungen}%
- \crefname{subfigure}{Abbildung}{Abbildungen}%
- \crefname{table}{Tabelle}{Tabellen}%
- \crefname{subtable}{Tabelle}{Tabellen}%
- \crefname{theorem}{Theorem}{Theoremen}%
- \crefname{lemma}{Lemma}{Lemmata}%
- \crefname{corollary}{Korollar}{Korollaren}%
- \crefname{proposition}{Satz}{S\"atze}%
- \crefname{definition}{Definition}{Definitionen}%
- \crefname{result}{Ergebnis}{Ergebnisse}%
- \crefname{example}{Beispiel}{Beispiele}%
- \crefname{remark}{Bemerkung}{Bemerkungen}%
- \crefname{note}{Anmerkung}{Anmerkungen}%
- \crefname{algorithm}{Algorithmus}{Algorithmen}%
- \crefname{listing}{Listing}{Listings}%
- \crefname{line}{Zeile}{Zeilen}%
- \fi%
+ %
+ \crefname{equation}{Gleichung}{Gleichungen}%
+ \crefname{figure}{Abbildung}{Abbildungen}%
+ \crefname{subfigure}{Abbildung}{Abbildungen}%
+ \crefname{table}{Tabelle}{Tabellen}%
+ \crefname{subtable}{Tabelle}{Tabellen}%
+ \crefname{page}{Seite}{Seiten}%
+ \crefname{part}{Teil}{Teile}%
+ \crefname{chapter}{Kapitel}{Kapitel}%
+ \crefname{section}{Abschnitt}{Abschnitte}%
+ \crefname{subsection}{Abschnitt}{Abschnitte}%
+ \crefname{subsubsection}{Abschnitt}{Abschnitte}%
+ \crefname{appendix}{Anhang}{Anh\"ange}%
+ \crefname{subappendix}{Anhang}{Anh\"ange}%
+ \crefname{subsubappendix}{Anhang}{Anh\"ange}%
+ \crefname{subsubsubappendix}{Anhang}{Anh\"ange}%
+ \crefname{enumi}{Punkt}{Punkte}%
+ \crefname{enumii}{Punkt}{Punkte}%
+ \crefname{enumiii}{Punkt}{Punkte}%
+ \crefname{enumiv}{Punkt}{Punkte}%
+ \crefname{enumv}{Punkt}{Punkte}%
+ \crefname{footnote}{Fu\ss note}{Fu\ss noten}%
+ \crefname{theorem}{Theorem}{Theoreme}%
+ \crefname{lemma}{Lemma}{Lemmata}%
+ \crefname{corollary}{Korollar}{Korollare}%
+ \crefname{proposition}{Satz}{S\"atze}%
+ \crefname{definition}{Definition}{Definitionen}%
+ \crefname{result}{Ergebnis}{Ergebnisse}%
+ \crefname{example}{Beispiel}{Beispiele}%
+ \crefname{remark}{Bemerkung}{Bemerkungen}%
+ \crefname{note}{Anmerkung}{Anmerkungen}%
+ \crefname{algorithm}{Algorithmus}{Algorithmen}%
+ \crefname{listing}{Listing}{Listings}%
+ \crefname{line}{Zeile}{Zeilen}%
}}}
% \end{macrocode}
%
+%
+% \subsubsection{Dutch}
% \begin{macro}{dutch}
% Dutch translations kindly contributed by Philip H\"olzenspies.
% \end{macro}
@@ -6947,13 +8429,15 @@
\def\crefpairgroupconjunction@preamble{ en\nobreakspace}%
\def\crefmiddlegroupconjunction@preamble{, }%
\def\creflastgroupconjunction@preamble{ en\nobreakspace}%
+ %
\Crefname@preamble{equation}{Vergel\ij{}king}{Vergel\ij{}kingen}%
+ \Crefname@preamble{figure}{Figuur}{Figuren}%
+ \Crefname@preamble{table}{Tabel}{Tabellen}%
+ \Crefname@preamble{page}{Pagina}{Pagina's}%
\Crefname@preamble{part}{Deel}{Delen}%
\Crefname@preamble{chapter}{Hoofdstuk}{Hoofdstuken}%
\Crefname@preamble{section}{Paragraaf}{Paragrafen}%
\Crefname@preamble{appendix}{Appendix}{Appendices}%
- \Crefname@preamble{figure}{Figuur}{Figuren}%
- \Crefname@preamble{table}{Tabel}{Tabellen}%
\Crefname@preamble{enumi}{Punt}{Punten}%
\Crefname@preamble{footnote}{Voetnote}{Voetnoten}%
\Crefname@preamble{lemma}{Lemma}{Lemma's}%
@@ -6967,16 +8451,23 @@
\Crefname@preamble{algorithm}{Algoritme}{Algoritmen}%
\Crefname@preamble{listing}{Listing}{Listings}%
\Crefname@preamble{line}{Lijn}{Lijnen}%
- \if@cref@capitalise%
- \crefname@preamble{equation}{Verg.}{Verg's.}%
+ %
+ \if@cref@capitalise% capitalise set
+ \if@cref@abbrev%
+ \crefname@preamble{equation}{Verg.}{Verg's.}%
+ \crefname@preamble{figure}{Fig.}{Fig's.}%
+ \else%
+ \crefname@preamble{equation}{Vergel\ij{}king}{Vergel\ij{}kingen}%
+ \crefname@preamble{figure}{Figuur}{Figuren}%
+ \fi%
+ \crefname@preamble{page}{Pagina}{Pagina's}%
+ \crefname@preamble{table}{Tabel}{Tabellen}%
\crefname@preamble{part}{Deel}{Delen}%
\crefname@preamble{chapter}{Hoofdstuk}{Hoofdstukken}%
\crefname@preamble{section}{Paragraaf}{Paragrafen}%
\crefname@preamble{appendix}{Appendix}{Appendices}%
\crefname@preamble{enumi}{Punt}{Punten}%
\crefname@preamble{footnote}{Voetnote}{Voetnoten}%
- \crefname@preamble{figure}{Fig.}{Fig's.}%
- \crefname@preamble{table}{Tabel}{Tabellen}%
\crefname@preamble{theorem}{Theorema}{Theorema's}%
\crefname@preamble{lemma}{Lemma}{Lemma's}%
\crefname@preamble{corollary}{Corollarium}{Corollaria}%
@@ -6989,16 +8480,23 @@
\crefname@preamble{algorithm}{Algoritme}{Algoritmen}%
\crefname@preamble{listing}{Listing}{Listings}%
\crefname@preamble{line}{Lijn}{Lijnen}%
- \else%
- \crefname@preamble{equation}{verg.}{verg's.}%
+ %
+ \else% capitalise unset
+ \if@cref@abbrev%
+ \crefname@preamble{equation}{verg.}{verg's.}%
+ \crefname@preamble{figure}{fig.}{fig's.}%
+ \else%
+ \crefname@preamble{equation}{vergel\ij{}king}{vergel\ij{}kingen}%
+ \crefname@preamble{figure}{figuur}{figuren}%
+ \fi%
+ \crefname@preamble{page}{pagina}{pagina's}%
+ \crefname@preamble{table}{tabel}{tabellen}%
\crefname@preamble{part}{deel}{delen}%
\crefname@preamble{chapter}{hoofdstuk}{hoofdstukken}%
\crefname@preamble{section}{paragraaf}{paragrafen}%
\crefname@preamble{appendix}{appendix}{appendices}%
\crefname@preamble{enumi}{punt}{punten}%
\crefname@preamble{footnote}{voetnote}{voetnoten}%
- \crefname@preamble{figure}{fig.}{fig's.}%
- \crefname@preamble{table}{tabel}{tabellen}%
\crefname@preamble{theorem}{theorema}{theorema's}%
\crefname@preamble{lemma}{lemma}{lemma's}%
\crefname@preamble{corollary}{corollarium}{corollaria}%
@@ -7015,7 +8513,7 @@
\def\cref@language{dutch}%
% \end{macrocode}
%
-% Next, we add the definitions to \cmd{\extras}\dots so that
+% Next, we add the definitions to \cmd{\extras}\dots{} so that
% \package{babel}'s \cmd{\selectlanguage} command will change the format
% appropriately.
% \begin{macrocode}
@@ -7029,7 +8527,13 @@
\renewcommand{\crefpairgroupconjunction}{ en\nobreakspace}%
\renewcommand{\crefmiddlegroupconjunction}{, }%
\renewcommand{\creflastgroupconjunction}{ en\nobreakspace}%
+ %
\Crefname{equation}{Vergel\ij{}king}{Vergel\ij{}kingen}%
+ \Crefname{figure}{Figuur}{Figuren}%
+ \Crefname{subfigure}{Figuur}{Figuren}%
+ \Crefname{table}{Tabel}{Tabellen}%
+ \Crefname{subtable}{Tabel}{Tabellen}%
+ \Crefname{page}{Pagina}{Pagina's}%
\Crefname{part}{Deel}{Delen}%
\Crefname{chapter}{Hoofdstuk}{Hoofdstuken}%
\Crefname{section}{Paragraaf}{Paragrafen}%
@@ -7045,10 +8549,6 @@
\Crefname{enumiv}{Punt}{Punten}%
\Crefname{enumv}{Punt}{Punten}%
\Crefname{footnote}{Voetnote}{Voetnoten}%
- \Crefname{figure}{Figuur}{Figuren}%
- \Crefname{subfigure}{Figuur}{Figuren}%
- \Crefname{table}{Tabel}{Tabellen}%
- \Crefname{subtable}{Tabel}{Tabellen}%
\Crefname{theorem}{Theorema}{Theorema's}%
\Crefname{lemma}{Lemma}{Lemma's}%
\Crefname{corollary}{Corollarium}{Corollaria}%
@@ -7061,16 +8561,26 @@
\Crefname{algorithm}{Algoritme}{Algoritmen}%
\Crefname{listing}{Listing}{Listings}%
\Crefname{line}{Lijn}{Lijnen}%
- \if@cref@capitalise%
- \crefname{equation}{Verg.}{Verg's.}%
+ %
+ \if@cref@capitalise% capitalise set
+ \if@cref@abbrev%
+ \crefname{equation}{Verg.}{Verg's.}%
+ \crefname{figure}{Fig.}{Fig's.}%
+ \crefname{subfigure}{Fig.}{Fig's.}%
+ \else%
+ \crefname{equation}{Vergel\ij{}king}{Vergel\ij{}kingen}%
+ \crefname{figure}{Figuur}{Figuren}%
+ \crefname{subfigure}{Figuur}{Figuren}%
+ \fi%
+ \crefname{table}{Tabel}{Tabellen}%
+ \crefname{subtable}{Tabel}{Tabellen}%
+ \crefname{page}{Pagina}{Pagina's}%
\crefname{part}{Deel}{Delen}%
\crefname{chapter}{Hoofdstuk}{Hoofdstukken}%
\crefname{section}{Paragraaf}{Paragrafen}%
\crefname{appendix}{Appendix}{Appendices}%
\crefname{enumi}{Punt}{Punten}%
\crefname{footnote}{Voetnote}{Voetnoten}%
- \crefname{figure}{Fig.}{Fig's.}%
- \crefname{table}{Tabel}{Tabellen}%
\crefname{theorem}{Theorema}{Theorema's}%
\crefname{lemma}{Lemma}{Lemma's}%
\crefname{corollary}{Corollarium}{Corollaria}%
@@ -7083,16 +8593,26 @@
\crefname{algorithm}{Algoritme}{Algoritmen}%
\crefname{listing}{Listing}{Listings}%
\crefname{line}{Lijn}{Lijnen}%
- \else%
- \crefname{equation}{verg.}{verg's.}%
+ %
+ \else% capitalise unset
+ \if@cref@abbrev%
+ \crefname{equation}{verg.}{verg's.}%
+ \crefname{figure}{fig.}{fig's.}%
+ \crefname{subfigure}{fig.}{fig's.}%
+ \else%
+ \crefname{equation}{vergel\ij{}king}{vergel\ij{}kingen}%
+ \crefname{figure}{figuur}{figuren}%
+ \crefname{subfigure}{figuur}{figuren}%
+ \fi%
+ \crefname{table}{tabel}{tabellen}%
+ \crefname{subtable}{tabel}{tabellen}%
+ \crefname{page}{pagina}{pagina's}%
\crefname{part}{deel}{delen}%
\crefname{chapter}{hoofdstuk}{hoofdstukken}%
\crefname{section}{paragraaf}{paragrafen}%
\crefname{appendix}{appendix}{appendices}%
\crefname{enumi}{punt}{punten}%
\crefname{footnote}{voetnote}{voetnoten}%
- \crefname{figure}{fig.}{fig's.}%
- \crefname{table}{tabel}{tabellen}%
\crefname{theorem}{theorema}{theorema's}%
\crefname{lemma}{lemma}{lemma's}%
\crefname{corollary}{corollarium}{corollaria}%
@@ -7110,6 +8630,7 @@
% \end{macrocode}
%
%
+% \subsubsection{French}
% \begin{macro}{french}
% French translations attempted by the package author (please report
% any corrections that might be needed!).
@@ -7136,15 +8657,17 @@
\def\crefpairgroupconjunction@preamble{ et\nobreakspace}%
\def\crefmiddlegroupconjunction@preamble{, }%
\def\creflastgroupconjunction@preamble{, et\nobreakspace}%
+ %
\Crefname@preamble{equation}{{\'E}quation}{{\'E}quations}%
+ \Crefname@preamble{figure}{Figure}{Figures}%
+ \Crefname@preamble{table}{Tableau}{Tableaux}%
+ \Crefname@preamble{page}{Page}{Pages}%
\Crefname@preamble{part}{Partie}{Parties}%
\Crefname@preamble{chapter}{Chapitre}{Chapitres}%
\Crefname@preamble{section}{Section}{Sections}%
\Crefname@preamble{appendix}{Annexe}{Annexes}%
\Crefname@preamble{enumi}{Point}{Points}%
\Crefname@preamble{footnote}{Note}{Notes}%
- \Crefname@preamble{figure}{Figure}{Figures}%
- \Crefname@preamble{table}{Tableau}{Tableaux}%
\Crefname@preamble{theorem}{Th\'eor\`eme}{Th\'eor\`emes}%
\Crefname@preamble{lemma}{Lemme}{Lemmes}%
\Crefname@preamble{corollary}{Corollaire}{Corollaires}%
@@ -7156,16 +8679,18 @@
\Crefname@preamble{algorithm}{Algorithme}{Algorithmes}%
\Crefname@preamble{listing}{Liste}{Listes}%
\Crefname@preamble{line}{Ligne}{Lignes}%
- \if@cref@capitalise%
+ %
+ \if@cref@capitalise% capitalise set
\crefname@preamble{equation}{{\'E}quation}{{\'E}quations}%
+ \crefname@preamble{figure}{Figure}{Figures}%
+ \crefname@preamble{table}{Tableau}{Tableaux}%
+ \crefname@preamble{page}{Page}{Pages}%
\crefname@preamble{part}{Partie}{Parties}%
\crefname@preamble{chapter}{Chapitre}{Chapitres}%
\crefname@preamble{section}{Section}{Sections}%
\crefname@preamble{appendix}{Annexe}{Annexes}%
\crefname@preamble{enumi}{Point}{Points}%
\crefname@preamble{footnote}{Note}{Notes}%
- \crefname@preamble{figure}{Figure}{Figures}%
- \crefname@preamble{table}{Tableau}{Tableaux}%
\crefname@preamble{theorem}{Th\'eor\`eme}{Th\'eor\`emes}%
\crefname@preamble{lemma}{Lemme}{Lemmes}%
\crefname@preamble{corollary}{Corollaire}{Corollaires}%
@@ -7178,16 +8703,18 @@
\crefname@preamble{algorithm}{Algorithme}{Algorithmes}%
\crefname@preamble{listing}{Liste}{Listes}%
\crefname@preamble{line}{Ligne}{Lignes}%
- \else%
+ %
+ \else% capitalise unset
\crefname@preamble{equation}{{\'e}quation}{{\'e}quations}%
+ \crefname@preamble{figure}{figure}{figures}%
+ \crefname@preamble{table}{tableau}{tableaux}%
+ \crefname@preamble{page}{page}{pages}%
\crefname@preamble{part}{partie}{parties}%
\crefname@preamble{chapter}{chapitre}{chapitres}%
\crefname@preamble{section}{section}{sections}%
\crefname@preamble{appendix}{annexe}{annexes}%
\crefname@preamble{enumi}{point}{points}%
\crefname@preamble{footnote}{note}{notes}%
- \crefname@preamble{figure}{figure}{figures}%
- \crefname@preamble{table}{tableau}{tableaux}%
\crefname@preamble{theorem}{th\'eor\`eme}{th\'eor\`emes}%
\crefname@preamble{lemma}{lemme}{lemmes}%
\crefname@preamble{corollary}{corollaire}{corollaires}%
@@ -7204,7 +8731,7 @@
\def\cref@language{french}%
% \end{macrocode}
%
-% Next, we add the definitions to \cmd{\extras}\dots so that
+% Next, we add the definitions to \cmd{\extras}\dots{} so that
% \package{babel}'s \cmd{\selectlanguage} command will change the format
% appropriately.
% \begin{macrocode}
@@ -7218,7 +8745,13 @@
\renewcommand{\crefpairgroupconjunction}{ et\nobreakspace}%
\renewcommand{\crefmiddlegroupconjunction}{, }%
\renewcommand{\creflastgroupconjunction}{ et\nobreakspace}%
+ %
\Crefname{equation}{{\'E}quation}{{\'E}quations}%
+ \Crefname{figure}{Figure}{Figures}%
+ \Crefname{subfigure}{Figure}{Figures}%
+ \Crefname{table}{Tableau}{Tableaux}%
+ \Crefname{subtable}{Tableau}{Tableaux}%
+ \Crefname{page}{Page}{Pages}%
\Crefname{part}{Partie}{Parties}%
\Crefname{chapter}{Chapitre}{Chapitres}%
\Crefname{section}{Section}{Sections}%
@@ -7234,10 +8767,6 @@
\Crefname{enumiv}{Point}{Points}%
\Crefname{enumv}{Point}{Points}%
\Crefname{footnote}{Note}{Notes}%
- \Crefname{figure}{Figure}{Figures}%
- \Crefname{subfigure}{Figure}{Figures}%
- \Crefname{table}{Tableau}{Tableaux}%
- \Crefname{subtable}{Tableau}{Tableaux}%
\Crefname{theorem}{Th\'eor\`eme}{Th\'eor\`emes}%
\Crefname{lemma}{Lemme}{Lemmes}%
\Crefname{corollary}{Corollaire}{Corollaires}%
@@ -7250,8 +8779,14 @@
\Crefname{algorithm}{Algorithme}{Algorithmes}%
\Crefname{listing}{Liste}{Listes}%
\Crefname{line}{Ligne}{Lignes}%
- \if@cref@capitalise%
+ %
+ \if@cref@capitalise% capitalise set
\crefname{equation}{{\'E}quation}{{\'E}quations}%
+ \crefname{figure}{Figure}{Figures}%
+ \crefname{subfigure}{Figure}{Figures}%
+ \crefname{table}{Tableau}{Tableaux}%
+ \crefname{subtable}{Tableau}{Tableaux}%
+ \crefname{page}{Page}{Pages}%
\crefname{part}{Partie}{Parties}%
\crefname{chapter}{Chapitre}{Chapitres}%
\crefname{section}{Section}{Sections}%
@@ -7267,10 +8802,6 @@
\crefname{enumiv}{Point}{Points}%
\crefname{enumv}{Point}{Points}%
\crefname{footnote}{Note}{Notes}%
- \crefname{figure}{Figure}{Figures}%
- \crefname{subfigure}{Figure}{Figures}%
- \crefname{table}{Tableau}{Tableaux}%
- \crefname{subtable}{Tableau}{Tableaux}%
\crefname{theorem}{Th\'eor\`eme}{Th\'eor\`emes}%
\crefname{lemma}{Lemme}{Lemmes}%
\crefname{corollary}{Corollaire}{Corollaires}%
@@ -7283,8 +8814,14 @@
\crefname{algorithm}{Algorithme}{Algorithmes}%
\crefname{listing}{Liste}{Listes}%
\crefname{line}{Ligne}{Lignes}%
- \else%
+ %
+ \else% capitalise unset
\crefname{equation}{{\'e}quation}{{\'e}quations}%
+ \crefname{figure}{figure}{figures}%
+ \crefname{subfigure}{figure}{figures}%
+ \crefname{table}{tableau}{tableaux}%
+ \crefname{subtable}{tableau}{tableaux}%
+ \crefname{page}{page}{pages}%
\crefname{part}{partie}{parties}%
\crefname{chapter}{chapitre}{chapitres}%
\crefname{section}{section}{sections}%
@@ -7300,10 +8837,6 @@
\crefname{enumiv}{point}{points}%
\crefname{enumv}{point}{points}%
\crefname{footnote}{note}{notes}%
- \crefname{figure}{figure}{figures}%
- \crefname{subfigure}{figure}{figures}%
- \crefname{table}{tableau}{tableaux}%
- \crefname{subtable}{tableau}{tableaux}%
\crefname{theorem}{th\'eor\`eme}{th\'eor\`emes}%
\crefname{lemma}{lemme}{lemmes}%
\crefname{corollary}{corollaire}{corollaires}%
@@ -7321,6 +8854,7 @@
% \end{macrocode}
%
%
+% \subsubsection{Spanish}
% \begin{macro}{spanish}
% Spanish translations generously contributed by Gonzalo Medina.
% \end{macro}
@@ -7341,15 +8875,17 @@
\def\crefpairgroupconjunction@preamble{ y\nobreakspace}%
\def\crefmiddlegroupconjunction@preamble{, }%
\def\creflastgroupconjunction@preamble{ y\nobreakspace}%
+ %
\Crefname@preamble{equation}{Ecuaci\'on}{Ecuaciones}%
+ \Crefname@preamble{figure}{Figura}{Figuras}%
+ \Crefname@preamble{table}{Cuadro}{Cuadros}%
+ \Crefname@preamble{page}{P\'agina}{P\'aginas}%
\Crefname@preamble{part}{Parte}{Partes}%
\Crefname@preamble{chapter}{Cap\'itulo}{Cap\'itulos}%
- \Crefname@preamble{section}{Secci\'on}{Secciones}%
+ \Crefname@preamble{section}{Apartado}{Apartados}%
\Crefname@preamble{appendix}{Ap\'endice}{Ap\'endices}%
\Crefname@preamble{enumi}{Punto}{Puntos}%
\Crefname@preamble{footnote}{Nota}{Notas}%
- \Crefname@preamble{figure}{Figura}{Figuras}%
- \Crefname@preamble{table}{Cuadro}{Cuadros}%
\Crefname@preamble{theorem}{Teorema}{Teoremas}%
\Crefname@preamble{lemma}{Lema}{Lemas}%
\Crefname@preamble{corollary}{Corolario}{Corolarios}%
@@ -7362,16 +8898,18 @@
\Crefname@preamble{algorithm}{Algoritmo}{Algoritmos}%
\Crefname@preamble{listing}{Listado}{Listados}%
\Crefname@preamble{line}{L\'inea}{L\'ineas}%
- \if@cref@capitalise%
+ %
+ \if@cref@capitalise% capitalise set
\crefname@preamble{equation}{Ecuaci\'on}{Ecuaciones}%
+ \crefname@preamble{figure}{Figura}{Figuras}%
+ \crefname@preamble{table}{Cuadro}{Cuadros}%
+ \crefname@preamble{page}{P\'agina}{P\'aginas}%
\crefname@preamble{part}{Parte}{Partes}%
\crefname@preamble{chapter}{Cap\'itulo}{Cap\'itulos}%
- \crefname@preamble{section}{Secci\'on}{Secciones}%
+ \crefname@preamble{section}{Apartado}{Apartados}%
\crefname@preamble{appendix}{Ap\'endice}{Ap\'endices}%
\crefname@preamble{enumi}{Punto}{Puntos}%
\crefname@preamble{footnote}{Nota}{Notas}%
- \crefname@preamble{figure}{Figura}{Figuras}%
- \crefname@preamble{table}{Cuadro}{Cuadros}%
\crefname@preamble{theorem}{Teorema}{Teoremas}%
\crefname@preamble{lemma}{Lema}{Lemas}%
\crefname@preamble{corollary}{Corolario}{Corolarios}%
@@ -7384,16 +8922,18 @@
\crefname@preamble{algorithm}{Algoritmo}{Algoritmos}%
\crefname@preamble{listing}{Listado}{Listados}%
\crefname@preamble{line}{L\'inea}{L\'ineas}%
- \else%
+ %
+ \else% capitalise unset
\crefname@preamble{equation}{ecuaci\'on}{ecuaciones}%
+ \crefname@preamble{figure}{figura}{figuras}%
+ \crefname@preamble{table}{cuadro}{cuadros}%
+ \crefname@preamble{page}{p\'agina}{p\'aginas}%
\crefname@preamble{part}{parte}{partes}%
\crefname@preamble{chapter}{cap\'itulo}{cap\'itulos}%
- \crefname@preamble{section}{secci\'on}{secciones}%
+ \crefname@preamble{section}{apartado}{apartados}%
\crefname@preamble{appendix}{ap\'endice}{ap\'endices}%
\crefname@preamble{enumi}{punto}{puntos}%
\crefname@preamble{footnote}{nota}{notas}%
- \crefname@preamble{figure}{figura}{figuras}%
- \crefname@preamble{table}{cuadro}{cuadros}%
\crefname@preamble{theorem}{teorema}{teoremas}%
\crefname@preamble{lemma}{lema}{lemas}%
\crefname@preamble{corollary}{corolario}{corolarios}%
@@ -7410,7 +8950,7 @@
\def\cref@language{spanish}%
% \end{macrocode}
%
-% Next, we add the definitions to \cmd{\extras}\dots so that
+% Next, we add the definitions to \cmd{\extras}\dots{} so that
% \package{babel}'s \cmd{\selectlanguage} command will change the format
% appropriately.
% \begin{macrocode}
@@ -7424,12 +8964,18 @@
\renewcommand{\crefpairgroupconjunction}{ y\nobreakspace}%
\renewcommand{\crefmiddlegroupconjunction}{, }%
\renewcommand{\creflastgroupconjunction}{ y\nobreakspace}%
+ %
\Crefname{equation}{Ecuaci\'on}{Ecuaciones}%
+ \Crefname{figure}{Figura}{Figuras}%
+ \Crefname{subfigure}{Figura}{Figuras}%
+ \Crefname{table}{Cuadro}{Cuadros}%
+ \Crefname{subtable}{Cuadro}{Cuadros}%
+ \Crefname{page}{P\'agina}{P\'aginas}%
\Crefname{part}{Parte}{Partes}%
\Crefname{chapter}{Cap\'itulo}{Cap\'itulos}%
- \Crefname{section}{Secci\'on}{Secciones}%
- \Crefname{subsection}{Secci\'on}{Secciones}%
- \Crefname{subsubsection}{Secci\'on}{Secciones}%
+ \Crefname{section}{Apartado}{Apartados}%
+ \Crefname{subsection}{Apartado}{Apartados}%
+ \Crefname{subsubsection}{Apartado}{Apartados}%
\Crefname{appendix}{Ap\'endice}{Ap\'endices}%
\Crefname{subappendix}{Ap\'endice}{Ap\'endices}%
\Crefname{subsubappendix}{Ap\'endice}{Ap\'endices}%
@@ -7440,10 +8986,6 @@
\Crefname{enumiv}{Punto}{Puntos}%
\Crefname{enumv}{Punto}{Puntos}%
\Crefname{footnote}{Nota}{Notas}%
- \Crefname{figure}{Figura}{Figuras}%
- \Crefname{subfigure}{Figura}{Figuras}%
- \Crefname{table}{Cuadro}{Cuadros}%
- \Crefname{subtable}{Cuadro}{Cuadros}%
\Crefname{theorem}{Teorema}{Teoremas}%
\Crefname{lemma}{Lema}{Lemas}%
\Crefname{corollary}{Corolario}{Corolarios}%
@@ -7456,13 +8998,19 @@
\Crefname{algorithm}{Algoritmo}{Algoritmos}%
\Crefname{listing}{Listado}{Listados}%
\Crefname{line}{L\'inea}{L\'ineas}%
- \if@cref@capitalise%
+ %
+ \if@cref@capitalise% capitalise set
\crefname{equation}{Ecuaci\'on}{Ecuaciones}%
+ \crefname{figure}{Figura}{Figuras}%
+ \crefname{subfigure}{Figura}{Figuras}%
+ \crefname{table}{Cuadro}{Cuadros}%
+ \crefname{subtable}{Cuadro}{Cuadros}%
+ \crefname{page}{P\'agina}{P\'aginas}%
\crefname{part}{Parte}{Partes}%
\crefname{chapter}{Cap\'itulo}{Cap\'itulos}%
- \crefname{section}{Secci\'on}{Secciones}%
- \crefname{subsection}{Secci\'on}{Secciones}%
- \crefname{subsubsection}{Secci\'on}{Secciones}%
+ \crefname{section}{Apartado}{Apartados}%
+ \crefname{subsection}{Apartado}{Apartados}%
+ \crefname{subsubsection}{Apartado}{Apartados}%
\crefname{appendix}{Ap\'endice}{Ap\'endices}%
\crefname{subappendix}{Ap\'endice}{Ap\'endices}%
\crefname{subsubappendix}{Ap\'endice}{Ap\'endices}%
@@ -7473,10 +9021,6 @@
\crefname{enumiv}{Punto}{Puntos}%
\crefname{enumv}{Punto}{Puntos}%
\crefname{footnote}{Nota}{Notas}%
- \crefname{figure}{Figura}{Figuras}%
- \crefname{subfigure}{Figura}{Figuras}%
- \crefname{table}{Cuadro}{Cuadros}%
- \crefname{subtable}{Cuadro}{Cuadros}%
\crefname{theorem}{Teorema}{Teoremas}%
\crefname{lemma}{Lema}{Lemas}%
\crefname{corollary}{Corolario}{Corolarios}%
@@ -7489,13 +9033,19 @@
\crefname{algorithm}{Algoritmo}{Algoritmos}%
\crefname{listing}{Listado}{Listados}%
\crefname{line}{L\'inea}{L\'ineas}%
- \else%
+ %
+ \else% capitalise unset
\crefname{equation}{ecuaci\'on}{ecuaciones}%
+ \crefname{figure}{figura}{figuras}%
+ \crefname{subfigure}{figura}{figuras}%
+ \crefname{table}{cuadro}{cuadros}%
+ \crefname{subtable}{cuadro}{cuadros}%
+ \crefname{page}{p\'agina}{p\'aginas}%
\crefname{part}{parte}{partes}%
\crefname{chapter}{cap\'itulo}{cap\'itulos}%
- \crefname{section}{secci\'on}{secciones}%
- \crefname{subsection}{secci\'on}{secciones}%
- \crefname{subsubsection}{secci\'on}{secciones}%
+ \crefname{section}{apartado}{apartados}%
+ \crefname{subsection}{apartado}{apartados}%
+ \crefname{subsubsection}{apartado}{apartados}%
\crefname{appendix}{ap\'endice}{ap\'endices}%
\crefname{subappendix}{ap\'endice}{ap\'endices}%
\crefname{subsubappendix}{ap\'endice}{ap\'endices}%
@@ -7506,10 +9056,6 @@
\crefname{enumiv}{punto}{puntos}%
\crefname{enumv}{punto}{puntos}%
\crefname{footnote}{nota}{notas}%
- \crefname{figure}{figura}{figuras}%
- \crefname{subfigure}{figura}{figuras}%
- \crefname{table}{cuadro}{cuadros}%
- \crefname{subtable}{cuadro}{cuadros}%
\crefname{theorem}{teorema}{teoremas}%
\crefname{lemma}{lema}{lemas}%
\crefname{corollary}{corolario}{corolarios}%
@@ -7527,6 +9073,7 @@
% \end{macrocode}
%
%
+% \subsubsection{Italian}
% \begin{macro}{italian}
% Italian translations kindly contributed by Massimo Redaelli.
% \end{macro}
@@ -7554,15 +9101,17 @@
\def\crefpairgroupconjunction@preamble{ e\nobreakspace}%
\def\crefmiddlegroupconjunction@preamble{, }%
\def\creflastgroupconjunction@preamble{ e\nobreakspace}%
+ %
\Crefname@preamble{equation}{Equazione}{Equazioni}%
+ \Crefname@preamble{figure}{Figura}{Figure}%
+ \Crefname@preamble{table}{Tabella}{Tabelle}%
+ \Crefname@preamble{page}{Pagina}{Pagine}%
\Crefname@preamble{part}{Parte}{Parti}%
\Crefname@preamble{chapter}{Capitolo}{Capitoli}%
\Crefname@preamble{section}{Sezione}{Sezioni}%
\Crefname@preamble{appendix}{Appendice}{Appendici}%
\Crefname@preamble{enumi}{Voce}{Voci}%
\Crefname@preamble{footnote}{Nota}{Note}%
- \Crefname@preamble{figure}{Figura}{Figure}%
- \Crefname@preamble{table}{Tabella}{Tabelle}%
\Crefname@preamble{theorem}{Teorema}{Teoremi}%
\Crefname@preamble{lemma}{Lemma}{Lemmi}%
\Crefname@preamble{corollary}{Corollario}{Corollari}%
@@ -7575,16 +9124,23 @@
\Crefname@preamble{algorithm}{Algoritmo}{Algoritmi}%
\Crefname@preamble{listing}{Elenco}{Elenchi}%
\Crefname@preamble{line}{Linea}{Linee}%
- \if@cref@capitalise%
- \crefname@preamble{equation}{Eq.}{Eq.}%
+ %
+ \if@cref@capitalise% capitalise set
+ \if@cref@abbrev%
+ \crefname@preamble{equation}{Eq.}{Eq.}%
+ \crefname@preamble{figure}{Fig.}{Fig.}%
+ \else%
+ \crefname@preamble{equation}{Equazione}{Equazioni}%
+ \crefname@preamble{figure}{Figura}{Figure}%
+ \fi%
+ \crefname@preamble{table}{Tabella}{Tabelle}%
+ \crefname@preamble{page}{Pagina}{Pagine}%
\crefname@preamble{part}{Parte}{Parti}%
\crefname@preamble{chapter}{Capitolo}{Capitoli}%
\crefname@preamble{section}{Sezione}{Sezioni}%
\crefname@preamble{appendix}{Appendice}{Appendici}%
\crefname@preamble{enumi}{Voce}{Voci}%
\crefname@preamble{footnote}{Nota}{Note}%
- \crefname@preamble{figure}{Fig.}{Fig.}%
- \crefname@preamble{table}{Tabella}{Tabelle}%
\crefname@preamble{theorem}{Teorema}{Teoremi}%
\crefname@preamble{lemma}{Lemma}{Lemmi}%
\crefname@preamble{corollary}{Corollario}{Corollari}%
@@ -7597,16 +9153,23 @@
\crefname@preamble{algorithm}{Algoritmo}{Algoritmi}%
\crefname@preamble{listing}{Elenco}{Elenchi}%
\crefname@preamble{line}{Linea}{Linee}%
- \else%
- \crefname@preamble{equation}{eq.}{eq.}%
+ %
+ \else% capitalise unset
+ \if@cref@abbrev%
+ \crefname@preamble{equation}{eq.}{eq.}%
+ \crefname@preamble{figure}{fig.}{fig.}%
+ \else%
+ \crefname@preamble{equation}{equazione}{equazioni}%
+ \crefname@preamble{figure}{figura}{figure}%
+ \fi%
+ \crefname@preamble{table}{tabella}{tabelle}%
+ \crefname@preamble{page}{pagina}{pagine}%
\crefname@preamble{part}{parte}{parti}%
\crefname@preamble{chapter}{capitolo}{capitoli}%
\crefname@preamble{section}{sezione}{sezioni}%
\crefname@preamble{appendix}{appendice}{appendici}%
\crefname@preamble{enumi}{voce}{voci}%
\crefname@preamble{footnote}{nota}{note}%
- \crefname@preamble{figure}{fig.}{fig.}%
- \crefname@preamble{table}{tabella}{tabelle}%
\crefname@preamble{theorem}{teorema}{teoremi}%
\crefname@preamble{lemma}{lemma}{lemmi}%
\crefname@preamble{corollary}{corollario}{corollari}%
@@ -7623,7 +9186,7 @@
\def\cref@language{italian}%
% \end{macrocode}
%
-% Next, we add the definitions to \cmd{\extras}\dots so that
+% Next, we add the definitions to \cmd{\extras}\dots{} so that
% \package{babel}'s \cmd{\selectlanguage} command will change the format
% appropriately.
% \begin{macrocode}
@@ -7637,7 +9200,13 @@
\renewcommand{\crefpairgroupconjunction}{ e\nobreakspace}%
\renewcommand{\crefmiddlegroupconjunction}{, }%
\renewcommand{\creflastgroupconjunction}{ e\nobreakspace}%
+ %
\Crefname{equation}{Equazione}{Equazioni}%
+ \Crefname{figure}{Figura}{Figure}%
+ \Crefname{subfigure}{Figura}{Figure}%
+ \Crefname{table}{Tabella}{Tabelle}%
+ \Crefname{subtable}{Tabella}{Tabelle}%
+ \Crefname{page}{Pagina}{Pagine}%
\Crefname{part}{Parte}{Parti}%
\Crefname{chapter}{Capitolo}{Capitoli}%
\Crefname{section}{Sezione}{Sezioni}%
@@ -7653,10 +9222,6 @@
\Crefname{enumiv}{Voce}{Voci}%
\Crefname{enumv}{Voce}{Voci}%
\Crefname{footnote}{Nota}{Note}%
- \Crefname{figure}{Figura}{Figure}%
- \Crefname{subfigure}{Figura}{Figure}%
- \Crefname{table}{Tabella}{Tabelle}%
- \Crefname{subtable}{Tabella}{Tabelle}%
\Crefname{theorem}{Teorema}{Teoremi}%
\Crefname{lemma}{Lemma}{Lemmi}%
\Crefname{corollary}{Corollario}{Corollari}%
@@ -7669,8 +9234,20 @@
\Crefname{algorithm}{Algoritmo}{Algoritmi}%
\Crefname{listing}{Elenco}{Elenchi}%
\Crefname{line}{Linea}{Linee}%
- \if@cref@capitalise%
- \crefname{equation}{Eq.}{Eq.}%
+ %
+ \if@cref@capitalise% capitalise set
+ \if@cref@abbrev%
+ \crefname{equation}{Eq.}{Eq.}%
+ \crefname{figure}{Fig.}{Fig.}%
+ \crefname{subfigure}{Fig.}{Fig.}%
+ \else%
+ \crefname{equation}{Equazione}{Equazioni}%
+ \crefname{figure}{Figura}{Figure}%
+ \crefname{figure}{Figura}{Figure}%
+ \fi%
+ \crefname{table}{Tabella}{Tabelle}%
+ \crefname{page}{Pagina}{Pagine}%
+ \crefname{subtable}{Tabella}{Tabelle}%
\crefname{part}{Parte}{Parti}%
\crefname{chapter}{Capitolo}{Capitoli}%
\crefname{section}{Sezione}{Sezioni}%
@@ -7686,10 +9263,6 @@
\crefname{enumiv}{Voce}{Voci}%
\crefname{enumv}{Voce}{Voci}%
\crefname{footnote}{Nota}{Note}%
- \crefname{figure}{Fig.}{Fig.}%
- \crefname{subfigure}{Fig.}{Fig.}%
- \crefname{table}{Tabella}{Tabelle}%
- \crefname{subtable}{Tabella}{Tabelle}%
\crefname{theorem}{Teorema}{Teoremi}%
\crefname{lemma}{Lemma}{Lemmi}%
\crefname{corollary}{Corollario}{Corollari}%
@@ -7702,8 +9275,20 @@
\crefname{algorithm}{Algoritmo}{Algoritmi}%
\crefname{listing}{Elenco}{Elenchi}%
\crefname{line}{Linea}{Linee}%
- \else%
- \crefname{equation}{eq.}{eq.}%
+ %
+ \else% capitalise unset
+ \if@cref@abbrev%
+ \crefname{equation}{eq.}{eq.}%
+ \crefname{figure}{fig.}{fig.}%
+ \crefname{subfigure}{fig.}{fig.}%
+ \else%
+ \crefname{equation}{equazione}{equazioni}%
+ \crefname{figure}{figura}{figure}%
+ \crefname{figure}{figura}{figure}%
+ \fi%
+ \crefname{table}{tabella}{tabelle}%
+ \crefname{page}{pagina}{pagine}%
+ \crefname{subtable}{tabella}{tabelle}%
\crefname{part}{parte}{parti}%
\crefname{chapter}{capitolo}{capitoli}%
\crefname{section}{sezione}{sezioni}%
@@ -7719,10 +9304,6 @@
\crefname{enumiv}{voce}{voci}%
\crefname{enumv}{voce}{voci}%
\crefname{footnote}{nota}{note}%
- \crefname{figure}{fig.}{fig.}%
- \crefname{subfigure}{fig.}{fig.}%
- \crefname{table}{tabella}{tabelle}%
- \crefname{subtable}{tabella}{tabelle}%
\crefname{theorem}{teorema}{teoremi}%
\crefname{lemma}{lemma}{lemmi}%
\crefname{corollary}{corollario}{corollari}%
@@ -7740,6 +9321,7 @@
% \end{macrocode}
%
%
+% \subsubsection{Russian}
% \begin{macro}{russian}
% Russian translations generously contributed by Aleksander Gorohovski.
% \end{macro}
@@ -7767,12 +9349,19 @@
\def\crefmiddlegroupconjunction@preamble{, }%
\def\creflastgroupconjunction@preamble%
{, \cyra\ \cyrt\cyra\cyrk\cyrzh\cyre\nobreakspace}%
- \Crefname@preamble{equation}%
+ %
+ \Crefname@preamble{equation}%
{\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyra}%
{\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyrery}%
- \Crefname@preamble{part}%
- {\CYRCH\cyra\cyrs\cyrt\cyrsftsn}%
- {\CYRCH\cyra\cyrs\cyrt\cyri}%
+ \Crefname@preamble{figure}%
+ {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}%
+ {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}%
+ \Crefname@preamble{table}%
+ {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyra}%
+ {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrery}%
+ \Crefname@preamble{enumi}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}%
\Crefname@preamble{chapter}%
{\CYRG\cyrl\cyra\cyrv\cyra}%
{\CYRG\cyrl\cyra\cyrv\cyrery}%
@@ -7782,18 +9371,9 @@
\Crefname@preamble{appendix}%
{\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}%
{\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}%
- \Crefname@preamble{enumi}%
- {\CYRP\cyru\cyrn\cyrk\cyrt}%
- {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}%
\Crefname@preamble{footnote}%
{\CYRS\cyrn\cyro\cyrs\cyrk\cyra}%
{\CYRS\cyrn\cyro\cyrs\cyrk\cyri}%
- \Crefname@preamble{figure}%
- {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}%
- {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}%
- \Crefname@preamble{table}%
- {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyra}%
- {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrery}%
\Crefname@preamble{theorem}%
{\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyra}%
{\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyrery}%
@@ -7830,13 +9410,41 @@
\Crefname@preamble{line}%
{\CYRS\cyrt\cyrr\cyro\cyrk\cyra}%
{\CYRS\cyrt\cyrr\cyro\cyrk\cyri}%
- \if@cref@capitalise%
- \crefname@preamble{equation}%
- {\CYRF-\cyrl.}%
- {\CYRF-\cyrl.}%
- \crefname@preamble{part}%
- {\CYRCH\cyra\cyrs\cyrt\cyrsftsn}%
- {\CYRCH\cyra\cyrs\cyrt\cyri}%
+ \Crefname@preamble{page}%
+ {\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra}%
+ {\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyrery}%
+ \Crefname@preamble{part}%
+ {\CYRCH\cyra\cyrs\cyrt\cyrsftsn}%
+ {\CYRCH\cyra\cyrs\cyrt\cyri}%
+ %
+ \if@cref@capitalise% capitalise set
+ \if@cref@abbrev% abbrev set
+ \crefname@preamble{equation}%
+ {\CYRF-\cyrl.}%
+ {\CYRF-\cyrl.}%
+ \crefname@preamble{figure}%
+ {\CYRR\cyri\cyrs.}%
+ {\CYRR\cyri\cyrs.}%
+ \crefname@preamble{table}%
+ {\CYRT\cyra\cyrb\cyrl.}%
+ {\CYRT\cyra\cyrb\cyrl.}%
+ \crefname@preamble{enumi}%
+ {\CYRP.}%
+ {\CYRP.\cyrp.}%
+ \else%
+ \crefname@preamble{equation}%
+ {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyra}%
+ {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyrery}%
+ \crefname@preamble{figure}%
+ {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}%
+ {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}%
+ \crefname@preamble{table}%
+ {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyra}%
+ {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrery}%
+ \crefname@preamble{enumi}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}%
+ \fi%
\crefname@preamble{chapter}%
{\CYRG\cyrl\cyra\cyrv\cyra}%
{\CYRG\cyrl\cyra\cyrv\cyrery}%
@@ -7846,16 +9454,9 @@
\crefname@preamble{appendix}%
{\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}%
{\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}%
- \crefname@preamble{enumi}{\CYRP.}{\CYRP.\cyrp.}%
\crefname@preamble{footnote}%
{\CYRS\cyrn\cyro\cyrs\cyrk\cyra}%
{\CYRS\cyrn\cyro\cyrs\cyrk\cyri}%
- \crefname@preamble{figure}%
- {\CYRR\cyri\cyrs.}%
- {\CYRR\cyri\cyrs.}%
- \crefname@preamble{table}%
- {\CYRT\cyra\cyrb\cyrl.}%
- {\CYRT\cyra\cyrb\cyrl.}%
\crefname@preamble{theorem}%
{\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyra}%
{\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyrery}%
@@ -7892,71 +9493,148 @@
\crefname@preamble{line}%
{\CYRS\cyrt\cyrr\cyro\cyrk\cyra}%
{\CYRS\cyrt\cyrr\cyro\cyrk\cyri}%
- \else%
- \crefname@preamble{equation}{\cyrf-\cyrl.}{\cyrf-\cyrl.}%
+ \crefname@preamble{page}%
+ {\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra}%
+ {\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyrery}%
+ \crefname@preamble{part}%
+ {\CYRCH\cyra\cyrs\cyrt\cyrsftsn}%
+ {\CYRCH\cyra\cyrs\cyrt\cyri}%
+ %
+ \else% capitalise unset
+ \if@cref@abbrev% abbrev set
+ \crefname@preamble{equation}%
+ {\cyrf-\cyrl.}%
+ {\cyrf-\cyrl.}%
+ \crefname@preamble{figure}%
+ {\cyrr\cyri\cyrs.}%
+ {\cyrr\cyri\cyrs.}%
+ \crefname@preamble{table}%
+ {\cyrt\cyra\cyrb\cyrl.}%
+ {\cyrt\cyra\cyrb\cyrl.}%
+ \crefname@preamble{enumi}%
+ {\cyrp.}%
+ {\cyrp.\cyrp.}%
+ \crefname@preamble{chapter}%
+ {\cyrg\cyrl\cyra\cyrv.}%
+ {\cyrg\cyrl\cyra\cyrv.}%
+ \crefname@preamble{section}%
+ {\cyrr\cyra\cyrz\cyrd.}%
+ {\cyrr\cyra\cyrz\cyrd\cyre\cyrl.}%
+ \crefname@preamble{appendix}%
+ {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}%
+ {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}%
+ \crefname@preamble{footnote}%
+ {\cyrs\cyrn\cyro\cyrs\cyrk.}%
+ {\cyrs\cyrn\cyro\cyrs\cyrk.}%
+ \crefname@preamble{theorem}%
+ {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}%
+ {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}%
+ \crefname@preamble{lemma}%
+ {\cyrl\cyre\cyrm\cyrm.}%
+ {\cyrl\cyre\cyrm\cyrm.}%
+ \crefname@preamble{corollary}%
+ {\cyrv\cyrery\cyrv\cyro\cyrd}%
+ {\cyrv\cyrery\cyrv\cyro\cyrd.}%
+ \crefname@preamble{proposition}%
+ {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd.}%
+ {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd.}%
+ \crefname@preamble{definition}%
+ {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn.}%
+ {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn.}%
+ \crefname@preamble{result}%
+ {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt.}%
+ {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt.}%
+ \crefname@preamble{example}%
+ {\cyrp\cyrr\cyri\cyrm.}%
+ {\cyrp\cyrr\cyri\cyrm\cyre\cyrr.}%
+ \crefname@preamble{remark}%
+ {\cyrp\cyrr\cyri\cyrm\cyre\cyrch.}%
+ {\cyrp\cyrr\cyri\cyrm\cyre\cyrch.}%
+ \crefname@preamble{note}%
+ {\cyrz\cyra\cyrm\cyre\cyrt\cyrk.}%
+ {\cyrz\cyra\cyrm\cyre\cyrt\cyrk.}%
+ \crefname@preamble{algorithm}%
+ {\cyra\cyrl\cyrg.}%
+ {\cyra\cyrl\cyrg.}%
+ \crefname@preamble{listing}%
+ {\cyrl\cyri\cyrs\cyrt\cyri\cyrn.}%
+ {\cyrl\cyri\cyrs\cyrt\cyri\cyrn\cyrg.}%
+ \crefname@preamble{line}%
+ {\cyrs\cyrt\cyrr\cyrk.}%
+ {\cyrs\cyrt\cyrr\cyrk.}%
+ \else% abbrev unset
+ \crefname@preamble{equation}%
+ {\cyrf\cyro\cyrr\cyrm\cyru\cyrl\cyra}%
+ {\cyrf\cyro\cyrr\cyrm\cyru\cyrl\cyrery}%
+ \crefname@preamble{figure}%
+ {\cyrr\cyri\cyrs\cyru\cyrn\cyro\cyrk}%
+ {\cyrr\cyri\cyrs\cyru\cyrn\cyrk\cyri}%
+ \crefname@preamble{table}%
+ {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyra}%
+ {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrery}%
+ \crefname@preamble{enumi}%
+ {\cyrp\cyru\cyrn\cyrk\cyrt}%
+ {\cyrp\cyru\cyrn\cyrk\cyrt\cyrery}%
+ \crefname@preamble{chapter}%
+ {\cyrg\cyrl\cyra\cyrv\cyra}%
+ {\cyrg\cyrl\cyra\cyrv\cyrery}%
+ \crefname@preamble{section}%
+ {\cyrr\cyra\cyrz\cyrd\cyre\cyrl}%
+ {\cyrr\cyra\cyrz\cyrd\cyre\cyrl\cyrery}%
+ \crefname@preamble{appendix}%
+ {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}%
+ {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}%
+ \crefname@preamble{footnote}%
+ {\cyrs\cyrn\cyro\cyrs\cyrk\cyra}%
+ {\cyrs\cyrn\cyro\cyrs\cyrk\cyri}%
+ \crefname@preamble{theorem}%
+ {\cyrt\cyre\cyro\cyrr\cyre\cyrm\cyra}%
+ {\cyrt\cyre\cyro\cyrr\cyre\cyrm\cyrery}%
+ \crefname@preamble{lemma}%
+ {\cyrl\cyre\cyrm\cyrm\cyra}%
+ {\cyrl\cyre\cyrm\cyrm\cyrery}%
+ \crefname@preamble{corollary}%
+ {\cyrv\cyrery\cyrv\cyro\cyrd}%
+ {\cyrv\cyrery\cyrv\cyro\cyrd\cyrery}%
+ \crefname@preamble{proposition}%
+ {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyre}%
+ {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyrya}%
+ \crefname@preamble{definition}%
+ {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyre}%
+ {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyrya}%
+ \crefname@preamble{result}%
+ {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}%
+ {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyrery}%
+ \crefname@preamble{example}%
+ {\cyrp\cyrr\cyri\cyrm\cyre\cyrr}%
+ {\cyrp\cyrr\cyri\cyrm\cyre\cyrr\cyrery}%
+ \crefname@preamble{remark}%
+ {\cyrp\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyre}%
+ {\cyrp\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyrya}%
+ \crefname@preamble{note}%
+ {\cyrz\cyra\cyrm\cyre\cyrt\cyrk\cyra}%
+ {\cyrz\cyra\cyrm\cyre\cyrt\cyrk\cyri}%
+ \crefname@preamble{algorithm}%
+ {\cyra\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}%
+ {\cyra\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyrery}%
+ \crefname@preamble{listing}%
+ {\cyrl\cyri\cyrs\cyrt\cyri\cyrn\cyrg}%
+ {\cyrl\cyri\cyrs\cyrt\cyri\cyrn\cyrg\cyri}%
+ \crefname@preamble{line}%
+ {\cyrs\cyrt\cyrr\cyro\cyrk\cyra}%
+ {\cyrs\cyrt\cyrr\cyro\cyrk\cyri}%
+ \fi%
+ \crefname@preamble{page}%
+ {\cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyre}%
+ {\cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra\cyrh}%
\crefname@preamble{part}%
{\cyrch\cyra\cyrs\cyrt\cyrsftsn}%
{\cyrch\cyra\cyrs\cyrt\cyri}%
- \crefname@preamble{chapter}%
- {\cyrg\cyrl\cyra\cyrv.}%
- {\cyrg\cyrl\cyra\cyrv.}%
- \crefname@preamble{section}%
- {\cyrr\cyra\cyrz\cyrd.}%
- {\cyrr\cyra\cyrz\cyrd\cyre\cyrl.}%
- \crefname@preamble{appendix}%
- {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}%
- {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}%
- \crefname@preamble{enumi}{\cyrp.}{\cyrp.\cyrp.}%
- \crefname@preamble{footnote}%
- {\cyrs\cyrn\cyro\cyrs\cyrk.}%
- {\cyrs\cyrn\cyro\cyrs\cyrk.}%
- \crefname@preamble{figure}%
- {\cyrr\cyri\cyrs.}%
- {\cyrr\cyri\cyrs.}%
- \crefname@preamble{table}%
- {\cyrt\cyra\cyrb\cyrl.}%
- {\cyrt\cyra\cyrb\cyrl.}%
- \crefname@preamble{theorem}%
- {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}%
- {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}%
- \crefname@preamble{lemma}%
- {\cyrl\cyre\cyrm\cyrm.}%
- {\cyrl\cyre\cyrm\cyrm.}%
- \crefname@preamble{corollary}%
- {\cyrv\cyrery\cyrv\cyro\cyrd}%
- {\cyrv\cyrery\cyrv\cyro\cyrd.}%
- \crefname@preamble{proposition}%
- {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd.}%
- {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd.}%
- \crefname@preamble{definition}%
- {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn.}%
- {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn.}%
- \crefname@preamble{result}%
- {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt.}%
- {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt.}%
- \crefname@preamble{example}%
- {\cyrp\cyrr\cyri\cyrm.}%
- {\cyrp\cyrr\cyri\cyrm\cyre\cyrr.}%
- \crefname@preamble{remark}%
- {\cyrp\cyrr\cyri\cyrm\cyre\cyrch.}%
- {\cyrp\cyrr\cyri\cyrm\cyre\cyrch.}%
- \crefname@preamble{note}%
- {\cyrz\cyra\cyrm\cyre\cyrt\cyrk.}%
- {\cyrz\cyra\cyrm\cyre\cyrt\cyrk.}%
- \crefname@preamble{algorithm}%
- {\cyra\cyrl\cyrg.}%
- {\cyra\cyrl\cyrg.}%
- \crefname@preamble{listing}%
- {\cyrl\cyri\cyrs\cyrt\cyri\cyrn.}%
- {\cyrl\cyri\cyrs\cyrt\cyri\cyrn\cyrg.}%
- \crefname@preamble{line}%
- {\cyrs\cyrt\cyrr\cyrk.}%
- {\cyrs\cyrt\cyrr\cyrk.}%
\fi%
\def\cref@language{russian}%
% \end{macrocode}
%
-% Next, we add the definitions to \cmd{\extras}\dots so that
+% Next, we add the definitions to \cmd{\extras}\dots{} so that
% \package{babel}'s \cmd{\selectlanguage} command will change the format
% appropriately.
% \begin{macrocode}
@@ -7971,9 +9649,25 @@
\renewcommand{\crefmiddlegroupconjunction}{, }%
\renewcommand{\creflastgroupconjunction}%
{, \cyra\ \cyrt\cyra\cyrk\cyrzh\cyre\nobreakspace}%
+ %
+ \Crefname{page}%
+ {\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra}%
+ {\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyrery}%
\Crefname{equation}%
{\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyra}%
{\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyrery}%
+ \Crefname{figure}%
+ {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}%
+ {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}%
+ \Crefname{subfigure}%
+ {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}%
+ {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}%
+ \Crefname{table}%
+ {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyra}%
+ {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrery}%
+ \Crefname{subtable}%
+ {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyra}%
+ {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrery}%
\Crefname{part}%
{\CYRCH\cyra\cyrs\cyrt\cyrsftsn}%
{\CYRCH\cyra\cyrs\cyrt\cyri}%
@@ -8019,18 +9713,6 @@
\Crefname{footnote}%
{\CYRS\cyrn\cyro\cyrs\cyrk\cyra}%
{\CYRS\cyrn\cyro\cyrs\cyrk\cyri}%
- \Crefname{figure}%
- {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}%
- {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}%
- \Crefname{subfigure}%
- {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}%
- {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}%
- \Crefname{table}%
- {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyra}%
- {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrery}%
- \Crefname{subtable}%
- {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyra}%
- {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrery}%
\Crefname{theorem}%
{\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyra}%
{\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyrery}%
@@ -8067,8 +9749,74 @@
\Crefname{line}%
{\CYRS\cyrt\cyrr\cyro\cyrk\cyra}%
{\CYRS\cyrt\cyrr\cyro\cyrk\cyri}%
- \if@cref@capitalise%
- \crefname{equation}{\CYRF-\cyrl.}{\CYRF-\cyrl.}%
+ %
+ \if@cref@capitalise% capitalise set
+ \if@cref@abbrev% abbrev set
+ \crefname{equation}%
+ {\CYRF-\cyrl.}%
+ {\CYRF-\cyrl.}%
+ \crefname{figure}%
+ {\CYRR\cyri\cyrs.}%
+ {\CYRR\cyri\cyrs.}%
+ \crefname{subfigure}%
+ {\CYRR\cyri\cyrs.}%
+ {\CYRR\cyri\cyrs.}%
+ \crefname{table}%
+ {\CYRT\cyra\cyrb\cyrl.}%
+ {\CYRT\cyra\cyrb\cyrl.}%
+ \crefname{subtable}%
+ {\CYRT\cyra\cyrb\cyrl.}%
+ {\CYRT\cyra\cyrb\cyrl.}%
+ \crefname{enumi}%
+ {\CYRP.}%
+ {\CYRP.\cyrp.}%
+ \crefname{enumii}%
+ {\CYRP.}%
+ {\CYRP.\cyrp.}%
+ \crefname{enumiii}%
+ {\CYRP.}%
+ {\CYRP.\cyrp.}%
+ \crefname{enumiv}%
+ {\CYRP.}%
+ {\CYRP.\cyrp.}%
+ \crefname{enumv}%
+ {\CYRP.}%
+ {\CYRP.\cyrp.}%
+ \else% abbrev unset
+ \crefname{equation}%
+ {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyra}%
+ {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyrery}%
+ \crefname{figure}%
+ {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}%
+ {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}%
+ \crefname{subfigure}%
+ {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}%
+ {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}%
+ \crefname{table}%
+ {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyra}%
+ {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrery}%
+ \crefname{subtable}%
+ {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyra}%
+ {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrery}%
+ \crefname{enumi}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}%
+ \crefname{enumii}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}%
+ \crefname{enumiii}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}%
+ \crefname{enumiv}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}%
+ \crefname{enumv}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}%
+ \fi%
+ \crefname{page}%
+ {\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra}%
+ {\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyrery}%
\crefname{part}%
{\CYRCH\cyra\cyrs\cyrt\cyrsftsn}%
{\CYRCH\cyra\cyrs\cyrt\cyri}%
@@ -8096,26 +9844,9 @@
\crefname{subsubsubappendix}%
{\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}%
{\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}%
- \crefname{enumi}{\CYRP.}{\CYRP.\cyrp.}%
- \crefname{enumii}{\CYRP.}{\CYRP.\cyrp.}%
- \crefname{enumiii}{\CYRP.}{\CYRP.\cyrp.}%
- \crefname{enumiv}{\CYRP.}{\CYRP.\cyrp.}%
- \crefname{enumv}{\CYRP.}{\CYRP.\cyrp.}%
\crefname{footnote}%
{\CYRS\cyrn\cyro\cyrs\cyrk\cyra}%
{\CYRS\cyrn\cyro\cyrs\cyrk\cyri}%
- \crefname{figure}%
- {\CYRR\cyri\cyrs.}%
- {\CYRR\cyri\cyrs.}%
- \crefname{subfigure}%
- {\CYRR\cyri\cyrs.}%
- {\CYRR\cyri\cyrs.}%
- \crefname{table}%
- {\CYRT\cyra\cyrb\cyrl.}%
- {\CYRT\cyra\cyrb\cyrl.}%
- \crefname{subtable}%
- {\CYRT\cyra\cyrb\cyrl.}%
- {\CYRT\cyra\cyrb\cyrl.}%
\crefname{theorem}%
{\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyra}%
{\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyrery}%
@@ -8152,96 +9883,209 @@
\crefname{line}%
{\CYRS\cyrt\cyrr\cyro\cyrk\cyra}%
{\CYRS\cyrt\cyrr\cyro\cyrk\cyri}%
- \else%
- \crefname{equation}{\cyrf-\cyrl.}{\cyrf-\cyrl.}%
+ %
+ \else% capitalise unset
+ \if@cref@abbrev% abbrev set
+ \crefname{equation}%
+ {\cyrf-\cyrl.}%
+ {\cyrf-\cyrl.}%
+ \crefname{chapter}%
+ {\cyrg\cyrl\cyra\cyrv.}%
+ {\cyrg\cyrl\cyra\cyrv.}%
+ \crefname{section}%
+ {\cyrr\cyra\cyrz\cyrd.}%
+ {\cyrr\cyra\cyrz\cyrd\cyre\cyrl.}%
+ \crefname{subsection}%
+ {\cyrr\cyra\cyrz\cyrd.}%
+ {\cyrr\cyra\cyrz\cyrd\cyre\cyrl.}%
+ \crefname{subsubsection}%
+ {\cyrr\cyra\cyrz\cyrd.}%
+ {\cyrr\cyra\cyrz\cyrd\cyre\cyrl.}%
+ \crefname{appendix}%
+ {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}%
+ {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}%
+ \crefname{subappendix}%
+ {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}%
+ {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}%
+ \crefname{subsubappendix}%
+ {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}%
+ {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}%
+ \crefname{subsubsubappendix}%
+ {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}%
+ {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}%
+ \crefname{enumi}%
+ {\cyrp.}%
+ {\cyrp.\cyrp.}%
+ \crefname{enumii}%
+ {\cyrp.}%
+ {\cyrp.\cyrp.}%
+ \crefname{enumiii}%
+ {\cyrp.}%
+ {\cyrp.\cyrp.}%
+ \crefname{enumiv}%
+ {\cyrp.}%
+ {\cyrp.\cyrp.}%
+ \crefname{enumv}%
+ {\cyrp.}%
+ {\cyrp.\cyrp.}%
+ \crefname{footnote}%
+ {\cyrs\cyrn\cyro\cyrs\cyrk.}%
+ {\cyrs\cyrn\cyro\cyrs\cyrk.}%
+ \crefname{figure}%
+ {\cyrr\cyri\cyrs.}%
+ {\cyrr\cyri\cyrs.}%
+ \crefname{subfigure}%
+ {\cyrr\cyri\cyrs.}%
+ {\cyrr\cyri\cyrs.}%
+ \crefname{table}%
+ {\cyrt\cyra\cyrb\cyrl.}%
+ {\cyrt\cyra\cyrb\cyrl.}%
+ \crefname{subtable}%
+ {\cyrt\cyra\cyrb\cyrl.}%
+ {\cyrt\cyra\cyrb\cyrl.}%
+ \crefname{theorem}%
+ {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}%
+ {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}%
+ \crefname{lemma}%
+ {\cyrl\cyre\cyrm\cyrm.}%
+ {\cyrl\cyre\cyrm\cyrm.}%
+ \crefname{corollary}%
+ {\cyrv\cyrery\cyrv\cyro\cyrd}%
+ {\cyrv\cyrery\cyrv\cyro\cyrd.}%
+ \crefname{proposition}%
+ {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd.}%
+ {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd.}%
+ \crefname{definition}%
+ {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn.}%
+ {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn.}%
+ \crefname{result}%
+ {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt.}%
+ {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt.}%
+ \crefname{example}%
+ {\cyrp\cyrr\cyri\cyrm.}%
+ {\cyrp\cyrr\cyri\cyrm\cyre\cyrr.}%
+ \crefname{remark}%
+ {\cyrp\cyrr\cyri\cyrm\cyre\cyrch.}%
+ {\cyrp\cyrr\cyri\cyrm\cyre\cyrch.}%
+ \crefname{note}%
+ {\cyrz\cyra\cyrm\cyre\cyrt\cyrk.}%
+ {\cyrz\cyra\cyrm\cyre\cyrt\cyrk.}%
+ \crefname{algorithm}%
+ {\cyra\cyrl\cyrg.}%
+ {\cyra\cyrl\cyrg.}%
+ \crefname{listing}%
+ {\cyrl\cyri\cyrs\cyrt\cyri\cyrn.}%
+ {\cyrl\cyri\cyrs\cyrt\cyri\cyrn\cyrg.}%
+ \crefname{line}%
+ {\cyrs\cyrt\cyrr\cyrk.}%
+ {\cyrs\cyrt\cyrr\cyrk.}%
+ \else% abbrev unset
+ \crefname{equation}%
+ {\cyrf\cyro\cyrr\cyrm\cyru\cyrl\cyra}%
+ {\cyrf\cyro\cyrr\cyrm\cyru\cyrl\cyrery}%
+ \crefname{figure}%
+ {\cyrr\cyri\cyrs\cyru\cyrn\cyro\cyrk}%
+ {\cyrr\cyri\cyrs\cyru\cyrn\cyrk\cyri}%
+ \crefname{subfigure}%
+ {\cyrr\cyri\cyrs\cyru\cyrn\cyro\cyrk}%
+ {\cyrr\cyri\cyrs\cyru\cyrn\cyrk\cyri}%
+ \crefname{table}%
+ {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyra}%
+ {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrery}%
+ \crefname{subtable}%
+ {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyra}%
+ {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrery}%
+ \crefname{enumi}%
+ {\cyrp\cyru\cyrn\cyrk\cyrt}%
+ {\cyrp\cyru\cyrn\cyrk\cyrt\cyrery}%
+ \crefname{enumii}%
+ {\cyrp\cyru\cyrn\cyrk\cyrt}%
+ {\cyrp\cyru\cyrn\cyrk\cyrt\cyrery}%
+ \crefname{enumiii}%
+ {\cyrp\cyru\cyrn\cyrk\cyrt}%
+ {\cyrp\cyru\cyrn\cyrk\cyrt\cyrery}%
+ \crefname{enumiv}%
+ {\cyrp\cyru\cyrn\cyrk\cyrt}%
+ {\cyrp\cyru\cyrn\cyrk\cyrt\cyrery}%
+ \crefname{enumv}%
+ {\cyrp\cyru\cyrn\cyrk\cyrt}%
+ {\cyrp\cyru\cyrn\cyrk\cyrt\cyrery}%
+ \crefname{chapter}%
+ {\cyrg\cyrl\cyra\cyrv\cyra}%
+ {\cyrg\cyrl\cyra\cyrv\cyrery}%
+ \crefname{section}%
+ {\cyrr\cyra\cyrz\cyrd\cyre\cyrl}%
+ {\cyrr\cyra\cyrz\cyrd\cyre\cyrl\cyrery}%
+ \crefname{subsection}%
+ {\cyrr\cyra\cyrz\cyrd\cyre\cyrl}%
+ {\cyrr\cyra\cyrz\cyrd\cyre\cyrl\cyrery}%
+ \crefname{subsubsection}%
+ {\cyrr\cyra\cyrz\cyrd\cyre\cyrl}%
+ {\cyrr\cyra\cyrz\cyrd\cyre\cyrl\cyrery}%
+ \crefname{appendix}%
+ {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}%
+ {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}%
+ \crefname{subappendix}%
+ {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}%
+ {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}%
+ \crefname{subsubappendix}%
+ {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}%
+ {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}%
+ \crefname{subsubsubappendix}%
+ {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}%
+ {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}%
+ \crefname{footnote}%
+ {\cyrs\cyrn\cyro\cyrs\cyrk\cyra}%
+ {\cyrs\cyrn\cyro\cyrs\cyrk\cyri}%
+ \crefname{theorem}%
+ {\cyrt\cyre\cyro\cyrr\cyre\cyrm\cyra}%
+ {\cyrt\cyre\cyro\cyrr\cyre\cyrm\cyrery}%
+ \crefname{lemma}%
+ {\cyrl\cyre\cyrm\cyrm\cyra}%
+ {\cyrl\cyre\cyrm\cyrm\cyrery}%
+ \crefname{corollary}%
+ {\cyrv\cyrery\cyrv\cyro\cyrd}%
+ {\cyrv\cyrery\cyrv\cyro\cyrd\cyrery}%
+ \crefname{proposition}%
+ {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyre}%
+ {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyrya}%
+ \crefname{definition}%
+ {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyre}%
+ {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyrya}%
+ \crefname{result}%
+ {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}%
+ {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyrery}%
+ \crefname{example}%
+ {\cyrp\cyrr\cyri\cyrm\cyre\cyrr}%
+ {\cyrp\cyrr\cyri\cyrm\cyre\cyrr\cyrery}%
+ \crefname{remark}%
+ {\cyrp\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyre}%
+ {\cyrp\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyrya}%
+ \crefname{note}%
+ {\cyrz\cyra\cyrm\cyre\cyrt\cyrk\cyra}%
+ {\cyrz\cyra\cyrm\cyre\cyrt\cyrk\cyri}%
+ \crefname{algorithm}%
+ {\cyra\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}%
+ {\cyra\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyrery}%
+ \crefname{listing}%
+ {\cyrl\cyri\cyrs\cyrt\cyri\cyrn\cyrg}%
+ {\cyrl\cyri\cyrs\cyrt\cyri\cyrn\cyrg\cyri}%
+ \crefname{line}%
+ {\cyrs\cyrt\cyrr\cyro\cyrk\cyra}%
+ {\cyrs\cyrt\cyrr\cyro\cyrk\cyri}%
+ \fi%
+ \crefname{page}%
+ {\cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyre}%
+ {\cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra\cyrh}%
\crefname{part}%
{\cyrch\cyra\cyrs\cyrt\cyrsftsn}%
{\cyrch\cyra\cyrs\cyrt\cyri}%
- \crefname{chapter}%
- {\cyrg\cyrl\cyra\cyrv.}%
- {\cyrg\cyrl\cyra\cyrv.}%
- \crefname{section}%
- {\cyrr\cyra\cyrz\cyrd.}%
- {\cyrr\cyra\cyrz\cyrd\cyre\cyrl.}%
- \crefname{subsection}%
- {\cyrr\cyra\cyrz\cyrd.}%
- {\cyrr\cyra\cyrz\cyrd\cyre\cyrl.}%
- \crefname{subsubsection}%
- {\cyrr\cyra\cyrz\cyrd.}%
- {\cyrr\cyra\cyrz\cyrd\cyre\cyrl.}%
- \crefname{appendix}%
- {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}%
- {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}%
- \crefname{subappendix}%
- {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}%
- {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}%
- \crefname{subsubappendix}%
- {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}%
- {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}%
- \crefname{subsubsubappendix}%
- {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}%
- {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}%
- \crefname{enumi}{\cyrp.}{\cyrp.\cyrp.}%
- \crefname{enumii}{\cyrp.}{\cyrp.\cyrp.}%
- \crefname{enumiii}{\cyrp.}{\cyrp.\cyrp.}%
- \crefname{enumiv}{\cyrp.}{\cyrp.\cyrp.}%
- \crefname{enumv}{\cyrp.}{\cyrp.\cyrp.}%
- \crefname{footnote}%
- {\cyrs\cyrn\cyro\cyrs\cyrk.}%
- {\cyrs\cyrn\cyro\cyrs\cyrk.}%
- \crefname{figure}%
- {\cyrr\cyri\cyrs.}%
- {\cyrr\cyri\cyrs.}%
- \crefname{subfigure}%
- {\cyrr\cyri\cyrs.}%
- {\cyrr\cyri\cyrs.}%
- \crefname{table}%
- {\cyrt\cyra\cyrb\cyrl.}%
- {\cyrt\cyra\cyrb\cyrl.}%
- \crefname{subtable}%
- {\cyrt\cyra\cyrb\cyrl.}%
- {\cyrt\cyra\cyrb\cyrl.}%
- \crefname{theorem}%
- {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}%
- {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}%
- \crefname{lemma}%
- {\cyrl\cyre\cyrm\cyrm.}%
- {\cyrl\cyre\cyrm\cyrm.}%
- \crefname{corollary}%
- {\cyrv\cyrery\cyrv\cyro\cyrd}%
- {\cyrv\cyrery\cyrv\cyro\cyrd.}%
- \crefname{proposition}%
- {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd.}%
- {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd.}%
- \crefname{definition}%
- {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn.}%
- {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn.}%
- \crefname{result}%
- {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt.}%
- {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt.}%
- \crefname{example}%
- {\cyrp\cyrr\cyri\cyrm.}%
- {\cyrp\cyrr\cyri\cyrm\cyre\cyrr.}%
- \crefname{remark}%
- {\cyrp\cyrr\cyri\cyrm\cyre\cyrch.}%
- {\cyrp\cyrr\cyri\cyrm\cyre\cyrch.}%
- \crefname{note}%
- {\cyrz\cyra\cyrm\cyre\cyrt\cyrk.}%
- {\cyrz\cyra\cyrm\cyre\cyrt\cyrk.}%
- \crefname{algorithm}%
- {\cyra\cyrl\cyrg.}%
- {\cyra\cyrl\cyrg.}%
- \crefname{listing}%
- {\cyrl\cyri\cyrs\cyrt\cyri\cyrn.}%
- {\cyrl\cyri\cyrs\cyrt\cyri\cyrn\cyrg.}%
- \crefname{line}%
- {\cyrs\cyrt\cyrr\cyrk.}%
- {\cyrs\cyrt\cyrr\cyrk.}%
\fi%
}}}
% \end{macrocode}
%
%
+% \subsubsection{Ukrainian}
% \begin{macro}{ukrainian}
% Ukrainian translations courtesy of Aleksander Gorohovski.
% \end{macro}
@@ -8269,12 +10113,19 @@
\def\crefmiddlegroupconjunction@preamble{, }%
\def\creflastgroupconjunction@preamble%
{, \cyra\ \cyrt\cyra\cyrk\cyro\cyrzh\nobreakspace}%
+ %
\Crefname@preamble{equation}%
{\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyra}%
{\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyri}%
- \Crefname@preamble{part}%
- {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyra}%
- {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyri}%
+ \Crefname@preamble{figure}%
+ {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}%
+ {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}%
+ \Crefname@preamble{table}%
+ {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrya}%
+ {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrii}%
+ \Crefname@preamble{enumi}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}%
\Crefname@preamble{chapter}%
{\CYRG\cyrl\cyra\cyrv\cyra}%
{\CYRG\cyrl\cyra\cyrv\cyri}%
@@ -8284,18 +10135,9 @@
\Crefname@preamble{appendix}%
{\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}%
{\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}%
- \Crefname@preamble{enumi}%
- {\CYRP\cyru\cyrn\cyrk\cyrt}%
- {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}%
\Crefname@preamble{footnote}%
{\CYRV\cyri\cyrn\cyro\cyrs\cyrk\cyra}%
{\CYRV\cyri\cyrn\cyro\cyrs\cyrk\cyri}%
- \Crefname@preamble{figure}%
- {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}%
- {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}%
- \Crefname@preamble{table}%
- {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrya}%
- {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrii}%
\Crefname@preamble{theorem}%
{\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyra}%
{\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyri}%
@@ -8332,11 +10174,41 @@
\Crefname@preamble{line}%
{\CYRS\cyrt\cyrr\cyro\cyrk\cyra}%
{\CYRS\cyrt\cyrr\cyro\cyrk\cyri}%
- \if@cref@capitalise%
- \crefname@preamble{equation}{\CYRF-\cyrl.}{\CYRF-\cyrl.}%
- \crefname@preamble{part}%
- {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyra}%
- {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyri}%
+ \Crefname@preamble{page}%
+ {\CYRS\cyrt\cyro\cyrr\cyri\cyrn\cyrk\cyra}%
+ {\CYRS\cyrt\cyro\cyrr\cyrii\cyrn\cyrk\cyri}%
+ \Crefname@preamble{part}%
+ {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyra}%
+ {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyri}%
+ %
+ \if@cref@capitalise% capitalise set
+ \if@cref@abbrev% abbrev set
+ \crefname@preamble{equation}%
+ {\CYRF-\cyrl.}%
+ {\CYRF-\cyrl.}%
+ \crefname@preamble{figure}%
+ {\CYRR\cyri\cyrs.}%
+ {\CYRR\cyri\cyrs.}%
+ \crefname@preamble{table}%
+ {\CYRT\cyra\cyrb\cyrl.}%
+ {\CYRT\cyra\cyrb\cyrl.}%
+ \crefname@preamble{enumi}%
+ {\CYRP.}%
+ {\CYRP.\cyrp.}%
+ \else%
+ \crefname@preamble{equation}%
+ {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyra}%
+ {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyri}%
+ \crefname@preamble{figure}%
+ {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}%
+ {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}%
+ \crefname@preamble{table}%
+ {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrya}%
+ {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrii}%
+ \crefname@preamble{enumi}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}%
+ \fi%
\crefname@preamble{chapter}%
{\CYRG\cyrl\cyra\cyrv\cyra}%
{\CYRG\cyrl\cyra\cyrv\cyri}%
@@ -8346,16 +10218,9 @@
\crefname@preamble{appendix}%
{\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}%
{\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}%
- \crefname@preamble{enumi}{\CYRP.}{\CYRP.\cyrp.}%
\crefname@preamble{footnote}%
{\CYRV\cyri\cyrn\cyro\cyrs\cyrk\cyra}%
{\CYRV\cyri\cyrn\cyro\cyrs\cyrk\cyri}%
- \crefname@preamble{figure}%
- {\CYRR\cyri\cyrs.}%
- {\CYRR\cyri\cyrs.}%
- \crefname@preamble{table}%
- {\CYRT\cyra\cyrb\cyrl.}%
- {\CYRT\cyra\cyrb\cyrl.}%
\crefname@preamble{theorem}%
{\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyra}%
{\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyri}%
@@ -8392,71 +10257,148 @@
\crefname@preamble{line}%
{\CYRS\cyrt\cyrr\cyro\cyrk\cyra}%
{\CYRS\cyrt\cyrr\cyro\cyrk\cyri}%
- \else%
- \crefname@preamble{equation}{\cyrf-\cyrl.}{\cyrf-\cyrl.}%
+ \crefname@preamble{page}%
+ {\CYRS\cyrt\cyro\cyrr\cyri\cyrn\cyrk\cyra}%
+ {\CYRS\cyrt\cyro\cyrr\cyrii\cyrn\cyrk\cyri}%
+ \crefname@preamble{part}%
+ {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyra}%
+ {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyri}%
+ %
+ \else% capitalise unset
+ \if@cref@abbrev% abbrev set
+ \crefname@preamble{equation}%
+ {\cyrf-\cyrl.}%
+ {\cyrf-\cyrl.}%
+ \crefname@preamble{figure}%
+ {\cyrr\cyri\cyrs.}%
+ {\cyrr\cyri\cyrs.}%
+ \crefname@preamble{table}%
+ {\cyrt\cyra\cyrb\cyrl.}%
+ {\cyrt\cyra\cyrb\cyrl.}%
+ \crefname@preamble{enumi}%
+ {\cyrp.}%
+ {\cyrp.\cyrp.}%
+ \crefname@preamble{chapter}%
+ {\cyrg\cyrl\cyra\cyrv.}%
+ {\cyrg\cyrl\cyra\cyrv.}%
+ \crefname@preamble{section}%
+ {\cyrr\cyro\cyrz\cyrd.}%
+ {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl.}%
+ \crefname@preamble{appendix}%
+ {\cyrd\cyro\cyrd\cyra\cyrt.}%
+ {\cyrd\cyro\cyrd\cyra\cyrt\cyrk.}%
+ \crefname@preamble{footnote}%
+ {\cyrv\cyri\cyrn\cyro\cyrs\cyrk.}%
+ {\cyrv\cyri\cyrn\cyro\cyrs\cyrk.}%
+ \crefname@preamble{theorem}%
+ {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}%
+ {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}%
+ \crefname@preamble{lemma}%
+ {\cyrl\cyre\cyrm\cyrm.}%
+ {\cyrl\cyre\cyrm\cyrm.}%
+ \crefname@preamble{corollary}%
+ {\cyrv\cyri\cyrs\cyrn\cyro\cyrv.}%
+ {\cyrv\cyri\cyrs\cyrn\cyro\cyrv\cyrk.}%
+ \crefname@preamble{proposition}%
+ {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn.}%
+ {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn.}%
+ \crefname@preamble{definition}%
+ {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn.}%
+ {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn.}%
+ \crefname@preamble{result}%
+ {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt.}%
+ {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt.}%
+ \crefname@preamble{example}%
+ {\cyrp\cyrr\cyri\cyrk\cyrl.}%
+ {\cyrp\cyrr\cyri\cyrk\cyrl\cyra\cyrd.}%
+ \crefname@preamble{remark}%
+ {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt.}%
+ {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt.}%
+ \crefname@preamble{note}%
+ {\cyrz\cyra\cyrm\cyrii\cyrt.}%
+ {\cyrz\cyra\cyrm\cyrii\cyrt.}%
+ \crefname@preamble{algorithm}%
+ {\cyra\cyrl\cyrg.}%
+ {\cyra\cyrl\cyrg.}%
+ \crefname@preamble{listing}%
+ {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn.}%
+ {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn\cyrg.}%
+ \crefname@preamble{line}%
+ {\cyrs\cyrt\cyrr\cyrk.}%
+ {\cyrs\cyrt\cyrr\cyrk.}%
+ \else% abbrev unset
+ \crefname@preamble{equation}%
+ {\cyrf\cyro\cyrr\cyrm\cyru\cyrl\cyra}%
+ {\cyrf\cyro\cyrr\cyrm\cyru\cyrl\cyri}%
+ \crefname@preamble{figure}%
+ {\cyrr\cyri\cyrs\cyru\cyrn\cyro\cyrk}%
+ {\cyrr\cyri\cyrs\cyru\cyrn\cyrk\cyri}%
+ \crefname@preamble{table}%
+ {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrya}%
+ {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrii}%
+ \crefname@preamble{enumi}%
+ {\cyrp\cyru\cyrn\cyrk\cyrt}%
+ {\cyrp\cyru\cyrn\cyrk\cyrt\cyri}%
+ \crefname@preamble{chapter}%
+ {\cyrg\cyrl\cyra\cyrv\cyra}%
+ {\cyrg\cyrl\cyra\cyrv\cyri}%
+ \crefname@preamble{section}%
+ {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl}%
+ {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl\cyri}%
+ \crefname@preamble{appendix}%
+ {\cyrd\cyro\cyrd\cyra\cyrt\cyro\cyrk}%
+ {\cyrd\cyro\cyrd\cyra\cyrt\cyrk\cyri}%
+ \crefname@preamble{footnote}%
+ {\cyrv\cyri\cyrn\cyro\cyrs\cyrk\cyra}%
+ {\cyrv\cyri\cyrn\cyro\cyrs\cyrk\cyri}%
+ \crefname@preamble{theorem}%
+ {\cyrt\cyre\cyro\cyrr\cyre\cyrm\cyra}%
+ {\cyrt\cyre\cyro\cyrr\cyre\cyrm\cyri}%
+ \crefname@preamble{lemma}%
+ {\cyrl\cyre\cyrm\cyrm\cyra}%
+ {\cyrl\cyre\cyrm\cyrm\cyri}%
+ \crefname@preamble{corollary}%
+ {\cyrv\cyri\cyrs\cyrn\cyro\cyrv\cyro\cyrk}%
+ {\cyrv\cyri\cyrs\cyrn\cyro\cyrv\cyrk\cyri}%
+ \crefname@preamble{proposition}%
+ {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}%
+ {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}%
+ \crefname@preamble{definition}%
+ {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}%
+ {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}%
+ \crefname@preamble{result}%
+ {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}%
+ {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyri}%
+ \crefname@preamble{example}%
+ {\cyrp\cyrr\cyri\cyrk\cyrl\cyra\cyrd}%
+ {\cyrp\cyrr\cyri\cyrk\cyrl\cyra\cyrd\cyri}%
+ \crefname@preamble{remark}%
+ {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyra}%
+ {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyri}%
+ \crefname@preamble{note}%
+ {\cyrz\cyra\cyrm\cyrii\cyrt\cyrk\cyra}%
+ {\cyrz\cyra\cyrm\cyrii\cyrt\cyrk\cyri}%
+ \crefname@preamble{algorithm}%
+ {\cyra\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}%
+ {\cyra\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyri}%
+ \crefname@preamble{listing}%
+ {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn\cyrg}%
+ {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn\cyrg\cyri}%
+ \crefname@preamble{line}%
+ {\cyrs\cyrt\cyrr\cyro\cyrk\cyra}%
+ {\cyrs\cyrt\cyrr\cyro\cyrk\cyri}%
+ \fi%
+ \crefname@preamble{page}%
+ {\cyrs\cyrt\cyro\cyrr\cyri\cyrn\cyrc\cyrii}%
+ {\cyrs\cyrt\cyro\cyrr\cyrii\cyrn\cyrk\cyra\cyrh}%
\crefname@preamble{part}%
{\cyrch\cyra\cyrs\cyrt\cyri\cyrn\cyra}%
{\cyrch\cyra\cyrs\cyrt\cyri\cyrn\cyri}%
- \crefname@preamble{chapter}%
- {\cyrg\cyrl\cyra\cyrv.}%
- {\cyrg\cyrl\cyra\cyrv.}%
- \crefname@preamble{section}%
- {\cyrr\cyro\cyrz\cyrd.}%
- {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl.}%
- \crefname@preamble{appendix}%
- {\cyrd\cyro\cyrd\cyra\cyrt.}%
- {\cyrd\cyro\cyrd\cyra\cyrt\cyrk.}%
- \crefname@preamble{enumi}{\cyrp.}{\cyrp.\cyrp.}%
- \crefname@preamble{footnote}%
- {\cyrv\cyri\cyrn\cyro\cyrs\cyrk.}%
- {\cyrv\cyri\cyrn\cyro\cyrs\cyrk.}%
- \crefname@preamble{figure}%
- {\cyrr\cyri\cyrs.}%
- {\cyrr\cyri\cyrs.}%
- \crefname@preamble{table}%
- {\cyrt\cyra\cyrb\cyrl.}%
- {\cyrt\cyra\cyrb\cyrl.}%
- \crefname@preamble{theorem}%
- {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}%
- {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}%
- \crefname@preamble{lemma}%
- {\cyrl\cyre\cyrm\cyrm.}%
- {\cyrl\cyre\cyrm\cyrm.}%
- \crefname@preamble{corollary}%
- {\cyrv\cyri\cyrs\cyrn\cyro\cyrv.}%
- {\cyrv\cyri\cyrs\cyrn\cyro\cyrv\cyrk.}%
- \crefname@preamble{proposition}%
- {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn.}%
- {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn.}%
- \crefname@preamble{definition}%
- {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn.}%
- {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn.}%
- \crefname@preamble{result}%
- {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt.}%
- {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt.}%
- \crefname@preamble{example}%
- {\cyrp\cyrr\cyri\cyrk\cyrl.}%
- {\cyrp\cyrr\cyri\cyrk\cyrl\cyra\cyrd.}%
- \crefname@preamble{remark}%
- {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt.}%
- {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt.}%
- \crefname@preamble{note}%
- {\cyrz\cyra\cyrm\cyrii\cyrt.}%
- {\cyrz\cyra\cyrm\cyrii\cyrt.}%
- \crefname@preamble{algorithm}%
- {\cyra\cyrl\cyrg.}%
- {\cyra\cyrl\cyrg.}%
- \crefname@preamble{listing}%
- {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn.}%
- {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn\cyrg.}%
- \crefname@preamble{line}%
- {\cyrs\cyrt\cyrr\cyrk.}%
- {\cyrs\cyrt\cyrr\cyrk.}%
\fi%
\def\cref@language{ukrainian}%
% \end{macrocode}
%
-% Next, we add the definitions to \cmd{\extras}\dots so that
+% Next, we add the definitions to \cmd{\extras}\dots{} so that
% \package{babel}'s \cmd{\selectlanguage} command will change the format
% appropriately.
% \begin{macrocode}
@@ -8467,16 +10409,42 @@
\renewcommand{\crefpairconjunction}{ \cyrii\nobreakspace}%
\renewcommand{\crefmiddleconjunction}{, }%
\renewcommand{\creflastconjunction}{ \cyrii\nobreakspace}%
- \renewcommand{\crefpairgroupconjunction}{ \cyrt\cyra\nobreakspace}%
+ \renewcommand{\crefpairgroupconjunction}%
+ { \cyrt\cyra\nobreakspace}%
\renewcommand{\crefmiddlegroupconjunction}{, }%
\renewcommand{\creflastgroupconjunction}%
{, \cyra\ \cyrt\cyra\cyrk\cyro\cyrzh\nobreakspace}%
- \Crefname{equation}%
+ %
+ \Crefname{equation}%
{\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyra}%
{\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyri}%
- \Crefname{part}%
- {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyra}%
- {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyri}%
+ \Crefname{figure}%
+ {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}%
+ {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}%
+ \Crefname{subfigure}%
+ {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}%
+ {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}%
+ \Crefname{table}%
+ {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrya}%
+ {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrii}%
+ \Crefname{subtable}%
+ {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrya}%
+ {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrii}%
+ \Crefname{enumi}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}%
+ \Crefname{enumii}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}%
+ \Crefname{enumiii}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}%
+ \Crefname{enumiv}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}%
+ \Crefname{enumv}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}%
\Crefname{chapter}%
{\CYRG\cyrl\cyra\cyrv\cyra}%
{\CYRG\cyrl\cyra\cyrv\cyri}%
@@ -8501,36 +10469,9 @@
\Crefname{subsubsubappendix}%
{\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}%
{\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}%
- \Crefname{enumi}%
- {\CYRP\cyru\cyrn\cyrk\cyrt}%
- {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}%
- \Crefname{enumii}%
- {\CYRP\cyru\cyrn\cyrk\cyrt}%
- {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}%
- \Crefname{enumiii}%
- {\CYRP\cyru\cyrn\cyrk\cyrt}%
- {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}%
- \Crefname{enumiv}%
- {\CYRP\cyru\cyrn\cyrk\cyrt}%
- {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}%
- \Crefname{enumv}%
- {\CYRP\cyru\cyrn\cyrk\cyrt}%
- {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}%
\Crefname{footnote}%
{\CYRV\cyri\cyrn\cyro\cyrs\cyrk\cyra}%
{\CYRV\cyri\cyrn\cyro\cyrs\cyrk\cyri}%
- \Crefname{figure}%
- {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}%
- {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}%
- \Crefname{subfigure}%
- {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}%
- {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}%
- \Crefname{table}%
- {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrya}%
- {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrii}%
- \Crefname{subtable}%
- {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrya}%
- {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrii}%
\Crefname{theorem}%
{\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyra}%
{\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyri}%
@@ -8567,11 +10508,77 @@
\Crefname{line}%
{\CYRS\cyrt\cyrr\cyro\cyrk\cyra}%
{\CYRS\cyrt\cyrr\cyro\cyrk\cyri}%
- \if@cref@capitalise%
- \crefname{equation}{\CYRF-\cyrl.}{\CYRF-\cyrl.}%
- \crefname{part}%
- {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyra}%
- {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyri}%
+ \Crefname{page}%
+ {\CYRS\cyrt\cyro\cyrr\cyri\cyrn\cyrk\cyra}%
+ {\CYRS\cyrt\cyro\cyrr\cyrii\cyrn\cyrk\cyri}%
+ \Crefname{part}%
+ {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyra}%
+ {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyri}%
+ %
+ \if@cref@capitalise% capitalise set
+ \if@cref@abbrev% abbrev set
+ \crefname{equation}%
+ {\CYRF-\cyrl.}%
+ {\CYRF-\cyrl.}%
+ \crefname{figure}%
+ {\CYRR\cyri\cyrs.}%
+ {\CYRR\cyri\cyrs.}%
+ \crefname{subfigure}%
+ {\CYRR\cyri\cyrs.}%
+ {\CYRR\cyri\cyrs.}%
+ \crefname{table}%
+ {\CYRT\cyra\cyrb\cyrl.}%
+ {\CYRT\cyra\cyrb\cyrl.}%
+ \crefname{subtable}%
+ {\CYRT\cyra\cyrb\cyrl.}%
+ {\CYRT\cyra\cyrb\cyrl.}%
+ \crefname{enumi}%
+ {\CYRP.}%
+ {\CYRP.\cyrp.}%
+ \crefname{enumii}%
+ {\CYRP.}%
+ {\CYRP.\cyrp.}%
+ \crefname{enumiii}%
+ {\CYRP.}%
+ {\CYRP.\cyrp.}%
+ \crefname{enumiv}%
+ {\CYRP.}%
+ {\CYRP.\cyrp.}%
+ \crefname{enumv}%
+ {\CYRP.}%
+ {\CYRP.\cyrp.}%
+ \else% abbrev unset
+ \crefname{equation}%
+ {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyra}%
+ {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyri}%
+ \crefname{figure}%
+ {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}%
+ {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}%
+ \crefname{subfigure}%
+ {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}%
+ {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}%
+ \crefname{table}%
+ {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrya}%
+ {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrii}%
+ \crefname{subtable}%
+ {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrya}%
+ {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrii}%
+ \crefname{enumi}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}%
+ \crefname{enumii}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}%
+ \crefname{enumiii}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}%
+ \crefname{enumiv}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}%
+ \crefname{enumv}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt}%
+ {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}%
+ \fi%
\crefname{chapter}%
{\CYRG\cyrl\cyra\cyrv\cyra}%
{\CYRG\cyrl\cyra\cyrv\cyri}%
@@ -8596,26 +10603,9 @@
\crefname{subsubsubappendix}%
{\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}%
{\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}%
- \crefname{enumi}{\CYRP.}{\CYRP.\cyrp.}%
- \crefname{enumii}{\CYRP.}{\CYRP.\cyrp.}%
- \crefname{enumiii}{\CYRP.}{\CYRP.\cyrp.}%
- \crefname{enumiv}{\CYRP.}{\CYRP.\cyrp.}%
- \crefname{enumv}{\CYRP.}{\CYRP.\cyrp.}%
\crefname{footnote}%
{\CYRV\cyri\cyrn\cyro\cyrs\cyrk\cyra}%
{\CYRV\cyri\cyrn\cyro\cyrs\cyrk\cyri}%
- \crefname{figure}%
- {\CYRR\cyri\cyrs.}%
- {\CYRR\cyri\cyrs.}%
- \crefname{subfigure}%
- {\CYRR\cyri\cyrs.}%
- {\CYRR\cyri\cyrs.}%
- \crefname{table}%
- {\CYRT\cyra\cyrb\cyrl.}%
- {\CYRT\cyra\cyrb\cyrl.}%
- \crefname{subtable}%
- {\CYRT\cyra\cyrb\cyrl.}%
- {\CYRT\cyra\cyrb\cyrl.}%
\crefname{theorem}%
{\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyra}%
{\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyri}%
@@ -8652,94 +10642,215 @@
\crefname{line}%
{\CYRS\cyrt\cyrr\cyro\cyrk\cyra}%
{\CYRS\cyrt\cyrr\cyro\cyrk\cyri}%
- \else%
- \crefname{equation}{\cyrf-\cyrl.}{\cyrf-\cyrl.}%
+ \crefname{page}%
+ {\CYRS\cyrt\cyro\cyrr\cyri\cyrn\cyrk\cyra}%
+ {\CYRS\cyrt\cyro\cyrr\cyrii\cyrn\cyrk\cyri}%
+ \crefname{part}%
+ {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyra}%
+ {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyri}%
+ %
+ \else% capitalise unset
+ \if@cref@abbrev% abbrev set
+ \crefname{equation}%
+ {\cyrf-\cyrl.}%
+ {\cyrf-\cyrl.}%
+ \crefname{chapter}%
+ {\cyrg\cyrl\cyra\cyrv.}%
+ {\cyrg\cyrl\cyra\cyrv.}%
+ \crefname{section}%
+ {\cyrr\cyro\cyrz\cyrd.}%
+ {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl.}%
+ \crefname{subsection}%
+ {\cyrr\cyro\cyrz\cyrd.}%
+ {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl.}%
+ \crefname{subsubsection}%
+ {\cyrr\cyro\cyrz\cyrd.}%
+ {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl.}%
+ \crefname{appendix}%
+ {\cyrd\cyro\cyrd\cyra\cyrt.}%
+ {\cyrd\cyro\cyrd\cyra\cyrt\cyrk.}%
+ \crefname{subappendix}%
+ {\cyrd\cyro\cyrd\cyra\cyrt.}%
+ {\cyrd\cyro\cyrd\cyra\cyrt\cyrk.}%
+ \crefname{subsubappendix}%
+ {\cyrd\cyro\cyrd\cyra\cyrt.}%
+ {\cyrd\cyro\cyrd\cyra\cyrt\cyrk.}%
+ \crefname{subsubsubappendix}%
+ {\cyrd\cyro\cyrd\cyra\cyrt.}%
+ {\cyrd\cyro\cyrd\cyra\cyrt\cyrk.}%
+ \crefname{enumi}%
+ {\cyrp.}%
+ {\cyrp.\cyrp.}%
+ \crefname{enumii}%
+ {\cyrp.}%
+ {\cyrp.\cyrp.}%
+ \crefname{enumiii}%
+ {\cyrp.}%
+ {\cyrp.\cyrp.}%
+ \crefname{enumiv}%
+ {\cyrp.}%
+ {\cyrp.\cyrp.}%
+ \crefname{enumv}%
+ {\cyrp.}%
+ {\cyrp.\cyrp.}%
+ \crefname{footnote}%
+ {\cyrv\cyri\cyrn\cyro\cyrs\cyrk.}%
+ {\cyrv\cyri\cyrn\cyro\cyrs\cyrk.}%
+ \crefname{figure}%
+ {\cyrr\cyri\cyrs.}%
+ {\cyrr\cyri\cyrs.}%
+ \crefname{subfigure}%
+ {\cyrr\cyri\cyrs.}%
+ {\cyrr\cyri\cyrs.}%
+ \crefname{table}%
+ {\cyrt\cyra\cyrb\cyrl.}%
+ {\cyrt\cyra\cyrb\cyrl.}%
+ \crefname{subtable}%
+ {\cyrt\cyra\cyrb\cyrl.}%
+ {\cyrt\cyra\cyrb\cyrl.}%
+ \crefname{theorem}%
+ {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}%
+ {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}%
+ \crefname{lemma}%
+ {\cyrl\cyre\cyrm\cyrm.}%
+ {\cyrl\cyre\cyrm\cyrm.}%
+ \crefname{corollary}%
+ {\cyrv\cyri\cyrs\cyrn\cyro\cyrv.}%
+ {\cyrv\cyri\cyrs\cyrn\cyro\cyrv\cyrk.}%
+ \crefname{proposition}%
+ {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn.}%
+ {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn.}%
+ \crefname{definition}%
+ {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn.}%
+ {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn.}%
+ \crefname{result}%
+ {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt.}%
+ {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt.}%
+ \crefname{example}%
+ {\cyrp\cyrr\cyri\cyrk\cyrl.}%
+ {\cyrp\cyrr\cyri\cyrk\cyrl\cyra\cyrd.}%
+ \crefname{remark}%
+ {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt.}%
+ {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt.}%
+ \crefname{note}%
+ {\cyrz\cyra\cyrm\cyrii\cyrt.}%
+ {\cyrz\cyra\cyrm\cyrii\cyrt.}%
+ \crefname{algorithm}%
+ {\cyra\cyrl\cyrg.}%
+ {\cyra\cyrl\cyrg.}%
+ \crefname{listing}%
+ {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn.}%
+ {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn\cyrg.}%
+ \crefname{line}%
+ {\cyrs\cyrt\cyrr\cyrk.}%
+ {\cyrs\cyrt\cyrr\cyrk.}%
+ \else% abbrev unset
+ \crefname{equation}%
+ {\cyrf\cyro\cyrr\cyrm\cyru\cyrl\cyra}%
+ {\cyrf\cyro\cyrr\cyrm\cyru\cyrl\cyri}%
+ \crefname{figure}%
+ {\cyrr\cyri\cyrs\cyru\cyrn\cyro\cyrk}%
+ {\cyrr\cyri\cyrs\cyru\cyrn\cyrk\cyri}%
+ \crefname{subfigure}%
+ {\cyrr\cyri\cyrs\cyru\cyrn\cyro\cyrk}%
+ {\cyrr\cyri\cyrs\cyru\cyrn\cyrk\cyri}%
+ \crefname{table}%
+ {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrya}%
+ {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrii}%
+ \crefname{subtable}%
+ {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrya}%
+ {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrii}%
+ \crefname{enumi}%
+ {\cyrp\cyru\cyrn\cyrk\cyrt}%
+ {\cyrp\cyru\cyrn\cyrk\cyrt\cyri}%
+ \crefname{enumii}%
+ {\cyrp\cyru\cyrn\cyrk\cyrt}%
+ {\cyrp\cyru\cyrn\cyrk\cyrt\cyri}%
+ \crefname{enumiii}%
+ {\cyrp\cyru\cyrn\cyrk\cyrt}%
+ {\cyrp\cyru\cyrn\cyrk\cyrt\cyri}%
+ \crefname{enumiv}%
+ {\cyrp\cyru\cyrn\cyrk\cyrt}%
+ {\cyrp\cyru\cyrn\cyrk\cyrt\cyri}%
+ \crefname{enumv}%
+ {\cyrp\cyru\cyrn\cyrk\cyrt}%
+ {\cyrp\cyru\cyrn\cyrk\cyrt\cyri}%
+ \crefname{chapter}%
+ {\cyrg\cyrl\cyra\cyrv\cyra}%
+ {\cyrg\cyrl\cyra\cyrv\cyri}%
+ \crefname{section}%
+ {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl}%
+ {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl\cyri}%
+ \crefname{subsection}%
+ {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl}%
+ {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl\cyri}%
+ \crefname{subsubsection}%
+ {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl}%
+ {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl\cyri}%
+ \crefname{appendix}%
+ {\cyrd\cyro\cyrd\cyra\cyrt\cyro\cyrk}%
+ {\cyrd\cyro\cyrd\cyra\cyrt\cyrk\cyri}%
+ \crefname{subappendix}%
+ {\cyrd\cyro\cyrd\cyra\cyrt\cyro\cyrk}%
+ {\cyrd\cyro\cyrd\cyra\cyrt\cyrk\cyri}%
+ \crefname{subsubappendix}%
+ {\cyrd\cyro\cyrd\cyra\cyrt\cyro\cyrk}%
+ {\cyrd\cyro\cyrd\cyra\cyrt\cyrk\cyri}%
+ \crefname{subsubsubappendix}%
+ {\cyrd\cyro\cyrd\cyra\cyrt\cyro\cyrk}%
+ {\cyrd\cyro\cyrd\cyra\cyrt\cyrk\cyri}%
+ \crefname{footnote}%
+ {\cyrv\cyri\cyrn\cyro\cyrs\cyrk\cyra}%
+ {\cyrv\cyri\cyrn\cyro\cyrs\cyrk\cyri}%
+ \crefname{theorem}%
+ {\cyrt\cyre\cyro\cyrr\cyre\cyrm\cyra}%
+ {\cyrt\cyre\cyro\cyrr\cyre\cyrm\cyri}%
+ \crefname{lemma}%
+ {\cyrl\cyre\cyrm\cyrm\cyra}%
+ {\cyrl\cyre\cyrm\cyrm\cyri}%
+ \crefname{corollary}%
+ {\cyrv\cyri\cyrs\cyrn\cyro\cyrv\cyro\cyrk}%
+ {\cyrv\cyri\cyrs\cyrn\cyro\cyrv\cyrk\cyri}%
+ \crefname{proposition}%
+ {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}%
+ {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}%
+ \crefname{definition}%
+ {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}%
+ {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}%
+ \crefname{result}%
+ {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}%
+ {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyri}%
+ \crefname{example}%
+ {\cyrp\cyrr\cyri\cyrk\cyrl\cyra\cyrd}%
+ {\cyrp\cyrr\cyri\cyrk\cyrl\cyra\cyrd\cyri}%
+ \crefname{remark}%
+ {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyra}%
+ {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyri}%
+ \crefname{note}%
+ {\cyrz\cyra\cyrm\cyrii\cyrt\cyrk\cyra}%
+ {\cyrz\cyra\cyrm\cyrii\cyrt\cyrk\cyri}%
+ \crefname{algorithm}%
+ {\cyra\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}%
+ {\cyra\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyri}%
+ \crefname{listing}%
+ {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn\cyrg}%
+ {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn\cyrg\cyri}%
+ \crefname{line}%
+ {\cyrs\cyrt\cyrr\cyro\cyrk\cyra}%
+ {\cyrs\cyrt\cyrr\cyro\cyrk\cyri}%
+ \fi%
+ \crefname{page}%
+ {\cyrs\cyrt\cyro\cyrr\cyri\cyrn\cyrc\cyrii}%
+ {\cyrs\cyrt\cyro\cyrr\cyrii\cyrn\cyrk\cyra\cyrh}%
\crefname{part}%
{\cyrch\cyra\cyrs\cyrt\cyri\cyrn\cyra}%
{\cyrch\cyra\cyrs\cyrt\cyri\cyrn\cyri}%
- \crefname{chapter}%
- {\cyrg\cyrl\cyra\cyrv.}%
- {\cyrg\cyrl\cyra\cyrv.}%
- \crefname{section}%
- {\cyrr\cyro\cyrz\cyrd.}%
- {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl.}%
- \crefname{subsection}%
- {\cyrr\cyro\cyrz\cyrd.}%
- {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl.}%
- \crefname{subsubsection}%
- {\cyrr\cyro\cyrz\cyrd.}%
- {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl.}%
- \crefname{appendix}%
- {\cyrd\cyro\cyrd\cyra\cyrt.}%
- {\cyrd\cyro\cyrd\cyra\cyrt\cyrk.}%
- \crefname{subappendix}%
- {\cyrd\cyro\cyrd\cyra\cyrt.}%
- {\cyrd\cyro\cyrd\cyra\cyrt\cyrk.}%
- \crefname{subsubappendix}%
- {\cyrd\cyro\cyrd\cyra\cyrt.}%
- {\cyrd\cyro\cyrd\cyra\cyrt\cyrk.}%
- \crefname{subsubsubappendix}%
- {\cyrd\cyro\cyrd\cyra\cyrt.}%
- {\cyrd\cyro\cyrd\cyra\cyrt\cyrk.}%
- \crefname{enumi}{\cyrp.}{\cyrp.\cyrp.}%
- \crefname{enumii}{\cyrp.}{\cyrp.\cyrp.}%
- \crefname{enumiii}{\cyrp.}{\cyrp.\cyrp.}%
- \crefname{enumiv}{\cyrp.}{\cyrp.\cyrp.}%
- \crefname{enumv}{\cyrp.}{\cyrp.\cyrp.}%
- \crefname{footnote}%
- {\cyrv\cyri\cyrn\cyro\cyrs\cyrk.}%
- {\cyrv\cyri\cyrn\cyro\cyrs\cyrk.}%
- \crefname{figure}%
- {\cyrr\cyri\cyrs.}%
- {\cyrr\cyri\cyrs.}%
- \crefname{subfigure}%
- {\cyrr\cyri\cyrs.}%
- {\cyrr\cyri\cyrs.}%
- \crefname{table}%
- {\cyrt\cyra\cyrb\cyrl.}%
- {\cyrt\cyra\cyrb\cyrl.}%
- \crefname{subtable}%
- {\cyrt\cyra\cyrb\cyrl.}%
- {\cyrt\cyra\cyrb\cyrl.}%
- \crefname{theorem}%
- {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}%
- {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}%
- \crefname{lemma}{\cyrl\cyre\cyrm\cyrm.}{\cyrl\cyre\cyrm\cyrm.}%
- \crefname{corollary}%
- {\cyrv\cyri\cyrs\cyrn\cyro\cyrv.}%
- {\cyrv\cyri\cyrs\cyrn\cyro\cyrv\cyrk.}%
- \crefname{proposition}%
- {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn.}%
- {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn.}%
- \crefname{definition}%
- {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn.}%
- {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn.}%
- \crefname{result}%
- {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt.}%
- {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt.}%
- \crefname{example}%
- {\cyrp\cyrr\cyri\cyrk\cyrl.}%
- {\cyrp\cyrr\cyri\cyrk\cyrl\cyra\cyrd.}%
- \crefname{remark}%
- {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt.}%
- {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt.}%
- \crefname{note}%
- {\cyrz\cyra\cyrm\cyrii\cyrt.}%
- {\cyrz\cyra\cyrm\cyrii\cyrt.}%
- \crefname{algorithm}%
- {\cyra\cyrl\cyrg.}%
- {\cyra\cyrl\cyrg.}%
- \crefname{listing}%
- {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn.}%
- {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn\cyrg.}%
- \crefname{line}%
- {\cyrs\cyrt\cyrr\cyrk.}%
- {\cyrs\cyrt\cyrr\cyrk.}%
\fi%
}}}
% \end{macrocode}
%
%
+% \subsubsection{Norsk}
% \begin{macro}{norsk}
% Norwegian translations kindly donated by Sveinung Heggen.
% \end{macro}
@@ -8766,15 +10877,17 @@
\def\crefpairgroupconjunction@preamble{ og\nobreakspace}%
\def\crefmiddlegroupconjunction@preamble{, }%
\def\creflastgroupconjunction@preamble{ og\nobreakspace}%
+ %
\Crefname@preamble{equation}{Likning}{Likningene}%
+ \Crefname@preamble{figure}{Figur}{Figurene}%
+ \Crefname@preamble{table}{Tabell}{Tabellene}%
+ \Crefname@preamble{page}{Side}{Siden}%
\Crefname@preamble{part}{Del}{Delene}%
\Crefname@preamble{chapter}{Kapittel}{Kapitlene}%
\Crefname@preamble{section}{Avsnitt}{Avsnittene}%
\Crefname@preamble{appendix}{Tillegg}{Tilleggene}%
\Crefname@preamble{enumi}{Punkt}{Punktene}%
\Crefname@preamble{footnote}{Fotnote}{Fotnotene}%
- \Crefname@preamble{figure}{Figur}{Figurene}%
- \Crefname@preamble{table}{Tabell}{Tabellene}%
\Crefname@preamble{theorem}{Teorem}{Teoremene}%
\Crefname@preamble{lemma}{Lemma}{Lemma}%
\Crefname@preamble{corollary}{Korollar}{Korollarene}%
@@ -8787,16 +10900,18 @@
\Crefname@preamble{algorithm}{Algoritme}{Algoritmene}%
\Crefname@preamble{listing}{Opplisting}{Opplistingene}%
\Crefname@preamble{line}{Linje}{Linjene}%
+ %
\if@cref@capitalise%
+ \crefname@preamble{page}{Side}{Siden}%
\crefname@preamble{equation}{Likning}{Likningene}%
+ \crefname@preamble{figure}{Figur}{Figurene}%
+ \crefname@preamble{table}{Tabell}{Tabellene}%
\crefname@preamble{part}{Del}{Delene}%
\crefname@preamble{chapter}{Kapittel}{Kapitlene}%
\crefname@preamble{section}{Avsnitt}{Avsnittene}%
\crefname@preamble{appendix}{Tillegg}{Tilleggene}%
\crefname@preamble{enumi}{Punkt}{Punktene}%
\crefname@preamble{footnote}{Fotnote}{Fotnotene}%
- \crefname@preamble{figure}{Figur}{Figurene}%
- \crefname@preamble{table}{Tabell}{Tabellene}%
\crefname@preamble{theorem}{Teorem}{Teoremene}%
\crefname@preamble{lemma}{Lemma}{Lemma}%
\crefname@preamble{corollary}{Korollar}{Korollarene}%
@@ -8809,16 +10924,18 @@
\crefname@preamble{algorithm}{Algoritme}{Algoritmene}%
\crefname@preamble{listing}{Opplisting}{Opplistingene}%
\crefname@preamble{line}{Linje}{Linjene}%
+ %
\else%
\crefname@preamble{equation}{likning}{likningene}%
+ \crefname@preamble{figure}{figur}{figurene}%
+ \crefname@preamble{table}{tabell}{tabeller}%
+ \crefname@preamble{page}{side}{siden}%
\crefname@preamble{part}{del}{delene}%
\crefname@preamble{chapter}{kapittel}{kapitlene}%
\crefname@preamble{section}{avsnitt}{avsnittene}%
\crefname@preamble{appendix}{tillegg}{tilleggene}%
\crefname@preamble{enumi}{punkt}{punktene}%
\crefname@preamble{footnote}{fotnote}{fotnotene}%
- \crefname@preamble{figure}{figur}{figurene}%
- \crefname@preamble{table}{tabell}{tabeller}%
\crefname@preamble{theorem}{teorem}{teoremene}%
\crefname@preamble{lemma}{lemma}{lemma}%
\crefname@preamble{corollary}{korollar}{korollarene}%
@@ -8835,7 +10952,7 @@
\def\cref@language{norsk}%
% \end{macrocode}
%
-% Next, we add the definitions to \cmd{\extras}\dots so that
+% Next, we add the definitions to \cmd{\extras}\dots{} so that
% \package{babel}'s \cmd{\selectlanguage} command will change the format
% appropriately.
% \begin{macrocode}
@@ -8849,7 +10966,13 @@
\renewcommand{\crefpairgroupconjunction}{ og\nobreakspace}%
\renewcommand{\crefmiddlegroupconjunction}{, }%
\renewcommand{\creflastgroupconjunction}{ og\nobreakspace}%
+ %
\Crefname{equation}{Likning}{Likningene}%
+ \Crefname{figure}{Figur}{Figurene}%
+ \Crefname{subfigure}{Figur}{Figurene}%
+ \Crefname{table}{Tabell}{Tabellene}%
+ \Crefname{subtable}{Tabell}{Tabellene}%
+ \Crefname{page}{Side}{Siden}%
\Crefname{part}{Del}{Delene}%
\Crefname{chapter}{Kapittel}{Kapitlene}%
\Crefname{section}{Avsnitt}{Avsnittene}%
@@ -8865,10 +10988,6 @@
\Crefname{enumiv}{Punkt}{Punktene}%
\Crefname{enumv}{Punkt}{Punktene}%
\Crefname{footnote}{Fotnote}{Fotnotene}%
- \Crefname{figure}{Figur}{Figurene}%
- \Crefname{subfigure}{Figur}{Figurene}%
- \Crefname{table}{Tabell}{Tabellene}%
- \Crefname{subtable}{Tabell}{Tabellene}%
\Crefname{theorem}{Teorem}{Teoremene}%
\Crefname{lemma}{Lemma}{Lemma}%
\Crefname{corollary}{Korollar}{Korollarene}%
@@ -8881,8 +11000,14 @@
\Crefname{algorithm}{Algoritme}{Algoritmene}%
\Crefname{listing}{Opplisting}{Opplistingene}%
\Crefname{line}{Linje}{Linjene}%
+ %
\if@cref@capitalise%
\crefname{equation}{Likning}{Likningene}%
+ \crefname{figure}{Figur}{Figurene}%
+ \crefname{subfigure}{Figur}{Figurene}%
+ \crefname{table}{Tabell}{Tabellene}%
+ \crefname{subtable}{Tabell}{Tabellene}%
+ \crefname{page}{Side}{Siden}%
\crefname{part}{Del}{Delene}%
\crefname{chapter}{Kapittel}{Kapitlene}%
\crefname{section}{Avsnitt}{Avsnittene}%
@@ -8898,10 +11023,6 @@
\crefname{enumiv}{Punkt}{Punktene}%
\crefname{enumv}{Punkt}{Punktene}%
\crefname{footnote}{Fotnote}{Fotnotene}%
- \crefname{figure}{Figur}{Figurene}%
- \crefname{subfigure}{Figur}{Figurene}%
- \crefname{table}{Tabell}{Tabellene}%
- \crefname{subtable}{Tabell}{Tabellene}%
\crefname{theorem}{Teorem}{Teoremene}%
\crefname{lemma}{Lemma}{Lemma}%
\crefname{corollary}{Korollar}{Korollarene}%
@@ -8914,8 +11035,14 @@
\crefname{algorithm}{Algoritme}{Algoritmene}%
\crefname{listing}{Opplisting}{Opplistingene}%
\crefname{line}{Linje}{Linjene}%
+ %
\else%
\crefname{equation}{likning}{likningene}%
+ \crefname{figure}{figur}{figurene}%
+ \crefname{subfigure}{figur}{figurene}%
+ \crefname{table}{tabell}{tabellene}%
+ \crefname{subtable}{tabell}{tabellene}%
+ \crefname{page}{side}{siden}%
\crefname{part}{del}{delene}%
\crefname{chapter}{kapittel}{kapitlene}%
\crefname{section}{avsnitt}{avsnittene}%
@@ -8931,10 +11058,6 @@
\crefname{enumiv}{punkt}{punktene}%
\crefname{enumv}{punkt}{punktene}%
\crefname{footnote}{fotnote}{fotnotene}%
- \crefname{figure}{figur}{figurene}%
- \crefname{subfigure}{figur}{figurene}%
- \crefname{table}{tabell}{tabellene}%
- \crefname{subtable}{tabell}{tabellene}%
\crefname{theorem}{teorem}{teoremene}%
\crefname{lemma}{lemma}{lemma}%
\crefname{corollary}{korollar}{korollarene}%
@@ -8952,6 +11075,7 @@
% \end{macrocode}
%
%
+% \subsubsection{Danish}
% \begin{macro}{danish}
% Danish translations courtesy of Benjamin H{\o}yer.
% \end{macro}
@@ -8978,15 +11102,17 @@
\def\crefpairgroupconjunction@preamble{ og\nobreakspace}%
\def\crefmiddlegroupconjunction@preamble{, }%
\def\creflastgroupconjunction@preamble{ og\nobreakspace}%
+ %
\Crefname@preamble{equation}{Ligning}{Ligninger}%
+ \Crefname@preamble{figure}{Figur}{Figurer}%
+ \Crefname@preamble{table}{Tabel}{Tabeller}%
+ \Crefname@preamble{page}{Side}{Sider}%
\Crefname@preamble{part}{Del}{Dele}%
\Crefname@preamble{chapter}{Kapitel}{Kapitler}%
\Crefname@preamble{section}{Afsnit}{Afsnit}%
\Crefname@preamble{appendix}{Appendiks}{Appendiks}%
\Crefname@preamble{enumi}{Punkt}{Punkter}%
\Crefname@preamble{footnote}{Fodnote}{Fodnoter}%
- \Crefname@preamble{figure}{Figur}{Figurer}%
- \Crefname@preamble{table}{Tabel}{Tabeller}%
\Crefname@preamble{theorem}{Teorem}{Teoremer}%
\Crefname@preamble{lemma}{Lemma}{Lemma}%
\Crefname@preamble{corollary}{F\o lgeslutning}{F\o lgeslutninger}%
@@ -8998,16 +11124,18 @@
\Crefname@preamble{note}{Note}{Noter}%
\Crefname@preamble{algorithm}{Algoritme}{Algoritmer}%
\Crefname@preamble{line}{Linje}{Linjer}%
+ %
\if@cref@capitalise%
\crefname@preamble{equation}{Ligning}{Ligninger}%
+ \crefname@preamble{figure}{Figur}{Figurer}%
+ \crefname@preamble{table}{Tabel}{Tabeller}%
+ \crefname@preamble{page}{Side}{Sider}%
\crefname@preamble{part}{Del}{Dele}%
\crefname@preamble{chapter}{Kapitel}{Kapitler}%
\crefname@preamble{section}{Afsnit}{Afsnit}%
\crefname@preamble{appendix}{Appendiks}{Appendiks}%
\crefname@preamble{enumi}{Punkt}{Punkter}%
\crefname@preamble{footnote}{Fodnote}{Fodnoter}%
- \crefname@preamble{figure}{Figur}{Figurer}%
- \crefname@preamble{table}{Tabel}{Tabeller}%
\crefname@preamble{theorem}{Teorem}{Teoremer}%
\crefname@preamble{lemma}{Lemma}{Lemma}%
\crefname@preamble{corollary}{F\o lgeslutning}{F\o lgeslutninger}%
@@ -9019,16 +11147,18 @@
\crefname@preamble{note}{Note}{Noter}%
\crefname@preamble{algorithm}{Algoritme}{Algoritmer}%
\crefname@preamble{line}{Linje}{Linjer}%
+ %
\else%
\crefname@preamble{equation}{ligning}{ligninger}%
+ \crefname@preamble{figure}{figur}{figurer}%
+ \crefname@preamble{table}{tabel}{tabeller}%
+ \crefname@preamble{page}{side}{sider}%
\crefname@preamble{part}{del}{dele}%
\crefname@preamble{chapter}{kapitel}{kapitler}%
\crefname@preamble{section}{afsnit}{afsnit}%
\crefname@preamble{appendix}{appendiks}{appendiks}%
\crefname@preamble{enumi}{punkt}{punkter}%
\crefname@preamble{footnote}{fodnote}{fodnoter}%
- \crefname@preamble{figure}{figur}{figurer}%
- \crefname@preamble{table}{tabel}{tabeller}%
\crefname@preamble{theorem}{teorem}{teoremer}%
\crefname@preamble{lemma}{lemma}{lemma}%
\crefname@preamble{corollary}{f\o lgeslutning}{f\o lgeslutninger}%
@@ -9044,7 +11174,7 @@
\def\cref@language{danish}%
% \end{macrocode}
%
-% Next, we add the definitions to \cmd{\extras}\dots so that
+% Next, we add the definitions to \cmd{\extras}\dots{} so that
% \package{babel}'s \cmd{\selectlanguage} command will change the format
% appropriately.
% \begin{macrocode}
@@ -9058,82 +11188,120 @@
\renewcommand{\crefpairgroupconjunction@preamble}{ og\nobreakspace}%
\renewcommand{\crefmiddlegroupconjunction@preamble}{, }%
\renewcommand{\creflastgroupconjunction@preamble}{ og\nobreakspace}%
- \Crefname@preamble{equation}{Ligning}{Ligninger}%
- \Crefname@preamble{part}{Del}{Dele}%
- \Crefname@preamble{chapter}{Kapitel}{Kapitler}%
- \Crefname@preamble{section}{Afsnit}{Afsnit}%
- \Crefname@preamble{appendix}{Appendiks}{Appendiks}%
- \Crefname@preamble{enumi}{Punkt}{Punkter}%
- \Crefname@preamble{footnote}{Fodnote}{Fodnoter}%
- \Crefname@preamble{figure}{Figur}{Figurer}%
- \Crefname@preamble{table}{Tabel}{Tabeller}%
- \Crefname@preamble{theorem}{Teorem}{Teoremer}%
- \Crefname@preamble{lemma}{Lemma}{Lemma}%
- \Crefname@preamble{corollary}{F\o lgeslutning}{F\o lgeslutninger}%
- \Crefname@preamble{proposition}{Udsagn}{Udsagn}%
- \Crefname@preamble{definition}{Definition}{Definitioner}%
- \Crefname@preamble{result}{Resultat}{Resultater}%
- \Crefname@preamble{example}{Eksempel}{Eksempler}%
- \Crefname@preamble{remark}{Bem\ae rkning}{Bem\ae rkninger}%
- \Crefname@preamble{note}{Note}{Noter}%
- \Crefname@preamble{algorithm}{Algoritme}{Algoritmer}%
- \Crefname@preamble{line}{Linje}{Linjer}%
+ %
+ \Crefname{equation}{Ligning}{Ligninger}%
+ \Crefname{figure}{Figur}{Figurer}%
+ \Crefname{subfigure}{Figur}{Figurer}%
+ \Crefname{table}{Tabel}{Tabeller}%
+ \Crefname{subtable}{Tabel}{Tabeller}%
+ \Crefname{page}{Side}{Sider}%
+ \Crefname{part}{Del}{Dele}%
+ \Crefname{chapter}{Kapitel}{Kapitler}%
+ \Crefname{section}{Afsnit}{Afsnit}%
+ \Crefname{subsection}{Afsnit}{Afsnit}%
+ \Crefname{subsubsection}{Afsnit}{Afsnit}%
+ \Crefname{appendix}{Appendiks}{Appendiks}%
+ \Crefname{subappendix}{Appendiks}{Appendiks}%
+ \Crefname{subsubappendix}{Appendiks}{Appendiks}%
+ \Crefname{subsubsubappendix}{Appendiks}{Appendiks}%
+ \Crefname{enumi}{Punkt}{Punkter}%
+ \Crefname{enumii}{Punkt}{Punkter}%
+ \Crefname{enumiii}{Punkt}{Punkter}%
+ \Crefname{enumiv}{Punkt}{Punkter}%
+ \Crefname{enumv}{Punkt}{Punkter}%
+ \Crefname{footnote}{Fodnote}{Fodnoter}%
+ \Crefname{theorem}{Teorem}{Teoremer}%
+ \Crefname{lemma}{Lemma}{Lemma}%
+ \Crefname{corollary}{F\o lgeslutning}{F\o lgeslutninger}%
+ \Crefname{proposition}{Udsagn}{Udsagn}%
+ \Crefname{definition}{Definition}{Definitioner}%
+ \Crefname{result}{Resultat}{Resultater}%
+ \Crefname{example}{Eksempel}{Eksempler}%
+ \Crefname{remark}{Bem\ae rkning}{Bem\ae rkninger}%
+ \Crefname{note}{Note}{Noter}%
+ \Crefname{algorithm}{Algoritme}{Algoritmer}%
+ \Crefname{line}{Linje}{Linjer}%
+ %
\if@cref@capitalise%
- \crefname@preamble{equation}{Ligning}{Ligninger}%
- \crefname@preamble{part}{Del}{Dele}%
- \crefname@preamble{chapter}{Kapitel}{Kapitler}%
- \crefname@preamble{section}{Afsnit}{Afsnit}%
- \crefname@preamble{appendix}{Appendiks}{Appendiks}%
- \crefname@preamble{enumi}{Punkt}{Punkter}%
- \crefname@preamble{footnote}{Fodnote}{Fodnoter}%
- \crefname@preamble{figure}{Figur}{Figurer}%
- \crefname@preamble{table}{Tabel}{Tabeller}%
- \crefname@preamble{theorem}{Teorem}{Teoremer}%
- \crefname@preamble{lemma}{Lemma}{Lemma}%
- \crefname@preamble{corollary}{F\o lgeslutning}{F\o lgeslutninger}%
- \crefname@preamble{proposition}{Udsagn}{Udsagn}%
- \crefname@preamble{definition}{Definition}{Definitioner}%
- \crefname@preamble{result}{Resultat}{Resultater}%
- \crefname@preamble{example}{Eksempel}{Eksempler}%
- \crefname@preamble{remark}{Bem\ae rkning}{Bem\ae rkninger}%
- \crefname@preamble{note}{Note}{Noter}%
- \crefname@preamble{algorithm}{Algoritme}{Algoritmer}%
- \crefname@preamble{line}{Linje}{Linjer}%
+ \crefname{equation}{Ligning}{Ligninger}%
+ \crefname{figure}{Figur}{Figurer}%
+ \crefname{subfigure}{Figur}{Figurer}%
+ \crefname{table}{Tabel}{Tabeller}%
+ \crefname{subtable}{Tabel}{Tabeller}%
+ \crefname{page}{Side}{Sider}%
+ \crefname{part}{Del}{Dele}%
+ \crefname{chapter}{Kapitel}{Kapitler}%
+ \crefname{section}{Afsnit}{Afsnit}%
+ \crefname{subsection}{Afsnit}{Afsnit}%
+ \crefname{subsubsection}{Afsnit}{Afsnit}%
+ \crefname{appendix}{Appendiks}{Appendiks}%
+ \crefname{subappendix}{Appendiks}{Appendiks}%
+ \crefname{subsubappendix}{Appendiks}{Appendiks}%
+ \crefname{subsubsubappendix}{Appendiks}{Appendiks}%
+ \crefname{enumi}{Punkt}{Punkter}%
+ \crefname{enumii}{Punkt}{Punkter}%
+ \crefname{enumiii}{Punkt}{Punkter}%
+ \crefname{enumiv}{Punkt}{Punkter}%
+ \crefname{enumv}{Punkt}{Punkter}%
+ \crefname{footnote}{Fodnote}{Fodnoter}%
+ \crefname{theorem}{Teorem}{Teoremer}%
+ \crefname{lemma}{Lemma}{Lemma}%
+ \crefname{corollary}{F\o lgeslutning}{F\o lgeslutninger}%
+ \crefname{proposition}{Udsagn}{Udsagn}%
+ \crefname{definition}{Definition}{Definitioner}%
+ \crefname{result}{Resultat}{Resultater}%
+ \crefname{example}{Eksempel}{Eksempler}%
+ \crefname{remark}{Bem\ae rkning}{Bem\ae rkninger}%
+ \crefname{note}{Note}{Noter}%
+ \crefname{algorithm}{Algoritme}{Algoritmer}%
+ \crefname{line}{Linje}{Linjer}%
+ %
\else%
- \crefname@preamble{equation}{ligning}{ligninger}%
- \crefname@preamble{part}{del}{dele}%
- \crefname@preamble{chapter}{kapitel}{kapitler}%
- \crefname@preamble{section}{afsnit}{afsnit}%
- \crefname@preamble{appendix}{appendiks}{appendiks}%
- \crefname@preamble{enumi}{punkt}{punkter}%
- \crefname@preamble{footnote}{fodnote}{fodnoter}%
- \crefname@preamble{figure}{figur}{figurer}%
- \crefname@preamble{table}{tabel}{tabeller}%
- \crefname@preamble{theorem}{teorem}{teoremer}%
- \crefname@preamble{lemma}{lemma}{lemma}%
- \crefname@preamble{corollary}{f\o lgeslutning}{f\o lgeslutninger}%
- \crefname@preamble{proposition}{udsagn}{udsagn}%
- \crefname@preamble{definition}{definition}{definitioner}%
- \crefname@preamble{result}{resultat}{resultater}%
- \crefname@preamble{example}{eksempel}{eksempler}%
- \crefname@preamble{remark}{bem\ae rkning}{bem\ae rkninger}%
- \crefname@preamble{note}{note}{noter}%
- \crefname@preamble{algorithm}{algoritme}{algoritmer}%
- \crefname@preamble{line}{linje}{linjer}%
+ \crefname{equation}{ligning}{ligninger}%
+ \crefname{figure}{figur}{figurer}%
+ \crefname{subfigure}{figur}{figurer}%
+ \crefname{table}{tabel}{tabeller}%
+ \crefname{subtable}{tabel}{tabeller}%
+ \crefname{page}{side}{sider}%
+ \crefname{part}{del}{dele}%
+ \crefname{chapter}{kapitel}{kapitler}%
+ \crefname{section}{afsnit}{afsnit}%
+ \crefname{subsection}{afsnit}{afsnit}%
+ \crefname{subsubsection}{afsnit}{afsnit}%
+ \crefname{appendix}{appendiks}{appendiks}%
+ \crefname{subappendix}{appendiks}{appendiks}%
+ \crefname{subsubappendix}{appendiks}{appendiks}%
+ \crefname{subsubsubappendix}{appendiks}{appendiks}%
+ \crefname{enumi}{punkt}{punkter}%
+ \crefname{enumii}{punkt}{punkter}%
+ \crefname{enumiii}{punkt}{punkter}%
+ \crefname{enumiv}{punkt}{punkter}%
+ \crefname{enumv}{punkt}{punkter}%
+ \crefname{footnote}{fodnote}{fodnoter}%
+ \crefname{theorem}{teorem}{teoremer}%
+ \crefname{lemma}{lemma}{lemma}%
+ \crefname{corollary}{f\o lgeslutning}{f\o lgeslutninger}%
+ \crefname{proposition}{udsagn}{udsagn}%
+ \crefname{definition}{definition}{definitioner}%
+ \crefname{result}{resultat}{resultater}%
+ \crefname{example}{eksempel}{eksempler}%
+ \crefname{remark}{bem\ae rkning}{bem\ae rkninger}%
+ \crefname{note}{note}{noter}%
+ \crefname{algorithm}{algoritme}{algoritmer}%
+ \crefname{line}{linje}{linjer}%
\fi%
}}}
% \end{macrocode}
%
%
%
-% \subsubsection{Default Cross-Reference Formats}
+% \subsection{Default Cross-Reference Formats}
% \label{sec:code:default_formats}
-% Setup the default format definitions, then process options in the order
-% they were supplied. However, the \option{capitalise} option must be
-% processed before the language options, so that it takes effect in the
-% default format definitions. Therefore, we have to manually check
-% whether it's present, and force processing of it before the other
-% options.
+% The \option{capitalise} and \option{nameinlink} options must be
+% processed before we process any language options and define the default
+% formats, so that they take effect in the default format definitions.
+% Therefore, we have to manually check whether they're present, and force
+% processing of those before the other options.
% \begin{macrocode}
\edef\@curroptions{\@ptionlist{\@currname.\@currext}}%
\@expandtwoargs\in@{,capitalise,}{%
@@ -9147,6 +11315,38 @@
\ExecuteOptions{capitalise}%
\fi%
\fi%
+\@expandtwoargs\in@{,nameinlink,}{%
+ ,\@classoptionslist,\@curroptions,}%
+\ifin@%
+ \ExecuteOptions{nameinlink}%
+\fi%
+% \end{macrocode}
+%
+%
+% \begin{macro}{\crefdefaultlabelformat}
+% \begin{macro}{\creflabelformat}
+% Define the default label formats, which don't depend on language. We
+% override the default format for equations, to follow the near
+% universal convention of enclosing equation labels in brackets.
+% However, if the \option{nameinlink} option is enabled, the end of the
+% hyperlink must come outside the group or it will cause \LaTeX{}
+% grouping errors, so we must define it differently in that case.
+% \begin{macrocode}
+\crefdefaultlabelformat{#2#1#3}
+\if@cref@nameinlink%
+ \creflabelformat{equation}{#2\textup{(#1)}#3}%
+\else%
+ \creflabelformat{equation}{\textup{(#2#1#3)}}%
+\fi
+\@labelcrefdefinedefaultformats
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% Setup the default English format definitions, then process options in
+% the order they were supplied.
+% \begin{macrocode}
\ExecuteOptions{english}
\ProcessOptions*\relax
% \end{macrocode}
@@ -9284,12 +11484,14 @@
\csname cref@\@tempa @name\endcsname}%
\expandafter\def\expandafter\@tempc\expandafter{%
\csname cref@\@tempa @name@preamble\endcsname}%
- \expandafter\expandafter\expandafter\let\expandafter\@tempb\@tempc%
+ \expandafter\expandafter\expandafter%
+ \let\expandafter\@tempb\@tempc%
\expandafter\def\expandafter\@tempb\expandafter{%
\csname cref@\@tempa @name@plural\endcsname}%
\expandafter\def\expandafter\@tempc\expandafter{%
\csname cref@\@tempa @name@plural@preamble\endcsname}%
- \expandafter\expandafter\expandafter\let\expandafter\@tempb\@tempc%
+ \expandafter\expandafter\expandafter%
+ \let\expandafter\@tempb\@tempc%
}{%
\edef\@tempb{%
\expandafter\noexpand\csname extras\cref@language\endcsname}%
@@ -9313,12 +11515,14 @@
\csname Cref@\@tempa @name\endcsname}%
\expandafter\def\expandafter\@tempc\expandafter{%
\csname Cref@\@tempa @name@preamble\endcsname}%
- \expandafter\expandafter\expandafter\let\expandafter\@tempb\@tempc%
+ \expandafter\expandafter\expandafter%
+ \let\expandafter\@tempb\@tempc%
\expandafter\def\expandafter\@tempb\expandafter{%
\csname Cref@\@tempa @name@plural\endcsname}%
\expandafter\def\expandafter\@tempc\expandafter{%
\csname Cref@\@tempa @name@plural@preamble\endcsname}%
- \expandafter\expandafter\expandafter\let\expandafter\@tempb\@tempc%
+ \expandafter\expandafter\expandafter%
+ \let\expandafter\@tempb\@tempc%
}{%
\edef\@tempb{%
\expandafter\noexpand\csname extras\cref@language\endcsname}%
@@ -10076,6 +12280,25 @@
% \end{macrocode}
%
%
+%
+% \subsection{\file{cleveref.cfg} Config File}
+% \begin{macro}{cleveref.cfg}
+% If \LaTeX{} can find a \file{cleveref.cfg} file in its search path,
+% then we read in whatever's in it. The intended use of
+% \file{cleveref.cfg} is to make it easy for authors to customise the
+% cross-reference formats for all their documents, without having to
+% manually include the definitions in every document preamble. In order
+% for these customisations to override the default formats, we input
+% \file{cleveref.cfg} right at the end, after the rest of
+% \package{cleveref} has loaded.
+% \begin{macrocode}
+\InputIfFileExists{cleveref.cfg}%
+ {\PackageInfo{cleveref}{reading definitions from cleveref.cfg}}{}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
% \Finale
\endinput
%%