GeneralEquation numbering problem

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
pallav
Posts: 170
Joined: Wed Nov 12, 2008 5:53 pm

Equation numbering problem

Post by pallav »

In place of writing equationa as:

from equation 1,2,3,4 we get

I want to get in latex the equations as

from equation 1-4 we get
Please help me.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Equation numbering problem

Post by localghost »

Recently discussed in another topic [1]. Might be done with the cleveref package.

[1] View topic: Auto cross reference fixing


Best regards
Thorsten
pallav
Posts: 170
Joined: Wed Nov 12, 2008 5:53 pm

Re: Equation numbering problem

Post by pallav »

Got the ref. : cleveref package. But please guide me to use it.
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Equation numbering problem

Post by frabjous »

If you follow the link Thorsten gave you, you'll also find the manual/documentation for using cleveref, which should contain all the information you need.

For a very simple example matching your initial request, take this:

Code: Select all

\documentclass{article}
\usepackage{cleveref}
\newcommand{\crefrangeconjunction}{--}
\crefname{equation}{equation}{equations}

\begin{document}

\begin{equation}\label{mylabel}
2+2=4
\end{equation}

\begin{equation}\label{mynextlabel}
3+3=6
\end{equation}

\begin{equation}\label{anotherlabel}
4+4=8
\end{equation}

\begin{equation}\label{finallabel}
5+5=10
\end{equation}

From \cref{mylabel,mynextlabel,anotherlabel,finallabel}, we can see that I have too much time on my hands.

\end{document}
pallav
Posts: 170
Joined: Wed Nov 12, 2008 5:53 pm

Re: Equation numbering problem

Post by pallav »

Thank you both very much
Post Reply