T-F-S / tcolorbox

A LaTeX package to create highly customizable colored boxes.
http://www.ctan.org/pkg/tcolorbox
LaTeX Project Public License v1.3c
213 stars 15 forks source link

Expl3 arg-spec of `\__tcobox_new_bool_key:nn` should be `Nn` #257

Closed muzimuzhi closed 6 months ago

muzimuzhi commented 7 months ago

According to texdoc expl3 (2023-11-09), sec. 3.2.6 "Functions: argument specifications"

n Unexpanded token or braced token list. This is a standard TEX undelimited macro argument. N Single token (unlike n, the argument must not be surrounded by braces). A typical example of a command taking an N argument is \cs_set, in which the command being defined must be unbraced.

The first argument of \__tcobox_new_bool_key:nn is a bool variable, hence N is the right choice.

diff --git a/tex/latex/tcolorbox/tcbdocumentation.code.tex b/tex/latex/tcolorbox/tcbdocumentation.code.tex
index ecdcf95..7e900ea 100644
--- a/tex/latex/tcolorbox/tcbdocumentation.code.tex
+++ b/tex/latex/tcolorbox/tcbdocumentation.code.tex
@@ -333,7 +333,7 @@
 \ExplSyntaxOn

-\cs_new_nopar:Npn \__tcobox_new_bool_key:nn #1 #2
+\cs_new_nopar:Npn \__tcobox_new_bool_key:Nn #1 #2
   {
     \bool_new:N #1
     \tcbset
@@ -345,15 +345,15 @@
       }
   }

-\__tcobox_new_bool_key:nn \l__tcobox_doc_toindex_bool { doc~into~index }
-\__tcobox_new_bool_key:nn \l__tcobox_doc_gather_colors_bool       { index~gather~colors }
-\__tcobox_new_bool_key:nn \l__tcobox_doc_gather_commands_bool     { index~gather~commands }
-\__tcobox_new_bool_key:nn \l__tcobox_doc_gather_counters_bool     { index~gather~counters }
-\__tcobox_new_bool_key:nn \l__tcobox_doc_gather_environments_bool { index~gather~environments }
-\__tcobox_new_bool_key:nn \l__tcobox_doc_gather_keys_bool         { index~gather~keys }
-\__tcobox_new_bool_key:nn \l__tcobox_doc_gather_lengths_bool      { index~gather~lengths }
-\__tcobox_new_bool_key:nn \l__tcobox_doc_gather_paths_bool        { index~gather~paths }
-\__tcobox_new_bool_key:nn \l__tcobox_doc_gather_values_bool       { index~gather~values }
+\__tcobox_new_bool_key:Nn \l__tcobox_doc_toindex_bool { doc~into~index }
+\__tcobox_new_bool_key:Nn \l__tcobox_doc_gather_colors_bool       { index~gather~colors }
+\__tcobox_new_bool_key:Nn \l__tcobox_doc_gather_commands_bool     { index~gather~commands }
+\__tcobox_new_bool_key:Nn \l__tcobox_doc_gather_counters_bool     { index~gather~counters }
+\__tcobox_new_bool_key:Nn \l__tcobox_doc_gather_environments_bool { index~gather~environments }
+\__tcobox_new_bool_key:Nn \l__tcobox_doc_gather_keys_bool         { index~gather~keys }
+\__tcobox_new_bool_key:Nn \l__tcobox_doc_gather_lengths_bool      { index~gather~lengths }
+\__tcobox_new_bool_key:Nn \l__tcobox_doc_gather_paths_bool        { index~gather~paths }
+\__tcobox_new_bool_key:Nn \l__tcobox_doc_gather_values_bool       { index~gather~values }

 \cs_new_nopar:Npn \__tcobox_sanitize_tl:n #1
T-F-S commented 7 months ago

Thank you for hinting me to that. Will be corrected.

muzimuzhi commented 7 months ago

Resolved in eb19e7e (6.2.0 (Preview 3), 2023-11-24).

T-F-S commented 6 months ago

Done with https://github.com/T-F-S/tcolorbox/releases/tag/v6.2.0