4

I am trying to write the equation below but latex marks an error saying that there is no line here to end. I have tried commands as align and split but they do not work. I would appreciate it if someone has a suggestion to fix this problem.

\begin{equation} 
    \label{eq:standard_curve}
    \begin{align}
                $\Phi_\text{e}$  = K_\text{m} \[ \int_{\SI{780}{\nano\meter}}^{\SI{380}{\nano\meter}} $V_\lambda$ $\Phi_{e,\lambda}$ \,$d\lambda$ \]  
     \end{align}
    
    \end{equation}

equation to write

4
  • 3
    It's wrong to have align inside equation. Remove \begin{align} and \end{align} (don't leave blank lines) and also the $ characters. – egreg Apr 17 at 13:42
  • 1
    Welcome to TeX SX! Do you have whatever to align? – Bernard Apr 17 at 13:43
  • 2
    Oh, also \[ and \] should be [ and ]. – egreg Apr 17 at 13:45
  • And also your use \text is wrong in two ways, firstly it is shear luck that _\text actually works without {} , secondly \text does not do what you think it does. – daleif Apr 17 at 17:36
5

When you start \begin{equation}, TeX goes into “math mode”. Also align does, so you shouldn't use it inside equation (its job is doing alignments, which you don't seem to have).

Since you're already in math mode, $ is disallowed: it is not a way to make funny symbols, but to start inline math mode.

If you want square brackets, type [ and ], not \[ and \]. The backslash is only needed for braces {}, that should be typed in as \{ and \}, because { and } have a different usage in TeX. You also need to make them bigger to encompass the integral sign.

Fixed code:

\begin{equation} 
    \label{eq:standard_curve}
    \Phi_{\mathrm{e}} = K_{\mathrm{m}} \biggl[ \int_{\SI{380}{\nano\meter}}^{\SI{780}{\nano\meter}} V_\lambda \Phi_{\mathrm{e},\lambda} \,d\lambda \biggr]
\end{equation}

enter image description here

On the other hand, the brackets don't seem necessary here.

\documentclass{article}
\usepackage{amsmath,siunitx}

\begin{document}

\begin{equation} 
    \label{eq:standard_curve}
    \Phi_{\mathrm{e}} = K_{\mathrm{m}} \int_{\SI{380}{\nano\meter}}^{\SI{780}{\nano\meter}} V_\lambda \Phi_{\mathrm{e},\lambda} \,d\lambda
\end{equation}

\end{document}

enter image description here

3
  • 1
    +1. You beat me to this answer by a few seconds. :-) – Mico Apr 17 at 13:54
  • I would have done the integral from 380 nm to 780 nm – D Duck Apr 17 at 21:59
  • @DDuck Oh, I just took the OP's code and didn't look at the picture. I'll fix. – egreg Apr 17 at 22:15

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.