1

I have 4 equations (2 on each line) separated by text. I cannot get the equal signs (red box) to align. Here is the code to recreate the image:

\begin{equation*}
    \eta_{1 i}=x_{1 i}^{T} \beta \qquad \quad \eta_{2 i}=x_{2 i}^{T} \alpha
\end{equation*}    
where
\begin{equation*}
    \theta_{1}=h_{1}(\eta_{1 i}) \qquad \quad \theta_{2}=h_{2}(\eta_{2 i})
\end{equation*}

enter image description here

I have tried with alignedat but cannot find a way to include the text "where" to be left justified

    \begin{equation*}
    \begin{alignedat}{2}
        \eta_{1 i}&=x_{1 i}^{T} \beta \qquad \quad &\eta_{2 i}&=x_{2 i}^{T} \alpha\\
        \theta_{1}&=h_{1}(\eta_{1 i}) \qquad \quad &\theta_{2}&=h_{2}(\eta_{2 i})
    \end{alignedat}
\end{equation*}

enter image description here

4

You can use alignat* and the command \intertext or shorintertext of mathtools:enter image description here

\documentclass{article}
\usepackage{mathtools}

\begin{document}

\begin{alignat*}{2}
    \eta_{1 i}&=x_{1 i}^{T} \beta \qquad \quad &\eta_{2 i}&=x_{2 i}^{T} \alpha\\
\shortintertext{where}
    \theta_{1}&=h_{1}(\eta_{1 i}) \qquad \quad &\theta_{2}&=h_{2}(\eta_{2 i})
\end{alignat*}

\end{document}
2
  • Why not simply align? No need to specify the horizontal spacing. – egreg Apr 10 '20 at 12:16
  • @egreg: Yes, I should have used align. I used alignat only because alignedat was used in the question... – F. Pantigny Apr 10 '20 at 12:19

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.