Reference equation with Roman numerals

I would like to number my equations with Roman numerals. This is my code:

\documentclass[a4paper,11pt,titlepage]{article}

\usepackage{mathtools}
\usepackage{cleveref}
\newtagform{Roman}[\renewcommand{\theequation}{\Roman{equation}}]()
\usetagform{Roman}

\begin{document}

$$\label{eq1} 1 + 1 = 2.$$

A reference to \cref{eq1}.

\end{document}



The equation is labelled as (I), as it should be. But the reference comes out with a (Hindu)-Arabic numeral as: "eq. (1)".

How can I change my code, so that the reference comes out with a Roman numeral as: "eq. (I)"?

• Why don't you just do \renewcommand{\theequation}{\Roman{equation}} and comment out the \newtagform and \usetagform calls? – frougon Mar 5 at 10:57

As @frougon said, it's easier to use the next code:

\documentclass[a4paper,11pt,titlepage]{article}
\usepackage{cleveref}
\renewcommand{\theequation}{\Roman{equation}}

\begin{document}

$$\label{eq1} 1 + 1 = 2.$$

A reference to \cref{eq1}.

\end{document}


Also, you can avoid using unnecessary packages using this one:

\documentclass[a4paper,11pt,titlepage]{article}
\renewcommand{\theequation}{\Roman{equation}}
\newcommand{\cref}[1]{eq. (\ref{#1})}

\begin{document}

$$\label{eq1} 1 + 1 = 2.$$

A reference to \cref{eq1}.

\end{document}


Hope it works!

• Employing \newcommand{\cref}[1]{eq. (\ref{#1})} instead of loading the cleveref package has some significant disadvantages. Among them are: your macro cannot handle multiple arguments, your macro allows line breaks after "eq.", and the output of \cref{eq1} is not guaranteed to be typeset in an upright font shape. – Mico Mar 5 at 16:44