1

I am translating a book into Chinese, and it doesn't provide the latex file of the book. How to add text before the subequations?

enter image description here

This is my code for it

\parbox{8.5em}{
    predictor: \\
    Kalman gain: \\
    corrector: 
} 
\parbox{8.5em}{
\begin{subequations}
\begin{align}
    \check{\mathbf{P}}_k &= ...\\
    \check{\mathbf{x}}_k &= ...\\
    \mathbf{K}_k  &= ...\\
    \hat{\mathbf{P}}_k  &= ...\\
    \hat{\mathbf{x}}_k  &= ...
\end{align}
\end{subequations}
}

It's not the same as the version as the book shown.. enter image description here

  • 1
    Welcome to TeX.SE! Please show the compilable code you used to create the image ... – Mensch Jul 26 '17 at 23:57
  • It's just a pdf and I just want to translate it into latex ... – Zerolover Jul 26 '17 at 23:59
  • 3
    Welcome to the site Zerolover! If you were to at least do the tedious leg work of typing up the equations in the image, even if you don't know how to produce the text before, that would probably save the answerer a lot of work, which makes it much more likely that you will get an answer. It's also good manners isn't it, people are understandably much more likely to want to help if they can see you've tried to help yourself and have given them something to work with – Au101 Jul 27 '17 at 0:01
0

A quick solution using eqnarray (not very recommended):

\documentclass{article}
\usepackage{amsmath,multirow}
\begin{document}

\begin{subequations}
\begin{eqnarray}
 \multirow{2}{*}{predictor:}  &\Check{\mathbf{P}}_k = ...\\
                              &\Check{\mathbf{x}}_k = ...\\
 \text{Kalman gain:}          &\mathbf{K}_k       = ...\\
 \multirow{2}{*}{corrector:}  &\hat{\mathbf{P}}_k = ...\\
                              &\hat{\mathbf{x}}_k = ...
\end{eqnarray} 
\end{subequations}

\end{document}

enter image description here

A better option using align:

\begin{subequations}
\newcommand{\hleft}{\hspace{-6em}}
\begin{align}
 \multirow{2}{*}{predictor:} &\hleft& \Check{\mathbf{P}}_k &= ...\\
                             &\hleft& \Check{\mathbf{x}}_k &= ...\\
 \text{Kalman gain:}         &\hleft& \mathbf{K}_k         &= ...\\
 \multirow{2}{*}{corrector:} &\hleft& \hat{\mathbf{P}}_k   &= ...\\
                             &\hleft& \hat{\mathbf{x}}_k   &= ...
\end{align} 
\end{subequations}

enter image description here

| improve this answer | |
0

Two solutions with \alignat and mathtools, and some manual adjustments:

\documentclass{article}
\usepackage{array}
\usepackage{mathtools}

\begin{document}

\begin{subequations}
  \begin{alignat}{2}
                                                                       & & \check{\mathbf{P}}_k & = ... \\[-1.2ex]
    \ArrowBetweenLines[\llap{\raisebox{-0.8ex}[0pt][0pt]{predictor:}}] & \qquad & \check{\mathbf{x}}_k & = ... \\[0.5ex]
    \llap{Kalman gain:\quad} & & \mathbf{K}_k & = ... \\
                                                                       & & \hat{\mathbf{P}}_k & = ... \\[-1.2ex]
    \ArrowBetweenLines[\llap{\raisebox{-0.8ex}{corrector:}}] & & \hat{\mathbf{x}}_k & = ...
  \end{alignat}
\end{subequations}

\begin{subequations}
  \begin{alignat}{2}
                                                                                                 & & \check{\mathbf{P}}_k & = ... \\
                                                                                                 & & \check{\mathbf{x}}_k & = ... \\
    \llap{\raisebox{1.2ex}[0pt][0pt]{\setlength{\extrarowheight}{3ex}\begin{tabular}{r}predictor: \\[-0.5ex]Kalman gain: \\corrector:
        \end{tabular}}} & \qquad & \mathbf{K}_k & = ... \\
                                                                                                 & & \hat{\mathbf{P}}_k & = ... \\
                                                                                                 & & \hat{\mathbf{x}}_k & = ...
  \end{alignat}
\end{subequations}

\end{document} 

enter image description here

| improve this answer | |

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.