# Plain text inside align* environment

I have an align environment that contains two lines, and in between these lines I want to include some plain text on its own line, and it should be centered on that line.

\newcommand{\tu}{\uptau}
\newcommand{\sgm}{\upsigma}
\newcommand{\txtn}{\textnormal}

\begin{document}
\begin{align*}
& \tu \sgm_{r_1} \tu^{-1} = \txtn{(2 3 5)(4 7 6)(1 2 3 4)(5 8 7 6)(5 3 2)(6 7 4) = (1 3 5 7)(2 8 6 4)} = \sgm_{r_2} \\
\txtn{and} \\
& \tu \sgm_{s_1} \tu^{-1} = \txtn{(2 3 5)(4 7 6)(1 5)(2 6)(3 7)(4 8) = (1 2)(3 4)(5 6)(7 8)} = \sgm_{s_2}.
\end{align*}
\end{document}


This results in the word "and" showing up all the way to the left, but I want it to be centered.

You could use \intertext along with \centering:

\documentclass{article}
\usepackage{amsmath}
\usepackage{upgreek}
\newcommand{\tu}{\uptau}
\newcommand{\sgm}{\upsigma}
\newcommand{\txtn}{\textnormal}

\begin{document}
\begin{align*}
& \tu \sgm_{r_1} \tu^{-1} = \txtn{(2 3 5)(4 7 6)(1 2 3 4)(5 8 7 6)(5 3 2)(6 7 4) = (1 3 5 7)(2 8 6 4)} = \sgm_{r_2} \\
\intertext{\centering and}
& \tu \sgm_{s_1} \tu^{-1} = \txtn{(2 3 5)(4 7 6)(1 5)(2 6)(3 7)(4 8) = (1 2)(3 4)(5 6)(7 8)} = \sgm_{s_2}.
\end{align*}
\end{document}


Or, if you want tighter vertical spacing, include in preamble

\usepackage{mathtools}


and then in the document use

\shortintertext{\centering and}


I propose a solution with shortintertext, and also another alignment on the = signs, which looks better, in my opinion:

\documentclass{article}
\usepackage{mathtools}
\usepackage{makebox}
\usepackage{upgreek}
\newcommand{\tu}{\uptau}
\newcommand{\sgm}{\upsigma}
\newcommand{\txtn}{\textnormal}

\begin{document}

\begin{align*}
\tu \sgm_{r_1} \tu^{-1} & = \txtn{(2 3 5)(4 7 6)(1 2 3 4)(5 8 7 6)(5 3 2)(6 7 4) = (1 3 5 7)(2 8 6 4)} = \sgm_{r_2} \\
\shortintertext{\makebox[\linewidth]{and}}
\tu \sgm_{s_1} \tu^{-1} &= \txtn{(2 3 5)(4 7 6)(1 5)(2 6)(3 7)(4 8) = (1 2)(3 4)(5 6)(7 8)} = \sgm_{s_2}.
\end{align*}

\begin{align*}
\tu \sgm_{r_1} \tu^{-1} & = \txtn{(2 3 5)(4 7 6)(1 2 3 4)(5 8 7 6)(5 3 2)(6 7 4) = (1 3 5 7)(2 8 6 4)} = \sgm_{r_2} \\
& \makebox*{${}={}$}{and}\\
\tu \sgm_{s_1} \tu^{-1} &= \txtn{(2 3 5)(4 7 6)(1 5)(2 6)(3 7)(4 8) = (1 2)(3 4)(5 6)(7 8)} = \sgm_{s_2}.
\end{align*}

\end{document}


You can use an array. I also suggest a different way to cope with cycles in permutations.

\documentclass{article}
\usepackage{amsmath}
\usepackage{upgreek}
\usepackage{lipsum}% for some context

\newcommand{\tu}{\uptau}
\newcommand{\sgm}{\upsigma}

%not \textnormal
\newcommand{\perm}[1]{%
\begingroup
\begingroup\lccode~= \lowercase{\endgroup\let~}\,%
\catcode =12 \scantokens{#1}
\endgroup
}

\begin{document}

\lipsum[1][1-4]
\begin{equation*}
\begin{array}{@{}l@{}}
\tu \sgm_{r_1} \tu^{-1}
= \perm{(2 3 5)(4 7 6)(1 2 3 4)(5 8 7 6)(5 3 2)(6 7 4)}
= \perm{(1 3 5 7)(2 8 6 4)}
= \sgm_{r_2} \\[1ex]
\multicolumn{1}{c}{\text{and}} \\[1ex]
\tu \sgm_{s_1} \tu^{-1}
= \perm{(2 3 5)(4 7 6)(1 5)(2 6)(3 7)(4 8)}
= \perm{(1 2)(3 4)(5 6)(7 8)}
= \sgm_{s_2}.
\end{array}
\end{equation*}
\lipsum[2][1-4]

\end{document}


What does the magic \perm macro do? It changes the space to an ordinary printable character (like punctuation) and redefines it to do \,. Here I exploit the fact that the \mathcode of space is set to "8000 in the LaTeX kernel.

In any case you should never write something like

\txtn{(1 2 3 4) = (2 3 4 1)}


because the semantics of your document would be ruined. You mean

\txtn{(1 2 3 4)} = \txtn{(2 3 4 1)}


but even if you choose to stick with \textnormal you should properly denote permutations as such, so do \newcommand{\perm}{\textnormal} if you prefer and write the above as

\perm{(1 2 3 4)} = \perm{(2 3 4 1)}


The fact that the output of the equals sign is the same is not relevant; the spaces around it would be different.

Here's a picture of the output

• Thank you, but probably too advanced and intricate for my purposes. Jun 21 '20 at 19:19
• @Junglemath Well, at least the array` is not too advanced. Jun 21 '20 at 19:54