Latex:以罗马数字打印变量
我正在 LaTeX 中排版,我想用罗马语而不是默认的阿拉伯语显示一个“变量”(在我的例子中,是对列表中项目编号的引用 \ref{blah} )。有没有简单的方法可以做到这一点?感谢您的指点!
I'm typesetting in LaTeX, and I'd like to display a "variable" (in my case, a reference \ref{blah} to an item number in list) in roman rather than the default arabic. Is there an easy way to do this? Thanks for any pointers!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您可以在
enumerate
环境中尝试\def\theenumi{\roman{enumi}}
——这会更改标签和引用,但您必须显式撤消它(如果你愿意的话)。You can try
\def\theenumi{\roman{enumi}}
inside anenumerate
environment -- this changes both labels and refs, but you'll have to then explicitly undo it (if you want to).小写
\romannumeral 0\ref{blah}\relax
大写
\uppercase\expandafter{\romannumeral 0\ref{blah}}
lowercase
\romannumeral 0\ref{blah}\relax
uppercase
\uppercase\expandafter{\romannumeral 0\ref{blah}}
参考文献是什么??通常,您会重新定义该特定计数器的显示方式。
例如,要更改节号的显示方式,可以使用以下命令:
现在,每个内部使用
\thesection
的命令都会将节号打印为罗马数字。类似的命令适用于
chapter
、figure
等。\roman
(小写r
)产生小写罗马数字。What are the references to? Usually, you would redefine how that particular counter is displayed.
For example, to change how a section number is displayed, you could use the following command:
Now, each command that internally uses
\thesection
will print the section number as a roman numeral.Similar commands work for
chapter
,figure
etc.\roman
(lowercaser
) yield lowercase roman numerals.小写:
{\romannumeral \ref{blah}}
大写:
\uppercase\expandafter{\romannumeral \ref{blah}}
For lowercase:
{\romannumeral \ref{blah}}
For uppercase:
\uppercase\expandafter{\romannumeral \ref{blah}}
在我看来,一个好的解决方案是
在标题中声明,然后通过
\eqref{blah}
引用以获得第三项的 (iii)。 (请注意,\eqref
需要 amsmath 包。或者,编写(\ref{blah})
。)A good solution seems to me to declare
in the header and then cite by
\eqref{blah}
to get your (iii) for the third item. (Note that\eqref
requires the amsmath package. Alternatively, write(\ref{blah})
.)