How do you make numbered equations in latex?
You can use display math environment such as equation
:
Notes:
- The
d
indt
should be upright asd
is an operator, not a variable. Have defined a macro for that and corrected it below.
References:
You should not use a the TeX way of using a
$$
to enter display math. See Why is \[ ... \] preferable to $$ ... $$?An excellent reference for math mode is Herbert Voss' comprehensive review of mathematics in (La)TeX.
Code:
\documentclass{article}
\newcommand{\dd}[1]{\mathrm{d}#1}
\begin{document}
\begin{equation}
\ddot{\underline{\mathbf{r}}} = \frac{\dd{}{^2}\underline{\mathbf{r}}}{\dd{t}^2} = 0
\end{equation}
\end{document}
You can also use the align
environment:
\documentclass[a4paper,11pt]{article}
%\documentclass[a4paper,11pt]{scrartcl}
\usepackage{amsmath}
\usepackage[utf8]{inputenc}
\begin{document}
%Equations with numbering
\begin{align}
\ddot{\underline{\mathbf{r}}} &= \frac{d{^2}\underline{\mathbf{r}}}{dt^2}\\
&= 0
\end{align}
%Equations with no numbering in specific line by using \nonumber
\begin{align}
\ddot{\underline{\mathbf{r}}} &= \frac{d{^2}\underline{\mathbf{r}}}{dt^2}\nonumber\\
&= 0
\end{align}
%Equations without numbering
\begin{align*}
\ddot{\underline{\mathbf{r}}} &= \frac{d{^2}\underline{\mathbf{r}}}{dt^2}\\
&= 0
\end{align*}
\end{document}