texlive[64216] Master/texmf-dist: crefthe (28aug22)

commits+karl at tug.org commits+karl at tug.org
Sun Aug 28 21:53:03 CEST 2022


Revision: 64216
          http://tug.org/svn/texlive?view=revision&revision=64216
Author:   karl
Date:     2022-08-28 21:53:03 +0200 (Sun, 28 Aug 2022)
Log Message:
-----------
crefthe (28aug22)

Modified Paths:
--------------
    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/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	2022-08-27 23:49:41 UTC (rev 64215)
+++ trunk/Master/texmf-dist/doc/latex/crefthe/crefthe-doc.tex	2022-08-28 19:53:03 UTC (rev 64216)
@@ -43,9 +43,13 @@
       {
         cref,crefname,
         Cref,Crefname,
+        namecref,namecrefs,
+        nameCref,nameCrefs,
         crefformat,
         crefthe,crefthename,
         Crefthe,Crefthename,
+        namecrefthe,namecrefsthe,
+        nameCrefthe,nameCrefsthe,
         crefthemark,
         crefthepatchname,
         selectlanguage,
@@ -112,7 +116,7 @@
 
 \begin{document}
 
-\def\PackageVersion{2022/07/24}
+\def\PackageVersion{2022/08/28}
 
 \title{\crefthepackage{}\\\smallskip\itshape Cross referencing with proper definite articles}
 \author{Jinwen XU}
@@ -200,7 +204,10 @@
 \end{itemize}
 
 \begin{tip}
-    There is also a stared version \lstinline|\crefthe*| for generating the same referencing text but without creating hyperlinks.
+    \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|.
+    \end{itemize}
 \end{tip}
 
 % However, before using it, you should first define the \lstinline|\crefname|s carefully. The definite article in \lstinline|\crefname|s needs to be marked manually using \lstinline|\crefthemark|, for example:
@@ -236,7 +243,7 @@
 
 \section{Regarding the upper and lower cases}
 
-The commands also have correspoding uppercased version: \lstinline|\Crefthename| and \lstinline|\Crefthe|, similar to \textsf{cleveref}'s \lstinline|\Crefname| and \lstinline|\Cref|, reserved for use at the beginning of a sentence. \lstinline|\Crefthe| can handle case changing automatically: for example, with \lstinline|\Crefthe[À]{thm1,thm2,prop3}|, you will get something like
+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. \lstinline|\Crefthe| (and the name-only relatives) can handle case changing automatically: for example, with \lstinline|\Crefthe[À]{thm1,thm2,prop3}|, you will get something like
 
 \begin{demo}
     \textbf{Aux} théorèmes 1 et 2 et \textbf{à la} proposition 3
@@ -251,7 +258,7 @@
 
 \section{For writing multi-language documents}
 
-To place hyperlinks at the right place, \lstinline|\crefthename| touches the corresponding \lstinline|\crefformat| internally, which makes the format language-dependent. If you are writing multi-language documents, you may consider putting \lstinline|\crefthename| inside your language configuration so as to reset it each time you select a new language.
+To place hyperlinks at the correct place, \lstinline|\crefthename| touches the corresponding format macro \lstinline|\crefformat| internally, which makes the format language-dependent. If you are writing multi-language documents, you may consider putting \lstinline|\crefthename| inside your language configuration so as to reset it each time you select a new language.
 
 \section{Dealing with existed \texttt{cref} / \texttt{Cref} names}
 

Modified: trunk/Master/texmf-dist/tex/latex/crefthe/crefthe.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/crefthe/crefthe.sty	2022-08-27 23:49:41 UTC (rev 64215)
+++ trunk/Master/texmf-dist/tex/latex/crefthe/crefthe.sty	2022-08-28 19:53:03 UTC (rev 64216)
@@ -12,7 +12,7 @@
 \NeedsTeXFormat{LaTeX2e}[2022-06-01]
 \ProvidesExplPackage
   {crefthe}
-  {2022/07/24} {}
+  {2022/08/28} {}
   {Cross referencing with proper definite articles}
 
 \keys_define:nn { crefthe }
@@ -34,10 +34,14 @@
 \RequirePackage { cleveref }
 \RequirePackage { regexpatch }
 
-\NewCommandCopy \crefthe_cref_original:w     \cref
-\NewCommandCopy \crefthe_Cref_original:w     \Cref
-\NewCommandCopy \crefthe_crefname_original:w \crefname
-\NewCommandCopy \crefthe_Crefname_original:w \Crefname
+\NewCommandCopy \crefthe_cref_original:w      \cref
+\NewCommandCopy \crefthe_Cref_original:w      \Cref
+\NewCommandCopy \crefthe_crefname_original:w  \crefname
+\NewCommandCopy \crefthe_Crefname_original:w  \Crefname
+\NewCommandCopy \crefthe_namecref_original:w  \namecref
+\NewCommandCopy \crefthe_nameCref_original:w  \nameCref
+\NewCommandCopy \crefthe_namecrefs_original:w \namecrefs
+\NewCommandCopy \crefthe_nameCrefs_original:w \nameCrefs
 
 \str_new:N \l__crefthe_tmpa_str
 
@@ -61,6 +65,28 @@
     \bool_gset_true:N \g__crefthe_uppercase_bool
     \__crefthe_cref_general:NNNnnN #1 #2 #3 { #4 } { #5 } \crefthe_Cref_original:w
   }
+
+\NewDocumentCommand \namecrefthe { t- t+ O{} m }
+  {
+    \bool_gset_false:N \g__crefthe_uppercase_bool
+    \__crefthe_cref_general:NNNnnN \c_false_bool #1 #2 { #3 } { #4 } \crefthe_namecref_original:w
+  }
+\NewDocumentCommand \nameCrefthe { t- t+ O{} m }
+  {
+    \bool_gset_true:N \g__crefthe_uppercase_bool
+    \__crefthe_cref_general:NNNnnN \c_false_bool #1 #2 { #3 } { #4 } \crefthe_nameCref_original:w
+  }
+\NewDocumentCommand \namecrefsthe { t- t+ O{} m }
+  {
+    \bool_gset_false:N \g__crefthe_uppercase_bool
+    \__crefthe_cref_general:NNNnnN \c_false_bool #1 #2 { #3 } { #4 } \crefthe_namecrefs_original:w
+  }
+\NewDocumentCommand \nameCrefsthe { t- t+ O{} m }
+  {
+    \bool_gset_true:N \g__crefthe_uppercase_bool
+    \__crefthe_cref_general:NNNnnN \c_false_bool #1 #2 { #3 } { #4 } \crefthe_nameCrefs_original:w
+  }
+
 \cs_new_protected:Nn \__crefthe_cref_general:NNNnnN
   {
     \tl_if_blank:eTF { #4 }



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