Skip to content

Deletion of latex templates in v1.18 causes \mainmatter issue/bug for bookdown::pdf_book() #1721

@remlapmot

Description

@remlapmot

I think that in v1.18 the deletion of default.tex and the other latex templates by #1563 causes a small problem for bookdown relating to \mainmatter.

I have created a simple repo which demonstrates the problem for the bookdown::pdf_book() output pdf.
https://github.com/remlapmot/example-rmarkdown-mainmatter-issue

When compiled under rmarkdown v1.17 the Contents and Preface are in the \frontmatter as intended.

However, when compiled under rmarkdown v1.18 the different (I am assuming pandoc) template puts an extra \mainmatter immediately before the R Markdown input from index.Rmd. See line 144 of the combined tex file.

If you don't want to put the latex templates back in rmarkdown this could be solved by providing a latex template to bookdown.

Thanks for any help (I hope I have identified the correct source of the additional \mainmatter).


By filing an issue to this repo, I promise that

  • I have fully read the issue guide at https://yihui.org/issue/.
  • I have provided the necessary information about my issue.
    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('rmarkdown'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('rstudio/rmarkdown').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • I have learned the Github Markdown syntax, and formatted my issue correctly.

I understand that my issue may be closed if I don't fulfill my promises.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions