Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having file with only PART header will cause wrong html structure in previous chapter #974

Open
cderv opened this issue Oct 12, 2020 · 4 comments
Labels
feature a feature request or enhancement

Comments

@cderv
Copy link
Collaborator

cderv commented Oct 12, 2020

This comes from an investigation on an issue reported in tidymodels/TMwR#75

Step to reproduce

  • Use the book demo
  • Add a PART.Rmd file with this content
# (PART) Content {-}
  • Use this _bookdown.yml
book_filename: "bookdown-demo"
language:
  ui:
    chapter_name: "Chapter "
delete_merged_file: true
rmd_files: [
  "index.Rmd",
  "01-intro.Rmd",
  "PART.Rmd",
  "02-literature.Rmd"
]
  • Build the book

Issue

The chapter just before the PART header, the one call Introduction, will have an incorrect HTML structure leading to

  • No navigation arrow on the side
  • Wrong position and formatting of the reference and footnote section
    image

The splitting process of bookdown does not handle well this case.
The section inside <div class 'page-inner'> will close too soon, causing the Reference part and the navigation arrows to be included at the end of the wrong div.

@jtbayly
Copy link
Contributor

jtbayly commented Oct 13, 2020

Perhaps related to #947

Sounds very similar, anyway.

@svanimpe
Copy link

svanimpe commented Nov 1, 2020

I have the exact same issue. There's no forward navigation button on the chapter right before a PART header.

@svanimpe
Copy link

svanimpe commented Nov 2, 2020

The workaround described here works for me: tidymodels/TMwR#75 (comment)

@cderv
Copy link
Collaborator Author

cderv commented Mar 24, 2021

Duplicate of #662

@cderv cderv marked this as a duplicate of #662 Mar 24, 2021
@cderv cderv added the feature a feature request or enhancement label Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants