0
\begin{equation}\begin{split}
 H(m_X) &= \sqrt{\frac{8\pi G}{3} \rho(x=1)}\\ %removed big before rho from here from here.

\rho(x=1) &= \epsilon / c^2 &= \frac{g_*\pi^2}{30}\frac{K_b^4T_m^4}{\hbar^3c^5}\\
    \tagaddtext{\Big(T_m = T(x=1)\Big)}`\\
\end{split}
\end{equation}

So here is my code. Iam using the packages delimset and amsmath.

My error is.

! Undefined control sequence.
<argument> ..._b^4T_m^4}{\hbar ^3c^5} \tagaddtext 
                                                  {\Big (T_m = T(x=1)\Big )}...
l.223 \end{split}

The thing that I found was that by commenting on the \tagaddtext. The file runs perfectly. So I would like to know whats causing the issue. Thanks in advance and I am a beginner in LaTeX. Started like around 5 days back.

1

You seem to have multiple mixed constructions in that section.

Thus it is difficult to guess your desired output.

You have wrapped the equation matter in {split} but I don't see any split defined (or any need for one)

You have included alignment markers &= suggesting you simply need the equations in a basic {align}

The problem with \tagaddtext is that it is an undefined command that comes from an answer by Werner to Numbered equations with additional text part 2 so needs to be defined the same way in the preamble and as text when in a math environment it needs as a minimum $...$. Adding all the above comments together I get this as a working solution with the given snippet.

enter image description here

\documentclass{article}
\usepackage{delimset,amsmath}% http://ctan.org/pkg/amsmath

\makeatletter
\providecommand{\add@text}{}
\newcommand{\tagaddtext}[1]{\gdef\add@text{#1\gdef\add@text{}}}% http://tex.stackexchange.com/a/89187/5764
\renewcommand{\tagform@}[1]{\maketag@@@{(\ignorespaces#1\unskip\@@italiccorr)\rlap{~\add@text}}}
\makeatother

\begin{document}

%\begin{equation}
\begin{align}
%\begin{split}
H(m_X) &= \sqrt{\frac{8\pi G}{3} \rho(x=1)}\\
\rho(x=1) &= \epsilon / c^2 \\
&= \frac{g_*\pi^2}{30}\frac{K_b^4T_m^4}{\hbar^3c^5} \tagaddtext{$\Bigl(T_m = T(x=1)\Bigr)$}
%\end{split}
\end{align}
%\end{equation}

\end{document} 
  • 1
    sorry I should have left a note in the edit, yes it makes the ( mathopen rather than mathord but since in this case the (...) is the entire math list it doesn't actually make any difference, but it's simpler to follow a simple rule of never using the versions without r/l. – David Carlisle Jun 3 at 11:03

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.