schochastics / quarto-cv

Templates to create CVs/Resumes with Quarto
MIT License
115 stars 11 forks source link

Adjustments on bullet points #3

Closed rruiz-s closed 8 months ago

rruiz-s commented 8 months ago

Hi, first of all thank you very much for sharing your work. I wrote my CV with it and I received very good remarks using your quarto-cv. I used modern cv. I was wondering if it is possible to add a third bullet point.

I tried to add this third parameter:

#| label: cvevents
cvevents <- function(tbl, when, what, where, para1,para2,para3) {

    command_start <- "\\cvevent"

    res <- paste0(
        command_start, "{", tbl[[when]], "}", 
        "{", tbl[[what]], "}",
        "{", tbl[[where]], "}",
        "{", tbl[[para1]], "}",
        "{", tbl[[para2]], "}",
        "{", tbl[[para3]], "}"
        )

    cat(res, sep = "\n")
}

`

| label: education

| output: asis

tibble::tribble( ~degree, ~uni, ~loc, ~dates, ~para1, ~para2,~para3, .....(rows) |> cvevents(when = "dates", what = "degree", where = "loc", para1 = "para1", para2 = "para2",para3="para3")`

Which results on the following error:

Quitting from lines 68-76 [experience] (quarto_cv_test_2.qmd)
Error in tbl[[para3]]: ! Subscript can't be missing for tibbles in [[.
Backtrace:
 1. global cvevents(...)
 4. tibble:::[[.tbl_df(tbl, para3)                                                                                                   
Execution halted

It is not a big issue. I understand that a tribble element must be of equal length, so I will find a workaround by writing the message differently.

In any case, again, thank you very much for sharing your work.

schochastics commented 8 months ago

Thanks for your kind words :). Unfortunately, this adjustment needs deeper changes in the tex template. the csevent command only accepts 5 parameters (https://github.com/schochastics/modern-cv/blob/main/_extensions/modern-cv/template.tex#L199) so i am afraid that you need to hack this yourself.

rruiz-s commented 8 months ago

Not a problem at all. I will still use it as it is for now, I really like it :)

However, thank you so much for guiding me to the right direction in the "template.tex". It is a lot clearer for me now what I have to change in the future.