summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-08-28 19:53:03 +0000
committerKarl Berry <karl@freefriends.org>2022-08-28 19:53:03 +0000
commit2ebf3159c9c1bc2d15a019c44c7e6eb4d1b4923e (patch)
tree447ce4fa1f83fe86a6bf72f9e8954c5b1b5433c0 /Master/texmf-dist
parente0b13b7016db35134e9c96389e6023a6e55e2853 (diff)
crefthe (28aug22)
git-svn-id: svn://tug.org/texlive/trunk@64216 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/crefthe/crefthe-doc.pdfbin53103 -> 53448 bytes
-rw-r--r--Master/texmf-dist/doc/latex/crefthe/crefthe-doc.tex15
-rw-r--r--Master/texmf-dist/tex/latex/crefthe/crefthe.sty36
3 files changed, 42 insertions, 9 deletions
diff --git a/Master/texmf-dist/doc/latex/crefthe/crefthe-doc.pdf b/Master/texmf-dist/doc/latex/crefthe/crefthe-doc.pdf
index 67f9587e8f4..734263af644 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 80597e3b61e..877e68119bd 100644
--- a/Master/texmf-dist/doc/latex/crefthe/crefthe-doc.tex
+++ b/Master/texmf-dist/doc/latex/crefthe/crefthe-doc.tex
@@ -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 @@ Then you can use the command \lstinline|\crefthe| as follows:
\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 @@ Voilà !
\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 @@ Of course you will have to define the \lstinline|\Crefthename|s separately, for
\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}
diff --git a/Master/texmf-dist/tex/latex/crefthe/crefthe.sty b/Master/texmf-dist/tex/latex/crefthe/crefthe.sty
index 8a1aefe4a23..8fc93018ceb 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}
- {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 }