D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] LaTeX - can someone help please

 

> the line referred to in the <insterted text> part is
> {16 \div 18 \times 100 = 88.2 percent}
>
> if I press q,   the document compiles fine,  suggesting its not a
> serious error,  however should there be a $ in the above line somewhere,
> if I insert this manually it should fix it,  but where do I put it,

IIRC it should be:

{$16 \div 18 \times 100 = 88.2$ percent}

A $ changes to maths-mode and back. \div and \times are only available
in maths mode, so that's why the compiler is complaining. In theory,
you could just put $'s around these two commands, but maths mode has a
slightly different spacing, than normal text mode, so it's recommended
to make the numbers and the = part of the math mode as well. They are,
in this case, mathematical symbols after all.

The overfull \hbox warning is irrelevant to this, it means that
something can't be put on a page without crossing the margins or
something similar (in this case it's probably the table causing
problems). These warning are quite hard to avoid, though of course,
it's best to do so if you can.

By the way, I think there are special packages for typesetting
chemical formulas so that you don't have to switch between maths mode
and non-maths mode all the time. But I am a mathematician, not a
chemist, so I've never had to use them. There's a lot out there on the
interweb though.

Martijn.

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html