[latex3-commits] [latex3/latex2e] latexlab/uf-review-04: minor source cleanup (1a956f88)

github at latex-project.org github at latex-project.org
Mon Oct 30 23:08:44 CET 2023


Repository : https://github.com/latex3/latex2e
On branch  : latexlab/uf-review-04
Link       : https://github.com/latex3/latex2e/commit/1a956f88464cdd42b96fb0888a3d17cf2001f565

>---------------------------------------------------------------

commit 1a956f88464cdd42b96fb0888a3d17cf2001f565
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Mon Oct 30 23:08:44 2023 +0100

    minor source cleanup


>---------------------------------------------------------------

1a956f88464cdd42b96fb0888a3d17cf2001f565
 required/latex-lab/latex-lab-table.dtx | 101 +++++++++++++++++----------------
 1 file changed, 51 insertions(+), 50 deletions(-)

diff --git a/required/latex-lab/latex-lab-table.dtx b/required/latex-lab/latex-lab-table.dtx
index 6c891402..699fd5ac 100644
--- a/required/latex-lab/latex-lab-table.dtx
+++ b/required/latex-lab/latex-lab-table.dtx
@@ -296,7 +296,7 @@
 \tl_new:N  \l_@@_rowattribute_tl
 \tl_set:Nn \l_@@_rowattribute_tl {}
 %    \end{macrocode}
-% This will contain the number of missing cells used
+% This will contain the number of missing cells used:
 %    \begin{macrocode}
 \int_new:N \g_@@_missing_cells_int
 %    \end{macrocode}
@@ -310,9 +310,10 @@
 %
 % \subsection{Sockets}
 %
-% The code uses a number of sockets to inject the tagging commands. These can
-% be easily set to a noop-plug in case the automated tagging is not wanted
-% At first sockets for the begin and end of cells and rows
+% The code uses a number of sockets to inject the tagging
+% commands. These can be easily set to a noop-plug in case the
+% automated tagging is not wanted At first sockets for the begin and
+% end of cells and rows
 %
 % \begin{socketdecl}{tagsupport/tblcell/begin,
 %                    tagsupport/tblcell/end,
@@ -329,9 +330,9 @@
 %
 % \begin{socketdecl}{tagsupport/tbl/init}
 %    This socket should be at the begin of the table, inside a group.
-%    It is meant for settings like disabling paratagging.
-%    This socket can perhaps be merged later into the begin-sockets when they
-%    are no longer added as hooks but in the environment definitions.
+%    It is meant for settings like disabling paratagging.  This socket
+%    can perhaps be merged later into the begin-sockets when they are
+%    no longer added as hooks but in the environment definitions.
 %    \begin{macrocode}
 \NewSocket{tagsupport/tbl/init}{0}
 %    \end{macrocode}
@@ -339,21 +340,21 @@
 %
 %
 % \begin{socketdecl}{tagsupport/tbl/finalize}
-% To fine tune the structure (change cells to header cells,
-% remove unwanted structures, move a foot to the end etc)
-% we also need a socket that is executed at the end of the
-% table but \emph{before} all the variables are restored to the outer or default values.
-% The code in the socket can make assignments but probably shouldn't do typesetting and not
-% write whatsits.
+%    To fine tune the structure (change cells to header cells, remove
+%    unwanted structures, move a foot to the end, etc.) we also need a
+%    socket that is executed at the end of the table but \emph{before}
+%    all the variables are restored to the outer or default values.
+%    The code in the socket can make assignments, but probably
+%    shouldn't do typesetting and not write whatsits.
 %    \begin{macrocode}
 \NewSocket{tagsupport/tbl/finalize}{0}
 %    \end{macrocode}
 % \end{socketdecl}
 %
 % \begin{socketdecl}{tagsupport/tbl/finalize/longtable}
-% longtable needs its own socket to fine tune the structure.
-% Simply switching the plug in the previous socket interferes
-% with enabling/disabling the tagging.
+%    \env{longtable} needs its own socket to fine tune the structure.
+%    Simply switching the plug in the previous socket interferes with
+%    enabling/disabling the tagging.
 %    \begin{macrocode}
 \NewSocket{tagsupport/tbl/finalize/longtable}{0}
 %    \end{macrocode}
@@ -367,8 +368,8 @@
 %
 %    These sockets are used in the begin and end code of environments,
 %    to allow a fast enabling and disabling of the tagging. We
-%    distinguish between tables that can be used inside paragraphs
-%    and standalone tables like longtable.
+%    distinguish between tables that can be used inside paragraphs and
+%    standalone tables like longtable.
 %    \begin{macrocode}
 \NewSocket{tagsupport/tblhmode/begin}{0}
 \NewSocket{tagsupport/tblhmode/end}{0}
@@ -412,7 +413,8 @@
 %    \end{macrocode}
 % \end{plugdecl}
 % 
-% In p-columns we need a slightly different plug which reactivates para
+%    In p-columns we need a slightly different plug which reactivates the
+%    paragraph tagging.
 % tagging
 % \begin{plugdecl}{TD}
 %    \begin{macrocode}
@@ -481,13 +483,14 @@
 %    \end{macrocode}
 % \end{plugdecl}
 %
-% And the plugs for the table as whole. The code can be different for normal tables which
-% can also be used inline and nested and \enquote{vmode} tables like longtable.
+% And the plugs for the table as whole. The code can be different for
+% normal tables which can also be used inline and nested and
+% \enquote{vmode} tables like longtable.
 %
 % \begin{plugdecl}{Table}
-% Inside a table we currently only disable
-% paratagging. We assume that these sockets are in an environment
-% group, so there is no need to reenable paratagging.
+%    Inside a table we currently only disable paratagging. We assume
+%    that these sockets are in an environment group, so there is no
+%    need to reenable paratagging.
 %    \begin{macrocode}
 \NewSocketPlug{tagsupport/tbl/init}{Table}
   {
@@ -516,18 +519,17 @@
 \NewSocketPlug{tagsupport/tbl/finalize/longtable}{Table}
   {
 %    \end{macrocode}
-%    If neither \cs{endhead} nor \cs{endfirsthead} has been use
-%    we use the standard header command
+%    If neither \cs{endhead} nor \cs{endfirsthead} has been used
+%    we use the standard header command:
 %    \begin{macrocode}
      \bool_lazy_and:nnTF
        { \seq_if_empty_p:N \g_@@_LT at head_rows_seq  }
        { \seq_if_empty_p:N \g_@@_LT at firsthead_rows_seq }
        { \@@_set_header_rows: }
 %    \end{macrocode}
-%    otherwise
-%      if firsthead has not been used we use head. For this
-%      we simple retrieve the row numbers and then call the
-%      header command.
+%    Otherwise, if firsthead has not been used we use head. For this
+%    we simple retrieve the row numbers and then call the header
+%    command.
 %    \begin{macrocode}
        {
          \seq_if_empty:NTF \g_@@_LT at firsthead_rows_seq
@@ -537,18 +539,18 @@
              \@@_set_header_rows:
            }
 %    \end{macrocode}
-% In the other case we use firsthead
+%    In the other case we use firsthead.
 %    \begin{macrocode}
            {
              \clist_set:Ne \l_@@_header_rows_clist
                { \seq_use:Nn \g_@@_LT at firsthead_rows_seq {,} }
              \@@_set_header_rows:
 %    \end{macrocode}
-% Addtionally we have to remove the head to avoid duplication. The
-% one option here is to remove the rows from the kid sequence of the
-% table (which will lead to orphaned structure elements), the other to make them artifact.
-% For now we use the first option for pdf 1.7 and the second
-% for pdf 2.0.
+%    Additionally we have to remove the head to avoid duplication. The
+%    one option here is to remove the rows from the kid sequence of
+%    the table (which will lead to orphaned structure elements), the
+%    other to make them artifact.  For now we use the first option for
+%    pdf 1.7 and the second for pdf 2.0.
 %    \begin{macrocode}
              \pdf_version_compare:NnTF < {2.0}
               {
@@ -559,10 +561,9 @@
                       { ##1 }
                       {}
 %    \end{macrocode}
-% Not sure if needed, but if needed we can remove also the P tag.
-% This is currently disabled as it produce warnings.
-% TODO: This needs also
-% a tagpdf command which takes care of debug code.
+%    Not sure if needed, but if needed we can remove also the P tag.
+%    This is currently disabled as it produce warnings.  TODO: This
+%    needs also a tagpdf command which takes care of debug code.
 %    \begin{macrocode}
                     \tl_set:Ne \l_@@_tmpa_tl
                       { \seq_item:Nn\g_@@_struct_rows_seq {##1} }
@@ -588,16 +589,16 @@
             }
        }
 %    \end{macrocode}
-% The foot is handled similar, the difference is
-% that we have to move it to the end one of them
-% is not empty, but do nothing if they aren't there.
+%    The foot is handled similar, the difference is
+%    that we have to move it to the end one of them
+%    is not empty, but do nothing if they aren't there.
 %    \begin{macrocode}
      \bool_lazy_and:nnF
        { \seq_if_empty_p:N \g_@@_LT at foot_rows_seq  }
        { \seq_if_empty_p:N \g_@@_LT at lastfoot_rows_seq }
        {
 %    \end{macrocode}
-% If lastfoot is empty move foot to the end
+%    If lastfoot is empty move foot to the end.
 %    \begin{macrocode}
          \seq_if_empty:NTF \g_@@_LT at lastfoot_rows_seq
            {
@@ -619,7 +620,7 @@
                }
            }
 %    \end{macrocode}
-% if lastfoot is not empty we move that
+%    If lastfoot is not empty we move that.
 %    \begin{macrocode}
            {
              \seq_map_inline:Nn \g_@@_LT at lastfoot_rows_seq
@@ -639,7 +640,7 @@
                    \l_@@_tmpa_tl
                }
 %    \end{macrocode}
-% and we hide foot
+%    and we hide foot
 %    \begin{macrocode}
             \pdf_version_compare:NnTF < {2.0}
               {
@@ -650,10 +651,10 @@
                       { ##1 }
                       {}
 %    \end{macrocode}
-% Not sure if needed, but if needed we can remove also the P tag.
-% This is currently disabled as it produce warnings.
-% TODO: This needs also
-% a tagpdf command which takes care of debug code.
+%    Not sure if needed, but if needed we can remove also the P tag.
+%    This is currently disabled as it produce warnings.
+%    TODO: This needs also
+%    a tagpdf command which takes care of debug code.
 %    \begin{macrocode}
                     \tl_set:Ne \l_@@_tmpa_tl
                       { \seq_item:Nn\g_@@_struct_rows_seq {##1} }





More information about the latex3-commits mailing list.