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

Add page numbers to table of contents page #50

Open
tanga94 opened this issue Jul 25, 2022 · 0 comments
Open

Add page numbers to table of contents page #50

tanga94 opened this issue Jul 25, 2022 · 0 comments
Assignees

Comments

@tanga94
Copy link

tanga94 commented Jul 25, 2022

Is there any way to add the page numbers to the table of contents? I've tried adding the following CSS to my Rmarkdown document however it doesn't work

.toc a::after,
.toc2 a::after {
  content: "p. " target-counter(attr(href), page);
  float: right;
}

Here is my YAML

---
title: "Document Title"
subtitle: "Document Subtitle"
author: "My Name"
date: "`r format(Sys.time(), '%B %Y')`"
output: 
  pagedreport::paged_windmill:
    front_img: Cover Page and Logo/cover.png
    logo: Cover Page and Logo/logo.svg
    logo_to_white: TRUE
    img_to_dark: TRUE
    toc: TRUE
    number_sections: TRUE
knit: pagedown::chrome_print
toc-title: "Table of Contents"
main-color: "#6d1d26"
google-font: FALSE
main-font: "Arial"
header-font: "Arial"
---

@tvroylandt tvroylandt self-assigned this Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants