Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Latex: Text in Equation Mode

37 views
Skip to first unread message

Kwaj

unread,
Sep 3, 2003, 4:34:25 AM9/3/03
to
Latex equation mode seems to italicize and concatenate all variables when in
equation mode, for example

\begin{equation}
[c_{1},c_{2},...,c_{\tau}] = arg max \eta
\end{equation}

Now "arg max" would appear as, "argmax" in italics.

Is there anyway to PREVENT Latex from italicising the statements "arg" and
"max" whilst in equation mode?

cheers

- Kwaj
- Kingsley


Philipp Pagel

unread,
Sep 3, 2003, 6:43:54 AM9/3/03
to
Kwaj <k.o...@student.unsw.edu.au> wrote:
> Latex equation mode seems to italicize and concatenate all variables when in
> equation mode, for example

> Is there anyway to PREVENT Latex from italicising the statements "arg" and


> "max" whilst in equation mode?

Yes, there is.

\[ \frac{\mbox{one thing}}{\mbox{something else}} \]

Note that the font size is *not* adjusted according to the poition in
the fraction.

This is better:

\[ \frac{\mathrm{this}}{\mathrm{and\ that}} \]

Note that we have to force the space with a backslash here.
If you prefer another font family use mathsf, mathsc, ...


cu
Philipp


--
Dr. Philipp Pagel Tel. +49-89-3187-3675
Institute for Bioinformatics / MIPS Fax. +49-89-3187-3585
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1
85764 Neuherberg, Germany

David Kastrup

unread,
Sep 3, 2003, 7:18:40 AM9/3/03
to
"Kwaj" <k.o...@student.unsw.edu.au> writes:

\arg \, \max

If you are really talking about text and not operators, you might try
AMSLaTeX (docs in amsldoc.dvi).

\text is provided by the amsmath package, and if you only want \text
but nothing else, the amstext package will provide that.

--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
UKTUG FAQ: <URL:http://www.tex.ac.uk/cgi-bin/texfaq2html>

Patrick TJ McPhee

unread,
Sep 3, 2003, 10:21:07 AM9/3/03
to
In article <x53cfek...@lola.goethe.zz>, David Kastrup <d...@gnu.org> wrote:

% \arg \, \max

The spacing should be OK without the \,
--

Patrick TJ McPhee
East York Canada
pt...@interlog.com

Scott Pakin

unread,
Sep 3, 2003, 12:03:20 PM9/3/03
to
Kwaj wrote:
> Latex equation mode seems to italicize and concatenate all variables when in
> equation mode, for example
>
> \begin{equation}
> [c_{1},c_{2},...,c_{\tau}] = arg max \eta
> \end{equation}
>
> Now "arg max" would appear as, "argmax" in italics.

The reason this is happening is that LaTeX (TeX, actually) sees "arg max"
as the product of a, r, g, m, a, and x -- not what you probably expected.

> Is there anyway to PREVENT Latex from italicising the statements "arg" and
> "max" whilst in equation mode?

Because "arg max" is an operator, you should use amsmath's \DeclareMathOperator*
macro to define a new operator called \argmax:

\DeclareMathOperator*{\argmax}{arg\,max}

-- Scott

Pan Shizhu

unread,
Sep 3, 2003, 7:59:59 PM9/3/03
to
Kwaj wrote:

I think you should read `The not so short introduction to LaTeX2e'
(a.k.a. lshort) before start using LaTeX.

The solution for that is quite straight away: \arg, \max. see log-like
functions for that.

But the lshort also tells you, the *simplest* way is \textrm{arg max}

try that yourself.

HOH
Pan

Lars Madsen

unread,
Sep 4, 2003, 4:57:33 AM9/4/03
to

> I think you should read `The not so short introduction to LaTeX2e'
> (a.k.a. lshort) before start using LaTeX.
>
> The solution for that is quite straight away: \arg, \max. see log-like
> functions for that.
>
> But the lshort also tells you, the *simplest* way is \textrm{arg max}
>

no because this might not be correct since it seems that arg max should be
thought of as a mathematical operator, therefore it's better to use

\DeclareMathOperator(\argmax}{arg\,max}

\textrm{arg max} does not give you this spacing.

--

/daleif (remove RTFSIGNATURE from email address)

LaTeX FAQ: http://www.tex.ac.uk/faq
AMSMATH Intro: http://www.ams.org/tex/short-math-guide.html
LaTeX Intro: http://people.ee.ethz.ch/~oetiker/lshort/lshort.pdf
Graphics Intro: http://www.ctan.org/tex-archive/info/epslatex.pdf
Remember to post minimal working examples.

Mark Wooding

unread,
Sep 4, 2003, 12:43:20 PM9/4/03
to
Lars Madsen <dal...@RTFSIGNATUREimf.au.dk> wrote:

> \DeclareMathOperator(\argmax}{arg\,max}
>
> \textrm{arg max} does not give you this spacing.

... and also may result in a different font.

(I use Palatino for body text, and the CM maths fonts. This looks
rather pleasing to my eyes, but it's important to know when to use
\text{...} and when to use \mathrm{...} or {\operator@font ...}.)

-- [mdw]

Lars Madsen

unread,
Sep 5, 2003, 4:50:29 AM9/5/03
to

that's an odd combination. Why don't you just use the mathpazo package to get
palatino in both?

Mark Wooding

unread,
Sep 5, 2003, 8:35:34 AM9/5/03
to
Lars Madsen <dal...@RTFSIGNATUREimf.au.dk> wrote:

> that's an odd combination. Why don't you just use the mathpazo package
> to get palatino in both?

Firstly, mathpazo wasn't around when I started; and secondly I don't
like either Palatino italic for maths variables (even though it's a
gorgeous face for body text) nor the Pazo maths symbols.

Maybe I've just become used to it now, but I find the combination rather
pleasing. I got the idea from `The Handbook of Applied Cryptography',
published by CRC Press, which uses CM maths and Times body text and
looked fine for it.

-- [mdw]

0 new messages