summaryrefslogtreecommitdiff
path: root/macros/latex-dev/required/latex-lab/latex-lab-sec.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex-dev/required/latex-lab/latex-lab-sec.dtx')
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-sec.dtx67
1 files changed, 37 insertions, 30 deletions
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-sec.dtx b/macros/latex-dev/required/latex-lab/latex-lab-sec.dtx
index 5df3803b54..d20c55624b 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-sec.dtx
+++ b/macros/latex-dev/required/latex-lab/latex-lab-sec.dtx
@@ -16,6 +16,8 @@
%
% for those people who are interested or want to report an issue.
%
+\def\ltlabsecdate{2023-07-20}
+\def\ltlabsecversion{0.84a}
%<*driver>
\documentclass{l3doc}
\EnableCrossrefs
@@ -31,7 +33,7 @@
% \title{The \textsf{latex-lab-sec} package\\
% Changes related to the tagging of sectioning commands}
% \author{\LaTeX{} Project\thanks{Initial implementation done by Ulrike Fischer}}
-% \date{v0.83 2023-06-07}
+% \date{v\ltlabsecversion\ \ltlabsecdate}
%
% \maketitle
%
@@ -147,7 +149,7 @@
%
% \section{Implementation}
% \begin{macrocode}
-\ProvidesExplPackage {latex-lab-testphase-sec} {2023-05-20} {0.81}
+\ProvidesExplPackage {latex-lab-testphase-sec} {\ltlabsecdate} {\ltlabsecversion}
{Code related to the tagging of sectioning commands}
% \end{macrocode}
%
@@ -177,10 +179,12 @@
% \begin{macrocode}
%<*kernelchange>
\ifdefined\directlua
- \pdfvariable gentounicode =1
- \protected\def\pdfglyphtounicode {\pdfextension glyphtounicode }
- \protected\edef\pdfgentounicode {\pdfvariable gentounicode}
- \input{glyphtounicode}
+ \ifnum\outputmode > 0
+ \pdfvariable gentounicode =1
+ \protected\def\pdfglyphtounicode {\pdfextension glyphtounicode }
+ \protected\edef\pdfgentounicode {\pdfvariable gentounicode}
+ \input{glyphtounicode}
+ \fi
\fi
\ifdefined\pdfglyphtounicode
\input{glyphtounicode-cmex}
@@ -437,45 +441,48 @@
% \end{macrocode}
% This redefines \cs{part} in article class.
% \begin{macrocode}
- \RenewDocumentCommand\part{ s O{#3} m }
+ \@ifundefined{part}{}
{
- \if@noskipsec \leavevmode \fi
- \par
- \addvspace{4ex}%
- \@afterindentfalse
+ \RenewDocumentCommand\part{ s O{#3} m }
+ {
+ \if@noskipsec \leavevmode \fi
+ \par
+ \addvspace{4ex}%
+ \@afterindentfalse
% \end{macrocode}
% This are the tagging commands needed at the begin. They open a Part structure
% and the structure for the title of the heading.
% \begin{macrocode}
% tagging start commands
- \tag_tool:n {sec-start-part=#2}
+ \tag_tool:n {sec-start-part=#2}
% end tagging start commands
% \end{macrocode}
% This adds a manual target if the part is unnumbered or starred.
% It replaces the hyperref patches.
% \begin{macrocode}
- \bool_lazy_any:nT
- {
- { #1 }
- {
- \int_compare_p:nNn {\c@secnumdepth}<{-1}
- }
- }
- {
- \MakeLinkTarget[part]{}
- }
+ \bool_lazy_any:nT
+ {
+ { #1 }
+ {
+ \int_compare_p:nNn {\c@secnumdepth}<{-1}
+ }
+ }
+ {
+ \MakeLinkTarget[part]{}
+ }
% \end{macrocode}
% The main call to the underlying commands.
% \begin{macrocode}
- \IfBooleanTF
- {#1}
- { \@spart {#3} }
- { \@part [#2]{#3} }
+ \IfBooleanTF
+ {#1}
+ { \@spart {#3} }
+ { \@part [#2]{#3} }
% \end{macrocode}
% and now the closing command for the tagging of the title.
% \begin{macrocode}
- \tag_tool:n {sec-stop-part}
- }
+ \tag_tool:n {sec-stop-part}
+ }
+ }
}
% \end{macrocode}
% Redefinitions for book and report
@@ -812,8 +819,8 @@
% \begin{macrocode}
%<*latex-lab>
-\ProvidesFile{sec-tagging-latex-lab-testphase.ltx}
- [2023-05-20 v0.82 code related to the tagging of sectioning commands]
+\ProvidesFile{sec-latex-lab-testphase.ltx}
+ [\ltlabsecdate\space v\ltlabsecversion\space latex-lab wrapper sec]
\RequirePackage{latex-lab-testphase-sec}
%</latex-lab>
% \end{macrocode}