Skip to content

Commit

Permalink
Merge pull request mitchelloharawild#228 from isabelle-greco/ig-add-p…
Browse files Browse the repository at this point in the history
…ronouns

Adding pronouns to vitae package
  • Loading branch information
mitchelloharawild authored Feb 27, 2023
2 parents 935d63d + 97b50a9 commit 75cdf3e
Show file tree
Hide file tree
Showing 22 changed files with 53 additions and 15 deletions.
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ Authors@R: c(
person("Rob", "Hyndman", email="[email protected]", role=c("aut"), comment = c(ORCID = "0000-0002-2140-5352")),
person("Yihui", "Xie", role = c("ctb"), comment = c(ORCID = "0000-0003-0645-5666")),
person("Albert", "Krewinkel", role = c("cph"), comment = c("Multiple bibliographies lua filter")),
person("JooYoung", "Seo", role="ctb", comment = c(ORCID = "0000-0002-4064-6012")))
person("JooYoung", "Seo", role="ctb", comment = c(ORCID = "0000-0002-4064-6012")),
person("Isabelle", "Greco", role="ctb", comment = c(ORCID = "0000-0003-1604-6639")))
Description: Provides templates and functions to simplify the production and maintenance of curriculum vitae.
Depends:
Depends:
R (>= 3.5.0)
Imports:
rlang,
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

* Added option to remove footer from `awesomecv` template (#182, #200).
* Match font style of text for bibliography entries in `awesomecv` template.
* Added support for pronouns in the all templates (@isabelle-greco, #204, #228)

# vitae 0.5.1

Expand Down
3 changes: 3 additions & 0 deletions inst/rmarkdown/templates/awesomecv/resources/awesome-cv.tex
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
\address{$address$}
$endif$

$if(pronouns)$
\pronouns{$pronouns$}
$endif$
$if(phone)$
\mobile{$phone$}
$endif$
Expand Down
12 changes: 11 additions & 1 deletion inst/rmarkdown/templates/awesomecv/skeleton/awesome-cv.cls
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,10 @@
% Usage: \name{<position>}
\newcommand*{\position}[1]{\def\@position{#1}}

% Defines writer's pronouns (optional)
% Usage: \pronouns{<pronouns>}
\newcommand*{\pronouns}[1]{\def\@pronouns{#1}}

% Defines writer's mobile (optional)
% Usage: \mobile{<mobile number>}
\newcommand*{\mobile}[1]{\def\@mobile{#1}}
Expand Down Expand Up @@ -455,11 +459,17 @@
\headersocialstyle{%
\newbool{isstart}%
\setbool{isstart}{true}%
\ifthenelse{\isundefined{\@pronouns}}%
{}%
{%
\faComment\acvHeaderIconSep\@pronouns%
\setbool{isstart}{false}%
}%
\ifthenelse{\isundefined{\@mobile}}%
{}%
{%
\ifbool{isstart}{\setbool{isstart}{false}}{\acvHeaderSocialSep}%
\faMobile\acvHeaderIconSep\@mobile%
\setbool{isstart}{false}%
}%
\ifthenelse{\isundefined{\@email}}%
{}%
Expand Down
10 changes: 5 additions & 5 deletions inst/rmarkdown/templates/awesomecv/skeleton/skeleton.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Marie
surname: Curie
position: "Professor"
pronouns: she/her
address: "School of Physics & Chemistry, École Normale Supérieure"
phone: +1 22 3333 4444
www: mariecurie.com
Expand All @@ -10,7 +11,7 @@ twitter: mariecurie
github: mariecurie
linkedin: mariecurie
date: "`r format(Sys.time(), '%B %Y')`"
output:
output:
vitae::awesomecv:
page_total: true
---
Expand All @@ -35,7 +36,7 @@ tribble(
"Informal studies", "1889-91", "Flying University", "Warsaw, Poland",
"Master of Physics", "1893", "Sorbonne Université", "Paris, France",
"Master of Mathematics", "1894", "Sorbonne Université", "Paris, France"
) %>%
) %>%
detailed_entries(Degree, Year, Institution, Where)
```

Expand All @@ -46,10 +47,10 @@ tribble(
~Year, ~Type, ~Desc,
1903, "Physics", "Awarded for her work on radioactivity with Pierre Curie and Henri Becquerel",
1911, "Chemistry", "Awarded for the discovery of radium and polonium"
) %>%
) %>%
brief_entries(
glue::glue("Nobel Prize in {Type}"),
Year,
Year,
Desc
)
```
Expand All @@ -63,4 +64,3 @@ knitr::write_bib(c("vitae", "tibble"), "packages.bib")
bibliography_entries("packages.bib") %>%
arrange(desc(author$family), issued)
```

Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@
\info{%
$if(address)$\raisebox{-0.05cm}{\imagetop{\faIcon{map-marker-alt}}} & \imagetop{\begin{tabular}{@{}l@{}}$address$\end{tabular}}\\$endif$ %
$if(www)$\faIcon{home} & \href{http://$www$}{$www$}\\$endif$% %
$if(pronouns)$\faIcon{comment} & $pronouns$\\$endif$%
$if(phone)$\faIcon{phone-alt} & $phone$\\$endif$%
$if(email)$\faIcon{envelope} & $email$\\$endif$%
$if(twitter)$\faIcon{twitter} & \href{https://twitter.com/$twitter$}{@$twitter$}\\$endif$%
Expand Down
1 change: 1 addition & 0 deletions inst/rmarkdown/templates/hyndman/skeleton/skeleton.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Marie
surname: Curie
position: "Professor"
address: "School of Physics & Chemistry, École Normale Supérieure"
pronouns: she/her
phone: +1 22 3333 4444
www: mariecurie.com
email: "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@
%---------------------------------------------------------------------------------------
% META SECTION
%----------------------------------------------------------------------------------------
\metasection{$if(pronouns)$\faicon{comment} $pronouns$$endif$}{}
\metasection{$if(phone)$\faicon{phone} $phone$$endif$}{$if(address)$\faicon{map-marker} $address$$endif$}
\metasection{$if(email)$\faicon{envelope} $email$$endif$}{$if(www)$\faicon{home} \href{http://$www$}{$www$}$endif$}
\vspace{-2pt}
Expand Down
1 change: 1 addition & 0 deletions inst/rmarkdown/templates/latexcv/skeleton/skeleton.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Marie
surname: Curie
position: "Professor"
address: "School of Physics & Chemistry, École Normale Supérieure"
pronouns: she/her
phone: +1 22 3333 4444
www: mariecurie.com
email: "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ <h1>$name$ $surname$</h1>

<div id="webaddress">
|
$if(pronouns)$<i class="fa fa-comment"></i> $pronouns$ |$endif$
$if(phone)$<i class="fa fa-phone"></i> $phone$ |$endif$
$if(www)$<i class="fa fa-globe"></i> <a href="https://$www$">$www$</a> |$endif$
$if(email)$<i class="fa fa-envelope"></i> $email$ |$endif$
Expand Down
10 changes: 5 additions & 5 deletions inst/rmarkdown/templates/markdowncv/skeleton/skeleton.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ surname: Curie
position: "Professor"
address: "School of Physics & Chemistry, École Normale Supérieure"
phone: +1 22 3333 4444
pronouns: she/her
www: mariecurie.com
email: "[email protected]"
twitter: mariecurie
github: mariecurie
linkedin: mariecurie
date: "`r format(Sys.time(), '%B %Y')`"
aboutme: "Marie is a Polish and naturalized-French physicist and chemist who conducts pioneering research on radioactivity."
output:
output:
vitae::markdowncv:
theme: kjhealy
---
Expand All @@ -37,7 +38,7 @@ tribble(
"Informal studies", "1889-91", "Flying University", "Warsaw, Poland",
"Master of Physics", "1893", "Sorbonne Université", "Paris, France",
"Master of Mathematics", "1894", "Sorbonne Université", "Paris, France"
) %>%
) %>%
detailed_entries(Degree, Year, Institution, Where)
```

Expand All @@ -48,10 +49,10 @@ tribble(
~Year, ~Type, ~Desc,
1903, "Physics", "Awarded for her work on radioactivity with Pierre Curie and Henri Becquerel",
1911, "Chemistry", "Awarded for the discovery of radium and polonium"
) %>%
) %>%
brief_entries(
glue::glue("Nobel Prize in {Type}"),
Year,
Year,
Desc
)
```
Expand All @@ -65,4 +66,3 @@ knitr::write_bib(c("vitae", "tibble"), "packages.bib")
bibliography_entries("packages.bib") %>%
arrange(desc(author$family), issued)
```

1 change: 1 addition & 0 deletions inst/rmarkdown/templates/moderncv/resources/moderncv.tex
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
\name{$if(surname)$$name$$endif$}{$if(surname)$$surname$$else$$name$$endif$}
$if(position)$\title{$position$}$endif$
$if(address)$\address{$address$}{}{}$endif$
$if(pronouns)$\pronouns{$pronouns$}{}{}$endif$
$if(phone)$\phone[mobile]{$phone$}$endif$ % Phone number
$if(email)$\email{\donothing{$email$}}$endif$
$if(www)$\homepage{$www$}$endif$ % Personal website
Expand Down
7 changes: 6 additions & 1 deletion inst/rmarkdown/templates/moderncv/skeleton/moderncv.cls
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,10 @@
% usage: \homepage{<url>}
\newcommand*{\homepage}[1]{\def\@homepage{#1}}

% define's one's pronouns (optional)
% usage: \pronouns{<pronouns>}
\newcommand*{\pronouns}[1]{\def\@pronouns{#1}}

% adds a fixed/mobile/fax number to one's personal information (optional)
% usage: \phone[<optional type>]{<number>}
% where <optional type> should be either "fixed" (default), "mobile" or "fax
Expand Down Expand Up @@ -305,6 +309,7 @@
% other symbols
\newcommand*{\listitemsymbol} {\labelitemi~}
\newcommand*{\addresssymbol} {}
\newcommand*{\pronounssymbol} {{\small\faComment}~}
\newcommand*{\mobilephonesymbol} {}
\newcommand*{\fixedphonesymbol} {}
\newcommand*{\faxphonesymbol} {}
Expand Down Expand Up @@ -370,7 +375,7 @@
% usage: \moderncvcolor{<color scheme name>}
\newcommand*{\moderncvcolor}[1]{%
\RequirePackage{moderncvcolor#1}}

% loads an icons set
% usage: \moderncvicons{<icon set name>}
\newcommand*{\moderncvicons}[1]{%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
\ifthenelse{\equal{\@addresscity}{}}{}{\addtofoot[~--~]{\@addresscity}}% if \addresstreet is defined, \addresscity and \addresscountry will always be defined but could be empty
\ifthenelse{\equal{\@addresscountry}{}}{}{\addtofoot[~--~]{\@addresscountry}}%
\flushfoot\@firstfootelementtrue\\}%
\ifthenelse{\isundefined{\@pronouns}}{}{\addtofoot{\pronounssymbol\@pronouns}}%
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\addtofoot{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@email}}{}{\addtofoot{\emailsymbol\emaillink{\@email}}}%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
\ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
\ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty
\ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
\ifthenelse{\isundefined{\@pronouns}}{}{\makenewline\pronounssymbol\@pronouns}%
\phonesdetails% needs to be pre-rendered as loops and tabulars seem to conflict
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
\ifthenelse{\equal{\@addresscity}{}}{}{\addtomakeheaddetails[~--~]{\@addresscity}}% if \addresstreet is defined, \addresscity and \addresscountry will always be defined but could be empty
\ifthenelse{\equal{\@addresscountry}{}}{}{\addtomakeheaddetails[~--~]{\@addresscountry}}%
\flushmakeheaddetails\@firstmakeheaddetailselementtrue\\\null}%
\ifthenelse{\isundefined{\@pronouns}}{}{\addtomakeheaddetails{\pronounssymbol\@pronouns}}%
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\addtomakeheaddetails{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@email}}{}{\addtomakeheaddetails{\emailsymbol\emaillink{\@email}}}%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,15 @@
\centering%
% name and title
\namestyle{\@firstname~\@lastname}%
\ifthenelse{\equal{\@title}{}}{}{\titlestyle{~|~\@title}}\\% \isundefined doesn't work on \@title, as LaTeX itself defines \@title (before it possibly gets redefined by \title)
\ifthenelse{\equal{\@title}{}}{}{\titlestyle{~|~\@title}}\\% \isundefined doesn't work on \@title, as LaTeX itself defines \@title (before it possibly gets redefined by \title)
% optional detailed information
\if@details{%
\addressfont\color{color2}%
\ifthenelse{\isundefined{\@addressstreet}}{}{\addtomakeheaddetails{\addresssymbol\@addressstreet}%
\ifthenelse{\equal{\@addresscity}{}}{}{\addtomakeheaddetails[~--~]{\@addresscity}}% if \addresstreet is defined, \addresscity and \addresscountry will always be defined but could be empty
\ifthenelse{\equal{\@addresscountry}{}}{}{\addtomakeheaddetails[~--~]{\@addresscountry}}%
\flushmakeheaddetails\@firstmakeheaddetailselementtrue\\\null}%
\ifthenelse{\isundefined{\@pronouns}}{}{\addtomakeheaddetails{\pronounssymbol\@pronouns}}%
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\addtomakeheaddetails{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@email}}{}{\addtomakeheaddetails{\emailsymbol\emaillink{\@email}}}%
Expand Down
2 changes: 2 additions & 0 deletions inst/rmarkdown/templates/moderncv/skeleton/moderncvheadiv.sty
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
\ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
\ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and \addresscountry will always be defined but could be empty
\ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
\ifthenelse{\isundefined{\@pronouns}}{}{\makenewline\hbox to 1.0em{\pronounssymbol}~\@pronouns}%
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\makenewline\hbox to 1.0em{\csname\collectionloopkey phonesymbol\endcsname}~\collectionloopitem}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\hbox to 1.0em{\emailsymbol}~\emaillink{\@email}}%
Expand Down Expand Up @@ -153,6 +154,7 @@
\ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
\ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and \addresscountry will always be defined but could be empty
\ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
\ifthenelse{\isundefined{\@pronouns}}{}{\makenewline\hbox to 1.0em{\pronounssymbol}~\@pronouns}%
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\makenewline\hbox to 1.0em{\csname\collectionloopkey phonesymbol\endcsname}~\collectionloopitem}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\hbox to 1.0em{\emailsymbol}~\emaillink{\@email}}%
Expand Down
2 changes: 2 additions & 0 deletions inst/rmarkdown/templates/moderncv/skeleton/moderncvheadv.sty
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
\ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
\ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and \addresscountry will always be defined but could be empty
\ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
\ifthenelse{\isundefined{\@pronouns}}{}{\makenewline\pronounssymbol~\@pronouns}%
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\makenewline\csname\collectionloopkey phonesymbol\endcsname~\collectionloopitem}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol~\emaillink{\@email}}%
Expand Down Expand Up @@ -137,6 +138,7 @@
\ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
\ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty
\ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
\ifthenelse{\isundefined{\@pronouns}}{}{\makenewline\pronounssymbol\@pronouns}%
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
$if(position)$\cvjobtitle{$position$}$else$\cvjobtitle{}$endif$ % Job title/career
$if(date)$\cvdate{$date$}$else$\cvdate{}$endif$ % Date of birth or date of CV??
$if(address)$\cvaddress{$address$}$else$\cvaddress{}$endif$ % Short address/location, use \newline if more than 1 line is required
$if(pronouns)$\cvpronouns{$pronouns$}$else$\cvpronouns{}$endif$ % Pronouns
$if(phone)$\cvnumberphone{$phone$}$else$\cvnumberphone{}$endif$ % Phone number
$if(www)$\cvsite{\href{http://$www$}{$www$}}$else$\cvsite{}$endif$ % Personal website
$if(email)$\cvmail{$email$}$else$\cvmail{}$endif$ % Email address
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ surname: Curie
position: "Professor"
address: "School of Physics & Chemistry, École Normale Supérieure"
phone: +1 22 3333 4444
pronouns: she/her
profilepic: mariecurie.jpg
www: mariecurie.com
email: "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
\newcommand{\cvlinkedin}[1]{\renewcommand{\cvlinkedin}{#1}}
\newcommand{\cvgithub}[1]{\renewcommand{\cvgithub}{#1}}
\newcommand{\cvnumberphone}[1]{\renewcommand{\cvnumberphone}{#1}}
\newcommand{\cvpronouns}[1]{\renewcommand{\cvpronouns}{#1}}
\newcommand{\cvaddress}[1]{\renewcommand{\cvaddress}{#1}}
\newcommand{\cvsite}[1]{\renewcommand{\cvsite}{#1}}
\newcommand{\aboutme}[1]{\renewcommand{\aboutme}{#1}}
Expand Down Expand Up @@ -156,6 +157,7 @@
\renewcommand{\arraystretch}{1.6}
\begin{tabular}{p{0.5cm} @{\hskip 0.5cm}p{5cm}}
\ifthenelse{\equal{\cvaddress}{}}{}{\Large\faicon{map-marker} & \cvaddress\\}
\ifthenelse{\equal{\cvpronouns}{}}{}{\Large\faicon{comment} & \cvpronouns\\}
\ifthenelse{\equal{\cvnumberphone}{}}{}{\Large\faicon{phone} & \cvnumberphone\\}
\ifthenelse{\equal{\cvsite}{}}{}{\Large\faicon{home} & \cvsite\\}
\ifthenelse{\equal{\cvmail}{}}{}{\Large\faicon{envelope} & \cvmail\\}
Expand Down

0 comments on commit 75cdf3e

Please sign in to comment.