summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/crefthe/README.md19
-rw-r--r--Master/texmf-dist/doc/latex/crefthe/crefthe-doc.pdfbin66435 -> 66532 bytes
-rw-r--r--Master/texmf-dist/doc/latex/crefthe/crefthe-doc.tex14
-rw-r--r--Master/texmf-dist/tex/latex/crefthe/crefthe.sty28
4 files changed, 43 insertions, 18 deletions
diff --git a/Master/texmf-dist/doc/latex/crefthe/README.md b/Master/texmf-dist/doc/latex/crefthe/README.md
index 44a00effb63..e46658f1d65 100644
--- a/Master/texmf-dist/doc/latex/crefthe/README.md
+++ b/Master/texmf-dist/doc/latex/crefthe/README.md
@@ -25,7 +25,7 @@ which is wrong, as the correct result should be:
`\cref` would not be able to handle such cases correctly.
-## The solution
+### The solution
Thus, it would be better to have a new command `\crefthe[<prep>]{<labels>}`, and to use it like
```latex
@@ -33,7 +33,7 @@ Thus, it would be better to have a new command `\crefthe[<prep>]{<labels>}`, and
```
in order to get "*des théorèmes 1 et 2 et de la proposition 3*".
-# Usage
+## Usage
Simply load the package with:
```latex
@@ -41,11 +41,12 @@ Simply load the package with:
```
> "crefthe" uses "cleveref" internally, thus it should usually be placed at the last of your preamble.
-Before everything, you need to define the names, which can be done with `\crefthename`. Its syntax is similar to `\crefname`, but now you can specify the definite articles, for example:
+> With the package option `overwrite`, you may simply use `\cref` for `\crefthe`, and similarly for other commands.
+
+Before everything, you need to define the names, which can be done with `\crefthename`. Its syntax is similar to `\crefname`, but now you can specify the definite articles, for example (in French):
```latex
\crefthename{theorem}[le]{théorème}[les]{théorèmes}
```
-(*In French*)
Then you can use the command `\crefthe` as follows:
- `\crefthe[<prep>]{<labels>}`
@@ -53,9 +54,11 @@ Then you can use the command `\crefthe` as follows:
- `\crefthe-[<prep>]{<labels>}` and `\crefthe+[<prep>]{<labels>}`
- In case the automatic version does not meet your needs, here are two manual ones. The `-` version passes the preposition `<prep>` only to the first definite article, while the `+` version passes `<prep>` to every definite article.
-> There is also a stared version `\crefthe*` for generating the same text but without hyperlinks.
+> - There is also a stared version `\crefthe*` for generating the same text but without hyperlinks.
+> - The name-only relatives are also available: `\namecrefthe` and `\namecrefsthe`.
+> - `\cpagerefthe` and `\Cpagerefthe` are provided as well.
-## Regarding German
+### Regarding language with declensions
In German, there are four declensions: nominative (`Nominativ`), genitive (`Genitiv`), dative (`Dativ`) and accusative (`Akkusativ`). For such situation, we introduce the command `\crefthevariantname` to specify the referencing name for the correspond environment. Below is an example of usage:
```latex
@@ -87,7 +90,7 @@ These four are all equivalent and you may choose one to use according to your pr
> *For more information, please refer to the documentation.*
-# Acknowledgement
+## Acknowledgement
There are so many people I wish to express my gratitude to during the development of this package, including:
@@ -97,6 +100,6 @@ There are so many people I wish to express my gratitude to during the developmen
- Jonathan P. Spratte, without whose help the German support would probably take much longer to complete.
-# License
+## License
This work is released under the LaTeX Project Public License, v1.3c or later.
diff --git a/Master/texmf-dist/doc/latex/crefthe/crefthe-doc.pdf b/Master/texmf-dist/doc/latex/crefthe/crefthe-doc.pdf
index e943eabdfc0..63fd1342e37 100644
--- a/Master/texmf-dist/doc/latex/crefthe/crefthe-doc.pdf
+++ b/Master/texmf-dist/doc/latex/crefthe/crefthe-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/crefthe/crefthe-doc.tex b/Master/texmf-dist/doc/latex/crefthe/crefthe-doc.tex
index 36baa45df6b..c433d17e825 100644
--- a/Master/texmf-dist/doc/latex/crefthe/crefthe-doc.tex
+++ b/Master/texmf-dist/doc/latex/crefthe/crefthe-doc.tex
@@ -45,6 +45,7 @@
Cref,Crefname,
namecref,namecrefs,
nameCref,nameCrefs,
+ cpageref,Cpageref,
crefformat,
crefthe,crefthename,
Crefthe,Crefthename,
@@ -52,6 +53,7 @@
setcrefname,setCrefname,
namecrefthe,namecrefsthe,
nameCrefthe,nameCrefsthe,
+ cpagerefthe,Cpagerefthe,
crefthemark,
crefthepatchname,
selectlanguage,
@@ -118,13 +120,13 @@
\begin{document}
-\def\PackageVersion{2023/07/23}
-\def\PackageSubVersion{a}
+\def\PackageVersion{2023/10/16}
+\def\PackageSubVersion{}
\title{\crefthepackage{}\\\smallskip\itshape Cross referencing with proper definite articles}
\author{Jinwen XU}
\thanks{Corresponding to: \texttt{\crefthepackage{} \PackageVersion\PackageSubVersion}}
-\date{\TheDate{\PackageVersion}[only-year-month], in Beijing}
+\date{\TheDate{\PackageVersion}[only-year-month], in Paris}
\maketitle
@@ -210,6 +212,7 @@ Then you can use the command \lstinline|\crefthe| as follows:
\begin{itemize}
\item There is also a stared version \lstinline|\crefthe*| for generating the same referencing text without creating hyperlinks.
\item The name-only relatives are also available: \lstinline|\namecrefthe| and \lstinline|\namecrefsthe|.
+ \item \lstinline|\cpagerefthe| and \lstinline|\Cpagerefthe| are provided as well.
\end{itemize}
\end{tip}
@@ -307,7 +310,7 @@ Then, when referencing, you can use the command option \commandoption{abbr.} to
\section{Regarding the upper and lower cases}
-As in \textsf{cleveref}, these commands have corresponding uppercased version: \lstinline|\Crefthename|,\linebreak \lstinline|\Crefthe|, \lstinline|\nameCrefthe| and \lstinline|\nameCrefsthe|, similar to \lstinline|\Crefname|, \lstinline|\Cref|, \lstinline|\nameCref|\linebreak and \lstinline|\nameCrefs|, reserved for using at the beginning of a sentence.
+As in \textsf{cleveref}, these commands have corresponding uppercased version: \lstinline|\Crefthename|,\linebreak \lstinline|\Crefthe|, \lstinline|\nameCrefthe|, \lstinline|\nameCrefsthe| and \lstinline|\Cpagerefthe|, similar to \lstinline|\Crefname|,\linebreak \lstinline|\Cref|, \lstinline|\nameCref|, \lstinline|\nameCrefs| and \lstinline|\Cpageref|, reserved for using at the beginning of a sentence. Their usage is essentially the same as the corresponding lowercase version.
For languages with declensions, such as German, there is also a \lstinline|\Crefthevariantname| (or equivalently, \lstinline|\setCrefname|), corresponding to the above \lstinline|\crefthevariantname|.
@@ -324,6 +327,7 @@ Of course, you would have to define the \lstinline|\Crefthename|s separately, fo
\Crefthename{proposition}[La]{proposition}[Les]{propositions}
\end{code}
+\enlargethispage*{\baselineskip}
\section{On the coordination of gender and number}
In many languages, adjectives and verbs need to be properly inflected for the gender and singular or plural of the noun. Take French as example, you may see the following expressions:
@@ -361,7 +365,7 @@ For those preset names defined with \lstinline|\crefname|\,/\,\lstinline|\Crefna
\crefthepackage{} loads \textsf{cleveref} automatically and passes related options to it. All its commands, used without optional arguments, degenerate to those in \textsf{cleveref}. For example, \lstinline|\crefthe{...}|%
will produce the same result as \lstinline|\cref{...}|, and \lstinline|\crefthename| shall behave the same as \lstinline|\crefname| if the definite articles are not specified. That said, you may safely use the command \lstinline|\crefthe| everywhere in your document without causing extra trouble.
-With the package option \packageoption{overwrite}, user commands in \textsf{cleveref} will be replaced by those offered here, thus you can simply write \lstinline|\cref| for \lstinline|\crefthe| --- and similarly with \lstinline|\Cref|, \lstinline|\crefname| and \lstinline|\Crefname|.
+With the package option \packageoption{overwrite}, user commands in \textsf{cleveref} will be replaced by those offered here, thus you can simply write \lstinline|\cref| for \lstinline|\crefthe| --- and similarly with \lstinline|\Cref|, \lstinline|\crefname| and \lstinline|\Crefname|, etc.
\clearpage
diff --git a/Master/texmf-dist/tex/latex/crefthe/crefthe.sty b/Master/texmf-dist/tex/latex/crefthe/crefthe.sty
index 4f7b382e749..bffa152b577 100644
--- a/Master/texmf-dist/tex/latex/crefthe/crefthe.sty
+++ b/Master/texmf-dist/tex/latex/crefthe/crefthe.sty
@@ -12,7 +12,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{crefthe}
- {2023/07/23a} {}
+ {2023/10/16} {}
{Cross referencing with proper definite articles}
\keys_define:nn { crefthe }
@@ -48,6 +48,8 @@
\NewCommandCopy \crefthe_nameCref_original:w \nameCref
\NewCommandCopy \crefthe_namecrefs_original:w \namecrefs
\NewCommandCopy \crefthe_nameCrefs_original:w \nameCrefs
+\NewCommandCopy \crefthe_cpageref_original:w \cpageref
+\NewCommandCopy \crefthe_Cpageref_original:w \Cpageref
\str_new:N \l__crefthe_tmpa_str
@@ -92,6 +94,16 @@
\bool_gset_true:N \g__crefthe_uppercase_bool
\__crefthe_cref_general:NNNnnN \c_false_bool #1 #2 { #3 } { #4 } \crefthe_nameCrefs_original:w
}
+\NewDocumentCommand \cpagerefthe { t- t+ O{} m }
+ {
+ \bool_gset_false:N \g__crefthe_uppercase_bool
+ \__crefthe_cref_general:NNNnnN \c_false_bool #1 #2 { #3 } { #4 } \crefthe_cpageref_original:w
+ }
+\NewDocumentCommand \Cpagerefthe { t- t+ O{} m }
+ {
+ \bool_gset_true:N \g__crefthe_uppercase_bool
+ \__crefthe_cref_general:NNNnnN \c_false_bool #1 #2 { #3 } { #4 } \crefthe_Cpageref_original:w
+ }
\keys_define:nn { crefthe-command }
{
@@ -476,10 +488,16 @@
{
\bool_if:NT \l__crefthe_overwrite_bool
{
- \RenewCommandCopy \cref \crefthe
- \RenewCommandCopy \Cref \Crefthe
- \RenewCommandCopy \crefname \crefthename
- \RenewCommandCopy \Crefname \Crefthename
+ \RenewCommandCopy \cref \crefthe
+ \RenewCommandCopy \Cref \Crefthe
+ \RenewCommandCopy \namecref \namecrefthe
+ \RenewCommandCopy \nameCref \nameCrefthe
+ \RenewCommandCopy \namecrefs \namecrefsthe
+ \RenewCommandCopy \nameCrefs \nameCrefsthe
+ \RenewCommandCopy \cpageref \cpagerefthe
+ \RenewCommandCopy \Cpageref \Cpagerefthe
+ \RenewCommandCopy \crefname \crefthename
+ \RenewCommandCopy \Crefname \Crefthename
}
}