定义一个新的示例环境并给出参考

定义一个新的示例环境并给出参考

如何交叉引用所有单词,示例 1, 如下?

在此处输入图片描述

我定义了一个新环境,如下所示:

\newtheorem{exmp}{Example}

当我给出\label{Example}示例并写下时\ref{Example},我得到: 在此处输入图片描述

只是1包含链接。

`\documentclass[final,5p,times,twocolumn]{elsarticle} 
\usepackage{hyperref}
 
\hypersetup{
    colorlinks=true,
    urlcolor=blue,
    citecolor=blue}
\usepackage[all]{xy,xypic}
\usepackage{amsfonts,amssymb,amsmath,amsgen,amsopn,amsbsy,theorem,graphicx,epsfig}
\usepackage{multicol}  
\usepackage{eufrak,amscd,bezier,latexsym,mathrsfs,enumerate,multirow}
\usepackage[utf8]{inputenc}\usepackage[english]{babel}
\usepackage[dvipsnames]{xcolor}
\usepackage[pagewise]{lineno}
\usepackage{cleveref}
\graphicspath{{figures/}}
\usepackage{subfig} 
\usepackage{longtable} 
\usepackage[linesnumbered,ruled,vlined]{algorithm2e}% http://ctan.org/pkg/algorithm2e
\DontPrintSemicolon
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%

\usepackage{amsthm}
\theoremstyle{definition}
\theoremstyle{remark}
\newtheorem{exmp}{Example}
     \newtheorem{rem}{Remark}
\let\proof\relax
\let\endproof\relax
\let\example\relax
\let\endexample\relax
%%%%%%%%%%%

\begin{document}
\begin{exmp} \label{Ex1}
 Let's consider:
 \begin{equation}
     2x+y=3
 \end{equation}
 \end{exmp}

\begin{table*}[h!]
    \caption{Results in \cref{EX1}

.....
\end{document}`
 

相关内容