2

I want to change the numbering for a the fourth section in IEEEtran document from IV to IIII.

Is there a simple way to do it without setting a counter manually?

Thanks in advance!

nicksheen
  • 121
  • 1
    Why are you doing that? I thought they stopped using IIII hundreds of years ago. –  Apr 09 '19 at 13:06
  • All my latin teachers in school were used to use the IIII "format" and I'll keep it also that way. However that should not be the point of this question. – nicksheen Apr 09 '19 at 13:12
  • 1
    Not quite a duplicate (it's not about the section numbering) but how to get iiii instead of iv: Additive Roman Numeral 4. – campa Apr 09 '19 at 13:31
  • thanks for that. but I am still not getting it completely done. I tried to override/renew the command \thesection to \myRomannumeral{\Roman{section}} which fails as if I am calling \section in my document missing number, treated as zero, missing endcsname inserted and extra endcsname occure. – nicksheen Apr 09 '19 at 14:35

1 Answers1

0

Done by:

\usepackage{xparse}

\ExplSyntaxOn
\NewDocumentCommand \myRomannumeral { m }
{
    \tl_set:Nx \l_tmpa_tl { \int_to_Roman:n { #1 } }
    \tl_replace_all:Nnn \l_tmpa_tl { IV } { IIII }
    \tl_use:N \l_tmpa_tl
}
\ExplSyntaxOff

from Additive Roman Numeral 4(thanks to campa linking it!) and added this line:

\renewcommand\thesection{\myRomannumeral{\value{section}}}
nicksheen
  • 121