Latex輸出大小寫羅馬數字

因吉發表於2020-12-23

1 大寫羅馬數字

  相應的數字 1 1 1表示

\uppercase\expandafter{\romannumeral1}

2 小寫羅馬數字

\romannumeral1

3 示例

\begin{table}[!htb]\caption{Test.}
    \renewcommand\tabcolsep{0.005cm}
    \centering
    \setlength{\abovecaptionskip}{0pt}
    \setlength{\belowcaptionskip}{-5pt}
    \scriptsize
\begin{tabular*}{\hsize}{@{}@{\extracolsep{\fill}}lllllllllllll@{}}

		\bottomrule
 1 &  \uppercase\expandafter{\romannumeral1}    &  \romannumeral1\\
 2 &  \uppercase\expandafter{\romannumeral2}    &  \romannumeral2\\
 3 &  \uppercase\expandafter{\romannumeral3}    &  \romannumeral3\\
 4 &  \uppercase\expandafter{\romannumeral4}    &  \romannumeral4\\
 5 &  \uppercase\expandafter{\romannumeral5}    &  \romannumeral5\\
 6 &  \uppercase\expandafter{\romannumeral6}    &  \romannumeral6\\
 7 &  \uppercase\expandafter{\romannumeral7}    &  \romannumeral7\\
 8 &  \uppercase\expandafter{\romannumeral8}    &  \romannumeral8\\
 9 &  \uppercase\expandafter{\romannumeral9}    &  \romannumeral9\\
10 &  \uppercase\expandafter{\romannumeral10}   &  \romannumeral10\\
11 &  \uppercase\expandafter{\romannumeral11}   &  \romannumeral11\\
12 &  \uppercase\expandafter{\romannumeral12}   &  \romannumeral12\\
13 &  \uppercase\expandafter{\romannumeral13}   &  \romannumeral13\\
14 &  \uppercase\expandafter{\romannumeral14}   &  \romannumeral14\\
15 &  \uppercase\expandafter{\romannumeral15}   &  \romannumeral15\\
16 &  \uppercase\expandafter{\romannumeral16}   &  \romannumeral16\\
17 &  \uppercase\expandafter{\romannumeral17}   &  \romannumeral17\\
18 &  \uppercase\expandafter{\romannumeral18}   &  \romannumeral18\\
19 &  \uppercase\expandafter{\romannumeral19}   &  \romannumeral19\\
20 &  \uppercase\expandafter{\romannumeral20}   &  \romannumeral20\\
        \bottomrule
	\end{tabular*}
\end{table}

  測試如下:


參考資料:
【1】戳戳

相關文章