显然计数器可以存储最多2^31-1
(e-TeX)。但是如果我想使用 排版该计数器\Roman
,我最多可以显示多少?
答案1
\documentclass{article}
\newcounter{zz}
\begin{document}
\setcounter{zz}{2147483647}
\Roman{zz}
\end{document}
Roman 适用于全范围,但您需要非常宽的页面。
Overfull \hbox (24217.02405pt too wide) in paragraph at lines 8--9
[]\OT1/cmr/m/n/10 MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
...
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMDCXLVII
答案2
试试看:
\documentclass{article}
\newcounter{maxroman}
\begin{document}
\setcounter{maxroman}{0}% use the initial value you like (e.g. 2147483640)
\makeatletter
\@whilenum \value{maxroman}<\maxdimen\do{%
\stepcounter{maxroman}%
\typeout{Trying \themaxroman}%
\themaxroman=\Roman{maxroman}\par
}
\end{document}
;-)
然而, (La)TeX 并不支持通常使用的带有 aphostrophus 的大型罗马数字(例如IↃↃↃↃ
500.000)、vinculum 或乘法(例如)。D•M