[Tex/LaTex] How to use suggestive variable names in math

math-mode

I want to use suggestive variable and function names in math like the in the following:

result = f(input)

or

accumulator = sum(inputs)

I want the formula to stand out in relation to the surrounding text. So if I use the following:

\(\mbox{result} = F(input)\)

it doesn't work because then "result" looks just like the normal surrounding text, while "F(input)" is italicized in math mode. So how can I make the "result" be also italicized correctly and consistently. Maybe I shouldn't use math mode at all but just normal mode and italicize the whole? But I intend it to be a logical unit within the text.

Best Answer

I would probably use bold-upright for multi-letter names so \mathbf{result}=f(\mathbf{inputs}) you don't want to use math-italic for multi-letter names, the spacing is all wrong, but you could use text italic so:\mathit{input}

Depending on the document type you have other ways of making equations stand out from the surrounding text, different offset, or box them, or add colour or....

Related Question