In this post, it was mentioned that any character can be used as a delimiter using def. Is it possible to define a function with two types of delimiters?
In particular I'm looking to define an analogue to \alert in beamer but which hides text instead of displays it. My naive guess would be:
\def\hide<#1> {#2}{\color<#1>{\usebeamercolor{hidden text}} #2}
where hidden text is a predefined beamercolor of a hard-to-see color. The first argument is given by angle brackets and the second by braces. However, upon compiling this results in the error:
Illegal parameter number in definition of \hide
EDIT: My original version had the wrong syntax. I should have written,
\def\hide<#1> {#2}{\color<#1>{black}{\usebeamercolor[fg]{hidden text}{#2}}}
where the color black is a harmless place-holder which is overwritten by \usebeamercolor
#2? – Mico Dec 14 '15 at 22:11\newcommand<>{\hide}[1]{{\color#2{\usebeamercolor{hidden text}}#1}}? – egreg Dec 14 '15 at 23:24\defcan use non-brace deliminators – JeffDror Dec 15 '15 at 02:52