Answer by EngBIRD for newcommand with two arguments, one optional
I would use the xparse package as it keeps the default behaviors for an optional argument very manageable.\documentclass[10pt]{article}\usepackage{xparse}%\ExplSyntaxOn...
View Articlenewcommand with two arguments, one optional
I'm struggling with a command that doesn't do what I expect. This is my code\newcommand{\expectation}[2][]{\mathrm{E}_{#1}\left[#2\right]}\begin{document}I get $\expectation{A}{B}$, but I expect...
View Article
More Pages to Explore .....