[latex3-commits] [latex3/latex2e] develop: more minor stuff, eg indentation, periods, initial caps ... (580343fc)

github at latex-project.org github at latex-project.org
Tue Oct 31 11:21:27 CET 2023


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/580343fcff7d406cdf4707916e66a4ee904dc843

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

commit 580343fcff7d406cdf4707916e66a4ee904dc843
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Tue Oct 31 00:16:45 2023 +0100

    more minor stuff, eg indentation, periods, initial caps ...


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

580343fcff7d406cdf4707916e66a4ee904dc843
 required/latex-lab/latex-lab-table.dtx | 160 +++++++++++++++++++--------------
 1 file changed, 91 insertions(+), 69 deletions(-)

diff --git a/required/latex-lab/latex-lab-table.dtx b/required/latex-lab/latex-lab-table.dtx
index 699fd5ac..700d4ce6 100644
--- a/required/latex-lab/latex-lab-table.dtx
+++ b/required/latex-lab/latex-lab-table.dtx
@@ -690,8 +690,8 @@
     \mode_leave_vertical:
     \tag_mc_end_push:
 %    \end{macrocode}
-% close the P-chunk. This assumes that para-tagging is active.
-% For nested tables that is not necessarly true, so we test for it.
+%    Close the P-chunk. This assumes that para-tagging is active.
+%    For nested tables that is not necessarly true, so we test for it.
 %    \begin{macrocode}
      \bool_lazy_and:nnT
       { \bool_if_exist_p:N \l__tag_para_bool } { \l__tag_para_bool }
@@ -701,6 +701,7 @@
   }
 %    \end{macrocode}
 % \end{plugdecl}
+%
 % \begin{plugdecl}{Table}
 %    \begin{macrocode}
 \NewSocketPlug{tagsupport/tblhmode/end}{Table}
@@ -769,10 +770,11 @@
 % \subsection{Interfaces to tagging}
 %
 % \subsubsection{Tagging helper commands}
+%
 % \begin{macro}{\@@_set_colspan:n}
-% This commands takes a number, checks if is larger than one, checks if the
-% colspan attribute exists (we can't predefine an arbitrary number), and
-% updates \cs{l_@@_cellattribute_tl}.
+%    This commands takes a number, checks if is larger than one,
+%    checks if the colspan attribute exists (we can't predefine an
+%    arbitrary number), and updates \cs{l_@@_cellattribute_tl}.
 %    \begin{macrocode}
 \tag_if_active:T
   { \cs_generate_variant:Nn \__tag_attr_new_entry:nn {ee} }
@@ -857,7 +859,7 @@
   }
 %    \end{macrocode}
 %
-% Table tagging should be disabled in the head and foot
+% Table tagging should be disabled in the head and foot.
 %    \begin{macrocode}
 \AddToHook{begindocument}
  {
@@ -870,16 +872,20 @@
 %    \end{macrocode}
 %
 % \subsubsection{Header support}
+%
 % Accessible table must have header cells declaring the meaning of the
 % data in a row or column. To allow a data cell to find it header cell(s)
 % a number of things must be done:
 % \begin{itemize}
 % \item every cell meant as a header should use the tag \texttt{TH}.
-% \item header cells should have a \texttt{Scope} attribute with the value
-% \texttt{Column}, \texttt{Row} or \texttt{Both}.
-%  This is not needed in the first row or column of a table.
-% \item For more complex cases both \texttt{TD} and \texttt{TH} cell can contain
-% a \texttt{Headers} attribute, that is an array of \texttt{ID}s of \texttt{TH} cell.
+%
+% \item header cells should have a \texttt{Scope} attribute with the
+%   value \texttt{Column}, \texttt{Row} or \texttt{Both}.  This is not
+%   needed in the first row or column of a table.
+% 
+% \item For more complex cases both \texttt{TD} and \texttt{TH} cell
+%   can contain a \texttt{Headers} attribute, that is an array of
+%   \texttt{ID}s of \texttt{TH} cell.
 % \end{itemize}
 %
 % For now we support only header rows.
@@ -919,15 +925,17 @@
 %    \end{macrocode}
 %
 % \begin{variable}{\l_@@_header_rows_clist}
-% This holds the numbers of the header rows. Negative numbers are possible
-% and count from the back.
+%    This holds the numbers of the header rows. Negative numbers are
+%    possible and count from the back.
 %    \begin{macrocode}
 \clist_new:N  \l_@@_header_rows_clist
 %    \end{macrocode}
 % \end{variable}
+%
 % \begin{macro}{\@@_set_header_rows:}
-% TEMP: Next tagpdf will have the right command which also updates the debug info.
-% For now a temporary command:
+%    TEMP: Next tagpdf will have the right command which also updates
+%    the debug info.
+%    For now a temporary command:
 %    \begin{macrocode}
 \cs_if_free:NTF \__tag_struct_prop_gput:nnn
    {
@@ -952,14 +960,14 @@
         \clist_map_inline:Nn \l_@@_tmpa_clist
           {
 %    \end{macrocode}
-%   We can have negative numbers in the list from the multicolumn
+%    We can have negative numbers in the list from the multicolumn.
 %    \begin{macrocode}
             \prop_if_exist:cT { g__tag_struct_####1_prop }
               {
                 \@@_struct_prop_gput:nnn{ ####1 }{S}{/TH}
 %    \end{macrocode}
-%  This need refinement once row headers (and perhaps other attributes)
-%  are used too, but for now it should be ok
+%    This need refinement once row headers (and perhaps other attributes)
+%    are used too, but for now it should be ok.
 %    \begin{macrocode}
                 \prop_get:cnNTF
                   { g__tag_struct_####1_prop }
@@ -973,7 +981,8 @@
   }
 %    \end{macrocode}
 % \end{macro}
-% And some key support
+%  
+% And some key support:
 %    \begin{macrocode}
 % TODO decide about key name
 \keys_define:nn { __tag / setup }
@@ -1004,7 +1013,8 @@
 %
 %
 % \begin{macro}{\insert at column}
-%    \cs{insert at column} is defined in \pkg{array}, here only the two sockets are inserted.
+%    \cs{insert at column} is defined in \pkg{array}, here only the two
+%    sockets are inserted.
 %    \begin{macrocode}
 \def\insert at column{%
   \@@_show_curr_cell_data:
@@ -1083,7 +1093,8 @@
   \xdef\@preamble{%
     \noexpand
 %    \end{macrocode}
-%    \cs{ialign} in the original definition is replaced by \cs{ar at ialign} defined below.
+%    \cs{ialign} in the original definition is replaced by
+%    \cs{ar at ialign} defined below.
 %    \begin{macrocode}
      \ar at ialign
      \@halignto
@@ -1093,11 +1104,10 @@
 %    \begin{macrocode}
       \UseSocket{tagsupport/tblrow/begin}%
 %    \end{macrocode}
-%    At the start of the preamble for the first column we set \cs{g_@@_col_int}
-%    to \texttt{1} as we
-%    are no longer "at" but "in" the first column. This is done in
-%    \cs{@@_init_cell_data:}. In later columns this data is updated via
-%    \cs{@@_update_cell_data:}.
+%    At the start of the preamble for the first column we set
+%    \cs{g_@@_col_int} to \texttt{1} as we are no longer "at" but "in"
+%    the first column. This is done in \cs{@@_init_cell_data:}. In
+%    later columns this data is updated via \cs{@@_update_cell_data:}.
 %    \begin{macrocode}
       \@@_init_cell_data:
       \@preamble
@@ -1183,9 +1193,8 @@
 %
 %
 %
-%  \begin{macro}{
-%   \@@_store_missing_cells:n,
-%   \__tag_tbl_add_missing_cells:n}
+%  \begin{macro}{\@@_store_missing_cells:n,
+%                \__tag_tbl_add_missing_cells:n}
 %    The storing and use of the number of missing cells
 %    must happen at different places  as the testing happens at
 %    the end of the last cell of a row, but
@@ -1211,7 +1220,9 @@
         }
       }
 }
-
+%    \end{macrocode}
+%
+%    \begin{macrocode}
 \cs_new:Npn \__tag_tbl_add_missing_cells:n #1
   {
 %    \end{macrocode}
@@ -1242,7 +1253,7 @@
 %    are globally manipulated. We restore in all cases even if we are
 %    not in a nesting situation as that makes the code simpler (and
 %    probably faster).
-
+%
 %    \cs{endtabular} and \cs{endtabular*} inherit from \cs{endarray}
 %    so we only need to change that. \texttt{tabularx} is handled
 %    below.
@@ -1355,17 +1366,18 @@
 %     \g_@@_struct_cells_seq,\l_@@_saved_struct_cells_seq,
 %     \g_@@_struct_cur_seq,\l_@@_saved_struct_cur_seq
 %   }
-% We need to store the structure numbers for the fine tuning in the finalize socket.
-% For now we use a rather simple system: A sequence that hold the numbers for the
-% row structures, and one that holds comma lists for the cells.
+%    We need to store the structure numbers for the fine tuning in the
+%    finalize socket.  For now we use a rather simple system: A
+%    sequence that hold the numbers for the row structures, and one
+%    that holds comma lists for the cells.
 %
-% \cs{g_@@_struct_table_tl} will hold the structure number of the table,
-% \cs{g_@@_struct_rows_seq} will hold at index i the structure number of row i,
-% \cs{g_@@_struct_cells_seq} will hold at index i a comma list  of the
-% cell structure numbers of row i.
-% \cs{g_@@_struct_cur_seq} is used as a temporary store for
-% the cell structures of the current row.
-% We need also local version to store and restore the values.
+%    \cs{g_@@_struct_table_tl} will hold the structure number of the
+%    table, \cs{g_@@_struct_rows_seq} will hold at index i the
+%    structure number of row i, \cs{g_@@_struct_cells_seq} will hold
+%    at index i a comma list of the cell structure numbers of row i.
+%    \cs{g_@@_struct_cur_seq} is used as a temporary store for the
+%    cell structures of the current row.  We need also local version
+%    to store and restore the values.
 %
 %    \begin{macrocode}
 \tl_new:N  \g_@@_struct_table_tl
@@ -1380,9 +1392,9 @@
 % \end{macro}
 %
 % \begin{macro}{\ar at ialign}
-% A new command that replaces \cs{ialign} above.
-% \cs{everycr} is also applied to the \cs{cr} ending the preamble
-% so we have to program around that.
+%    A new command that replaces \cs{ialign} above.  \cs{everycr} is
+%    also applied to the \cs{cr} ending the preamble so we have to
+%    program around that.
 %    \begin{macrocode}
 \def\ar at ialign{%
 %    \end{macrocode}
@@ -1490,8 +1502,8 @@
    \@mkpream{#2}\@addtopreamble\@empty
    \endgroup
 %    \end{macrocode}
-%    Now we update the colspan attribute.  this needs setting after
-%    the group as it is hidden inside the plug in \cs{insert at column}
+%    Now we update the colspan attribute.  This needs setting after
+%    the group as it is hidden inside the plug in \cs{insert at column}.
 %    \begin{macrocode}
    \@@_set_colspan:n {#1}
 %    \end{macrocode}
@@ -1505,16 +1517,20 @@
 %
 % \subsection{longtable}
 %
-% Longtable is complicated. When at the begin the \cs{endhead}, \cs{endfirsthead},
-% \cs{endfoot} and \cs{endlastfoot} are used to setup head and foot they create
-% each a structure subtree with one or more rows. From this structures we want to keep
-% at most two (head and foot) and move the foot to the end of the table. When the
-% head and foot boxes are (re)inserted on following pages we want to mark them up as artifact
-% with the exception of the head at the begin and the foot box at the end.
+% Longtable is complicated. When at the begin the \cs{endhead},
+% \cs{endfirsthead}, \cs{endfoot} and \cs{endlastfoot} are used to
+% setup head and foot they create each a structure subtree with one or
+% more rows. From this structures we want to keep at most two (head
+% and foot) and move the foot to the end of the table. When the head
+% and foot boxes are (re)inserted on following pages we want to mark
+% them up as artifact with the exception of the head at the begin and
+% the foot box at the end.
 %
-% TODO: When a line is killed the structure subtree is there already too and must be removed.
+% TODO: When a line is killed the structure subtree is there already
+% too and must be removed.
 % 
-% Hyperref patches longtable. This must be disabled and replace with genuine code
+% Hyperref patches longtable. This must be disabled and replace with
+% genuine code
 %    \begin{macrocode}
 \let\@kernel at refstepcounter\refstepcounter
 \def\hyper at nopatch@longtable{}
@@ -1682,9 +1698,9 @@
   \endgraf\penalty\z@\addvspace\LTpost
   \ifvoid\footins\else\insert\footins{}\fi}
 %    \end{macrocode}
-
-
-
+%
+%
+%
 %  \begin{macro}{\@@_patch_LT at t@bularcr}
 %
 %    \begin{macrocode}
@@ -1708,13 +1724,13 @@
 
 %    \end{macrocode}
 %  \end{macro}
-
-
-
+%
+%
+%
 %  \begin{macro}{\@@_patch_LT at end@hd at ft}
-% This command is used to store the head and foot boxes.
-% We need to retrieve and store the row so that we can clean
-% up the structure in the finalize code.
+%    This command is used to store the head and foot boxes.
+%    We need to retrieve and store the row so that we can clean
+%    up the structure in the finalize code.
 %    \begin{macrocode}
 \def\@@_patch_LT at end@hd at ft#1{%
 %    \end{macrocode}
@@ -1796,8 +1812,10 @@
 %    \end{macrocode}
 % \end{macro}
 %
+%
 % \begin{macro}{\@@_patch_LT at output}
-% We must also avoid that the reuse of the foot box leads to duplicated content:
+%    We must also avoid that the reuse of the foot box leads to
+%    duplicated content:
 %    \begin{macrocode}
 \def\@@_patch_LT at output{%
   \ifnum\outputpenalty <-\@Mi
@@ -1819,7 +1837,7 @@
       \fi
         \unvbox\z@\box\ifvoid\LT at lastfoot\LT at foot\else\LT at lastfoot\fi
 %    \end{macrocode}
-% reset attribute of foot box
+%    Reset attribute of foot box:
 %    \begin{macrocode}
         \tagmcbegin{artifact}
         \tag_mc_reset_box:N \LT at foot
@@ -1828,7 +1846,7 @@
   \else
     \setbox\@cclv\vbox{\unvbox\@cclv\copy\LT at foot\vss}%
 %    \end{macrocode}
-% reset attribute of foot box:
+%    Reset attribute of foot box:
 %    \begin{macrocode}
     \tagmcbegin{artifact}
     \tag_mc_reset_box:N \LT at foot
@@ -1842,8 +1860,8 @@
 % \end{macro}
 %
 % \begin{macro}{\@@_patch_\LT at makecaption}
-%  This patch is quite similar to the one for LaTeX's \cs{@makecaption}
-%  we also have to change the parbox sockets.
+%     This patch is quite similar to the one for LaTeX's \cs{@makecaption}
+%     we also have to change the parbox sockets.
 %    \begin{macrocode}
 \def\@@_patch_LT at makecaption#1#2#3{%
   \LT at mcol\LT at cols c{%
@@ -1867,6 +1885,9 @@
   \hss}}}
 %    \end{macrocode}
 % \end{macro}
+%
+%
+%
 % Overwrite the longtable definition. That will probably break somewhere as
 % they are various package which patch too.
 %    \begin{macrocode}
@@ -1892,7 +1913,8 @@
 
 % \subsection{tabularx}
 %
-% In tabularx we mainly need to ensure that no tagging is done during the trial.
+% In tabularx we mainly need to ensure that no tagging is done during
+% the trial.
 %
 %    \begin{macrocode}
 \def\@@_patch_TX at endtabularx{%





More information about the latex3-commits mailing list.