I have a macro which appears throughout my document in various places:
\newcommand{\placefraction}[2]{
$\frac{#1}{#2}$
}
Sometimes it is placed with regular text. Sometimes it is placed within other math modes. However, the document won't compile if it is placed inside another math mode.
None of my math ever appears in displayed formulas, it is always part of the paragraph.
- How can I have a macro which sometimes appears inside math mode, sometimes outside, but itself contains math mode?
\placefraction{1}{2}
than it does\frac12
or even\frac{1}{2}
? Or have I missed the point?