LyX\DeclareMathOperator not working

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
gandi
Posts: 23
Joined: Tue Oct 20, 2009 2:45 pm

\DeclareMathOperator not working

Post by gandi »

I'm trying to define new math operators, using

Code: Select all

\DeclareMathOperator{\curl}{curl}
in the preamble, as described in the LyX Math Manual. This works fine in "normal" LaTeX, but in LyX I get an 'undefined control sequence' message when I try to convert to DVI or PDF.

Any ideas? Thanks!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: \DeclareMathOperator not working

Post by frabjous »

I don't know much about LyX, but in ordinary LaTeX, \DeclareMathOperator requires the amsmath pacakge. Is that being loaded in LyX?
gandi
Posts: 23
Joined: Tue Oct 20, 2009 2:45 pm

Re: \DeclareMathOperator not working

Post by gandi »

Thanks, frabjous, a \usepackage{amsmath} in the preamble helped! Alternatively, I've just seen, in LyX one can also tick "Use AMS Math Package" in Document-->Settings-->Math Options.
Post Reply