Quick-start for beginners

LaTeX provides a special syntax for math expressions. Furthermore, it has to be declared what is math but not text to get properly printed. Let's see how to write math!

How to do it...

We will practice math basics now. Let's write a document:

  1. As usual, start with a document class.
    \documentclass{article}
  2. Start the document:
    \begin{document}
  3. Let's have an unnumbered section for our text:
    \section*{The golden ratio}
  4. Write a statement containing math. Enclose each math formula within parentheses. As usual for LaTeX commands, write a backslash before each parenthesis.
    The symbol for the golden ratio is the Greek
    letter \( \varphi \). Its value is the positive
    solution of \( x^2 - x - 1 = 0 \).
  5. Continue the text; this time, math shall ...

Get LaTeX Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.