What is the command for writing roman numerals like I, II, IV etc. in an equation ? To be noted that my requirement is to write them within $$ …$$ and not as counters or page numbers. Any light on this would be extremely helpful.
[Tex/LaTex] Writing Roman numbers in Equation
roman numeralstex-core
Related Solutions
If you're using memoir
, you can use any page contents with an empty
pagestyle for your unnumbered title page, and then use the \frontmatter
command to set lowercase Roman numerals as the default page numbers.
In my university's case, since I'm using hyperref
and other packages, I've found it's best to let the unnumbered first page be numbered with alph format, the rest of the front matter pages use Roman numbering, and the main matter pages use Arabic numbering. This avoids the dreaded "pdfTeX warning (ext4): destination with the same identifier (name{page.1}) has been already used, duplicate ignored" messages.
Our unnumbered first page includes:
\pagenumbering{alph}
\setcounter{page}{1}
\thispagestyle{empty}
and \frontmatter
at the end of the page.
In the main thesis file, we put \mainmatter
right before we include the chapter files. Details as of 2011/08/15 at this site (particularly ttuthesis.sty and thesis-manual.tex -- thesis.tex will be updated later).
In response to comments, here's a simple example similar to what I use normally. Since I try to isolate my users from the guts of the style file, I separate out the page layout (my problem, and the graduate school's) with the page contents (their problem).
\documentclass[oneside]{memoir}
\title{My Thesis Title}
\author{Me, The Author}
% Define the (unnumbered) title page layout here
\newcommand{\mytitlepage}{
\pagenumbering{alph}
\thispagestyle{empty}
\beforepartskip
\begin{center}
\thetitle
\theauthor
\end{center}
\afterpartskip
\newpage
}
% Define the abstract page layout (numbered ii) here
\newcommand{\abstractpage}{
\frontmatter
\setcounter{page}{2}
\pagestyle{plain}
\begin{center}
Abstract: \thetitle
\end{center}
\theabstract
\newpage
}
% Define the abstract page contents here
\newcommand{\theabstract}{
Abstract content goes here.
}
\begin{document}
\mytitlepage
\abstractpage
\tableofcontents*
\mainmatter
\chapter{One}
This is chapter 1.
\end{document}
From Ⅰ to Ⅻ
Libertine and \libertineGlyph
In my example I use XeLaTeX and libertineotf
which provides \libertineGlyph
and the glyphs. As stated in my comment, this should work with libertine-legacy
, too. The new libertine-type1
and biolinum-type1
don't support this anymore.
This provides two macros:
\libertineRoman{<countername>}
for majuscle, and\libertineroman{<countername>}
for minuscle Roman digits .
This approach converts only numbers between 1 and 12 into the special roman digit glyphs.
Code
\documentclass{article}
\usepackage{libertineotf}% replace with libertine-legacy
%\usepackage[T1]{fontenc}% use with pdfLaTeX
\newcommand*{\libertineRoman}[1]{%
\def\Romantemp{}%
\ifnum\value{#1}>0\relax%
\ifnum\value{#1}<13\relax%
\edef\Romantemp{\ifcase\value{#1}\or One\or Two\or Three\or Four\or Five\or Six\or Seven\or Eight\or Nine\or Ten\or Eleven\or Twelve\fi}%
\libertineGlyph{\Romantemp roman}%
\else\Roman{#1}\fi%
\else\Roman{#1}\fi%
}
\newcommand*{\libertineroman}[1]{%
\def\Romantemp{}%
\ifnum\value{#1}>0\relax%
\ifnum\value{#1}<13\relax%
\edef\Romantemp{\ifcase\value{#1}\or one\or two\or three\or four\or five\or six\or seven\or eight\or nine\or ten\or eleven\or twelve\fi}%
\libertineGlyph{\Romantemp roman}%
\else\roman{#1}\fi%
\else\roman{#1}\fi%
}
\begin{document}
\newcounter{testRoman}
\setcounter{testRoman}{13}
\loop\ifnum\value{testRoman}>1\relax\addtocounter{testRoman}{-1}
\thetestRoman: \roman{testRoman} \Roman{testRoman} \libertineroman{testRoman} \libertineRoman{testRoman} \par
\repeat
\end{document}
Output
Unicode (Xe-/LuaLaTeX only)
A solution that uses the whole range of Unicode's Roman digits is already available.
Best Answer
If you don't want to do the conversion,
If you also don't want to do the arithmetic