0

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.

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

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!

| improve this answer | |
  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.