[latex3-commits] [l3svn] r7393 - Disable the shorthand "<" for \meta in math mode in l3doc (fixes #356)

noreply at latex-project.org noreply at latex-project.org
Tue Jul 18 02:02:04 CEST 2017


Author: bruno
Date: 2017-07-18 02:02:04 +0200 (Tue, 18 Jul 2017)
New Revision: 7393

Modified:
   trunk/l3kernel/l3doc.dtx
Log:
Disable the shorthand "<" for \meta in math mode in l3doc (fixes #356)


Modified: trunk/l3kernel/l3doc.dtx
===================================================================
--- trunk/l3kernel/l3doc.dtx	2017-07-17 04:30:21 UTC (rev 7392)
+++ trunk/l3kernel/l3doc.dtx	2017-07-18 00:02:04 UTC (rev 7393)
@@ -2252,34 +2252,39 @@
 % \end{macro}
 %
 % \begin{macro}[aux]{\@@_function_init:}
-%   Allow |<...>| to be used as markup for |\meta{...}|.  Clear various
-%   variables.
+%   Clear various variables.
 %    \begin{macrocode}
-\group_begin:
-  \char_set_catcode_active:N \<
-  \cs_new_protected:Npn \@@_function_init:
-    {
-      \coffin_clear:N \l_@@_descr_coffin
-      \box_gclear:N \g_@@_syntax_box
-      \coffin_clear:N \l_@@_syntax_coffin
-      \coffin_clear:N \l_@@_functions_coffin
-      \bool_set_false:N \l_@@_macro_TF_bool
-      \bool_set_false:N \l_@@_macro_pTF_bool
-      \bool_set_false:N \l_@@_macro_noTF_bool
-      \bool_set_false:N \l_@@_macro_EXP_bool
-      \bool_set_false:N \l_@@_macro_rEXP_bool
-      \bool_set_false:N \l_@@_no_label_bool
-      \bool_set_false:N \l_@@_names_verb_bool
-      \bool_set_true:N \l_@@_in_function_bool
-      \clist_clear:N \l_@@_function_label_clist
-      \tl_set:Nn \l_@@_override_module_tl { \q_no_value }
-      \char_set_catcode_active:N \<
-      \cs_set_protected_nopar:Npn < ##1 > { \meta {##1} }
-    }
-\group_end:
+\cs_new_protected:Npn \@@_function_init:
+  {
+    \coffin_clear:N \l_@@_descr_coffin
+    \box_gclear:N \g_@@_syntax_box
+    \coffin_clear:N \l_@@_syntax_coffin
+    \coffin_clear:N \l_@@_functions_coffin
+    \bool_set_false:N \l_@@_macro_TF_bool
+    \bool_set_false:N \l_@@_macro_pTF_bool
+    \bool_set_false:N \l_@@_macro_noTF_bool
+    \bool_set_false:N \l_@@_macro_EXP_bool
+    \bool_set_false:N \l_@@_macro_rEXP_bool
+    \bool_set_false:N \l_@@_no_label_bool
+    \bool_set_false:N \l_@@_names_verb_bool
+    \bool_set_true:N \l_@@_in_function_bool
+    \clist_clear:N \l_@@_function_label_clist
+    \tl_set:Nn \l_@@_override_module_tl { \q_no_value }
+    \char_set_active_eq:NN \< \@@_shorthand_meta:
+    \char_set_catcode_active:N \<
+  }
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}[aux]{\@@_shorthand_meta:, \@@_shorthand_meta:w}
+%   Allow |<...>| to be used as markup for |\meta{...}|.
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_shorthand_meta:
+  { \mode_if_math:TF { < } { \@@_shorthand_meta:w } }
+\cs_new_protected_nopar:Npn \@@_shorthand_meta:w #1 > { \meta {#1} }
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}[aux]{\@@_function_reset:}
 %   Clear some variables.
 %    \begin{macrocode}



More information about the latex3-commits mailing list