Math & ScienceCan't compile subscript, superscript, etc.

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
Aslund
Posts: 7
Joined: Sat Aug 15, 2009 3:12 pm

Can't compile subscript, superscript, etc.

Post by Aslund »

Hey everyone

Today I needed to do an subscript, but I got an compiler error, as I continued to test, I also noticed that Greek symbols also gave compiler error.

I get the following error:
--------------------------------------------------------------------------------
! Missing $ inserted.
<inserted text>
$
l.246 ...ing til PKF, så har EKF elimineret \Delta
x. Dette skyldes at EKF a...
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.

LaTeX Warning: Command \o invalid in math mode on input line 246.

! Missing $ inserted.
<inserted text>
$
l.247

I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.
---------------------------------------------------------------------------------

When I look at the document, the symbols are there, but the linie after the command is in italic.
Does anyone know what to do to make it work?

Thanks alot for your help.

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
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Can't compile subscript, superscript, etc.

Post by gmedina »

Hi,

please post the offending code, following the rules to build a minimal working example.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Can't compile subscript, superscript, etc.

Post by frabjous »

Commands such as \Delta for Greek letters, or ^ for superscripts or _ for subscripts are only valid in math mode.

To enter math mode in the middle of a paragraph, enclose the portion in the signs $...$.

So, for example, $\Delta$ should produce a Delta.

For superscripts or subscripts, use \textsuperscript or \textsubscript, unless you're writing something in mathematical or similar notation, and then enter math mode and use _ or ^.

Basics such as these are covered in introductory LaTeX materials such as lshort. If you're new to LaTeX, I recommend reading something like that.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Can't compile subscript, superscript, etc.

Post by localghost »

As an addition to the document mentioned by frabjous you should take a look at "The Unofficial LaTeX2e Reference Manual". I recommend also to refer to our list with useful links for beginners [1]. That will help you to get along with such basics.

[1] View topic: LaTeX Resources for Beginners


Best regards
Thorsten
Post Reply