FredHutch / VISCtemplates

Tools for writing reproducible reports at VISC
Other
6 stars 2 forks source link

Miscounting page numbers happened on RMarkdown knitted documents #116

Closed yungwenliu closed 1 year ago

yungwenliu commented 1 year ago

Describe the bug RMarkdown knitted documents have missed counting the pages of list of figures and list of tables. For my recent case, I was supposed to have page 4 for my Summary section on the table of content since I had the list of figures and the list of tables on pages 2 and 3. But the TOC, the first section (Summary) started at 2 (instead of 4). Also, the page number was 24/22 but not 24/24.

These two figures showed how the wrong counting looks like. On the table of content: image On the last page of the document image

These two figures showed how the correct counting looks like. On the table of content: image On the last page of the document image

Additional context I could resolve this problem by adding {repeat_header_method = 'replace'} in the kable_styling function for one document, but it did not work on another document.

mayerbry commented 1 year ago

This is not a visctemplate issue, please check the Rmarkdown for repeated labels.

Most common causes: