0

This is my code:

\begin{align}
Position_{increment}(t) &= K_{P1}.(Tension_{limit} - Sensor(t)) \\
&+ K_{P2}.(Sensor(t) - Sensor_{opposite}(t)) \\
&+ K_I.\sum_{0}^{t}(Tension_{limit} - Sensor(t)) 
\label{equation:position_PI}
\end{align}

And this is the output:

Note that I only want one label to appear.

Werner
  • 14,324
  • 7
  • 55
  • 77

3 Answers3

2

Is this what you are looking for, via \nonumber or \notag?:

enter image description here

\begin{align}
Position_{increment}(t) &= K_{P1}.(Tension_{limit} - Sensor(t)) \\
&+ K_{P2}.(Sensor(t) - Sensor_{opposite}(t)) \nonumber \\
&+ K_I.\sum_{0}^{t}(Tension_{limit} - Sensor(t)) \nonumber
\label{equation:position_PI}
\end{align}

From one of the answers to this related question.

Community
  • 1
  • 1
andybega
  • 1,387
  • 12
  • 19
2

You should consider using aligned inside an equation:

enter image description here

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align}
  Position_{increment}(t) &= K_{P1}.(Tension_{limit} - Sensor(t)) \\
  &+ K_{P2}.(Sensor(t) - Sensor_{opposite}(t)) \\
  &+ K_I.\sum_{0}^{t}(Tension_{limit} - Sensor(t)) 
\end{align}

\begin{equation}
  \begin{aligned}
    \text{Position}_{\text{increment}}(t) &= K_{P1} \cdot \bigl( \text{Tension}_{\text{limit}} - \text{Sensor}(t) \bigr) \\
    &\phantom{{}={}} + K_{P2} \cdot \bigl( \text{Sensor}(t) - \text{Sensor}_{\text{opposite}}(t) \bigr) \\
    &\phantom{{}={}} + K_I \cdot \sum_0^t \bigl( \text{Tension}_{\text{limit}} - \text{Sensor}(t) \bigr) 
  \end{aligned}
\end{equation}

\end{document}

I've updated the spacing around the missing = relation to reflect what it should look like. Also, if you're using text in equations, then use \text, or create your own "variable macro" \var{<stuff>}, for consistency:

\newcommand{\var}{\text}
Community
  • 1
  • 1
Werner
  • 14,324
  • 7
  • 55
  • 77
0

A third solution may be:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}
  \begin{split}
    Position_{increment}(t) &= K_{P1}.(Tension_{limit} - Sensor(t)) \\
    &+ K_{P2}.(Sensor(t) - Sensor_{opposite}(t)) \\
    &+ K_I.\sum_{0}^{t}(Tension_{limit} - Sensor(t))
    \label{equation:position_PI}
  \end{split}
\end{equation}

\end{document}

as suggested in section 3.2 of this manual.

MattAllegro
  • 6,455
  • 5
  • 45
  • 52