In my current document, I have a lot of angle brackets, which are computed via:
\langle a, b \rangle
Is there anyway I could create a new command, something in the look of:
\newcommand{\dotproduct{ab}}{\langle a, b \rangle}
so that I could replace the a
and b
by other variables? To be more specific, I would love for that command template to work also for:
\dotproduct{cd}, \dotproduct{Q,R}
\dotproduct{a,b}
seems much easier to parse. – egreg Aug 18 '20 at 20:48\newcommand\dotproduct[2]{\langle#1,#2\rangle}
then\dotproduct{Q}{R}
? – David Carlisle Aug 18 '20 at 20:58