+ - 0:00:00
Notes for current slide
Notes for next slide

Build html CV

with R markdown

Lin Yu

University of Alberta

2021/08/23 (updated: 2021-09-21)

1 / 12

Motivation

For fun;

To reduce repetitive effort;

To make it easier to share my CV with others;

To have the most-recent CV ready!

2 / 12

Get Started

3 / 12

Install Package

4 / 12

Install Package

  • Since you will need to use R markdown to write your CV, so you have to install the rmarkdown package if you have not install it:
install.packages("rmarkdown")
library(rmarkdown)
4 / 12

Install Package

  • Since you will need to use R markdown to write your CV, so you have to install the rmarkdown package if you have not install it:
install.packages("rmarkdown")
library(rmarkdown)
  • Then create a new .Rmd file by clicking File - New File -> R Markdown
4 / 12

Install Package

  • Since you will need to use R markdown to write your CV, so you have to install the rmarkdown package if you have not install it:
install.packages("rmarkdown")
library(rmarkdown)
  • Then create a new .Rmd file by clicking File - New File -> R Markdown

  • edit your metadata as below:(you can also add pdf output as you want)

title: ""
author: ""
date: ""
output: html_document
4 / 12

Add CSS Chunk

5 / 12

Add CSS Chunk

Why?

  • You might want to customize your CV in the same way that you would in Word or Google Docs. For example, you may see some text was centered, some was right aligned, and some was bold. The font size also seemed different.
5 / 12

Add CSS Chunk

Why?

  • You might want to customize your CV in the same way that you would in Word or Google Docs. For example, you may see some text was centered, some was right aligned, and some was bold. The font size also seemed different. How?

Easy:) You just need to add a css chunk in R markdown file right after the setup R chunk. See next slide.

However, if you do not have experience with CSS style (like me). you need to spend some time on it. I learned basic CSS in w3schools.

5 / 12

Add CSS Chunk (Continued)

{css echo=FALSE}
h1 {
text-align: center;
text-transform: uppercase;
color: steelblue;
}
h2 {
text-transform: uppercase;
color: #4CAF50;
}
.p1 {
text-transform: uppercase;
color: steelblue;
font-size: 14px;
}
.p2 {
font-size: 12px;
}
6 / 12

Add icons

You might wish to include icons in your CV as well. I looked into two options for adding icons. (In fact, there are two packages)

{r eval=FALSE}
install.packages("remotes")
remotes::install_github("mitchelloharawild/icons")
icons::download_academicons()
icons::download_fontawesome()

after installation, you need to use downlaod_*()function to load different icons.

then run the r code:icons::fontawesome("user-graduate", style = "solid")

you will get the following result:

7 / 12

Add icons (Continued)

r fontawesome::fa(name = "envelope", fill = "steelblue",fill_opacity = 0.5, height = "1em")

You can visit fontawesome for more icons.

8 / 12

Right alignment

  • You can align your items to the right or left by altering the <p> tag setting.

    • for example, set content to the right and content to the left in the same line.

content to the left

content to the right



You can use the following codes:

<p style="display:inline;float:left" >content to the left<p/> <p style="display:inline;float:right">content to the right </p><br>

9 / 12

Right alignment

  • You can align your items to the right or left by altering the <p> tag setting.

    • for example, set content to the right and content to the left in the same line.

content to the left

content to the right



You can use the following codes:

<p style="display:inline;float:left" >content to the left<p/> <p style="display:inline;float:right">content to the right </p><br>

The <br> at the end represents break. This allows you to start a new line.

9 / 12

Some tips

That is pretty much about it. Here are a few tips you should be aware of.

10 / 12

Some tips

That is pretty much about it. Here are a few tips you should be aware of.

  • Use &nbsp; for space. for example,

    There are several spaces between you               me

There are several spaces between you &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;me
10 / 12

Some tips

That is pretty much about it. Here are a few tips you should be aware of.

  • Use &nbsp; for space. for example,

    There are several spaces between you               me

There are several spaces between you &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;me
  • Use <br> tag after inline passages

    as aforementioned, you can always start a new line by adding a <br> tag

10 / 12

Some tips

That is pretty much about it. Here are a few tips you should be aware of.

  • Use &nbsp; for space. for example,

    There are several spaces between you               me

There are several spaces between you &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;me
  • Use <br> tag after inline passages

    as aforementioned, you can always start a new line by adding a <br> tag

  • Use <!--section name--> to add comments or session breaks

10 / 12

Some tips

That is pretty much about it. Here are a few tips you should be aware of.

  • Use &nbsp; for space. for example,

    There are several spaces between you               me

There are several spaces between you &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;me
  • Use <br> tag after inline passages

    as aforementioned, you can always start a new line by adding a <br> tag

  • Use <!--section name--> to add comments or session breaks

  • Finally, be familiar with CSS or html

10 / 12

I hope you find this helpful!

11 / 12

Thank you

12 / 12

Motivation

For fun;

To reduce repetitive effort;

To make it easier to share my CV with others;

To have the most-recent CV ready!

2 / 12
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow