Sign up ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Somwhere in preambula:

\newcommand{\eqnl}[2]{\label{eq:#1} \eqn{#2}} %eqn is smthlike $$ $$

Text part:

Будем полагать, что 
непрерывна (!) и 
такова, что 
\eqnl{c}{\pf{y}{x} \equiv f(x,y(x))\qquad ,x \in (a,b)}
Имеем \eqf{c} для каждой точки кривой.
\cent{Тут крутой график}
Функция \eqf{b}, удовлетворяющая \eqf{c}, ....

And here is what i get in output: (equations are here, everything is as planned til...)

Функция (2), удовлетворяющая (2), ....

How can it be? It should be Функция (2), удовлетворяющая (3). It's my second day with LaTeX and this is the first time it ever made me cry.

share|improve this question
Welcome to! My only guess would that \newcommand{\eqnl}[2]{\eqn{#2}\label{eq:#1}} should solve your problem - putting the \label after your \eqn. It would help though to see the full definition of \eqn by providing a minimal working example (MWE). – Werner Sep 26 '12 at 23:19
#define is evil... – Xiè Jìléi Sep 28 '12 at 7:50

2 Answers 2

I recommend against using that kind of abbreviations that make the input file very confuse. Here's an edited version:


Будем полагать, что 
непрерывна (!) и 
такова, что 
\frac{y}{x} \equiv f(x,y(x)),\qquad x \in (a,b)
Имеем \eqref{eq:c} для каждой точки кривой.
Тут крутой график
Функция \eqref{eq:b}, удовлетворяющая \eqref{eq:c}

that prints correctly. I guess that the definition of \eqnl you have is wrong.

enter image description here

share|improve this answer

Because of lack of a MWE … try putting \label inside your math environment:

\newcommand{\eqnl}[2]{\begin{equation} #2 \label{eq:#1} \end{equation}} %eqn is smthlike $$ $$

\eqf{a}, \eqf{b}, \eqf{c}, ....
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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