LyXLyX does not load amsmath for elsarticle

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
tafi
Posts: 42
Joined: Sat May 07, 2011 12:01 am

LyX does not load amsmath for elsarticle

Post by tafi »

I seem to have found a problem in the way lyx 2.0 handles mathematics in the elsarticle class.

After entering a formula including an integral sign I get the compilation error "command \iint already defined etc."
This usually indicates a package conflict or a case of packages being called in the wrong order.
The LyX maths defaults for this class appear to call both amsmath and esint packages automatically (both checkboxes are selected). The esint package requitres that amsmath be called first (something which is well advertised on the esint documentation). The document, however won't compile in LyX unless the esint package is switched off.

To check the behaviour I exported the document to tex format and found that amsmath was not actually being called at all. I just had to add "\usepackage{amsmath}" before "\usepackage{esint}" and it then compiled.

I have since gone back to LyX and have unchecked both amsmath and esint before reincluding them manually as the first lines in the preamble.

This now seems to work.

Has anyone else noticed this behaviour? Is it a problem with LyX's own internal settings or am I missing something?

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

gsmm
Posts: 4
Joined: Thu Feb 24, 2011 6:27 pm

Re: LyX does not load amsmath for elsarticle

Post by gsmm »

Yes. I had a similar problem just a couple of hours ago. After seeing your post, I unchecked esint and included it manually in the Preamble, as you suggested.

It compiles now.

Thanks.
Ganesh
Post Reply