2

I can accomplish what I want by manual spacing with align:

\begin{align*}
    o(\xi_n^k) \,&|\, r \\
    \Leftrightarrow \:\:\:\:\, \frac{n}{k} \,&\Big|\, \frac{n}{|\mathcal{O}|} \\
    \Leftrightarrow \:\: |\mathcal{O}| \,&|\, k
\end{align*}

enter image description here

Here's my attempt with alignat:

\begin{alignat*}{2}
    & o(\xi_n^k) \,&&|\, r \\
    \Leftrightarrow\, & \frac{n}{k} \,&&\Big|\, \frac{n}{|\mathcal{O}|} \\
    \Leftrightarrow\, & |\mathcal{O}| \,&&|\, k
\end{alignat*}

enter image description here

I need the middle column to align to the right.

1 Answer 1

1

I hope to have understood your request. Here I have used the enviroment alignat differently of your code. You see if it is the desidered output.

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb}


\begin{document}

\texttt{This is your version:}
\begin{alignat*}{2}
    & o(\xi_n^k) \,&&|\, r \\
    \Leftrightarrow\, & \frac{n}{k} \,&&\Big|\, \frac{n}{|\mathcal{O}|} \\
    \Leftrightarrow\, & |\mathcal{O}| \,&&|\, k
\end{alignat*}


\texttt{This is my version:}
\begin{alignat*}{2}
     &&    o(\xi_n^k) &|\, r\\
     \Leftrightarrow &&  \frac{n}{k} & \Big|\,\frac{n}{|\mathcal{O}|}\\
     \Leftrightarrow && |\mathcal{O}|\, & |\,k
\end{alignat*}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .