quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.98k stars 328 forks source link

Book PDF section numbering format #1889

Open jjallaire opened 2 years ago

jjallaire commented 2 years ago

Discussed in https://github.com/quarto-dev/quarto-cli/discussions/1888

Originally posted by **jpmorr** August 15, 2022 Typically when I use latex for creating documents like books/reports I would set a different page number format for frontmatter and the main contents (e.g. Preface would be on page (i), List of Figures on page (ii), etc, while Chapter 1 would start on page 1). How do you achieve this affect when using `quarto` to render to pdf? In `latex` it's simply a case of adding `\pagenumbering{roman}`or `\pagenumbering{arabic}` before each section begins? Is this a `pandoc` limitation? I've noticed the ToC, ToF are already using roman numerals (but don't start at (i) as the cover page and cover back are numbered) but the preface then starts at 1.
jjallaire commented 2 years ago

It may be a pandoc limitation but its definitely something we could work around in quarto. We'll be putting extensive work into crossrefs, numbering, etc. in v1.2 so I'll target this issue for work in that release (later this fall).

jpmorr commented 2 years ago

Thanks. Hopefully it makes it into v1.2.

danieltomasz commented 1 year ago

Hi @jjallaire I struggle with this too, I found workaround using book (memoir) document class instead the default one, then i could use include-in-header for \frontmatter to be placed before\maketitle

format:
  pdf:
    documentclass: memoir
    include-in-header:
     text: |
     \frontmatter

Source: https://latex.org/forum/viewtopic.php?t=21325