3

I would like to write the explanation of symbols on the same line of the equation.

I would like to see something like this:

enter image description here This is my code:

\documentclass{article}
\usepackage[utf8]{inputenc}

\usepackage{tasks}
\usepackage{amsmath}

\begin{document}

\begin{equation}
 K_0 = \frac{\sum x}{n} && \text{where, $x_i$ - raw yaw angle at idle state} \label{eq:2} \\
 \text{$n$ - total number of measurements}
\end{equation}

\end{document}
4

I generally would not add that as a part of the equation as there is often limited space available. If you insist, you could do something like

\begin{equation}
 K_0 = \frac{\sum x}{n} \qquad  \text{where,}\quad
 \begin{alignedat}[t]{2}
   &x_i &&\text{ -- raw yaw angle at idle state}
   \\
   & n &&\text{ -- total number of measurements}
\end{alignedat}
\end{equation}
6

I'd simply use a tabular. Two versions, one with the equation number centered as a whole, one with top alignment of the equation number.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}\label{eq:center}
\begin{gathered}
K_0 = \frac{1}{n}\sum_i x_i
\qquad\text{where}
\begin{tabular}[t]{ll}
$x_i$ & -- raw yaw angle at idle state \\
$n$   & -- total number of measurements
\end{tabular}
\end{gathered}
\end{equation}

\begin{equation}\label{eq:top}
K_0 = \frac{1}{n}\sum_i x_i
\qquad\text{where}
\begin{tabular}[t]{ll}
$x_i$ & -- raw yaw angle at idle state \\
$n$   & -- total number of measurements
\end{tabular}
\end{equation}

\end{document}

enter image description here

0

Meanwhile, I found another way.

\begin{align} % multi-line equation
     K_0 = \frac{\sum x}{n} \label{eq:311} \quad \text{where,} 
        & \text{ $x_i$ - raw yaw angle at idle state}\\
        & \text{$n$ - total number of measurements}\nonumber
\end{align}

enter image description here

  • It would be great if you could add an image to show how your answer parses – mrbolichi May 7 '18 at 10:25
  • @mrbolichi I have it now. – JeJo May 7 '18 at 10:46

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.