How to change the style of the cross reference in cleveref package?
For the parentheses, put this in preamble \crefdefaultlabelformat{#2(#1)#3}
where #1
stands for the cited item as stated in cleveref documentation
\documentclass[14pt,a4paper]{extreport}
\usepackage[left=2.00cm, right=1.50cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{lipsum}
\usepackage{hyperref}
\hypersetup{colorlinks=true,citecolor=red, linkcolor=blue}
\usepackage{cleveref}
\crefdefaultlabelformat{#2(#1)#3}
\begin{document}
\chapter{First Chapter}\label{ch:chapter 1}
\section{Section One}\label{sec:section one}
\lipsum[1]
\section{Section Two}\label{sec:section two}
\begin{align}
r =& \sqrt{x^2 + y^2}\label{eq:equation 1}\\[2ex]
z =& \sqrt[3]{1 - 2r^2}\label{eq:equation 2}
\end{align}
see \cref{sec:section one} in \cref{ch:chapter 1}\\
\Cref{eq:equation 1} is the governing equations, \cref{eq:equation 2} is the second equation.
\end{document}
If the numbers and the surrounding parentheses should be typeset in bold, add the instructions
\crefdefaultlabelformat{#2\bfseries\upshape(#1)#3}
\creflabelformat{equation}{#2\bfseries\upshape(#1)#3}
after loading cleveref
.
If only the numbers but not the surrounding parentheses should be typeset in bold, issue the instructions
\crefdefaultlabelformat{#2(\textbf{\textup{#1}})#3}
\creflabelformat{equation}{#2(\textbf{\textup{#1}})#3}
Observe the use of \upshape
/\textup
to make sure that the number (and, if required, the parentheses) are always typeset in the upright font shape.
A full MWE (minimum working example) that renders both the numbers and the surrounding parentheses in bold:
\documentclass[14pt,a4paper]{extreport}
\usepackage[left=2cm, right=1.5cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amsfonts,amssymb,graphicx,xcolor}
\usepackage{hyperref}
\hypersetup{colorlinks=true,linkcolor=blue}
\usepackage{cleveref}
\crefdefaultlabelformat{#2\bfseries\upshape(#1)#3}
\creflabelformat{equation}{#2\bfseries\upshape(#1)#3}
\usepackage{tcolorbox}
\begin{document}
\chapter{First Chapter}\label{ch:chapter 1}
\section{Section One}\label{sec:section one}
\section{Section Two}\label{sec:section two}
\begin{align}
r =& \sqrt{x^2 + y^2}\label{eq:equation 1}\\[2ex]
z =& \sqrt[3]{1 - 2r^2}\label{eq:equation 2}
\end{align}
See \cref{sec:section one} in \cref{ch:chapter 1}.
\Cref{eq:equation 1} is the governing equation, and \cref{eq:equation 2} is the second equation.
\end{document}
Addendum to address the OP's follow-up comment: Use the instructions
\crefdefaultlabelformat{(#2\textbf{\textup{#1}}#3)}
\creflabelformat{equation}{(#2\textbf{\textup{#1}}#3)}
if only the cross-referenced numbers, but not the surrounding parentheses, should be rendered in bold and be made into hyperlink targets (and hence be rendered in blue, given the hyperref
settings in force).