I am using latex with rmarkdown package. The following is the YAML heading in which the packages are located and the written text.
- \usepackage{amsmath}
- \usepackage{amsthm}
- \usepackage{bbm}
- \numberwithin{equation}{section}
- \usepackage{makecell}
- \usepackage{indentfirst}
- \usepackage{geometry}
- \usepackage{graphicx}
- \usepackage{tikz}
- \usepackage{verbatim}
- \usepackage{chronosys}
- \usepackage{stackengine}
- \usepackage{booktabs, colortbl, xcolor}
- \usepackage{babel}
- \usetikzlibrary{arrows.meta,calc}
- \usepackage[font=small]{caption}
- \usepackage{adjustbox}
- \usepackage{tabularx}
- \usepackage{pgfplots}
- \pgfplotsset{compat=1.7}
- \usepackage[makeroom]{cancel}
- \usetikzlibrary{arrows,decorations.markings}
- \usetikzlibrary{intersections}
- \usepackage[nottoc]{tocbibind}
- \newtheorem{prop}{Proposition}
- \theoremstyle{definition}
- \newtheorem{assumption}{Assumption}
- \newtheorem{definition}{Definition}
- \newtheorem{algorithm}{Algorithm}
- \usepackage[T1]{fontenc}
- \usepackage{tabularx,ragged2e,booktabs,caption}
- \newenvironment{rcases}
{\left.\begin{aligned}}
{\end{aligned}\right\rbrace}
- \renewcommand{\refname}{References}
- \UseRawInputEncoding
- \usepackage[utf8]{inputenc}
- \usepackage{hyperref}
- \hypersetup{
colorlinks=true,
linkcolor=black,
filecolor=blue,
citecolor = blue,
urlcolor=blue,
}
- \usepackage{subcaption}
- \usepackage[font=small,labelfont=bf]{caption}
- \usepackage{float}
- \usepackage{flafter}
- \floatstyle{plaintop}
- \restylefloat{table}
- \setlength{\parindent}{2.5em}
- \setlength{\parskip}{0em}
- \usepackage{adjustbox}
- \usepackage[style=english]{csquotes}
- \usepackage[colorlinks,allcolors=red]{hyperref}
- \usepackage[nameinlink,noabbrev]{cleveref}
- \creflabelformat{equation}{#2\textup{(\textcolor{red}{#1})}#3}
- \creflabelformat{assumption}{#2\textup{(\textcolor{red}{#1})}#3}
- \creflabelformat{proposition}{#2\textup{(\textcolor{red}{#1})}#3}
- \creflabelformat{figure}{#2\textcolor{red}{#1}#3}
- \creflabelformat{table}{#2\textcolor{red}{#1}#3}
- \creflabelformat{section}{#2\textcolor{red}{#1}#3}
...
\medskip
\makeatletter
\renewcommand\@makefnmark{\hbox{\@textsuperscript{\normalfont\color{red}\@thefnmark}}}
\newcommand{\lccref}[1]{\lcnamecref{#1}~\labelcref{#1}}
\makeatother
\pagebreak
\tableofcontents
\pagebreak
\section{Introduction}
\begin{assumption}\label{assump1}
\normalfont The production is assumed to adopt a single technology.
\end{assumption}
\cref{assump1} suggests something.
But it prints ?? suggests something.
.
\crefname{assumption}{assumption}{assumptions}
to this...?\lccref
is defined.\medskip \makeatletter \renewcommand\@makefnmark{\hbox{\@textsuperscript{\normalfont\color{red}\@thefnmark}}} \newcommand{\lccref}[1]{\lcnamecref{#1}~\labelcref{#1}} \makeatother \pagebreak \tableofcontents \pagebreak \section{Introduction}
. Please see the revised question above.