diff options
Diffstat (limited to 'macros/latex/base/ltproperties.dtx')
-rw-r--r-- | macros/latex/base/ltproperties.dtx | 75 |
1 files changed, 46 insertions, 29 deletions
diff --git a/macros/latex/base/ltproperties.dtx b/macros/latex/base/ltproperties.dtx index 40c50cd20a..0fd8f22e0e 100644 --- a/macros/latex/base/ltproperties.dtx +++ b/macros/latex/base/ltproperties.dtx @@ -1,8 +1,8 @@ % \iffalse meta-comment % -%% File: ltproperties.dtx +% File: ltproperties.dtx % -% Copyright (C) 2021-2023 The LaTeX Project +% Copyright (C) 2023-2024 The LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -21,13 +21,21 @@ % https://github.com/latex3/latex2e % % for those people who are interested. -% \begin{macrocode} -\def\ltpropertiesversion{1.0c} -\def\ltpropertiesdate{2023-10-15} -% \end{macrocode} - -%<*driver> +% +% \fi +% +% \iffalse +%%% From File: ltproperties.dtx +% +%<*driver> +% \fi +\ProvidesFile{ltproperties.dtx} + [2024/04/17 v1.0e LaTeX Kernel (Properties)] +% \iffalse +% \documentclass[full]{l3doc} +\GetFileInfo{ltproperties.dtx} + \EnableCrossrefs \CodelineIndex \begin{document} @@ -39,7 +47,7 @@ % \title{^^A % Recording and cross-referencing document properties^^A % \thanks{This module has version -% \ltpropertiesversion\ dated \ltpropertiesdate, \copyright\ The \LaTeX\ +% \fileversion\ dated \filedate, \copyright\ The \LaTeX\ % Project.} % } % @@ -157,8 +165,8 @@ % % \begin{function}{\property_new:nnnn,\property_gset:nnnn} % \begin{syntax} -% \cs{property_new:nnnn} \Arg{property} \Arg{setpoint} \Arg{default} \Arg{code} -% \cs{property_gset:nnnn} \Arg{property}\Arg{setpoint} \Arg{default} \Arg{code} +% \cs{property_new:nnnn} \Arg{property} \Arg{setpoint} \Arg{default} \Arg{code} +% \cs{property_gset:nnnn} \Arg{property} \Arg{setpoint} \Arg{default} \Arg{code} % \end{syntax} % \LaTeXe-interface: see \cs{NewProperty}, \cs{SetProperty}.\\ % Sets the \meta{property} to have the \meta{default} specified, and at the @@ -180,7 +188,7 @@ % \property_record:nn, \property_record:nV, \property_record:ee % } % \begin{syntax} -% \cs{property_record:nN} \Arg{label} \Arg{clist var} +% \cs{property_record:nN} \Arg{label} \meta{clist var} % \cs{property_record:nn} \Arg{label} \Arg{clist} % \end{syntax} % \LaTeXe{}-interface: see \cs{RecordProperties}.\\ @@ -266,7 +274,7 @@ % \cs{property_if_exist_p:n} \Arg{property} % \cs{property_if_exist:nTF} \Arg{property} \Arg{true code} \Arg{false code} % \end{syntax} -% \LaTeXe{}-interface: \cs{IfPropertyExistTF}.\\ +% \LaTeXe{}-interface: \cs{IfPropertyExistsTF}.\\ % Tests if the \meta{property} has been declared. % \end{function} % @@ -275,7 +283,7 @@ % \cs{property_if_recorded_p:n} \Arg{label} % \cs{property_if_recorded:nTF} \Arg{label} \Arg{true code} \Arg{false code} % \end{syntax} -% \LaTeXe{}-interface: \cs{IfLabelExistTF}\\ +% \LaTeXe{}-interface: \cs{IfLabelExistsTF}\\ % Tests if the \meta{label} is known. This is also true if the label has been % set with the standard \cs{label} command. % \end{function} @@ -307,8 +315,8 @@ % % \begin{function}{\NewProperty,\SetProperty} % \begin{syntax} -% \cs{NewProperty} \Arg{property} \Arg{setpoint} \Arg{default} \Arg{code} -% \cs{SetProperty} \Arg{property} \Arg{setpoint} \Arg{default} \Arg{code} +% \cs{NewProperty} \Arg{property} \Arg{setpoint} \Arg{default} \Arg{code} +% \cs{SetProperty} \Arg{property} \Arg{setpoint} \Arg{default} \Arg{code} % \end{syntax} % Sets the \meta{property} to have the \meta{default} specified, and at the % \meta{setpoint} (either |now| or |shipout|) to write the result of the @@ -329,7 +337,7 @@ % of properties. Also similar to the standard \cs{label} command, the command is surrounded % by an \cs{@bsphack}/\cs{@esphack} pair to preserve spacing. % \end{function} - +% % \begin{function}[EXP]{\RefProperty} % \begin{syntax} % \cs{RefProperty} \oarg{local default} \Arg{label} \Arg{property} @@ -340,16 +348,16 @@ % If \Arg{property} has not been declared an error is issued. % \end{function} % -% \begin{function}{\IfPropertyExistTF} +% \begin{function}{\IfPropertyExistsTF,\IfPropertyExistsT,\IfPropertyExistsF} % \begin{syntax} -% \cs{IfPropertyExistTF} \Arg{property} \Arg{true code} \Arg{false code} +% \cs{IfPropertyExistsTF} \Arg{property} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if the \meta{property} has been declared. % \end{function} % -% \begin{function}{\IfLabelExistTF} +% \begin{function}{\IfLabelExistsTF,\IfLabelExistsT,\IfLabelExistsF} % \begin{syntax} -% \cs{IfLabelExistTF} \Arg{label} \Arg{true code} \Arg{false code} +% \cs{IfLabelExistsTF} \Arg{label} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if the \meta{label} has been recorded. This is also true if a label % has been set with the standard \cs{label} command. @@ -361,7 +369,7 @@ % \end{syntax} % Tests if the label and a value of the \meta{property} for the \meta{label} are both known. % \end{function} - +% % \begin{function}{\RefUndefinedWarn} % \begin{syntax} % \cs{RefUndefinedWarn} \Arg{label} \Arg{property} @@ -551,6 +559,7 @@ % later too. That is all pretty easy using \pkg{expl3}: we accept a stray % comma at the end of the list as that is easier to deal with than trying % to tidy up, and there is no real downside. +% \changes{v1.0d}{2024-01-17}{Use \cs{protected@write}}% % \begin{macrocode} \cs_new_protected:Npn \property_record:nN #1#2 { \property_record:nV {#1} #2 } @@ -561,7 +570,7 @@ { \legacy_if:nT { @filesw } { - \iow_shipout_x:Nx \@auxout + \protected@write \@auxout {} { \token_to_str:N \new@label@record {#1} @@ -737,9 +746,13 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{IfPropertyExistTF} +% \begin{macro}{\IfPropertyExistsTF,\IfPropertyExistsT,\IfPropertyExistsF} +% \changes{v1.0e}{2024-04-17}{Renamed \cs{IfPropertyExistTF} to +% \cs{IfPropertyExistsTF} (gh/1262)} % \begin{macrocode} -\cs_new_eq:NN \IfPropertyExistTF \property_if_exist:eTF +\cs_new_eq:NN \IfPropertyExistsTF \property_if_exist:eTF +\cs_new:Npn \IfPropertyExistsT #1#2 {\property_if_exist:eTF {#1}{#2}{} } +\cs_new:Npn \IfPropertyExistsF #1 {\property_if_exist:eTF {#1}{} } % \end{macrocode} % \end{macro} % @@ -762,9 +775,13 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\IfLabelExistTF} +% \begin{macro}{\IfLabelExistsTF,\IfLabelExistsT,\IfLabelExistsF} +% \changes{v1.0e}{2024-04-17}{Renamed \cs{IfLabelExistTF} to +% \cs{IfLabelExistsTF} (gh/1262)} % \begin{macrocode} -\cs_new_eq:NN \IfLabelExistTF \property_if_recorded:eTF +\cs_new_eq:NN \IfLabelExistsTF \property_if_recorded:eTF +\cs_new:Npn \IfLabelExistsT #1#2 {\property_if_exist:eTF {#1}{#2}{} } +\cs_new:Npn \IfLabelExistsF #1 {\property_if_exist:eTF {#1}{} } % \end{macrocode} % \end{macro} % @@ -938,8 +955,8 @@ %<latexrelease>\let \RefProperty \@undefined %<latexrelease>\let \RefUndefinedWarn \@undefined %<latexrelease> -%<latexrelease>\let \IfPropertyExistTF \@undefined -%<latexrelease>\let \IfLabelExistTF \@undefined +%<latexrelease>\let \IfPropertyExistsTF \@undefined +%<latexrelease>\let \IfLabelExistsTF \@undefined %<latexrelease>\let \IfPropertyRecordedTF \@undefined %<latexrelease> %<latexrelease>\let\new@label@record \@undefined |