texlive[68565] Master/texmf-dist: crefthe (16oct23)

commits+karl at tug.org commits+karl at tug.org
Mon Oct 16 21:57:52 CEST 2023


Revision: 68565
          https://tug.org/svn/texlive?view=revision&revision=68565
Author:   karl
Date:     2023-10-16 21:57:52 +0200 (Mon, 16 Oct 2023)
Log Message:
-----------
crefthe (16oct23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/crefthe/README.md
    trunk/Master/texmf-dist/doc/latex/crefthe/crefthe-doc.pdf
    trunk/Master/texmf-dist/doc/latex/crefthe/crefthe-doc.tex
    trunk/Master/texmf-dist/tex/latex/crefthe/crefthe.sty

Modified: trunk/Master/texmf-dist/doc/latex/crefthe/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/crefthe/README.md	2023-10-16 19:57:41 UTC (rev 68564)
+++ trunk/Master/texmf-dist/doc/latex/crefthe/README.md	2023-10-16 19:57:52 UTC (rev 68565)
@@ -25,7 +25,7 @@
 
 `\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 @@
 ```
 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 @@
 ```
 > "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 @@
 - `\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 @@
 
 > *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 @@
 
 - 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.

Modified: trunk/Master/texmf-dist/doc/latex/crefthe/crefthe-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/crefthe/crefthe-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/crefthe/crefthe-doc.tex	2023-10-16 19:57:41 UTC (rev 68564)
+++ trunk/Master/texmf-dist/doc/latex/crefthe/crefthe-doc.tex	2023-10-16 19:57:52 UTC (rev 68565)
@@ -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 @@
     \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 @@
 
 \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 @@
 \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 @@
 \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

Modified: trunk/Master/texmf-dist/tex/latex/crefthe/crefthe.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/crefthe/crefthe.sty	2023-10-16 19:57:41 UTC (rev 68564)
+++ trunk/Master/texmf-dist/tex/latex/crefthe/crefthe.sty	2023-10-16 19:57:52 UTC (rev 68565)
@@ -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
       }
   }
 



More information about the tex-live-commits mailing list.