8000 Commands defined by `\newtcbox`, `\NewTCBox`, and friends · Issue #300 · T-F-S/tcolorbox · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commands defined by \newtcbox, \NewTCBox, and friends #300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
muzimuzhi opened this issue Nov 16, 2024 · 5 comments
8000
Closed

Commands defined by \newtcbox, \NewTCBox, and friends #300

muzimuzhi opened this issue Nov 16, 2024 · 5 comments
Assignees

Comments

@muzimuzhi
Copy link
Contributor
muzimuzhi commented Nov 16, 2024

As documented, a new command \⟨name⟩ defined by \newtcbox[⟨init options⟩]{\⟨name⟩}[⟨number⟩][⟨default⟩]{⟨options⟩} or \newtcboxfit takes ⟨number⟩+1 arguments. With current implementation, the last mandatory argument is curried thus \⟨name⟩ can take at most 10 arguments.

Will the behavior of "at most 10 arguments" be kept in future releases? If so maybe it's worth being documented, because when reading the docs I got the question, can ⟨number⟩ still be up to 9?`

Similarly, a new command \⟨name⟩ defined by \NewTCBox[⟨init options⟩]{\⟨name⟩}{⟨specification⟩}{⟨options⟩} and \NewTCBoxFit now can take at most 10 arguments, as if it was defined with arg-spec ⟨specification⟩ m. (The behavior of taking an extra mandatory argument beyond ⟨specification⟩, is not documented!)

Also note a subtle difference: the trailing optional arguments in ⟨specification⟩, if exist, can still be modified by !. That is, \NewTCBox\mybox{!o}{} works while \NewDocumentCommand\mycmd{!o m}{} errors, because no mandatory arguments can appear after !-modified opt-arg. See texdoc usrguide, sec. 2.6 "Spacing and optional arguments" for more info.

@T-F-S
Copy link
Owner
T-F-S commented Nov 18, 2024

The 10 arguments are more a side-effect than an intended feature. But, I see not reason why it should not be kept that way in future. I will add some remarks in that direction to the documentation. So, for \NewTCBox, it will be

grafik

I can confirm the subtle difference \NewTCBox\mybox{!o}{} to \NewDocumentCommand\mycmd{!o m}{}, but I think this is not something I would document.

@T-F-S T-F-S self-assigned this Nov 18, 2024
@T-F-S
Copy link
Owner
T-F-S commented Nov 18, 2024

By the way, note the extra space here after \NewTCBox:
grafik

I know so far that the \label{...} macro inserts a spurious space, but currently I cannot nail down which included package of the documentation is reponsible...

@mbertucci47
Copy link
Contributor

@T-F-S
Copy link
Owner
T-F-S commented Nov 18, 2024

I should have looked to stackexchange first instead of searching the for the bug myself. Thank you very much!

@T-F-S
Copy link
Owner
T-F-S commented May 20, 2025

@T-F-S T-F-S closed this as completed May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
0