I'm redefining beamer blocks to use tcolorboxes.
I want to make the title optional, but want to keep the curly braces.
How can I achieve this?
I tried this:
\documentclass{article}
\usepackage{fontspec}
\usepackage{xparse}
\NewDocumentCommand\test{d{}}{Hello\IfValueT{#1}{~#1}!}
\begin{document}
\test
\test{Bernd}
\end{document}
And this
\documentclass{article}
\usepackage{fontspec}
\usepackage{xparse}
\NewDocumentCommand\test{d\{\}}{Hello\IfValueT{#1}{~#1}!}
\begin{document}
\test
\test{Bernd}
\end{document}
Both do not work, the first raises an error (use a single token as delimiter) the second one simply ignores the argument.