3

I am trying to left align some text as shown below: enter image description here

But the problem here is that the line is almost exceeding the page (shown by red arrow).What I want is somewhat shown in the blue line which underlines the text. I want this text to be wrapped such that it starts below (m x n) and not under '=' sign. I tried flushleft environment but then '=' signs are not aligned and wrapped text started below '=' sign. Sample code is given below:

   \begin{flalign*}
\hat{x}_k &=(n\times 1)\hspace*{2pt} \text{state vector at time $k$}.&\\
A &=(n\times n)\hspace*{2pt} \text{matrix relating $x_k$ to $x^{}_{k+1}$}.&\\
w_k&=(n\times 1) \hspace*{2pt}\text{process noise vector}.&\\
y_k&=(m\times 1)\hspace*{2pt}\text{measurement vector}.&\\
z_k&=(m\times 1)\hspace*{2pt}\text{measurement noise vector}.&\\
H_k&=(m\times n)\hspace*{2pt} \text{matrix giving noiseless connection between measurement and the state vector at time $k$.}&\\
K_k&=(n\times m) \hspace*{2pt}\text{matrix giving Kalman gain}.&\\P_k&=(n\times n)\hspace*{2pt}\text{ matrix giving estimation error covariance.}
\end{flalign*}

1 Answer 1

5

I wouldn't use flalign* for this. Here's a way with tabularx, I show two alternative version (I like the second better).

\documentclass{article}
\usepackage{amsmath,tabularx,array}
\usepackage{lipsum} % just for the example
\begin{document}

\lipsum*[2]
\begin{flushleft}
\begin{tabularx}{\textwidth}{@{}>{$}r<{{}$}@{}X@{}}
\hat{x}_k = & $(n\times 1)$ state vector at time $k$.\\
A         = & $(n\times n)$ matrix relating $x_k$ to $x_{k+1}$.\\
w_k       = & $(n\times 1)$ process noise vector.\\
y_k       = & $(m\times 1)$ measurement vector.\\
z_k       = & $(m\times 1)$ measurement noise vector.\\
H_k       = & $(m\times n)$ matrix giving noiseless connection between 
              measurement and the state vector at time $k$.\\
K_k       = & $(n\times m)$ matrix giving Kalman gain.\\
P_k       = & $(n\times n)$ matrix giving estimation error covariance.
\end{tabularx}
\end{flushleft}
\lipsum*[2]
\begin{center}
\begin{tabularx}{0.9\textwidth}{@{}>{$}r<{{}$}@{}X@{}}
\hat{x}_k = & $(n\times 1)$ state vector at time $k$.\\
A         = & $(n\times n)$ matrix relating $x_k$ to $x_{k+1}$.\\
w_k       = & $(n\times 1)$ process noise vector.\\
y_k       = & $(m\times 1)$ measurement vector.\\
z_k       = & $(m\times 1)$ measurement noise vector.\\
H_k       = & $(m\times n)$ matrix giving noiseless connection between 
              measurement and the state vector at time $k$.\\
K_k       = & $(n\times m)$ matrix giving Kalman gain.\\
P_k       = & $(n\times n)$ matrix giving estimation error covariance.
\end{tabularx}
\end{center}
\lipsum[2]

\end{document}

enter image description here

0

You must log in to answer this question.

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