Skip to content

Instantly share code, notes, and snippets.

@anamewing
Last active March 23, 2024 17:03
Show Gist options
  • Save anamewing/5154b6278f63e8d738bb5d57413a923f to your computer and use it in GitHub Desktop.
Save anamewing/5154b6278f63e8d738bb5d57413a923f to your computer and use it in GitHub Desktop.
Add Simplified Chinese translation to cleveref.
\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}{~至~}
@NemoYuan2008
Copy link

@anamewing 非常感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment