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.
General ⇒ Equation numbering problem
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
Recently discussed in another topic [1]. Might be done with the cleveref package.
[1] View topic: Auto cross reference fixing
Best regards
Thorsten
[1] View topic: Auto cross reference fixing
Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Equation numbering problem
Got the ref. : cleveref package. But please guide me to use it.
Equation numbering problem
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:
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}
Re: Equation numbering problem
Thank you both very much