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.

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:) – Andrew Jul 9 '16 at 8:19
  • @Andrew: I just posted this, alright? ;-) – user31729 Jul 9 '16 at 8:20
  • Sorry, didn't realise it was a work in progress.. – Andrew Jul 9 '16 at 8: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 9 '16 at 8:25
  • 1
    @Amit: I don't suspect that -- the tagform is an equation number specific command/feature – user31729 Jul 9 '16 at 8:26

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.