quarto-dev / quarto-dev/quarto-cli

number-offset in PDF output for Quarto is not working.

Open
#6,842 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug latex pandoc upstream
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

When rendering a Quarto document to PDF, the number-offset YAML header is not working.

Steps to reproduce
---
title: "Section Numbering Test"
author: \vspace{-3cm}
format:
  html: 
    toc: true
    number-sections: true
    number-offset: 1
  pdf: 
    toc: true
    toc-depth: 3
    geometry:
      - top=1.90cm
      # - bottom=1.27cm
      - left=1.27cm
      - right=1.27cm
    mainfont: TimesNewRomanPSMT
    fontsize: 11pt
    number-sections: true
    number-offset: -1
---

# INTRO

## Quarto

Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.

# SPECIFIC STUFF

## Running Code

When you click the **Render** button a document will be generated that includes both content and the output of embedded code.
Expected behavior

Using the number-offset YAML option should offset the numbering in a PDF output.

Actual behavior

I'm trying to offset the section/heading numbers so that the first level 1 heading starts at 0. The default starts at 1. When I set number-offset: -1 for the PDF output option, it doesn't work. I've also tied a positive offset to test such as number-offset: 2. That doesn't work either. I read on one site that this was a bug on PDF outputs (https://github.com/quarto-dev/quarto-cli/issues/3126) but that it would be fixed in version 1.3. I'm assuming that meant Quarto version 1.3. When using the same YAML option for HTML output, the number offset works, but it is still not working for PDF outputs.

I know there is a version of pandoc available that is 3.1.8 but I haven't tried that yet as I've read that RStudio comes bundled with a pandoc version and that changing to a non-bundled version could cause issues.

Your environment

Here are the versions I'm running:
R: 4.3.1
RStudio: 2323.06.2 +561
Quarto: 1.3.450
Pandoc: 3.1.1

Quarto check output

[>] Checking versions of quarto binary dependencies...
Pandoc version 3.1.1: OK
Dart Sass version 1.55.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
Version: 1.3.450
Path: C:\Users\Cody\AppData\Local\Programs\Quarto\bin
CodePage: 1252

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....(None)

Unable to locate an installed version of Python 3.
Install Python 3 from https://www.python.org/downloads/

[>] Checking R installation...........OK
Version: 4.3.1
Path: C:/PROGRA1/R/R-431.1
LibPaths:

  • C:/Users/Cody/AppData/Local/R/win-library/4.3
  • C:/Program Files/R/R-4.3.1/library
    knitr: 1.44
    rmarkdown: 2.24

[>] Checking Knitr engine render......OK

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the supplied Quarto document with PDF output and compare its number-offset behavior with the working HTML output. Start by checking the PDF rendering path with the reported Quarto 1.3.450 and Pandoc 3.1.1 versions. Done means positive and negative number-offset values change the PDF heading numbering as expected.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.