[latex3-commits] [git/LaTeX3-latex3-latex2e] marks-debug: Minor misc changes (676789c2)
PhelypeOleinik
phelype.oleinik at latex-project.org
Sun Apr 17 02:00:38 CEST 2022
Repository : https://github.com/latex3/latex2e
On branch : marks-debug
Link : https://github.com/latex3/latex2e/commit/676789c293ab2cceac214b755ce11a6224bd7319
>---------------------------------------------------------------
commit 676789c293ab2cceac214b755ce11a6224bd7319
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date: Sat Apr 16 21:00:38 2022 -0300
Minor misc changes
- Typos
- Fix overfull boxes
- \IfMarksEqualTF is expandable
- Use \<thing>_set_eq:NN when possible
- Notes about expansion behaviour
>---------------------------------------------------------------
676789c293ab2cceac214b755ce11a6224bd7319
base/ltmarks.dtx | 264 +++++++++++++++++++++++++++++--------------------------
1 file changed, 140 insertions(+), 124 deletions(-)
diff --git a/base/ltmarks.dtx b/base/ltmarks.dtx
index fe9e9bc2..b83bfee7 100644
--- a/base/ltmarks.dtx
+++ b/base/ltmarks.dtx
@@ -121,14 +121,14 @@
% issues:
% \begin{itemize}
% \item
-% It provides arbitrary many, fully independent named marks, that
-% can be allocated and from that point onwards used.
+% It provides arbitrarily many, fully independent named marks, that
+% can be allocated and, from that point onwards, used.
% \item
% It offers access for each such marks to retrieve its top,
-% first, and bottom value separately.
+% first, and bottom values separately.
% \item
% Furthermore, the mechanism is augmented to give access to marks
-% in different ``regions'' which may not be just full pages.
+% in different \enquote{regions} which may not be just full pages.
% \end{itemize}
%
%
@@ -154,17 +154,17 @@
%
% \begin{function}{\InsertMark,\mark_insert:nn}
% \begin{syntax}
-% \cs{InsertMark} \Arg{class} \Arg{entry}
-% \cs{mark_insert:nn} \Arg{class} \Arg{entry}
+% \cs{InsertMark} \Arg{class} \Arg{text}
+% \cs{mark_insert:nn} \Arg{class} \Arg{text}
% \end{syntax}
% Adds a mark to the current galley for the \meta{class}, containing the
-% \meta{entry} text.
+% \meta{text}.
%
% It has no effect in places in which you can't place floats, e.g.,
% a mark inside a box or inside a footnote never shows up anywhere.
%
-% If used in vertical mode it obeys \LaTeX{}'s internal
-% \texttt{@nobreak} switch, i.e., it does not introduce a
+% If used in vertical mode it obeys \LaTeX's internal
+% \cs{@nobreak} switch, i.e., it does not introduce a
% breakpoint if used after a heading. If used in horizontal mode it
% doesn't handle spacing (like, for example, \cs{index} or
% \cs{label} does, so it should be attached to material that is
@@ -182,7 +182,7 @@
% In order to allow packages to augment or alter this setup there is
% a public hook \hook{insertmark} that is executed at this point. It
% runs in a group so local modification to commands are only applied
-% to the \meta{entry} argument of \cs{InsertMark} or \cs{mark_insert:nn}.
+% to the \meta{text} argument of \cs{InsertMark} or \cs{mark_insert:nn}.
% \end{variable}
%
% \begin{function}[EXP]{\TopMark, \FirstMark, \LastMark,
@@ -195,16 +195,22 @@
% \cs{mark_use_first:nn} \Arg{region} \Arg{class}
% \cs{mark_use_last:nn} \Arg{region} \Arg{class}
% \end{syntax}
-% These functions expand to the appropriate mark \meta{entry} for
+% These functions expand to the appropriate mark \meta{text} for
% the given \meta{class} in the specified \meta{region}.
% The default \meta{region} in the design-level commands is \texttt{page}.
% Note that with the L3 layer commands there are no
-% optional arguments, i.e., both arguments have to be provided.
+% optional arguments, i.e., both arguments have to be provided.
+% \begin{texnote}
+% The result is returned within the \tn{unexpanded}
+% primitive (\cs{exp_not:n}), which means that the \meta{text}
+% does not expand further when appearing in an \texttt{x}-type
+% or \texttt{e}-type argument expansion.
+% \end{texnote}
%
% The \enquote{first} and \enquote{last} marks are
% those seen first and last in the current region/page, respectively. The
% \enquote{top} mark is the last mark of the \meta{class} seen
-% in an earlier region, i.e., the \meta{entry} what would be \enquote{current} at the
+% in an earlier region, i.e., the \meta{text} what would be \enquote{current} at the
% very top of the region.
%
% \noindent\llap{\bfseries Important!\qquad}\indent
@@ -215,11 +221,11 @@
%
%
%
-% Currently supported \meta{region}s are
+% Currently, \meta{region} is one of
% \texttt{page},
% \texttt{previous-page},
% \texttt{column}, and
-% \texttt{previous-column} as regions.
+% \texttt{previous-column}.
% If a page has just been finished then the region \texttt{page}
% refers to the current page and \texttt{previous-page}, as the name
% indicates, to the page that has been finished previously. This
@@ -240,7 +246,7 @@
% regions named \texttt{first-column} and
% \texttt{last-column}\footnote{This is called \enquote{last} not \enquote{second}
% in anticipation of extending the mechanism to multiple columns,
-% where first and last would still makes sense.} to
+% where first and last would still make sense.} to
% access these regions.\footnote{At the moment there aren't any
% \texttt{previous-...-column} regions to access the columns from
% the previous page. If necessary, the mechanism could be
@@ -259,10 +265,10 @@
%
% \begin{function}[EXP]{\IfMarksEqualTF,\mark_if_eq:nnnnTF,\mark_if_eq:nnnnnnTF}
% \begin{syntax}
-% \cs{IfMarksEqualTF} \oarg{region} \Arg{class} \Arg{pos\textsubscript{1}} \Arg{pos\textsubscript{2}} \Arg{true} \Arg{false}
-% \cs{mark_if_eq:nnnnTF} \Arg{region} \Arg{class} \Arg{pos\textsubscript{1}} \Arg{pos\textsubscript{2}} \Arg{true} \Arg{false}
-% \cs{mark_if_eq:nnnnnnTF} \Arg{region\textsubscript{1}} \Arg{class\textsubscript{1}} \Arg{pos\textsubscript{1}}
-% \verb= = \Arg{region\textsubscript{2}} \Arg{class\textsubscript{2}} \Arg{pos\textsubscript{2}} \Arg{true} \Arg{false}
+% \cs{IfMarksEqualTF} \oarg{region} \Arg{class} \Arg{pos_1} \Arg{pos_2} \Arg{true} \Arg{false}
+% \cs{mark_if_eq:nnnnTF} \Arg{region} \Arg{class} \Arg{pos_1} \Arg{pos_2} \Arg{true} \Arg{false}
+% \cs{mark_if_eq:nnnnnnTF} \Arg{region_1} \Arg{class_1} \Arg{pos_1}
+% \verb= = \Arg{region_2} \Arg{class_2} \Arg{pos_2} \Arg{true} \Arg{false}
% \end{syntax}
% These conditionals allow you to compare the content of two marks
% and act based on the result. The commands work in an expansion
@@ -423,9 +429,9 @@
% mark.
%
% In other words they work reasonably well if you want to show the
-% section title that is current when you about to turn the page and
-% also show the first subsection title on current page (or the last
-% from the previous page if there wasn't one. Other combination
+% section title that is current when you are about to turn the page and
+% also show the first subsection title on the current page (or the last
+% from the previous page if there wasn't one). Other combinations
% can't be shown using this interface.
%
% The commands are fully expandable, because this is how they have
@@ -434,7 +440,10 @@
% expandable and does not contain any fragile material. Given that
% this can't be guaranteed for arbitrary content, a programmer using
% them in this way should use \cs{protected at edef} and \emph{not}
-% \cs{edef} to avoid bad surprises as far as this is possible.
+% \cs{edef} to avoid bad surprises as far as this is possible, or use
+% the new interfaces (\cs{TopMark}, \cs{FirstMark}, and \cs{LastMark})
+% which return the \meta{text} in \cs{exp_not:n} to prevent
+% uncontrolled expansion.
% \end{function}
%
%
@@ -442,8 +451,9 @@
%
% The new implementation adds three mark classes: \texttt{2e-left},
% \texttt{2e-right} and \texttt{2e-right-nonempty} and patches
-% \cs{markboth} and \cs{markright} slightly so that they in addition
-% to the above interface also update these mark classes.
+% \cs{markboth} and \cs{markright} slightly so that they also update
+% these new mark classes, so that the new classes work with existing
+% document classes.
%
% As a result you can use \verb=\LastMark{2e-left}= and
% \verb=\FirstMark{2e-right}= instead of \cs{leftmark} and
@@ -466,7 +476,7 @@
% even if there are subsections on that page. But
% \texttt{2e-right-nonempty} would then give you the first or last subsection
% on that page. Of course, nothing is simple. If there are no
-% subsection it would tell you the last subsection from an earlier
+% subsections it would tell you the last subsection from an earlier
% page. We therefore need comparison tools, e.g., if top and
% first are identical you know that the value is
% bogus, i.e., a suitable implementation would be
@@ -480,7 +490,7 @@
%
% \section{Notes on the mechanism}
%
-% In contrast to vanilla \TeX{} \eTeX{} extends the mark system to
+% In contrast to vanilla \TeX, \eTeX{} extends the mark system to
% allow multiple independent marks. However, it does not solve the
% \cs{topmark} problem which means that \LaTeX{} still needs to manage
% marks almost independently of \TeX{}. The reason for this is that
@@ -494,7 +504,7 @@
% \tn{botmark} only to ensure the correct interaction with the output
% routine (this was before the \eTeX{} mechanism was even
% available). However, other than in a prototype implementation for
-% \LaTeX3 this package was never made public.
+% \LaTeX3, this package was never made public.
%
% The new implementation now uses \eTeX{}'s marks as they have some
% advantages, because with them we can leave the mark text within the
@@ -612,8 +622,8 @@
% values. Finally it assigns new first and last values for all mark
% classes based on what was found in the second argument.
%
-% As a consequence the allowed values for \meta{region} are
-% \texttt{page} and \meta{column} because only they have
+% As a consequence, the allowed values for \meta{region} are
+% \texttt{page} and \texttt{column} because only they have
% \texttt{previous-...} counterparts.
%
% Another important part to keep in mind is that marks are only
@@ -718,7 +728,7 @@
\cs_new_protected:Npn \@@_new_class:nn #1
{
%<*trace>
- \@@_debug:n{ \iow_term:x { Marks:~ new~mark:~ #1 ~ \msg_line_context: } }
+ \@@_debug:n { \iow_term:x { Marks:~new~mark:~#1~\msg_line_context: } }
%</trace>
% \end{macrocode}
% Use the \LaTeXe{} interface for now as the L3 programming layer
@@ -730,7 +740,7 @@
% \begin{macrocode}
\seq_gput_right:Nn \g_@@_classes_seq {#1}
% \end{macrocode}
-% We need three token lists for each region, one for top , first,
+% We need three token lists for each region, one for top, first,
% and last.
% \begin{macrocode}
\tl_new:c { g_@@_page_top_ #1 _tl }
@@ -792,30 +802,31 @@
% assignments.
%
% \begin{macrocode}
-\cs_new_protected:Npn \@@_update_structure:nn #1#2 {
+\cs_new_protected:Npn \@@_update_structure:nn #1#2
+ {
% \end{macrocode}
% First thing we do is copying the current structure to
% \texttt{previous-...}; this leaves the current structure
% untouched so we can update it class by class (which is necessary).
% \begin{macrocode}
- \@@_update_structure_alias:nn { previous-#1 } { #1 }
+ \@@_update_structure_alias:nn { previous-#1 } {#1}
% \end{macrocode}
% Getting the first and last marks out of the material in \verb=#2=
% is done by putting the material in a box and then doing a
% split operation to the maximum size possible (which hopefully
-% means all of the content.\footnote{We could verify this, maybe we
+% means all of the content).\footnote{We could verify this, maybe we
% should.} Because this is an action only for the sake of getting
% at the mark values we don't want any underfull
% box warnings so we turn those (locally) off.
% \begin{macrocode}
- \group_begin:
- \dim_set:Nn \tex_splitmaxdepth:D \c_max_dim
- \int_set:Nn \tex_vbadness:D \c_max_int
- \dim_set:Nn \tex_vfuzz:D \c_max_dim
+ \group_begin:
+ \dim_set_eq:NN \tex_splitmaxdepth:D \c_max_dim
+ \int_set_eq:NN \tex_vbadness:D \c_max_int
+ \dim_set_eq:NN \tex_vfuzz:D \c_max_dim
% \end{macrocode}
% There is a further complication: if the region contains infinite
% shrinking glue then a \cs{vsplit} operation will balk with a
-% low-level error. Now pages or columns, which is our main concern here, can't
+% low-level error. Now pages or columns, which are our main concern here, can't
% have such infinite shrinkage if they are cut straight from the
% galley, however the use of \cs{enlargethispage} actually does add
% some at the very bottom (and also wraps the whole page into a box
@@ -823,29 +834,29 @@
% and b) we don't see any marks because they are hidden one level
% down).
%
-% We therefore do an unskip to get rid of that glue if present and
+% We therefore do an \tn{unskip} to get rid of that glue if present and
% also check if we have then a \cs{vbox} as the last item and if so
% unpack that too. All this is temporary, just for getting the
% marks out, so it doesn't affect the final page production.
%
-% In fact we go one step further and set the box to a large
+% In fact, we go one step further and set the box to a large
% negative height possible and afterwards take a look at the
% reported badness: if it is zero we know that there has still been
% infinite shrinkage in the box so that we can't do a
-% \cs{vsplit}. If that is the case we generate an error message and
+% \tn{vsplit}. If that is the case we generate an error message and
% bypass extracting the marks. We use only half of \cs{c_max_dim}
% because otherwise \TeX{} will report an overfull vbox despite our
% setting of \cs{tex_vfuzz:D}. This test will not find existing
-% infinite shrinkage in all case, e.g., if there are several glues
+% infinite shrinkage in all cases, e.g., if there are several glues
% that cancel each other, but it is the best we can do.
% \begin{macrocode}
- \vbox_set_to_ht:Nnn \l_@@_box { -.5\c_max_dim }
- {
- #2
- \tex_unskip:D
- \box_set_to_last:N \l_@@_box
- \box_if_vertical:NT \l_@@_box
- { \vbox_unpack:N \l_@@_box }
+ \vbox_set_to_ht:Nnn \l_@@_box { -.5\c_max_dim }
+ {
+ #2
+ \tex_unskip:D
+ \box_set_to_last:N \l_@@_box
+ \box_if_vertical:NT \l_@@_box
+ { \vbox_unpack:N \l_@@_box }
% \end{macrocode}
% If it wasn't a vbox, it was either an hbox or there was no box.
% Given that we are only interested in the marks we don't need put
@@ -853,109 +864,113 @@
% is not totally empty (which it might have been from the start, or
% now), because \TeX{} does not report a badness for empty boxes
% which means out test would incorrectly conclude that we have
-% infinite shrinking. A simple \cs{kern} is enough to avoid this.
+% infinite shrinking glue. A simple \tn{kern} is enough to avoid this.
% \begin{macrocode}
- \tex_kern:D\c_zero_dim
- }
- \int_compare:nNnTF \tex_badness:D > 0
+ \tex_kern:D \c_zero_dim
+ }
+ \int_compare:nNnTF \tex_badness:D > 0
% \end{macrocode}
% If the box had no infinite shrinkage (or rather if our test
% didn't show any) we vsplit it. Note that it
-% doesn't matter that we set it to this strange size first. If the
+% doesn't matter that we set it to this strange size first. If there
% was infinite shrinkage after all, we end up with a low-level
-% \TeX{} error, but if there is it is a coding error and needs
+% \TeX{} error, but if there is, it is a coding error and needs
% correcting.
% \begin{macrocode}
- {
- \vbox_set_split_to_ht:NNn \l_@@_box \l_@@_box \c_max_dim
+ {
+ \vbox_set_split_to_ht:NNn \l_@@_box \l_@@_box \c_max_dim
% \end{macrocode}
% After this action we can get first and last marks of the various
% classes through \cs{tex_splitfirstmarks:D} and
% \cs{tex_splitbotmarks:D}. So now we loop over all classes stored in
% \cs{g_@@_classes_seq}.
% \begin{macrocode}
- \seq_map_inline:Nn \g_@@_classes_seq
- {
+ \seq_map_inline:Nn \g_@@_classes_seq
+ {
% \end{macrocode}
% First action: get the last mark from the previous region, i.e.,
-% \verb=previous-#1= but because it is also still inside \verb=#1=
+% \verb=previous-#1=. But because it is also still inside \verb=#1=,
% at the moment we use that to construct the name because this is a
% tiny bit faster. Given that we
% need this value in various assignments we store it away which
% avoids unnecessary further csname generations.
% \begin{macrocode}
- \tl_gset_eq:Nc \g_@@_new_top_tl { g_@@_ #1 _last_ ##1 _tl }
+ \tl_gset_eq:Nc \g_@@_new_top_tl { g_@@_#1_last_##1_tl }
% \end{macrocode}
% This will first of all become the new top mark for the current class.
% \begin{macrocode}
- \tl_gset_eq:cN { g_@@_ #1 _top_ ##1 _tl } \g_@@_new_top_tl
+ \tl_gset_eq:cN { g_@@_#1_top_##1_tl } \g_@@_new_top_tl
% \end{macrocode}
% Next action is to get ourselves the new last mark from the
% material supplied.
% \begin{macrocode}
- \tl_gset:No \g_@@_tmp_tl
- { \tex_splitbotmarks:D \use:c { c_@@_class_ ##1 _mark } }
+ \tl_gset:No \g_@@_tmp_tl
+ { \tex_splitbotmarks:D \use:c { c_@@_class_##1_mark } }
% \end{macrocode}
% If this mark doesn't exist then obviously first mark does
-% neither, so both become the last mark from previous region. We
+% neither, so both become the last mark from the previous region. We
% have to be a little careful here: something like
-% \verb=\mark_insert{foo}{}= adds an \enquote{empty} mark that should
+% \verb=\mark_insert:nn{foo}{}= adds an \enquote{empty} mark that should
% not be confused with no mark at all. But no mark in our material
% will result in \cs{g_@@_tmp_tl} being fully empty. This is why we
-% have to make sure that ``empty'' from \cs{mark_insert:nn} only
+% have to make sure that \enquote{empty} from \cs{mark_insert:nn} only
% appears to be empty but fails the next test (see below how this
% is done).
% \begin{macrocode}
- \tl_if_empty:NTF \g_@@_tmp_tl
- {
- \tl_gset_eq:cN { g_@@_ #1 _last_ ##1 _tl } \g_@@_new_top_tl
- \tl_gset_eq:cN { g_@@_ #1 _first_ ##1 _tl } \g_@@_new_top_tl
- }
+ \tl_if_empty:NTF \g_@@_tmp_tl
+ {
+ \tl_gset_eq:cN { g_@@_#1_last_ ##1_tl }
+ \g_@@_new_top_tl
+ \tl_gset_eq:cN { g_@@_#1_first_##1_tl }
+ \g_@@_new_top_tl
+ }
% \end{macrocode}
% If it wasn't empty, i.e., if it had a real value then we use this
% value for our new last mark instead.
% \begin{macrocode}
- {
- \tl_gset_eq:cN { g_@@_ #1 _last_ ##1 _tl } \g_@@_tmp_tl
+ {
+ \tl_gset_eq:cN { g_@@_#1_last_##1_tl } \g_@@_tmp_tl
% \end{macrocode}
% Because we had a last mark we also have a first mark (which
% might be the same, but might be not), so we pick that up and
-% assign it to the appropriate token lists. This explains why we first
+% assign it to the appropriate token list. This explains why we first
% checked for the last mark because that makes the processing
% faster in case there is none.
% \begin{macrocode}
- \tl_gset:co { g_@@_ #1 _first_ ##1 _tl }
- { \tex_splitfirstmarks:D \use:c { c_@@_class_ ##1 _mark } }
- }
- }
- }
+ \tl_gset:co { g_@@_#1_first_##1_tl }
+ {
+ \tex_splitfirstmarks:D
+ \use:c { c_@@_class_##1_mark }
+ }
+ }
+ }
+ }
% \end{macrocode}
-% If the badness was zero (we actually tested for ${}>0$ but it
+% If the badness was zero (we actually tested for${}>0$ but it
% can't get negative) then we had infinite shrinkage, so we report
% that and set all marks to the value the last mark had before.
% \begin{macrocode}
- {
- \msg_error:nnn { mark } { infinite-shrinkage } {#1}
- \seq_map_inline:Nn \g_@@_classes_seq
- {
- \tl_gset_eq:cc { g_@@_ #1 _top_ ##1 _tl }
- { g_@@_ #1 _last_ ##1 _tl }
- \tl_gset_eq:cc { g_@@_ #1 _first_ ##1 _tl }
- { g_@@_ #1 _last_ ##1 _tl }
- }
- }
+ {
+ \msg_error:nnn { mark } { infinite-shrinkage } {#1}
+ \seq_map_inline:Nn \g_@@_classes_seq
+ {
+ \tl_gset_eq:cc { g_@@_#1_top_ ##1_tl }
+ { g_@@_#1_last_ ##1_tl }
+ \tl_gset_eq:cc { g_@@_#1_first_##1_tl }
+ { g_@@_#1_last_ ##1_tl }
+ }
+ }
% \end{macrocode}
% Once all mark classes have been processed the data structures are
-% up dated and we can close the group which undoes our local
+% updated and we can close the group which undoes our local
% changes and retains only the global ones.
% \begin{macrocode}
- \group_end:
-}
+ \group_end:
+ }
% \end{macrocode}
% \end{macro}
%
%
-
% \begin{macro}{\@@_update_structure_alias:nn}
% This function copies the structure for one region to another
% (name), e.g., from \texttt{page} to \texttt{previous-page} above,
@@ -998,7 +1013,7 @@
% perhaps we end up with another reason to use this error command
% elsewhere, so for now we keep the argument.
% \begin{macrocode}
-\cs_set_protected:Npn \@@_error:n #1 {
+\cs_new_protected:Npn \@@_error:n #1 {
\msg_error:nnn { mark } { invalid-use } {#1}
}
% \end{macrocode}
@@ -1051,13 +1066,11 @@
% Here is the trick to avoid truly empty marks: if the result from
% the above processing is empty we add something which eventually
% becomes empty, but not immediately; otherwise we just put
-% \cs{g_@@_tmp_tl} in. Because the setting for \cs{protect} is still in
-% force (as we used \cs{unrestored at protected@xdef} above), anything
-% protected will still not expand.
+% \cs{g_@@_tmp_tl} in.
% \begin{macrocode}
\tl_if_empty:NTF \g_@@_tmp_tl
- { \exp_not:n { \prg_do_nothing: } }
- { \exp_not:o { \g_@@_tmp_tl } }
+ { \exp_not:n { \prg_do_nothing: } }
+ { \exp_not:o { \g_@@_tmp_tl } }
}
\group_end:
% \end{macrocode}
@@ -1079,7 +1092,8 @@
% \end{macro}
%
%
-% \begin{macro}{@kernel at before@insertmark}
+% \begin{macro}[int]{\@kernel at before@insertmark}
+% \begin{macro}{insertmark}
% By default \cs{label}, \cs{index}, and \cs{glossary} do nothing
% when the mark is inserted.
% \begin{macrocode}
@@ -1093,7 +1107,8 @@
% \begin{macrocode}
\hook_new:n {insertmark}
% \end{macrocode}
-% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}[EXP]{\mark_use_top:nn, \mark_use_first:nn, \mark_use_last:nn}
%
@@ -1106,9 +1121,9 @@
% If used with an unknown class or region they generate an error
% (fairly low-level because we are in an expandable context).
% \begin{macrocode}
-\cs_new:Npn \mark_use_first:nn #1#2{ \exp_not:v { g_@@_ #1 _first_ #2 _tl } }
-\cs_new:Npn \mark_use_last:nn #1#2 { \exp_not:v { g_@@_ #1 _last_ #2 _tl } }
-\cs_new:Npn \mark_use_top:nn #1#2 { \exp_not:v { g_@@_ #1 _top_ #2 _tl } }
+\cs_new:Npn \mark_use_first:nn #1#2 { \exp_not:v { g_@@_#1_first_#2_tl } }
+\cs_new:Npn \mark_use_last:nn #1#2 { \exp_not:v { g_@@_#1_last_#2_tl } }
+\cs_new:Npn \mark_use_top:nn #1#2 { \exp_not:v { g_@@_#1_top_#2_tl } }
% \end{macrocode}
% \end{macro}
%
@@ -1165,8 +1180,8 @@
{ Unknown~mark~class~'#1'. }
{
\c__msg_coding_error_text_tl
- LaTeX~was~asked~to~manipulate~a~mark~of~class~'#1',~but~this~class~of~marks~
- does~not~exist.
+ LaTeX~was~asked~to~manipulate~a~mark~of~class~'#1',~
+ but~this~class~of~marks~does~not~exist.
}
% \end{macrocode}
%
@@ -1254,7 +1269,7 @@
%
%
% \begin{macro}{\@@_class_status:nn}
-% Show the mark values across all regions for one mark class
+% Shows the mark values across all regions for one mark class
% (\verb=#2=). The first argument gives some \meta{info} to help
% identifying where the command was called.
% \begin{macrocode}
@@ -1297,9 +1312,10 @@
% Show all mark class values across all regions.
% \begin{macrocode}
\cs_new_protected:Npn \@@_status:n #1
- {
- \seq_map_inline:Nn \g_@@_classes_seq { \@@_class_status:nn {#1} {##1} }
- }
+ {
+ \seq_map_inline:Nn \g_@@_classes_seq
+ { \@@_class_status:nn {#1} {##1} }
+ }
%</trace>
% \end{macrocode}
% \end{macro}
@@ -1345,13 +1361,13 @@
%
%
%
-% \begin{macro}{\IfMarksEqualTF}
+% \begin{macro}[EXP]{\IfMarksEqualTF}
% We only provide a CamelCase command for the case with one region
% (optional) and one class. One could think of also providing a
% version for the general case with several optional arguments, but
% use cases for this are most likely rare, so not done yet.
% \begin{macrocode}
-\NewDocumentCommand \IfMarksEqualTF {O{page}mmm} {
+\NewExpandableDocumentCommand \IfMarksEqualTF {O{page}mmm} {
\mark_if_eq:nnnnTF {#1}{#2}{#3}{#4}
}
% \end{macrocode}
@@ -1364,7 +1380,6 @@
%
% \subsection{Core \LaTeXe{} integration}
%
-
% \begin{macro}{\@@_update_singlecol_structures:}
% This command updates the mark structures if we are producing a
% single column document.
@@ -1515,15 +1530,16 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macrocode}
+%<@@=>
+% \end{macrocode}
%
-% \begin{macro}{\@expl@@@mark at update@singlecol at structures@@,
+% \begin{macro}[int]{\@expl@@@mark at update@singlecol at structures@@,
% \@expl@@@mark at update@dblcol at structures@@}
-%
% \begin{macrocode}
-%<@@=>
-\cs_set_eq:NN \@expl@@@mark at update@singlecol at structures@@
+\cs_new_eq:NN \@expl@@@mark at update@singlecol at structures@@
\__mark_update_singlecol_structures:
-\cs_set_eq:NN \@expl@@@mark at update@dblcol at structures@@
+\cs_new_eq:NN \@expl@@@mark at update@dblcol at structures@@
\__mark_update_dblcol_structures:
% \end{macrocode}
% \end{macro}
@@ -1551,7 +1567,7 @@
%<latexrelease>\renewcommand \FirstMark[2][]{}
%<latexrelease>\renewcommand \LastMark[2][]{}
%<latexrelease>\renewcommand \FirstMark[2][]{}
-%<latexrelease>\DeclareRobustCommand \IfMarksEqualTF[4][]{}
+%<latexrelease>\renewcommand \IfMarksEqualTF[4][]{}
%<latexrelease>
% \end{macrocode}
% Same here, this avoided extra roll back code in the OR.
More information about the latex3-commits
mailing list.