|
要引用还是得有编号啊。
至于编号冲突的问题,得看 example 和你的 myexample 是什么关系。
如果是下属关系,那可以 example 是“例1”,接下来的 myexample 就是“例1.1”、“例1.2”等就行了。- \documentclass[a4paper]{article}
- \usepackage{amsmath,bm,yhmath,amssymb,etoolbox,esvect,stmaryrd,cite,enumitem,extarrows,mathtools,ifthen}
- \usepackage[framemethod=tikz,ntheorem]{mdframed}
- \usepackage{xltxtra,fontspec,xunicode}
- \usepackage[slantfont,boldfont]{xeCJK}
- \usepackage[amsmath, thmmarks]{ntheorem}
- \theoremheaderfont{\indent\bfseries}
- \theorembodyfont{\normalfont}
- \theoremsymbol{\ensuremath{\Box}}
- \newtheorem{proof}{证明}
- \newtheorem{example}{例}
- \newcommand\exampleautorefname{例}
- \mdfdefinestyle{exampleStyle}{linewidth=0pt,innerleftmargin=0,innerrightmargin=0,innertopmargin=-\topskip}
- \newmdtheoremenv[style=exampleStyle]{myexample}{例}[example]
- \newcommand\myexampleautorefname{例}
- \usepackage[pdfencoding=auto,psdextra,colorlinks,linkcolor=red,anchorcolor=blue,citecolor=blue]{hyperref}
- \begin{document}
- \begin{example}
- 大佬
- \end{example}
- \begin{myexample}\label{myexama}
- 小弟a
- \end{myexample}
- \begin{myexample}\label{myexamb}
- 小弟b
- \end{myexample}
- \autoref{myexama}、\autoref{myexamb}
- \end{document}
复制代码 |
|