0

I 'm trying to align "=", but I have problem with the curly brackets.

I tried this code:

\documentclass{article}
\usepackage{amsmath}
\usepackage{mathtools}
\begin{document}
    
% amsmath
\begin{align*}
    \boldsymbol{r}'(s)&=\boldsymbol{v}(s)\Leftrightarrow \\
    x'(s)\boldsymbol{e_1}+y'(s)\boldsymbol{e_2}+u'(s)\boldsymbol{e_3}&=\left( x(s),-y(s),u(s)\right) \Leftrightarrow\\ \begin{cases}
        \dfrac{\strut d x}{\strut d s}=x(s)\\
        \dfrac{\strut d y}{\strut d s}=-y(s)\\
        \dfrac{\strut d u}{\strut d s}=u(s)
    \end{cases}
\end{align*}

% mathtools
\[\begin{aligned}
    \boldsymbol{r}'(s)&=\boldsymbol{v}(s)\Leftrightarrow \\
    x'(s)\boldsymbol{e_1}+y'(s)\boldsymbol{e_2}+u'(s)\boldsymbol{e_3}&=\left( x(s),-y(s),u(s)\right) \Leftrightarrow\\ \begin{dcases}
        \dfrac{\strut d x}{\strut d s}&=x(s)\\
        \dfrac{\strut d y}{\strut d s}&=-y(s)\\
        \dfrac{\strut d u}{\strut d s}&=u(s)
    \end{dcases}
\end{aligned}\]
\end{document}

But, as you can see, the "="s inside the curly bracket do not align with the others.

What can I do?

Thanks in advance!

enter image description here

1 Answer 1

2

Something like this?

\documentclass{article}
\usepackage{amsmath}
\newlength\dxds
\begin{document}
\settowidth\dxds{$\dfrac{\strut d x}{\strut d s} =$}
\[
    \begin{aligned}
        \boldsymbol{r}'(s)
            &= \boldsymbol{v}(s)\Leftrightarrow \\
        x'(s)\boldsymbol{e_1}+y'(s)\boldsymbol{e_2}+u'(s)\boldsymbol{e_3}
            &= \left( x(s),-y(s),u(s)\right) \Leftrightarrow\\
        & \hspace{-\dxds}\left\{\begin{aligned}
            \dfrac{\strut d x}{\strut d s}&=x(s)\\
            \dfrac{\strut d y}{\strut d s}&=-y(s)\\
            \dfrac{\strut d u}{\strut d s}&=u(s)
        \end{aligned}\right.
    \end{aligned}
\]
\end{document}

enter image description here

EDIT. Instead of dcases, I have added a stretchable left curly bracket; note it needs to be closed by either its complementary part, either the right bracket or a hollow item \right.. Then, I moved the whole block to the right-hand side of = and use negative spacing.

The \settowidth{<len>}{text or expression} can measure how much space the expression takes and store it in a length name. Then this amount is used to move the whole block towards the left.

3
  • Thanks a lot!!! Problem solved! Have a nice day! Nov 30, 2022 at 10:27
  • Thanks. Just one remark I forgot to mention. \leftX...\rightX in regular math expressions is not the best approach, unless necessary, like the example above. It's better to substitute it with fixed sizes: \biglX...\bigrX, \BiglX...\BigrX, \bigglX...\biggrX and \BigglX...\BiggrX, where X can be any of the brackets or braces s.a. ( ), [ ] or \{ \}.
    – Celdor
    Nov 30, 2022 at 10:37
  • Thanks for your advice! I 'll keep it in mind! Nov 30, 2022 at 11:16

You must log in to answer this question.

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