Closed dbitouze closed 1 year ago
There is already an example with \NewDocumentCommand
on p. 86
Oooops, sorry for the noise!
For the time being, I'd also favour using beamer's adapted version of \renewcommad<>
etc. over \NewDocumentCommad
as the later does not retain the original definition.
\documentclass{beamer}
\usepackage{mdframed}
\renewenvironment<>{mdframed}[1][]{%
\begin{originalmdframed}[#1]\color{red}%
}{%
\end{originalmdframed}%
}
\begin{document}
\begin{frame}
\begin{mdframed}
test
\end{mdframed}
\end{frame}
\end{document}
Maybe it's time to advise (or at least document) the new way of creating document commands and environments. For instance, page 85 (of the current (3.68)) documentation, the example:
could be replaced by:
More generally, the syntax:
could be replaced by:
with the description changed accordingly.