Latex中罗马数字输入(一)
本文主要介绍latex中罗马数字的输入。
第一种方法,试过,成功!
\uppercase\expandafter{\romannumeral2}
后面可以输入不同的数字,例如输入2,得到大写罗马数字2,
\romannumeral2
后面可以输入不同的数字,例如输入2,得到小写罗马数字2。
{出处:link}
第二种方法,试过,成功!
LaTeX不直接支持显示大小写罗马数字,但是可以通过自定义命令来实现。
定义新的命令\rmnum和\Rmnum,用来显示大小写罗马数字。
用法:\rmnum{数字},\Rmnum{数字}。
\makeatletter
\newcommand{\rmnum}[1]{\romannumeral #1}
\newcommand{\Rmnum}[1]{\expandafter@slowromancap\romannumeral #1@}
\makeatother
在文章的导言区加入上面四行,然后就可以在正文中使用命令\rmnum{数字}和\Rmnum{数字}来分别显示大小写罗马数字。
{出处:链接}