6 More logical structure
Mathematics
- Mathematical content is marked up in LaTeX in a logical way;
- You can use $ …$ or \( …\) to mark up in-line maths;
- For displayed mathematics, use \[ …\];
- A lot of spacing is automatic in math mode;
- Maths is an entire area on its own!
Example input
\( y = 2 \sin \theta^2 \)
Example output
Creating your own commands
Syntax
\newcommand*{\⟨name⟩}{⟨replacement text⟩} \newcommand*{\⟨name⟩}[⟨number⟩]{⟨replacement
text⟩}
Examples
\newcommand*{\authorname}{Joseph Wright} \newcommand*{\important}[1]{\textbf{#1}}