1 如何在 LATEX 中插入大小写的罗马字符

  • 3691
请先 登录 后评论

1 个回答

XY - 开发者 @ 学研谷
擅长:LS-DYNA,AUTODYN

LATEX 不直接支持显示大小写罗马数字,但是可以通过自定义命理来实现。

首先在文章的导言区加入上面四行

\makeatletter
\newcommand{\rmnum}[1]{\romannumeral #1}
\newcommand{\Rmnum}[1]{\expandafter\@slowromancap\romannumeral #1@}
\makeatother

用法 :\rmnum{数字},\Rmnum{数字}

使用案例

\documentclass{article}
\makeatletter
\newcommand{\rmnum}[1]{\romannumeral #1}
\newcommand{\Rmnum}[1]{\expandafter\@slowromancap\romannumeral #1@}
\makeatother
\begin{document}
% 命令使用方法
\rmnum{1},\rmnum{5},\rmnum{55}\\
\Rmnum{1},\Rmnum{5},\Rmnum{55}
\end{document}
\begin{document}

请先 登录 后评论