Math & ScienceCustom Equation Numbering

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
bkarpuz
Posts: 124
Joined: Thu Dec 18, 2008 4:53 pm

Custom Equation Numbering

Post by bkarpuz »

Dear all,

I dont know whether i am asking my question in the right subsection, but I could not find the suitable one.
I use \eqref and \label for my equations.
I want to set a custom \tag to an equation as follows:
Suppose that LaTeX assigns (2) to my equation but I want its label to be (2-n).
I used the following code,

Code: Select all

\tag{\theequation-n}\label{myeq2n}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
but this time I got (1-n).
Should I increase the equation counter?
If so how?

Many thanks.
bkarpuz

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
daleif
Posts: 199
Joined: Wed Nov 19, 2008 12:46 am

Re: Custom Equation Numbering

Post by daleif »

\stepcounter{equation}
but be a little carefull about doing it inside math, because some ams constructions typeset the contents twice
bkarpuz
Posts: 124
Joined: Thu Dec 18, 2008 4:53 pm

Custom Equation Numbering

Post by bkarpuz »

daleif wrote:\stepcounter{equation}
but be a little carefull about doing it inside math, because some ams constructions typeset the contents twice
Thanks!

But I now realized that what I need is a little bit different.
I label an equation by \label{myeq1} as (1-n) for instance.
And I want to say:
"It is clear that (1-1) holds, suppose now that (1-n) is true, and we will show that (1-(n+1)) is also true".
I think there is no way for this.

Thanks again.
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Re: Custom Equation Numbering

Post by phi »

That is certainly possible, but please post the formula itself and show precisely how you'd like to write it, then we can look for a good solution.
bkarpuz
Posts: 124
Joined: Thu Dec 18, 2008 4:53 pm

Custom Equation Numbering

Post by bkarpuz »

phi wrote:That is certainly possible, but please post the formula itself and show precisely how you'd like to write it, then we can look for a good solution.
Many thanks phi.
I give a sample code below

Code: Select all

Now, we prove that
\begin{equation}
\|x_{k}(t)-x_{k-1}(t)\|\leq\frac{(t-t_{0})^{k}}{k!}\label{eq1}%I want to show this as (Eq.1-k)
\end{equation}
holds for all $k\in\mathbb{N}$.
It is clear that (Eq.1-1) holds trivially. %call by \eqref.
Next suppose that (Eq.1-k) is true for some $k\in\mathbb{N}$, then we have %call by \eqref.
\begin{equation}
\begin{split}
\|x_{k+1}(t)-x_{k}(t)\|\leq&\cdots\\
=&\frac{(t-t_{0})^{k+1}}{(k+1)!},
\end{split}\notag
\end{equation}
which proves that (Eq.1-(n+1)) holds. %call by \eqref.
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
In the above code, the number 1 in the label (Eq.1-k) is the equation counter.
bkarpuz
Posts: 124
Joined: Thu Dec 18, 2008 4:53 pm

Re: Custom Equation Numbering

Post by bkarpuz »

Post Reply