cleveref for တူညီသောတန်ပြန်ကိုမျှဝေနေသော theorem ပတ်ဝန်းကျင်

ငါ theorems နှင့်ဆက်စပ်ချက်များကိုတူညီသော (section) ကောင်တာတွင်ရေတွက်ချင်သည်။ ဒါပေမယ့်ငါလုပ်တဲ့အခါမှာသူတို့ကို teorem နှစ်ခုစလုံးကိုရှင်းစေတယ်။ ဤတွင်အနည်းဆုံးဥပမာတစ်ခုဖြစ်သည်။

\documentclass{amsart}

\usepackage{amsthm, cleveref}
%\crefname{theorem}{theorem}{theorems}
%\crefname{corollary}{corollary}{corollaries}

\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}[theorem]{Corollary}

\begin{document}
\section{Section title}

\begin{theorem}\label{thm:test}
Here is the theorem.
\end{theorem}

\begin{corollary}\label{cor:test}
Here is the corollary.
\end{corollary}

The theorem reference is given by \cref{thm:test} and the corollary reference is given by \cref{cor:test}.

\end{document}

ဤတွင်နောက်ဆက်တွဲရည်ညွှန်းချက်မှာ 'theorem 1.2' ဖြစ်သည်။ crefname ကိုရှင်းရှင်းလင်းလင်းဖော်ပြသည့်တိုင်ပြproblemနာရှိနေသည်။

အကြံပြုချက်များရှိပါသလား။

6
задан obco 27 June 2011 в 22:07
поделиться