Last active
May 18, 2025 18:39
-
-
Save anamewing/5154b6278f63e8d738bb5d57413a923f to your computer and use it in GitHub Desktop.
Add Simplified Chinese translation to cleveref.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\crefname{equation}{式}{式} | |
\crefname{figure}{图}{图} | |
\crefname{table}{表}{表} | |
\crefname{page}{页}{页} | |
\crefname{chapter}{章}{章} | |
\crefname{section}{节}{节} | |
\crefname{appendix}{附录}{附录} | |
\crefname{theorem}{定理}{定理} | |
\crefname{lemma}{引理}{引理} | |
\crefname{corollary}{推论}{推论} | |
\crefname{proposition}{命题}{命题} | |
\crefname{definition}{定义}{定义} | |
\crefname{example}{例}{例} | |
\crefname{algorithm}{算法}{算法} | |
\crefname{listing}{列表}{列表} | |
\crefname{line}{行}{行} | |
\crefformat{chapter}{#2第#1章#3} | |
\crefformat{section}{#2第#1节#3} | |
\crefformat{subsection}{#2第#1节#3} | |
\crefformat{subsubsection}{#2第#1节#3} | |
\crefrangeformat{chapter}{#3第#1章#4至#5第#2章#6} | |
\crefrangeformat{section}{#3第#1节#4至#5第#2节#6} | |
\crefrangeformat{subsection}{#3第#1节#4至#5第#2节#6} | |
\crefrangeformat{subsubsection}{#3第#1节#4至#5第#2节#6} | |
\crefmultiformat{chapter}{#2第#1章#3}{和#2第#1章#3}{,#2第#1章#3}{和#2第#1章#3} | |
\crefmultiformat{section}{#2第#1节#3}{和#2第#1节#3}{,#2第#1节#3}{和#2第#1节#3} | |
\crefmultiformat{subsection}{#2第#1节#3}{和#2第#1节#3}{,#2第#1节#3}{和#2第#1节#3} | |
\crefmultiformat{subsubsection}{#2第#1节#3}{和#2第#1节#3}{,#2第#1节#3}{和#2第#1节#3} | |
\crefrangemultiformat{chapter}{#3第#1章#4至#5第#2章#6}{和#3第#1章#4至#5第#2章#6}{,#3第#1章#4至#5第#2章#6}{和#3第#1章#4至#5第#2章#6} | |
\crefrangemultiformat{section}{#3第#1节#4至#5第#2节#6}{和#3第#1节#4至#5第#2节#6}{,#3第#1节#4至#5第#2节#6}{和#3第#1节#4至#5第#2节#6} | |
\crefrangemultiformat{subsection}{#3第#1节#4至#5第#2节#6}{和#3第#1节#4至#5第#2节#6}{,#3第#1节#4至#5第#2节#6}{和#3第#1节#4至#5第#2节#6} | |
\crefrangemultiformat{subsubsection}{#3第#1节#4至#5第#2节#6}{和#3第#1节#4至#5第#2节#6}{,#3第#1节#4至#5第#2节#6}{和#3第#1节#4至#5第#2节#6} | |
\newcommand{\crefpairconjunction}{~和~} | |
\newcommand{\crefmiddleconjunction}{, } | |
\newcommand{\creflastconjunction}{~和~} | |
\newcommand{\crefpairgroupconjunction}{~和~} | |
\newcommand{\crefmiddlegroupconjunction}{, } | |
\newcommand{\creflastgroupconjunction}{~和~} | |
\newcommand{\crefrangeconjunction}{~至~} |
\crefformat{algorithm}{算法$#2#1#3$}
\crefformat{definition}{定义$#2#1#3$}
\crefformat{theorem}{定理$#2#1#3$}
\crefformat{lemma}{引理$#2#1#3$}
可以利用中文环境对$$的处理来判断后续需不需要补充空格
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我的思路是为“图1”、“表1”这类需要加
\xspace
的修改\crefformat
。