Ich möchte drei verschiedene Gleichungen mit drei verschiedenen Längen linksbündig ausrichten. Im Moment verwende ich diesen Code:
\begin{equation}
log_{10}M_{200} = (0.94\pm0.005)log_{10}N_{gal}+(12.11\pm0.009)\hspace{10mm} \left[for N_{gal}>20\right]
\label{equation:power_law_rich20}
\end{equation}
\begin{equation}
log_{10}M_{200} = (0.74\pm0.003)log_{10}N_{gal}+(12.46\pm0.005)\hspace{10mm} \left[for M_{200}>2X10^{13}M_{\odot}\right]
\label{equation:power_law_mass2e13}
\end{equation}
\begin{equation}
log_{10}M_{200} = (0.85\pm0.005)log_{10}N_{gal}+(12.28\pm0.008)\hspace{10mm} \left[for (N_{gal}>20+M_{200}>2X10^{13}M_{\odot})\right]
\label{equation:power_law_rich20_mass2e13}
\end{equation}
Das gibt mir diese Ausgabe:
Ich möchte, dass diese drei Gleichungen separat linksbündig ausgerichtet werden, mit anderen Worten, die Gleichungen (5) und (6) sollen mit Gleichung (7) ausgerichtet werden, da dies die längste Gleichung ist.
Antwort1
Sie möchten die align
Umgebung nutzen:
\documentclass{article}
\usepackage[margin=1cm,a4paper]{geometry}
\usepackage{amsmath}
\usepackage{lipsum} % just for the example
\begin{document}
\lipsum*[2]
\begin{align}
\log_{10}M_{200} &= (0.94\pm0.005)\log_{10}N_{\mathrm{gal}}+(12.11\pm0.009)
&&\text{for $N_{\mathrm{gal}}>20$}
\label{equation:power_law_rich20}
\\
\log_{10}M_{200} &= (0.74\pm0.003)\log_{10}N_{\mathrm{gal}}+(12.46\pm0.005)
&&\text{for $M_{200}>2\times10^{13}M_{\odot}$}
\label{equation:power_law_mass2e13}
\\
\log_{10}M_{200} &= (0.85\pm0.005)\log_{10}N_{\mathrm{gal}}+(12.28\pm0.008)
&&\text{for $(N_{\mathrm{gal}}>20+M_{200}>2\times10^{13}M_{\odot})$}
\label{equation:power_law_rich20_mass2e13}
\end{align}
\lipsum[3]
\end{document}
Beachten Sie, dass \log
anstelle von verwendet werden sollte log
; \times
ist in diesem Fall auch das richtige Symbol für das Produkt, nicht X
.
Wenn Sie strengere Platzbeschränkungen haben, können Sie multlined
Folgendes verwenden mathtools
:
\documentclass{article}
%\usepackage[margin=1cm,a4paper]{geometry}
\usepackage{amsmath,mathtools}
\usepackage{lipsum} % just for the example
\begin{document}
\lipsum*[2]
\begin{gather}
\begin{multlined}[c][\dimexpr\displaywidth-5em]
\log_{10}M_{200} = (0.94\pm0.005)\log_{10}N_{\mathrm{gal}}+(12.11\pm0.009)
\\\text{for $N_{\mathrm{gal}}>20$}
\end{multlined}
\label{equation:power_law_rich20}
\\
\begin{multlined}[c][\dimexpr\displaywidth-5em]
\log_{10}M_{200} = (0.74\pm0.003)\log_{10}N_{\mathrm{gal}}+(12.46\pm0.005)
\\\text{for $M_{200}>2\times10^{13}M_{\odot}$}
\end{multlined}
\label{equation:power_law_mass2e13}
\\
\begin{multlined}[c][\dimexpr\displaywidth-5em]
\log_{10}M_{200} = (0.85\pm0.005)\log_{10}N_{\mathrm{gal}}+(12.28\pm0.008)
\\\text{for $(N_{\mathrm{gal}}>20+M_{200}>2\times10^{13}M_{\odot})$}
\end{multlined}
\label{equation:power_law_rich20_mass2e13}
\end{gather}
\lipsum[3]
\end{document}