2

I am using the pagedown template resume, which is accessible by starting a new R markdown file and choosing "From Template" and "HTML Resume".

I have pasted the YAML header below.

---
title: "Lijia Yu's resume"
author: Lijia Yu
date: "`r Sys.Date()`"
output:
  pagedown::html_resume:
    # set it to true for a self-contained HTML page but it'll take longer to render
    self_contained: false
# uncomment this line to produce HTML and PDF in RStudio:
#knit: pagedown::chrome_print
---

The normal adding of fontsize: 12pt or geometry: margin=1cm doesn't work for me.

I did try adding some CSS (which I don't know too well), but it overrides the template and I want the formatting of the template to stay intact, just larger font and reduced margins.

I also found this snippet that removes the sidebar on the 2nd page. I'd love to incorporate this code as well:

```{css, echo=FALSE}
.pagedjs_page:not(:first-of-type) {
  --sidebar-width: 0rem;
  --sidebar-background-color: #ffffff;
  --main-width: calc(var(--content-width) - var(--sidebar-width));
  --decorator-horizontal-margin: 0.2in;
}
```

How to keep the general formatting of the HTML resume with larger font, smaller margins, and incorporate the code to remove the sidebar on the 2nd page?

richardgasquet
  • 109
  • 1
  • 6
  • I figured how to change the margins and font size of the resume template. In your working directory, when you create a resume template, a folder is created "[File Name]_files". My R Markdown file name was called "2022_08_06_R", so the folder automatically created was "2022_08_06_R_files". Go into the "paged-0.18" folder, "CSS", and then you see the "resume.css". That is the template's CSS formatting. – richardgasquet Aug 13 '22 at 14:39
  • 1
    You'll have to create another CSS file in your working dir to complement the "resume.css", name it "override.css". Add in YAML `add "output: pagedown::html_resume: css: - override.css #complement resume.css - resume #original css` You'll have to add additional CSS to the "override.css" if you want changes to be made on top of the resume.css. – richardgasquet Aug 13 '22 at 14:51
  • 1
    E.g. in my "override.css", I added: `* { /* Override default margins*/ --pagedjs-margin-right: 0.1in; --pagedjs-margin-left: 0.1in; --pagedjs-margin-top: 0.1in; --pagedjs-margin-bottom: 0.1in; } :root{ --sidebar-width: 11rem; /* side bar width */ --root-font-size: 15.5pt; } .aside{ font-size: 0.7rem; }` On top of the original "resume.css", I was able to change the margins, reduce the sidebar width, and change the root font size – richardgasquet Aug 13 '22 at 14:53

0 Answers0