# Adding text line in Equation Environment

I am a new user in LaTex. 1. Can someone please help me what wrong is with this code.

\begin{equation*}
T_{Loop Filter}(s)=K_{p}+\frac{K_{i}}{s}\\
The overall transfer function of given PLL can be given as\\
\frac{{\phi}_{c}(s)}{{\phi}(s)}=\frac{T_{Loop Filter}(s)*\frac{1}{s}}{1+\frac{T_{Loop Filter}(s)*\frac{1}{s}}\\
\frac{\phi_{c}(s)}{\phi(s)}=\frac{K_{p}(s)+K_{i}}{s^{2}+K_{p}(s)+K_{i}}\\
In general transfer function for a second order closed loop control system is given as\\
T_{second order}=\frac{{\omega}^2+{2{\delta}{\omega}s}{s_{2}+2{\delta}{\omega}s+{\omega}^{2}}\\
On comparing {\omega}={sqrt{K_i}}  {\delta}=\frac{K_p}{2\sqrt{K_{i}}}
\end{equation*}


I am getting following error

"Runaway argument? {1+\frac {T_{Loop Filter}(s)*\frac {1}{s}}\ \frac {\phi _{c}(s)}{\phi \ETC. ! File ended while scanning use of \frac

1. What is the professional way to write equations for research paper( or \begin{eqnarray} or  or \begin{OtherStyle} 2. Can we add text line directly in inside environment without any commands 3. How to use center aligned(Under ) as well as align with respect to particular character(\begin{Align}) in equation environment. • Don't use double dollar  . Use  instead. But if you wish you can use equation or equation* for unnumbered. – Sigur Apr 27 '15 at 8:10
• I suggest you to use T_{\text{Loop Filter}} – Sigur Apr 27 '15 at 8:42
• Welcome to TeX SX! The equation environment is for numbered one-lined formulae. Also any text inserted in an equation must be introduced with \text{…} (command defined by the amsmath package). – Bernard Apr 27 '15 at 10:19

I think flalign* and \intertext{} are very good for you.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{flalign*}
& & T_{Loop Filter}(s)&=K_{p}+\frac{K_{i}}{s} & & \\
\intertext{The overall transfer function of given PLL can be given as}
& & \frac{{\phi}_{c}(s)}{{\phi}(s)}&=\frac{T_{Loop Filter}(s)*\frac{1}{s}}{1+\frac{T_{Loop Filter}}(s)*\frac{1}{s}} & & \\
& & \frac{\phi_{c}(s)}{\phi(s)}&=\frac{K_{p}(s)+K_{i}}{s^{2}+K_{p}(s)+K_{i}} & &
\intertext{In general transfer function for a second order closed loop control system is given as}
& & T_{second order}&=\frac{{\omega}^2+{2{\delta}}{\omega}s}{s_{2}+2{\delta}{\omega}s+{\omega}^{2}} & & \\
& \rlap{\text{On comparing}} & {\omega}&={sqrt{K_i}}  {\delta}=\frac{K_p}{2\sqrt{K_{i}}} & &
\end{flalign*}
\end{document}

• Thanks for your kind interest. It solved my problem. I have further doubts.1. Can you please explain significance for position of '&' in \begin{flalign} environment. What will the effect if i will use single '&' both side 2. Why we are using \rlap{\text} ; Cant we use \intertext{} again. – user3045159 Apr 27 '15 at 14:07
• You can see examples of using flalign in this website latex-community.org/forum/viewtopic.php?f=46&t=4868 – onpra7 Apr 27 '15 at 14:33

You have a misssing } in your code.

This should work:

$T_{Loop Filter}(s)=K_{p}+\frac{K_{i}}{s}$
The overall transfer function of given PLL can be given as
$\frac{{\phi}_{c}(s)}{{\phi}(s)}=\frac{T_{Loop Filter}(s)*\frac{1}{s}}{1+\frac{T_{Loop Filter}}(s)*\frac{1}{s}}$
$\frac{\phi_{c}(s)}{\phi(s)}=\frac{K_{p}(s)+K_{i}}{s^{2}+K_{p}(s)+K_{i}}$
In general transfer function for a second order closed loop control system is given as
$T_{second order}=\frac{{\omega}^2+{2{\delta}}{\omega}s}{s_{2}+2{\delta}{\omega}s+{\omega}^{2}}$
On comparing
${\omega}={sqrt{K_i}} {\delta}=\frac{K_p}{2\sqrt{K_{i}}}$


I don't try all } so some could be added.

• erh, no, you cannot break lines in equation* – daleif Apr 27 '15 at 8:23
• Right, I look only to missign } due to the error. I'll modify my answer to fit – Romain Picot Apr 27 '15 at 8:29
• Thanks it works fine. but cant we align these equation by some means with respect to any character viz. '=' without using \begin{align}. – user3045159 Apr 27 '15 at 14:18
• You can use split in equation. See more detail in this website sharelatex.com/learn/Aligning_equations_with_amsmath – onpra7 Apr 27 '15 at 14:37

Can i use $Equation$ inside and outside \intertext{} under flalign{} environment .Because of these two lines my all equations got justified to left.Please help in this regard Before adding it is properly justified wrt center \begin{flalign*} & & \frac{Y(s)}{R(s)}&=\frac{{\omega}^2+{2{\delta}}{\omega}{s}}{s^{2}+2{\delta}{\omega}{s}+{\omega}^{2}} & & \ \end{flalign*} After adding bellow text, instead of center it is justified toward left {\intertext{On comparing}} ${\omega}={\sqrt{K_i}}$ \quad ${\delta}=\frac{K_p}{2\sqrt{K_{i}}}$\