1

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}

\begin{equation}\label{eq1}
1 + 1 = 2.
\end{equation}

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)"?

Thank you for your help.

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

1 Answer 1

2

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

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

\begin{document}

\begin{equation}\label{eq1}
1 + 1 = 2.
\end{equation}

A reference to \cref{eq1}.

\end{document}

Example

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}

\begin{equation}\label{eq1}
1 + 1 = 2.
\end{equation}

A reference to \cref{eq1}.

\end{document}

Hope it works!

1
  • 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, 2020 at 16:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .