2

Please note that

  1. the two equations ought to be aligned;
  2. the text and generally should be flush left, but the second equation should be centred.
\documentclass{article}
\usepackage{mathtools}

\begin{document}
\begin{flalign*}
  a^{m}\times a^{n}&=
  a^{m+n},\\
  \intertext{and generally}
  a^{m}\times a^{n}\times a^{p}\times \dotsm&=
  a^{m+n+p+\dotsb}
\end{flalign*}
\end{document}
0

2 Answers 2

9

Here is an option that sets both equations in a \linewidth box, measuring the duplicating the widest parts in the shorter (first) equation in order to center the contents. It also allows the placement of and generally to be flush-left:

enter image description here

\documentclass{article}
\usepackage{mathtools}
\begin{document}

\begin{align*}
  a^m \times a^n &= a^{m + n}, \\
  \intertext{and generally}
  a^m \times a^n \times a^p \times \dotsm &= a^{m + n + p + \dotsb}
\end{align*}

\begin{align*}
  \makebox[\linewidth]{%
    $\hphantom{a^m \times a^n \times a^p \times \dotsm}
     \mathllap{a^m \times a^n} = 
     \mathrlap{a^{m + n},}
     \hphantom{a^{m + n + p + \dotsb}}$} \\
  \makebox[\linewidth]{%
    \rlap{and generally}\hfill%
    $a^m \times a^n \times a^p \times \dotsm = a^{m + n + p + \dotsb}$%
    \hfill}
\end{align*}

\end{document}

Overlapping macros allow for the setting and placement of content without it taking up any horizontal space.

1
  • 1
    Oh, yes! This is what I exactly wanted. Thank you very much, Werner! I really appreciate it. :) This is perfect! Nov 1, 2014 at 7:16
8

Use flalign (full length align). However, in my opinion \intertext or \shortintertext are better: I find no reason that justifies “and generally” being on the same line as the equation.

\documentclass{article}
\usepackage{mathtools}
\usepackage{lipsum} % just for the example

\begin{document}

\lipsum*[2]
\begin{align*}
a^m \times a^n &= a^{m + n}, \\
\shortintertext{and generally}
a^m \times a^n \times a^p \times \dotsm &= a^{m + n + p + \dotsb}
\end{align*}
\lipsum*[2]
\begin{flalign*}
&& a^m \times a^n &= a^{m + n}, & \\
\makebox[0pt][l]{and generally}&&
a^m \times a^n \times a^p \times \dotsm &= a^{m + n + p + \dotsb} &
\end{flalign*}
\lipsum[2]

\end{document}

enter image description here

2
  • Thank you very much, Egreg! This method is also very applicable. :) Nov 1, 2014 at 10:15
  • 1
    @NisalKevinKotinkaduwa - Not only is this answer's method "also very applicable," it's also more straightforward to implement. As egreg also points out at the very top of his answer, there really seems to be no good purpose in placing the connecting phrase "and generally" on the same line as the second formula. The two equations are being connected by a short phrase, and I can't see a reason for "privileging" one equation over the other by overloading it with the short text phrase.
    – Mico
    Nov 1, 2014 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.