Math & ScienceMath Commands Not Working

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
gremlint
Posts: 16
Joined: Tue Oct 09, 2012 6:04 am

Math Commands Not Working

Post by gremlint »

I cannot figure out how to get any of the math commands to work (such as \infty).

I just get error messages.

Maybe I should just stick with pencil and paper and throw the computer (and this LaTeX software) out the window. It's clear as mud.

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

User avatar
Stefan Kottwitz
Site Admin
Posts: 10359
Joined: Mon Mar 10, 2008 9:44 pm

Math Commands Not Working

Post by Stefan Kottwitz »

You need to switch to math mode for math commands. Embed math commands within \( ... \) (LaTeX inline math) or $ ... $ (TeX inline math). For example:

Code: Select all

\documentclass{article}
\begin{document}
\( \infty \)

$ \infty $ 
\end{document}
This basic topic can be read in every LaTeX tutorial. You cannot expect to easily use LaTeX without reading something. A consistent way for a quick start can be reading a book, browsing tutorials on the internet can be a bit bothersome some times. That's why I wrote a LaTeX beginner's guide.

Perhaps have a look at the freely available mathmode guide.

Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Math Commands Not Working

Post by localghost »

A good free tutorial is »LaTeX for complete Novices«. It has been updated recently.


Thorsten
gremlint
Posts: 16
Joined: Tue Oct 09, 2012 6:04 am

Math Commands Not Working

Post by gremlint »

You cannot expect to easily use LaTeX without reading something.
Excuse me? That's insulting. Why do you assume that I have not? The fact is that I spent my entire evening reading not one but two of these tutorials. One of them is the reference that localghost recommends — http://theoval.cmp.uea.ac.uk/~nlct/latex/novices — and the other is "More Math into LaTeX" by Rainer Schöpf.

I find them poorly organized, and they fail to explain basic organizational structure, such as what the h*** "packages" are. I still don't know.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10359
Joined: Mon Mar 10, 2008 9:44 pm

Math Commands Not Working

Post by Stefan Kottwitz »

gremlint wrote:Why do you assume that I have not? The fact is that I spent my entire evening reading not one but two of these tutorials. One of them is the reference that localghost recommends — http://theoval.cmp.uea.ac.uk/~nlct/latex/novices — and the other is "More Math into LaTeX" by Rainer Schöpf.
Well, so you have read 9. Mathematics:
In order to use any of the maths commands we need to be in one of the mathematics environments. There are two basic types of mathematics: in-line maths and displayed maths.
The next two small sections explain those two math modes. It's pretty similar to what I wrote above.

So, did it help you writing math symbols, are you able to write \infty now, is the problem solved?

Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Math Commands Not Working

Post by localghost »

gremlint wrote:[…] I find them poorly organized, and they fail to explain basic organizational structure, such as what the h*** "packages" are. I still don't know.
But this is not the topic in this thread. So, please keep the point. If you are now able to write in math mode without complications, please accept the answer that led you to the solution.


Thorsten
Post Reply