2

I am using align and split in the following way, but equation number is not coming :

\documentclass{article}
\usepackage{amsmath}

\begin{document}

Equation \eqref{eqn1} shows

\begin{align}
\begin{split}
\hat{\beta_{kjt}} = \alpha_{0k} + \varepsilon_{kjt} \nonumber\\ 
&where,\ T_{kjt^\prime} = 1\quad if\ t^\prime = t  
\end{split}
\label{eqn1}
\end{align}

\end{document}

Can someone please help me with this?

  • What's the use of split nested in align? – Bernard Jun 29 '17 at 12:14
  • @Bernard look at the vertical alignment of the equation number. With split you get one number vertically centred, with \nonumber you get the equation number just behind one line. – Skillmon Jun 29 '17 at 14:42
  • @Skillmon: Isn't it just as fine (and more natural) to use use split within equation? – Bernard Jun 29 '17 at 15:03
  • @Bernard It is (see my answer). But you might use several splits in an align whether it's good practise or not. Also you might use one split in one equation and type more without inside align. Whether that's desirable is in the users opinion, not mine, and there is at least this one valid reason to use split. – Skillmon Jun 29 '17 at 15:45
5

It's no wonder that there is no equation number if you suppress it with \nonumber. If you remove that, everything works fine. Additionally you should wrap "where" and "if" in a \text so it gets displayed as just that. Also you shouldn't start the equation as a new paragraph (no empty lines inbetween) and as egreg mentions, you might use another environment than align (like equation).

\documentclass{article}
\usepackage{amsmath}

\begin{document}

Equation \eqref{eqn1} shows
\begin{equation}
\begin{split}
\hat{\beta_{kjt}} = \alpha_{0k} + \varepsilon_{kjt} \\ 
&\text{where},\ T_{kjt^\prime} = 1\quad \text{if}\ t^\prime = t  
\end{split}
\label{eqn1}
\end{equation}

\end{document}

The split-environment is only numbered once inside align no matter how many rows you use.

  • 2
    Also, using align for a single equation is discouraged. And “if” should be wrapped in \text, too. – egreg Jun 29 '17 at 11:41
  • Just an addition, I'd probably write the where part as \text{where , $T_{kjt'} = 1$ if $t' = t$}, because semantically the whole thing is the where comment, not just the text parts. Also note I changed ^\prime to ' because '=^\prime in math mode (plus more) – daleif Jun 29 '17 at 13: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.