A solution with a very small package, called scroman
, which defines three new numbering styles:
scroman
, which is what you want,
osroman
which is like roman
, except a final i is replaced by j
,
- a similar
scosroman
.
Demo of the first and third styles:
\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{osroman}
\renewcommand\thesection{\arabic{section}}
\usepackage{lipsum}
\pagestyle{plain}
\begin{document}
\pagenumbering{scosroman}
\tableofcontents
\section{Arabic Section}
\lipsum
\renewcommand\thesection{\scroman{section}}
\setcounter{section}{0}
\section{Roman Section}
\lipsum
\end{document}
The code of the small package:
\ProvidesPackage{osroman}
%%Provide 3 new numberings : scroman (roman numbering with small caps)
%% osroman (j, ij, iij, iv, v, vj, vij, viij, ix, x & c. )
%% scosroman (mixes scroman and os roman)
\newcommand{\oldstyleroman}[1]{\expandafter\@oldstyleroman#1\@nil}
\def\@oldstyleroman#1#2\@nil{%
\ifcat$\detokenize{#2}$%
\expandafter\@firstoftwo
\else
\expandafter\@secondoftwo
\fi
{\if#1ij\else#1\fi}% si #2 est vide
{#1\@oldstyleroman#2\@nil}% si #2 n'est pas vide
}
\def\scroman#1{\expandafter\@scroman\csname c@#1\endcsname}
\def\@scroman#1{{\scshape\romannumeral #1}}
\def\osroman#1{\expandafter\@osroman\csname c@#1\endcsname}
\def\@osroman#1{{\oldstyleroman{\romannumeral #1}}}
\def\scosroman#1{\expandafter\@scosroman\csname c@#1\endcsname}
\def\@scosroman#1{{\scshape\oldstyleroman{\romannumeral #1}}}
\ref
a section, should it print the small-caps version of the section number (something like\scshape\roman
)? Or should it just print the\Roman
representation? Also note that there's no bold small caps by default. – Werner Dec 7 '17 at 19:21\textsc{\textbf{i}}
@Werner: I would prefer the former. – Rasmus Dec 7 '17 at 19:22