Skip to content

"number-sections: false" ignored in mobile view #5306

@blacksqr

Description

@blacksqr

Bug description

If I create a book project and specify "number-sections: false" in _quarto.yml, then view the rendered project in a browser in mobile view mode, the visible label of the collapsed sidebar will still show a section number.

To reproduce:

Create a new book project:

$ quarto create-project mybook --type book
$ quarto preview mybook

Add "number-sections: false" to _quarto.yml as below:

project:
  type: book

book:
  title: "mybook"
  author: "Norah Jones"
  date: "4/25/2023"
  chapters:
    - index.qmd
    - intro.qmd
    - summary.qmd
    - references.qmd

bibliography: references.bib

format:
  html:
    theme: cosmo
    number-sections: false
  pdf:
    documentclass: scrreprt

Remove ".unnumbered" class from Preface header in index.qmd so it appears as below:

# Preface

This is a Quarto book.

To learn more about Quarto books visit <https://quarto.org/docs/books>.

After the site is re-rendered, navigate to index.html and switch to mobile view (e.g. ctrl-shift-m in Firefox).

The label next to the collapsed sidebar icon at the top of the screen reads "1 Preface".

OS: Kubuntu 20.04

Quarto version: 1.3.282

Firefox version: 112.0.1

Chromium version: 111.0.5563.146 (Official Build) snap (64-bit)

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.282
      Path: /opt/quarto/bin

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

[✓] Checking Python 3 installation....OK
      Version: 3.8.10
      Path: /usr/bin/python3
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK
      Version: 4.2.1
      Path: /usr/lib/R
      LibPaths:
        - /usr/local/lib/R/site-library
        - /usr/lib/R/site-library
        - /usr/lib/R/library
      knitr: 1.37
      rmarkdown: 2.11

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

Checklist

  • Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
  • Please format your issue so it is easier for us to read the bug report.
  • Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
  • Please document the operating system you're running. If on Linux, please provide the specific distribution.
  • Please provide the output of quarto check so we know which version of quarto and its dependencies you're running.

Metadata

Metadata

Assignees

Labels

booksbugSomething isn't workingtriaged-toIssues that were not self-assigned, signals that an issue was assigned to someone.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions