diff options
author | Norbert Preining <norbert@preining.info> | 2022-03-02 03:03:38 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-03-02 03:03:38 +0000 |
commit | 1769d3d8842ef66919943128931e647de9756adb (patch) | |
tree | 46df94f2204cba9384cccf5ab6ca8cbbcd49bcad /macros/latex/contrib/crefthe | |
parent | 3e9a44ea155766214d8657ed79db2206592b6e8e (diff) |
CTAN sync 202203020303
Diffstat (limited to 'macros/latex/contrib/crefthe')
-rw-r--r-- | macros/latex/contrib/crefthe/crefthe-doc.pdf | bin | 115616 -> 116473 bytes | |||
-rw-r--r-- | macros/latex/contrib/crefthe/crefthe-doc.tex | 5 | ||||
-rw-r--r-- | macros/latex/contrib/crefthe/crefthe.sty | 35 |
3 files changed, 20 insertions, 20 deletions
diff --git a/macros/latex/contrib/crefthe/crefthe-doc.pdf b/macros/latex/contrib/crefthe/crefthe-doc.pdf Binary files differindex 7f4f6ea5e0..2b94169807 100644 --- a/macros/latex/contrib/crefthe/crefthe-doc.pdf +++ b/macros/latex/contrib/crefthe/crefthe-doc.pdf diff --git a/macros/latex/contrib/crefthe/crefthe-doc.tex b/macros/latex/contrib/crefthe/crefthe-doc.tex index 70cdc89d92..bd9ebed23b 100644 --- a/macros/latex/contrib/crefthe/crefthe-doc.tex +++ b/macros/latex/contrib/crefthe/crefthe-doc.tex @@ -93,8 +93,8 @@ \title{\crefthepackage{}\\\smallskip\itshape Cross referencing with proper definite articles} \author{Jinwen XU} -\thanks{Corresponding to: \texttt{\crefthepackage{} 2022/02/27}} -\date{February 2022, in Paris} +\thanks{Corresponding to: \texttt{\crefthepackage{} 2022/03/01}} +\date{March 2022, in Paris} \maketitle @@ -237,6 +237,7 @@ To place hyperlinks at the right place, \lstinline|\crefthename| touches the cor 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|. +\clearpage \section{Known issues} \begin{itemize} diff --git a/macros/latex/contrib/crefthe/crefthe.sty b/macros/latex/contrib/crefthe/crefthe.sty index 213f3d2e60..dd3ea31b1d 100644 --- a/macros/latex/contrib/crefthe/crefthe.sty +++ b/macros/latex/contrib/crefthe/crefthe.sty @@ -13,7 +13,7 @@ \RequirePackage{l3keys2e} \ProvidesExplPackage {crefthe} - {2022/02/27} {} + {2022/03/01} {} {Cross referencing with proper definite articles} \keys_define:nn { crefthe } @@ -126,33 +126,32 @@ \use:c { crefthe_#6refname_original:w } { #1 } { #2 #3 } { #4 #5 } \hook_gput_code:nnn { begindocument } { crefthe } { - \crefthe_patch_format:nnnnn { 2 } { #6ref@#1@format } { #6ref@#1@name } { #2 } { #3 } - \crefthe_patch_format:nnnnn { 2 } { #6ref@#1@format@first } { #6ref@#1@name@plural } { #4 } { #5 } - \crefthe_patch_format:nnnnn { 3 } { #6refrange@#1@format } { #6ref@#1@name@plural } { #4 } { #5 } - \crefthe_patch_format:nnnnn { 3 } { #6refrange@#1@format@first } { #6ref@#1@name@plural } { #4 } { #5 } + \crefthe_patch_format:nnnn { #6ref@#1@format } { #6ref@#1@name } { #2 } { #3 } + \crefthe_patch_format:nnnn { #6ref@#1@format@first } { #6ref@#1@name@plural } { #4 } { #5 } + \crefthe_patch_format:nnnn { #6refrange@#1@format } { #6ref@#1@name@plural } { #4 } { #5 } + \crefthe_patch_format:nnnn { #6refrange@#1@format@first } { #6ref@#1@name@plural } { #4 } { #5 } } } \seq_new:N \g__crefthe_already_patched_seq -\cs_new_protected:Nn \crefthe_patch_format:nnnnn - % #1 = the # number for the beginning mark of hyperlink - % #2 = name of the format command - % #3 = name of the command after hyperlink mark - % #4 = new content before the mark - % #5 = new content after the mark +\cs_new_protected:Nn \crefthe_patch_format:nnnn + % #1 = name of the format command + % #2 = name of the command after the hyperlink beginning mark + % #3 = new content before the mark + % #4 = new content after the mark { - \seq_if_in:NnF \g__crefthe_already_patched_seq { #2 - #3 } + \seq_if_in:NnF \g__crefthe_already_patched_seq { #1 - #2 } { \makeatletter - \tl_set:Nn \l_tmpa_tl { #4 } - \tl_set:Nn \l_tmpb_tl { #5 } - \exp_args:Nc \regexpatchcmd { #2 } - { \cP. #1 \c{ #3 } } - { \u{l_tmpa_tl} \cP\# #1 \u{l_tmpb_tl} } + \tl_set:No \l_tmpa_tl { #3 } + \tl_set:No \l_tmpb_tl { #4 } + \exp_args:Nc \regexpatchcmd { #1 } + { (\cP\# .) \c{ #2 } } + { \u{l_tmpa_tl} \1 \u{l_tmpb_tl} } { } { \PatchFailed } \makeatother - \seq_gput_right:Nn \g__crefthe_already_patched_seq { #2 - #3 } + \seq_gput_right:Nn \g__crefthe_already_patched_seq { #1 - #2 } } } |