Skip to content
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

Protect/Brace arguments delimited by square brackets #234

Merged
merged 1 commit into from
Jun 19, 2023

Conversation

muzimuzhi
Copy link
Contributor

@muzimuzhi muzimuzhi commented Jun 19, 2023

This PR is just for showing the long diff more conveniently. It can be safely closed without merging.

I checked every occurrence of [ in files in ./tex subdirectory, and apart from tikz-level use cases, theses are the ones I think/assume need to be protected. For all the braces added, I admit they are not equally necessary. The two most helpful cases are for \tcblistof and \tcbsubtitle.

Part of #229

\documentclass{article}
\usepackage{tcolorbox}

\begin{document}
\tableofcontents
\tcblistof[\section]{exam}[{LoE, Short title[]}]{List of Exercises}

\begin{tcolorbox}[title=Title, after title={[]}]
  content
  \tcbsubtitle[{after upper=[]}]{Subtitle}
  content
\end{tcolorbox}
\end{document}
Before After
image image

@T-F-S T-F-S merged commit 7cd067c into T-F-S:master Jun 19, 2023
@muzimuzhi muzimuzhi deleted the brace-delimited-args branch June 19, 2023 14:20
@T-F-S
Copy link
Owner

T-F-S commented Jun 19, 2023

Some of the missing spots I left out deliberately (where the content came from a square bracket argument), but \tcboxfit I left out by mistake. Since the braces are not hurting at all the places, I will add them everywhere you proposed.

Thank you!

@muzimuzhi
Copy link
Contributor Author

lucky ^_^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants