0

I have an Missing } inserted \begin{equation} in this code:

\paragraph{Task constraints} \begin{equation} \label{c1} \sum_{k \in K} y_{i}^{k}\leq 1 ~~ i \in I \end{equation}

I figured out that when I remove \paragraph{Task/Technician constraints} it works. any suggestion please. in the log file:

! Missing } inserted.
<inserted text> 
                }
\begin{equation}
            \label{c1}
I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.

closed as unclear what you're asking by Werner, Mensch, Troy, TeXnician, Stefan Pinnow Dec 6 '17 at 6:51

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    The problem might be unrelated to what you've posted. We need more context. – Werner Dec 5 '17 at 19:16
  • I have no problem with this as given. I believe you're missing something. – Herb Schulz Dec 5 '17 at 19:57
  • welcome to tex.sx. since the error report shows \begin{equation} as the location of the problem, that means the closing brace should have appeared before \begin{equation}, and you haven't shown us what went before. – barbara beeton Dec 5 '17 at 20:05
  • Please, instead of a code snippet always post a minimal but working example (MWE), that can be used to reproduce your problem and to test our suggestions. Without such a MWE questions are often somehow unclear. And with such a MWE answering will become faster and the answers are less speculative but more proper. So please help us to help you. – Schweinebacke Dec 6 '17 at 6:46
  • The information you've added to your question would not adversely affect compilation and therefore does not show the problem. Best would be if you provide us with code that we can copy-and-paste-and-compile and see exactly your error. – Werner Dec 6 '17 at 20:39
2

The error shows that you have something before the equation that has grabbed the \begin{equation} and generated an error unrelated to the equation (which has not yet been read by TeX.

For example the following document produces exactly the error shown (and any document making this error will be essentially equivalent.

$ pdflatex file
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./file.tex
LaTeX2e <2017-12-01> patch level 99
Babel <3.15> and hyphenation patterns for 84 language(s) loaded.
(/usr/local/texlive/2017/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2017/texmf-dist/tex/latex/base/size10.clo)) (./file.aux)
! Missing } inserted.
<inserted text> 
                }
l.8 \begin{equation}
                     \label{c1}
? h
I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.

is generated from

\documentclass{article}

\newcommand\zz[2]{\begingroup{\endgroup}}
\begin{document}


\zz
\begin{equation} \label{c1}
 \sum_{k \in K} y_{i}^{k}\leq 1  ~~ i \in I
\end{equation}
\end{document}
0

Here is a suggestion: Try to comment out this code block (i.e. make all this code block a comment) and then compile. If there is still an error - then the problem is a missing delimiter somewhere else.

Also, note that ~ is not good to use inside equation, use "\sim" instead.

Not the answer you're looking for? Browse other questions tagged or ask your own question.