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

Chapter by chapter preview outputs titles of unpreviewed sections/chapters #42

Closed
BBieri opened this issue Jan 4, 2021 · 2 comments · Fixed by #43
Closed

Chapter by chapter preview outputs titles of unpreviewed sections/chapters #42

BBieri opened this issue Jan 4, 2021 · 2 comments · Fixed by #43
Assignees
Labels
bug Something isn't working

Comments

@BBieri
Copy link
Collaborator

BBieri commented Jan 4, 2021

When printing just a single chapter with chapter_pdf(), the section titles of all the other chapters are included in addition and some 'placeholder' text is entered under some of these extra section titles. These extra section titles either should not appear or appear only in the table of contents printed at the start of the chapter preview.

Links:

The issue seems to stem from the bookdown function preview_chapter() Doc Here. The documentation, as well as previous issues, have mentionned it on Github and the response from Yi Hui is that this is done by design. Also see, this issue and this issue

@BBieri BBieri added the bug Something isn't working label Jan 4, 2021
@BBieri BBieri self-assigned this Jan 4, 2021
@BBieri
Copy link
Collaborator Author

BBieri commented Jan 5, 2021

A few remarks:

From where I stand, we have two options. Either leave the issue as is and let the user crop the previewed chapter pdf ex-post (to remove the titles and placeholders of the template) or we render just the chapter without the rest of the book which is less elegant in my opinion. I would favor the first option since the purpose of a preview is to preview hence, as Yihui points out in the documentation as well as here, there will be rough edges (aka the other unpreviewed chapters) when using this method.

@jhollway Did I understand your suggestion to use {rmarkdown} correctly?

@BBieri
Copy link
Collaborator Author

BBieri commented Jan 5, 2021

Thanks @jhollway !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant