I have an "equation", where I simply want to give some constant values. I'm aligning on the equation symbols, but as the numbers have different amounts of digits, I would also like to align the numbers to the right:
LaTeX currently looks as follows:
\documentclass[ngerman]{scrbook}
\usepackage{amssymb,amsmath,amsthm}
\begin{document}
\begin{equation*}
\begin{aligned}
\text{first value} &= 12 & \\
\text{second value} &= 1234 & \\
\text{third one} &= 1234567 &
\end{aligned}
\end{equation*}
\end{document}
Is it possible to align to the right with aligned
? Are there any other packages for achieving this (I would like to stick to the equation if possible, for consistency reasons).
Best Answer
Like this?
I have just moved the
&
before the numbers and usedalignedat
(thanks to egreg).This is with
\makebox
:Another option with a
tabular
:Here you can use
begin{center}
or\centering
(within a group) instead of\begin{equation*}
.