[latex3-commits] [latex3/latex2e] latex-lab/uf-review-05: correct test and message for item outside list, latex3/tagging-project#35 (b1622983)

github at latex-project.org github at latex-project.org
Sat Nov 18 18:40:16 CET 2023


Repository : https://github.com/latex3/latex2e
On branch  : latex-lab/uf-review-05
Link       : https://github.com/latex3/latex2e/commit/b1622983e5148c93b6e27fd7b0748abdb559250e

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

commit b1622983e5148c93b6e27fd7b0748abdb559250e
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Sat Nov 18 18:40:16 2023 +0100

    correct test and message for item outside list, latex3/tagging-project#35


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

b1622983e5148c93b6e27fd7b0748abdb559250e
 required/latex-lab/latex-lab-block.dtx | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/required/latex-lab/latex-lab-block.dtx b/required/latex-lab/latex-lab-block.dtx
index 5279c121..88931237 100644
--- a/required/latex-lab/latex-lab-block.dtx
+++ b/required/latex-lab/latex-lab-block.dtx
@@ -691,7 +691,7 @@
 \tl_new:N \l_@@_item_align_tl
 \tl_new:N\l_@@_legacy_env_params_tl
 %    \end{macrocode}
-
+%
 % \subsection{Handling \cs{par} after the end of the list}
 %
 % An empty line (or a \cs{par}) after a list has semantic meaning as
@@ -2488,10 +2488,13 @@
     {
       \@inmatherr \item
 %    \end{macrocode}
-%    TODO: Test for being outside of a list needs updating!
+%    TODO: Check if test for being outside of a list is sensible
 %    \begin{macrocode}
-      \tl_if_empty:oTF \@@_item_instance:n %%FMi?
-        { \msg_error:nnn { @@ } { item-in-nonlist } { \item[{#1}] } }
+      \cs_if_free:NTF \@@_item_instance:n
+        {
+          \@latex at error{Lonely~\string\item--perhaps~a~missing~
+          list~environment}\@ehc
+        }
         {
           \legacy_if:nTF { @newlist }
             { \__kernel_list_item_begin: }





More information about the latex3-commits mailing list.