I am using the cleveref
package to refer to theorems, equations, etc, in an article (LaTeX). I wish to have the format of reference as:
Thm. (1) for single theorem (or equation, figure, etc) and Thms. (1,2) for a pair of (theorem) labels.
To achieve my required format with cleveref
I do:
\usepackage{cleveref}
\crefformat{theorem}{Thm.~(#2{}#1{}#3)}
\crefname{theorem}{Thm.}{Thms.}
\newcommand{\crefpairconjunction}{ ,~}
However, I am not quite able to achieve the format required for the case where I have a pair of labels -- I require the counters in the reference to be enclosed by "(" and ")" parenthesis:
Thms. (1.1, 1.2)
Can anyone please help me modify the format for multiple labels case ? Since some had asked for a MWE, here is one:
\documentclass[12pt]{article}
\usepackage{amsmath}
\newtheorem{theorem}{Theorem}[section]
\usepackage{hyperref}
\hypersetup{colorlinks,linkcolor=blue}
\usepackage{cleveref}
\crefformat{theorem}{Thm.~(#2{}#1{}#3)}
\crefname{theorem}{Thm.}{Thms.}
\newcommand{\crefpairconjunction}{ ,~}
\renewcommand{\baselinestretch}{2}
\begin{document}
\section{\today}
Here is a sample theorem:
\begin{theorem} \label{thm-something}
Define something \dots
\end{theorem}
Here is another sample theorem:
\begin{theorem} \label{thm-some-other-thing}
Define some other thing \dots
\end{theorem}
I do not want references in this format: \cref{thm-something,thm-some-other-thing}
I want to enclose the counters by ``('' and ``)'' parenthesis. So it should be: ``Thms. (1.1, 1.2)''.
\end{document}
I have edited this question based on comments on its previous posting. (This question is a continuation of How to cross-reference several objects simultaneously )
Eqs. (1,2,3)
to be the result of cross-referencing the first three equations. What should be the result when cross-referencing equations 7, 8, 9, 10, 11, and 12: Should it beEqs. (7--12)
orEqs. (7,8,9,10,11,12)
? Please advise.