Latex display roman numerals

Source: Internet
Author: User

Latex does not directly support displaying upper and lower case Roman numbers, but can be achieved through custom numerics.

Define the new command \ rmnum and \ rmnum to display upper and lower case Roman numerals.
Usage: \ rmnum {number}, \ rmnum {number}

\ Makeatletter
\ Newcommand {\ rmnum} [1] {\ romannumeral #1}
\ Newcommand {\ rmnum} [1] {\ expandafter \ @ slowromancap \ romannumeral #1 @}
\ Makeatother

InArticleAdd the above four lines in the Introduction area, and then you can use the command \ rmnum {number} And rmnum {number} in the body to display the upper and lower case roman numerals respectively.

The following is a simple example of the use of Roman numerals.

\ Documentclass {Article}
% New commands defined in the introduction section
\ Makeatletter
\ Newcommand {\ rmnum} [1] {\ romannumeral #1}
\ Newcommand {\ rmnum} [1] {\ expandafter \ @ slowromancap \ romannumeral #1 @}
\ Makeatother
\ Begin {document}
% Command usage
\ Rmnum {1}, \ rmnum {5}, \ rmnum {55 }\\
\ Rmnum {1}, \ rmnum {5}, \ rmnum {55}
\ End {document}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.