# Smallcaps Roman Numbering of Sections

Is it possible to get section heading numbered with roman smallcaps numerals?

The minimal working example gives me exactly what I seek, except that I would like the numbering of the Roman Section to be with a smallcaps numeral.

For the desired effect, I cannot use \Roman{section} instead of \roman{section}.

\documentclass{book}

\renewcommand\thesection{\arabic{section}}

\begin{document}
\tableofcontents

\section{Arabic Section}

\renewcommand\thesection{\roman{section}}
\setcounter{section}{0}

\section{Roman Section}

I vs. \textsc{i}

\end{document}


The example is based on this answer.

• The problem is not small caps of Roman numbers but the bold font version of small caps. That's not widely available, at least not for cm fonts – user31729 Dec 7 '17 at 19:15
• When you \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
• I see. I'm using my university's template, which requires that I use the Adobe Garamond Pro font. Compiling with Xelatex, I can produce smallcaps bold with \textsc{\textbf{i}} @Werner: I would prefer the former. – Rasmus Dec 7 '17 at 19:22

Basically

\renewcommand{\thesection}{{\scshape\roman{section}} will do

for the change of the number itself, note the extra{} pair for grouping and limiting the effect of \scshape, i.e. the font switching to small caps.

The problem is however that both in section headers and ToC entries the section numbers are written with bold fonts.

Normal cm fonts do not have a bold version of small caps, but it can be 'enabled/faked/emulated' with \usepackage{bold-extra}.

\documentclass{book}
\usepackage{bold-extra}

\renewcommand\thesection{\arabic{section}}

\begin{document}
\tableofcontents

\section{Arabic Section}

\renewcommand\thesection{{\scshape\roman{section}}}
\setcounter{section}{0}

\section{Roman Section}

I vs. \textsc{i}

\end{document}


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}}}