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

Make some use of `\sarg` in manual examples #256

Closed muzimuzhi closed 6 months ago

muzimuzhi commented 7 months ago

\sarg is supported since v6.0.2 (see #193) and it is designed to represent an optional star as one of command arguments.

Currently there are two examples that document commands accepting an optional star, but for now such stars are both part of command names, hence visually non optional.

In two examples for docCommand env

I feel like \foomakedocSubKey and \foomakedocSubKey* are not a good pair of examples, since the real command \tcbmakedocSubKey doesn't have a starred form.

Either the second example for \foomakedocSubKey* can be removed or \foomakedocSubKey(*) can be replaced by some command that does have a starred form, like \section

In the example for docCommands env

PS: For highlighting, \sarg need to be added to \lstdefinestyle{mydocumentation}{...} in tcolorbox.doc.s_main.sty

diff --git a/doc/latex/tcolorbox/tcolorbox.doc.s_main.sty b/doc/latex/tcolorbox/tcolorbox.doc.s_main.sty
index 5aaf1b5..f2c5339 100644
--- a/doc/latex/tcolorbox/tcolorbox.doc.s_main.sty
+++ b/doc/latex/tcolorbox/tcolorbox.doc.s_main.sty
@@ -205,6 +205,7 @@
     meta,marg,
     oarg,
     refCom,refEnv,refKey,
+    sarg,
     tcbmakedocSubKey,tcbdocmarginnote,tcbdocnew,tcbdocupdated,
     % skins
     tcbincludegraphics,tcbincludepdf,pdfpages,imagepage,imagepath,imagename,
T-F-S commented 7 months ago

The \foomakedocSubKey example is needed for later reference, but I can replace the \foomakedocSubKey* by a \section* example as suggested. Also, I will change the newtheorem example. Thank you.

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