# Undefined control sequence. \end{align*}

\begin{align*}
\DIV \BP =&~\Bzero~,\label{PDE1}\\
\rho_0 c \dot{\theta}=&-\DIV \BQ + \theta\p{\theta}\BP:\dot{\BF}~.\label{PDE2}
\end{align*}


I had used packages like amsmath,amsfonts,amssymb... But it's showing the following error:

Undefined control sequence. \end{align*}


Do I need to add other packages?

• What are \DIV, \BP, \BQ and \BF commands? – CarLaTeX Dec 27 '17 at 18:32
• Actually it's an equation Div P = 0 Div= divergent. Do I need to add anymore packages to access those unrecognised sentence? – A K Tom Thomas Dec 27 '17 at 18:34
• Did you define them as new operators or macro or whatelse? – CarLaTeX Dec 27 '17 at 18:36
• welcome to tex.se! please provide small but vomplete document beginning with \documentclass{...}, with used to math related packages and your definitiones in preamble, and ending with \end{document}. now we can only guessing are you defined somewhere used commands ... – Zarko Dec 27 '17 at 18:41
• Do we have any packages named hd.sty? I think it's the problem. My align works perfectly fine if I comment out all the equations. So I think the \DIV ,\BP has to do something. I just copied this equation from another tex file of which my professor gave me. SO any guesses of which file would I be missing?. Or how to create a command like that or is it some kind of macro? – A K Tom Thomas Dec 27 '17 at 18:51

Well, assuming that you defined some commands somewhere in your document, I took the liberty to define them too to be able to compile your document.

The problem is not at all related to the align* environment, but my LaTeX IDE (Kile) also shows the error in the align* environment.

The problems were:

1. All the user-undefined commands. I created them but you'll have to change to the correct ones later.

2. The align* environment produces an unumbered equation, so you cannot put labels in it (someone confirm this, please).

After some modifications, here is your code, with only the amsmath package and your mysterious user-defined commands.

I also added another version where you can put labels on your equations.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\newcommand{\DIV}{\div}
\newcommand{\BP}{\left<BP\right>}
\newcommand{\Bzero}{\left<Bzero\right>}
\newcommand{\BQ}{\left<BQ\right>}
\newcommand{\p}{\left<p\right>}
\newcommand{\BF}{\left<BF\right>}

\begin{align*}
\DIV \BP =&~\Bzero~,\\
\rho_0 c \dot{\theta}=&-\DIV \BQ + \theta\p{\theta}\BP:\dot{\BF}~.
\end{align*}

\begin{subequations}
\begin{align}
\DIV \BP =&~\Bzero~,\label{PDE1}\\
\rho_0 c \dot{\theta}=&-\DIV \BQ + \theta\p{\theta}\BP:\dot{\BF}~.\label{PDE2}
\end{align}
\end{subequations}

See Eqs. \ref{PDE1} and \ref{PDE2}

\end{document}

• a couple of things. \label can be used with align* if \tag is used on the same line. and the & is better used before the signs of relation, otherwise ={}& and omit the ~. the spacing should be provided automatically by inbuilt rules. – barbara beeton Dec 27 '17 at 23:07
• I didn't know about \tag`. Thanks @barbarabeeton! – Phelype Oleinik Dec 28 '17 at 1:14