diff options
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/denisbdoc/denisbdoc.sty | 84 |
1 files changed, 55 insertions, 29 deletions
diff --git a/Master/texmf-dist/tex/latex/denisbdoc/denisbdoc.sty b/Master/texmf-dist/tex/latex/denisbdoc/denisbdoc.sty index 05c7bdd6b6b..6ea2fbf36ec 100644 --- a/Master/texmf-dist/tex/latex/denisbdoc/denisbdoc.sty +++ b/Master/texmf-dist/tex/latex/denisbdoc/denisbdoc.sty @@ -7,7 +7,7 @@ %% denisbdoc.dtx (with options: `package') %% ----------------------------------------------------------------------------- %% denisbdoc --- A personal dirty package for documenting personal classes, -%% version 0.9.4 +%% version 0.9.5 %% %% Maintained by Denis Bitouzé %% E-mail: denis.bitouze@univ-littoral.fr @@ -16,7 +16,7 @@ %% ----------------------------------------------------------------------------- %% \RequirePackage{expl3,l3keys2e,xparse} -\ProvidesExplPackage {denisbdoc} {2022-06-13} {0.9.4} +\ProvidesExplPackage {denisbdoc} {2024-03-10} {0.9.5} {A personal package for documenting packages} \@ifpackagelater { expl3 } { 2012/11/21 } { } @@ -1173,37 +1173,63 @@ {% \__denisbdoc_subdirectory_filetree: {} } -\cs_new_protected:Nn \__denisbdoc_mandatory: -{ - \hyperref[sec-comm-oblig]{% - \textcolor{red!75!black}{ - % \sys_if_engine_pdftex:TF - % { - % % \string! - % \ding{52} - % }{ +\AddToHook{begindocument/end}{% + \cs_new_protected:Nn \__denisbdoc_arrow: + { + {\fontfamily{pzd}\fontencoding{U}\fontseries{m}\fontshape{n}\selectfont\char213} + } + \ltx@ifpackageloaded{realscripts}{% + \@ifundefined{up}{ + \cs_new_protected:Npn \__denisbdoc_deal_with_superiors:n #1 + { + \fakesuperscript{#1} + } + }{ + \cs_new_protected:Npn \__denisbdoc_deal_with_superiors:n #1 + { + \up*{#1} + } + } + }{ + \cs_new_protected:Npn \__denisbdoc_deal_with_superiors:n #1 + { + \textsuperscript{#1} + } + } + \cs_new_protected:Nn \__denisbdoc_mandatory: + { + \hyperref[sec-comm-oblig]{% + \textcolor{red!75!black}{ \faLock - % \ding{52} - % }% + } + \ifnum\getpagerefnumber{sec-comm-oblig}=\thepage% + \else% + \__denisbdoc_deal_with_superiors:n{\__denisbdoc_arrow:{}\,\kvtcb@text@pageshort\,\pageref*{sec-comm-oblig}}% + \fi% + }% + } + \RenewDocumentCommand\tcb@ref@doc{msm}{% + \hyperref[#1:#3]{\texttt{\ref*{#1:#3}}% + \IfBooleanTF{#2}{}{% + \ifnum\getpagerefnumber{#1:#3}=\thepage\relax% + \else% + \__denisbdoc_deal_with_superiors:n{\__denisbdoc_arrow:{}% + \,\kvtcb@text@pageshort\,\pageref*{#1:#3}}% + \fi}}% + } + \cs_new_protected:Nn \__denisbdoc_mandatory_no_link: + { + \textcolor{red!75!black}{ + \faLock } - \ifnum\getpagerefnumber{sec-comm-oblig}=\thepage% - \else% - \textsuperscript{\ding{213}\,\kvtcb@text@pageshort\,\pageref*{sec-comm-oblig}}% - \fi% - }% -} -\cs_new_protected:Nn \__denisbdoc_mandatory_no_link: -{ - \textcolor{red!75!black}{ - \faLock } + \NewDocumentCommand{\mandatory}{ s } + { + \IfBooleanTF {#1} + { \__denisbdoc_mandatory_no_link: {} } + { \__denisbdoc_mandatory: {} } + }% } -\NewDocumentCommand{\mandatory}{ s } -{ - \IfBooleanTF {#1} - { \__denisbdoc_mandatory_no_link: {} } - { \__denisbdoc_mandatory: {} } -}% \NewDocumentCommand{\unixtldirectory}{} { \directorytree{\c__denisbdoc_unixtldirectory_string_tl} |