Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify a starting number for numbered section headings in Quarto

Tags:

r

quarto

I'm generating a Word document using Quarto, under R environment, and I want to specify the starting number of numbered headings. When we indicate number-sections: true the default number for the first heading is 1. Is it possible to indicate a custom start number?

Here is a simple code example.

---
title: "My Document"
format:
  docx:
    number-sections: true
    number-depth: 3
    highlight-style: github
---

# Presentation

Lorem ipsum dolor sit amet. Et voluptate consequuntur vel ullam illum et omnis facilis.

# Development

Sed labore quisquam ea nihil nostrum sed quia praesentium et accusantium dolor non quia iste aut deserunt quibusdam.

# Fancy Results

Aut soluta fugiat est autem deserunt vel quam consectetur rem cumque officiis ad expedita delectus ut fugiat fuga.

This code generates the following text:

enter image description here

How to make the numbering of headings start, for example, at 3?

like image 418
Antonio Avatar asked Oct 20 '25 23:10

Antonio


1 Answers

I found the answer and leave it here

To star at 3 include number-offset: 2

---
title: "My Document"
format:
  docx:
    number-sections: true
    number-offset: 2
    number-depth: 3
    highlight-style: github
---
like image 149
Antonio Avatar answered Oct 22 '25 13:10

Antonio



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!