3

My mWE is (following this answer)--

\documentclass{article}
\usepackage{hyperref}
\usepackage[capitalise,nameinlink,noabbrev]{cleveref}
\creflabelformat{equation}{#2#1#3}
\begin{document}

    \begin{equation}
    \label{eq:1}
    x = y
    \end{equation}

    \cref{eq:1}
\end{document}

and output is --

enter image description here

This is fine. But I would like to present my equation without parentheses both in the environment (label) and also while referring to keep it consistent. Something like --

x = y                 1

Could some one point out the problem or give me a hint to work this out ? Additionally, (if asking this is allowed here), what is the preferred way in thesis?

Edit

By adding an additional line --

\crefrangelabelformat{equation}{#3#1#4 to #5#2#6}

does not make a difference.

novice
  • 1,108

1 Answers1

3

You can use the \newtagform command from mathtools to create another equation labelling style.

Say \usetagform{noparen} for example, if the tagform is named noparen.

The \creflabelformat command is only responsible for the display of the reference.

\documentclass{article}
\usepackage{mathtools}
\usepackage{hyperref}
\usepackage[capitalise,nameinlink,noabbrev]{cleveref}

\creflabelformat{equation}{#2#1#3}

\newtagform{noparen}{}{}
\usetagform{noparen}

\begin{document}

    \begin{equation}
    \label{eq:1}
    x = y
    \end{equation}

    \cref{eq:1}
\end{document}

enter image description here

  • A few words of explanation and a picture would not go astray:) –  Jul 09 '16 at 08:19
  • @Andrew: I just posted this, alright? ;-) –  Jul 09 '16 at 08:20
  • Sorry, didn't realise it was a work in progress.. –  Jul 09 '16 at 08:21
  • @Christian Hupfer, Thanks. I hope this will not affect/break the citations (using biblatex) or any others parentheses used in math env. – novice Jul 09 '16 at 08:25
  • 1
    @Amit: I don't suspect that -- the tagform is an equation number specific command/feature –  Jul 09 '16 at 08:26