I have generated the following code:

    c(s) &= [x_c(s),y_c(s)]^T \in \mathbb{R}^2, & \text{Centerline}, \\
    i(s) &= [x_{in},y_{in}]^T \in \mathbb{R}^2, & \text{Inner Border}, \\
    o(s) &= [x_{out},y_{out}]^T \in \mathbb{R}^2, & \text{Outer Border}, \\
    \Delta(s) &= o(s)-i(s) \in \mathbb{R}^2, & \text{Lateral Deviation}, \\
    t(s) &= i(s) + \alpha(s)\Delta(s), \quad \alpha \in [0,1] & \text{Trajectory}.
\end{aligned} \label{FrameworkTrajectory}

which leads to: Output The problem is that I want to also align the words in all the \text{}'s based on their first letter (left alignment) instead of right, but I fail miserably when trying to do so.

All help is greatly appreciated!

  • as always on this site you are more likely to get any help if you provide a full minimal example that others can copy and test as is. That said use &&\text instead.
    – daleif
    Apr 23 '21 at 10:56
  • Explanation: when you have several alignments the number of & per line is 2n-1 where n is the number of alignments, so it is n alignment &'s and n-1 & to separate the alignments.
    – daleif
    Apr 23 '21 at 10:57
  • Thank you very much daleif!
    – IHBPP
    Apr 23 '21 at 11:57

Just double the ampersand before \text. The environment align & Co. always alternate right-aligned/left-aligned columns, so after two & like in your code you are in a right-aligned column; you need a further & to go into the left-aligned one.




c(s)      &= [x_c(s),y_c(s)]^T \in \mathbb{R}^2,                     &&\text{Centerline},        \\
i(s)      &= [x_{\mathrm{in}},y_{\mathrm{in}}]^T \in \mathbb{R}^2,   &&\text{Inner Border},      \\
o(s)      &= [x_{\mathrm{out}},y_{\mathrm{out}}]^T \in \mathbb{R}^2, &&\text{Outer Border},      \\
\Delta(s) &= o(s)-i(s) \in \mathbb{R}^2,                             &&\text{Lateral Deviation}, \\
t(s)      &= i(s) + \alpha(s)\Delta(s), \quad \alpha \in [0,1] \quad &&\text{Trajectory}.
\end{aligned} \label{FrameworkTrajectory}


enter image description here

I've taken the liberty of making a small modification: ‘in’ and ‘out’ are not symbols but (abbreviations of) real words so they are customarily written with an upright font in sub/superscripts.

  • Thank you very much campa!
    – IHBPP
    Apr 23 '21 at 11:58
  • @IHBPP, if answer solve your problem, you can consider to accept it (by clicking on the check mark at the top left side of the answer).
    – Zarko
    Apr 23 '21 at 12:07
  • @Zarko, I will! Thanks for the reminder :).
    – IHBPP
    Apr 24 '21 at 14: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.