rmarkdown: use Roman numerals for section numbers?

696 views
Skip to first unread message

Michael Hannon

unread,
May 23, 2014, 4:06:25 AM5/23/14
to kn...@googlegroups.com
Greetings.  I've been given a document format that I'm required to follow, and it uses Roman numerals for section numbers.  I've got an Rmd document that I "typeset" with the render command in the rmarkdown package.  It works nicely, but it has Arabic numerals for the sections.  Is there any way to get Roman numerals?  In LaTeX it would be something like:

\documentclass{article}
\renewcommand{\thesection}{\Roman{section}} 
\renewcommand{\thesubsection}{\thesection.\Roman{subsection}}

Here's the info about the rmarkdown that I'm using:

Package:              rmarkdown
Type:                 Package
Title:                R Markdown Document Conversion
Version:              0.1.6
Date:                 2014-01-26

And the version of R:

> sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-redhat-linux-gnu (64-bit)

Thanks.

-- Mike

Yihui Xie

unread,
May 24, 2014, 5:08:55 PM5/24/14
to Michael Hannon, knitr
I do not think it is straightforward to change the section number
style, but it is always possible to define your own template:
http://rmarkdown.rstudio.com/developer_document_templates.html That is
almost always the answer when you ask for more than Pandoc's Markdown.

Regards,
Yihui
--
Yihui Xie <xiey...@gmail.com>
Web: http://yihui.name

Michael Hannon

unread,
May 25, 2014, 6:07:47 PM5/25/14
to Yihui Xie, knitr
Thanks, Yihui. The job I have at the moment is short-term enough that
I think I'll just put in the Roman numerals by hand.

-- Mike
Reply all
Reply to author
Forward
0 new messages