When I delete the second \item
, it compiles fine. However, with the second \item
, I get ERROR: Missing $ inserted
and the math renders incorrectly:
\documentclass[12pt]{article}
\newcommand \frob[2] {\langle #1,#2 \rangle_F}
\begin{document}
\begin{itemize}
\item What I want: $
\langle A,B \rangle_F
\geq
\langle C,D \rangle_F
$.
\item What I get: $
\frob{A,B}
\geq
\frob{A,B}
$.
\end{itemize}
\end{document}
Would appreciate any help with this issue!
\frob
as\frob{A,B}
but use it as\frob{A}{B}
. Your\frob
-macro does process two arguments which are not comma-separated. As result it delivers something where the phrases delivered via the arguments will be comma-separated. Maybe this confused you. ;-) If you do\frob{A,B}\geq
,\frob
's first undelimited argument will be formed from{A,B}
and\frob
's second undelimited argument will be formed from\geq
. So all in all\frob{A,B} \geq \frob{A,B}
should be\frob{A}{B}\geq\frob{C}{D}
. – Ulrich Diez Feb 2 '19 at 1:45