Comments (4)
It works fine. The issue is that the entries functions return tibbles, and not formatted output suitable for results='asis'. When in a loop, objects don't print automatically, so the CV entries are not being printed in the first place. To print the entries in a suitable format for 'asis' output, you would need to use knitr::knit_print()
. You would also need to ensure that they are actually displayed with cat
.
CV.Rmd
---
name: Mitchell O'Hara-Wild
date: "`r format(Sys.time(), '%B, %Y')`"
qualifications: BCom(Hons), BSc
position: Data Scientist
address: 58 Madeleine Rd, Clayton
phone: +61 408 259 421
email: [email protected]
website: mitchelloharawild.com
github: mitchelloharawild
linkedin: mitchelloharawild
twitter: mitchoharawild
headcolor: 414141
output: vitae::awesomecv
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```
```{r, results='asis'}
for (i in 1:nrow(sections)){
row <- slice(sections, i)
pandoc.header(row$name, level = 1, "atx")
data <- row$data[[1]]
if (ncol(data) == 3){
data %>%
brief_entries(what, when, with) %>%
knitr::knit_print() %>%
cat
} else {
data %>%
detailed_entries(what, when, with, where, why) %>%
knitr::knit_print() %>%
cat
}
}
```
compile.R
has also been changed to remove \n
from the package descriptions.
library(tidyverse)
library(vitae)
library(pander)
library(rmarkdown)
edu <- rorcid::orcid_educations("0000-0001-6729-7695")
df_education <- edu$`0000-0001-6729-7695`$`education-summary` %>%
transmute(
what = `role-title`,
when = glue::glue("{`start-date.year.value`} - {`end-date.year.value`}"),
with = organization.name,
where = organization.address.city,
why = NA
) %>%
as_tibble()
df_packages <- pkgsearch::ps("O'Hara-Wild",size = 100) %>%
filter(purrr::map_lgl(package_data, ~ grepl("Mitchell O'Hara-Wild", .x$Author, fixed = TRUE))) %>%
arrange(desc(downloads_last_month)) %>%
transmute(
what = title,
when = lubridate::year(date),
with = gsub("\n", "", description)
) %>%
as_tibble # drop the pkg_search class
sections <- tribble(
~name, ~data,
"Education", df_education,
"Packages", df_packages
)
render("loop/CV.Rmd")
from vitae.
Thank you so much for your help! This solves my problem.
I now recognized another, more cosmetic, issue, though: The second and following entries within a category are slightly more indented than the first one. Is that a general problem? (I just checked your CV on Github and it also seems to have the issue; https://github.com/mitchelloharawild/CV/blob/master/CV.pdf).
Thanks!
from vitae.
I'm aware of this issue, but not sure of where this is coming from. It's probably somewhere within the awesome-cv cls files.
from vitae.
OK, thanks!
from vitae.
Related Issues (20)
- knit pandoc new version problem HOT 8
- Release vitae 0.5.3
- Portafolio.
- Is it possible to use kable and kableExtra in awesome CV? HOT 1
- ! TeX capacity exceeded, sorry [input stack size=5000].
- Undefined control sequence. HOT 1
- profilepic position latexcv HOT 1
- Change profilepic size HOT 1
- Widen awards section's third column HOT 1
- Italicize words in bibliography
- Decreasing header spacing HOT 2
- apply lua to CSLBlock HOT 2
- Issue with Orcid removal
- Display abstract with bibliography_entries HOT 1
- bibliography_entries(): Lonely \item--perhaps a missing list environment. HOT 41
- section numbers
- Error on LINUX system HOT 7
- Inserting a good-looking table HOT 1
- bibliography_entries() propblems on missing "\item" for every publication list (bug) HOT 1
- Fix README previews
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vitae.