Search code examples
rlatexmarkdownbookdown

Customize or remove the header of reference after specify csl on Bookdown


I specified a csl bibliography style as described by this method of bookdown Chinese example, and found the header for the Reference was incorrect, it should be "参考文献(Reference) instead of "附录(Appendix)" for the second page of Section Reference. see the picture

How can I customize it to 'Reference' or just remove it.


Solution

  • You can use the LaTeX command \markboth{left page}{right page} to set the page headings, i.e. something like this

    # 参考文献 {#references .unnumbered}
    \markboth{参考文献}{参考文献}
    
    ```{r include=FALSE}
    # 自动生成 R 包的参考文献
    knitr::write_bib(c(
      .packages(), 'bookdown', 'knitr', 'rmarkdown'
    ), 'packages.bib')
    ```