Pagedown: page number for resume?

Created on 9 Apr 2019  路  1Comment  路  Source: rstudio/pagedown

Is there a way to add page number for each unique page in the resume template?

question

Most helpful comment

You can add the page number using the CSS overriding mechanism. What I've done is create my own CSS file where I add the page counter and then reference it within my YAML header.

This is my add-pages.css file

/*Add page number to the bottom left of the left and right pages */
@page :left {
  @bottom-left {
    content: counter(page);
  }
}
@page :right {
  @bottom-left {
    content: counter(page);
  }
}

And my YAML header used within the resume template

````

title: "Lijia Yu's resume"
author: Lijia Yu
date: "r Sys.Date()"
output:
pagedown::html_resume:
self_contained: false
# include my custom CSS file via the css option

css: ["add-pages.css", "resume"]

````

You can change the placement of the page number using any of the following

  @top-left-corner
  @top-left
  @top-center
  @top-right
  @top-right-corner
  @right-top
  @right-middle
  @right-bottom
  @bottom-right-corner
  @bottom-right
  @bottom-center
  @bottom-left
  @bottom-left-corner
  @left-bottom
  @left-middle
  @left-top

>All comments

You can add the page number using the CSS overriding mechanism. What I've done is create my own CSS file where I add the page counter and then reference it within my YAML header.

This is my add-pages.css file

/*Add page number to the bottom left of the left and right pages */
@page :left {
  @bottom-left {
    content: counter(page);
  }
}
@page :right {
  @bottom-left {
    content: counter(page);
  }
}

And my YAML header used within the resume template

````

title: "Lijia Yu's resume"
author: Lijia Yu
date: "r Sys.Date()"
output:
pagedown::html_resume:
self_contained: false
# include my custom CSS file via the css option

css: ["add-pages.css", "resume"]

````

You can change the placement of the page number using any of the following

  @top-left-corner
  @top-left
  @top-center
  @top-right
  @top-right-corner
  @right-top
  @right-middle
  @right-bottom
  @bottom-right-corner
  @bottom-right
  @bottom-center
  @bottom-left
  @bottom-left-corner
  @left-bottom
  @left-middle
  @left-top
Was this page helpful?
0 / 5 - 0 ratings