3

I am trying to align equations on two points throughout my whole document. I know about \documentclass[fleqn], but this only aligns the first part of an equation.

Minimal working example:

\documentclass[fleqn]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\begin{document}

\section*{Section 1}
\begin{align}
&some left text &&some right text\\
&some more left text &&some right text
\end{align}
\section*{Section 2}
\begin{align}
&some left text that is wider &&some right text\\
&some more left text that is wider &&some right text
\end{align}

\end{document}

which produces:

enter image description here

This correctly aligns the first &s but not the second &&s, is there any nice way to make this happen? The only way I can think of is using \intertext for the whole document which brings a whole other range of issues with it.

1 Answers1

2

enter image description here

something like this, perhaps

\documentclass[fleqn]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\begin{document}

\section*{Section 1}

\noindent\begin{minipage}{.5\textwidth}
\[some left text\]
\end{minipage}\begin{minipage}{.5\textwidth}
\[some right text\]
\end{minipage}

\noindent\begin{minipage}{.5\textwidth}
\[some more left text\]
\end{minipage}\begin{minipage}{.5\textwidth}
\[some right text\]
\end{minipage}

\section*{Section 2}
\noindent\begin{minipage}{.5\textwidth}
\[some left text that is wider\]
\end{minipage}\begin{minipage}{.5\textwidth}
\[some right text\]
\end{minipage}

\noindent\begin{minipage}{.5\textwidth}
\[some more left text that is wider\]
\end{minipage}\begin{minipage}{.5\textwidth}
\[some right text\]
\end{minipage}

\end{document}
David Carlisle
  • 757,742
  • That works I guess...it's not extremely elegant, especially as you need to do this over and over again, not only for every align, but for every equation in each align – matti0006 Aug 23 '16 at 14:48
  • i have another objection to this (and it's the same objection i have to mathml) -- it completely loses the math structure, and acts only on the presentation. think of the poor sight-impaired mathematician who is trying to decipher this file via an audio converter. hopeless! – barbara beeton Aug 23 '16 at 15:24