[Tex/LaTex] Align definition of variables of an equation right (not next to the equation)

alignamsmathequations

this question has been asked before but I never saw a "perfect" solution for this problem.

I use the equation block for my equations and I want the definition of the variables to show at the right, next to the equation number, not next to the equation. I have managed this (by accident) for two of my equations that stand together in one align block.

right alignment

\begin{align}
f(n) &= 8,199 \times 10^{-6} n + 8,418 & \{n \in \mathbb{N}\} \label{equ:Laufzeit} \\
t_e &\leq \frac{t_i}{5} & \{t_e \in \mathbb{Q}^+\},\;\{t_i \in \mathbb{N}\;|\;5f(n) \leq t_i \leq +\infty\} \label{equ:MinInterval}
\end{align}

But for my other equation i can't make it work…I think it would look "cleaner" if they would all align right

wrong alignment

\begin{equation}
t_e \leq \frac{t_i}{5} \quad \{t_e \in \mathbb{Q}^+\},\;\{t_i \in \mathbb{N}\} \label{equ:MaxAusführungszeit}
\end{equation}

Its just a style thing so not that urgent but I would like to know if there is a sulution.

Tanks 🙂

Best Answer

You can try with flalign

\documentclass{article}
\usepackage{amsmath,amssymb}

\begin{document}

\noindent Some equations:
\begin{flalign}
&& f(n) &= 8,199 \times 10^{-6} n + 8,418 & \{n \in \mathbb{N}\} \label{equ:Laufzeit} \\
&& t_e &\leq \frac{t_i}{5} & \{t_e \in \mathbb{Q}^+\},\;\{t_i \in \mathbb{N}\;|\;5f(n) \leq t_i \leq +\infty\} \label{equ:MinInterval}
\end{flalign}

\begin{flalign}
&& t_e \leq \frac{t_i}{5} && \{t_e \in \mathbb{Q}^+\},\;\{t_i \in \mathbb{N}\} \label{equ:MaxAusführungszeit}
\end{flalign}

\end{document} 

enter image description here

Related Question