quarto-dev / quarto-dev/quarto-cli

Word format doesn't respect PART and its contents in Quarto Book

Open
#3,434 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Bug description

Word format doesn't respect PART and its contents in Quarto Book, they will be auto removed.

截屏2022-11-23 11 41 18

reproduce

https://github.com/XiangyunHuang/quarto-broken is a minimal Quarto book project which created from Quarto Book skeleton. Only one more file getting-started.qmd was added, its content as follow:

# getting started

hello

This is _quarto.yml

project:
  type: book

book:
  title: "quarto-test"
  author: "Jane Doe"
  date: "11/23/2022"
  chapters:
    - index.qmd
    - part: getting-started.qmd
      chapters:
        - intro.qmd
    - summary.qmd
    - references.qmd

bibliography: references.bib

format:
  html:
    theme: cosmo
  pdf:
    documentclass: book
  docx:
    toc: true
    toc-depth: 3
    crossref:
      chapters: true

Session info

sessionInfo(package = c("knitr","rmarkdown"))
R version 4.2.2 (2022-10-31)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Ventura 13.0.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
character(0)

other attached packages:
[1] knitr_1.41     rmarkdown_2.18

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.9      grDevices_4.2.2 ps_1.7.2        digest_0.6.30   later_1.3.0     jsonlite_1.8.3 
 [7] evaluate_0.18   datasets_4.2.2  rlang_1.0.6     utils_4.2.2     cli_3.4.1       rstudioapi_0.14
[13] graphics_4.2.2  base_4.2.2      tools_4.2.2     yaml_2.3.6      xfun_0.35       fastmap_1.1.0  
[19] compiler_4.2.2  processx_3.8.0  stats_4.2.2     htmltools_0.5.3 methods_4.2.2   quarto_1.2 

I use Quarto 1.2.269.

RStudio 2022.07.2+576 "Spotted Wakerobin" Release (e7373ef832b49b2a9b88162cfe7eac5f22c40b34, 2022-09-06) for macOS
Mozilla/5.0 (Macintosh; Intel Mac OS X 13_0_1) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.10 Chrome/69.0.3497.128 Safari/537.36
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.

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

Start with the minimal project linked in the issue, especially _quarto.yml and getting-started.qmd, and reproduce the docx output using the shown book configuration. Trace how the PART entry and its nested intro.qmd content are handled, then verify that the generated Word document preserves both the part and its contents.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.