1

I am looking for a nice state space representation. Does someone know how to place text left to the equation in a split environment? What environment should be used for the explanations?enter image description here

\usepackage{mathtools}

\begin{document} This looks nice \begin{align} \begin{split} \mathbf{\dot{x}}_z &= \mathbf{A}_z \mathbf{x}_z +\mathbf{B}_z \mathbf{u}_z\ \mathbf{y}_z &= \mathbf{C}_z \mathbf{x}_z + \mathbf{D}_z \mathbf{u}_z \end{split} \end{align} A -- Matrix\hspace{15pt}\hspace{15pt}\hspace{15pt}u - Vector

B -- Matrix\hspace{15pt}\hspace{15pt}\hspace{15pt}z - Vector

C -- Matrix\hspace{15pt}\hspace{15pt}\hspace{15pt}y - Vector

D - Matrix\

Here the spacing of the equation number is improvable \begin{align} \begin{split} \[\medskipamount] \text{some text}\quad \mathbf{\dot{x}}_z &= \mathbf{A}_z \mathbf{x}_z +\mathbf{B}_z \mathbf{u}_z \[\medskipamount] \text{another text}\quad \mathbf{y}_z &= \mathbf{C}_z \mathbf{x}_z + \mathbf{D}_z \mathbf{u}_z \end{split} \end{align} Here an annother approach\ some text:\hspace{65pt}$\mathbf{z}=\mathbf{A}_z \mathbf{x}_z +\mathbf{B}_z \mathbf{u}_z$

some text:\hspace{65pt}$\mathbf{y}_z = \mathbf{C}_z \mathbf{x}_z + \mathbf{D}_z \mathbf{u}_z $\

A -- Matrix\hspace{15pt}\hspace{15pt}\hspace{15pt}u - Vector

B -- Matrix\hspace{15pt}\hspace{15pt}\hspace{15pt}z - Vector

C -- Matrix\hspace{15pt}\hspace{15pt}\hspace{15pt}y - Vector

D - Matrix

\end{document}

gernot
  • 49,614
tex123
  • 13

1 Answers1

3

For this purpose, I usually use the flalign of mathtools/amsmathand the \text{ } command of amsmath:

\documentclass{article}
\usepackage{mathtools}
\begin{document}

\begin{flalign} &\text{Equation 1} &\mathbf{\dot{x}}_z &= \mathbf{A}_z \mathbf{x}_z +\mathbf{B}_z \mathbf{u}_z&\nonumber\ &\text{Equation 2} &\mathbf{y}_z &= \mathbf{C}_z \mathbf{x}_z + \mathbf{D}_z \mathbf{u}_z& \end{flalign}

\begin{flalign} &\text{A -- System Matrix} &u\text{-Vector 1}&&\ &\text{B -- Input Matrix } &z\text{-Vector 2}&&\ &\text{C -- Output Matrix} &y\text{-Vector 2}&&\ &\text{D -- Output Matrix} & && \end{flalign}

\end{document}

Please notice the initial and final &.

enter image description here

The centering of the equation number is more tricky but a solution is provided below.

EDIT : this is in fact a duplicate of Use flalign or alignat or align or similar environment to align to the left

EDIT2 : The expected result can be achieved bu using flalign only to get the flushleft effect and the single centered line number; and inserting the annotated equations in an aligned:

\begin{flalign} 
&\begin{aligned}
&\text{Equation 1}    \qquad &\mathbf{\dot{x}}_z &= \mathbf{A}_z \mathbf{x}_z +\mathbf{B}_z \mathbf{u}_z\\
&\text{Equation 222}  \qquad &\mathbf{y}_z       &= \mathbf{C}_z \mathbf{x}_z + \mathbf{D}_z \mathbf{u}_z
\end{aligned}&
\end{flalign}

enter image description here

Jhor
  • 4,179