算法标题如何写成中文的?

您所在的位置:网站首页 kwin名字 算法标题如何写成中文的?

算法标题如何写成中文的?

2024-07-11 12:09| 来源: 网络整理| 查看: 265

如图片所示,如何将其中的“Algorithm”写成“算法”。使用的是algorithm2e宏包,但是在使用SetAlgorithmName{Algorithm}{算法}{算法}时无法将算法的英文标题改成中文的。捕获.PNG代码如下所示:

\documentclass[11pt]{ctexbook} \usepackage[ruled,vlined,algo2e,resetcount,algochapter]{algorithm2e} \usepackage{algorithm} \makeatletter \renewcommand\thealgorithm{\thechapter.\arabic{algorithm}} \@addtoreset{algorithm}{chapter} \makeatother \begin{document} \chapter{测试算法章节} 引用算法\ref{Algorithm:算法框架} \SetAlgorithmName{Algorithm}{算法}{算法} \SetKwInput{KwIn}{输入} \SetKwInput{KwOut}{输出} \begin{algorithm}[!htb] \DontPrintSemicolon \hspace{-0.2em}\KwIn{最大迭代次数:$Gen_{max}$,种群规模:$N$ ,邻居大小:$T$\\ \hspace{2.4em}最大调整向量数:$nus$ } \hspace{-0.2em}\KwOut{种群$P$ } \caption{算法框架\label{Algorithm:算法框架}} \end{algorithm} \end{document}

查看更多



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3