mitchelloharawild / vitae

R Markdown Résumés and CVs
https://pkg.mitchelloharawild.com/vitae/
1.23k stars 239 forks source link

bibliography_entries(): Lonely \item--perhaps a missing list environment. #246

Closed jooyoungseo closed 5 months ago

jooyoungseo commented 1 year ago

It seems like there is an error in the default awesomecv template or there was an inadvertent break. I just tried to render the skeleton awesomecv as is, but it failed.

Reprex

rmarkdown::render("C:/test/awesome/awesome.Rmd")
#> processing file: awesome.Rmd
#> output file: awesome.knit.md
#> "C:/PROGRA~3/CHOCOL~1/bin/pandoc" +RTS -K512m -RTS awesome.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output awesome.tex --lua-filter "C:\PROGRA~1\R\R-43~1.1\library\RMARKD~1\RMARKD~1\lua\PAGEBR~1.LUA" --lua-filter "C:\PROGRA~1\R\R-43~1.1\library\RMARKD~1\RMARKD~1\lua\LATEX-~1.LUA" --embed-resources --standalone --template "C:\PROGRA~1\R\R-43~1.1\library\vitae\RMARKD~1\TEMPLA~1\AWESOM~1\RESOUR~1\AWESOM~1.TEX" --highlight-style tango --pdf-engine xelatex --lua-filter "C:\Users\jseo1005\AppData\Local\Temp\Rtmp2pkWSJ/multiple-bibliographies.lua" --variable page_total=TRUE --variable show_footer=TRUE
#> ! LaTeX Error: Lonely \item--perhaps a missing list environment.
#> Error: LaTeX failed to compile awesome.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See awesome.log for more info.

Created on 2023-11-02 with reprex v2.0.2

Session info ``` r sessioninfo::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────── #> setting value #> version R version 4.3.1 (2023-06-16 ucrt) #> os Windows 11 x64 (build 22621) #> system x86_64, mingw32 #> ui RTerm #> language (EN) #> collate English_United States.utf8 #> ctype English_United States.utf8 #> tz America/Chicago #> date 2023-11-02 #> pandoc 3.1.9 @ C:/PROGRA~3/CHOCOL~1/bin/ (via rmarkdown) #> #> ─ Packages ─────────────────────────────────────────────────────────────────── #> package * version date (UTC) lib source #> cli 3.6.1 2023-03-23 [1] CRAN (R 4.3.1) #> digest 0.6.33 2023-07-07 [1] CRAN (R 4.3.1) #> dplyr * 1.1.3 2023-09-03 [1] CRAN (R 4.3.1) #> evaluate 0.22 2023-09-29 [1] CRAN (R 4.3.1) #> fansi 1.0.5 2023-10-08 [1] CRAN (R 4.3.1) #> fastmap 1.1.1 2023-02-24 [1] CRAN (R 4.3.1) #> fs 1.6.3 2023-07-20 [1] CRAN (R 4.3.1) #> generics 0.1.3 2022-07-05 [1] CRAN (R 4.3.1) #> glue 1.6.2 2022-02-24 [1] CRAN (R 4.3.1) #> htmltools 0.5.6.1 2023-10-06 [1] CRAN (R 4.3.1) #> jsonlite 1.8.7 2023-06-29 [1] CRAN (R 4.3.1) #> knitr 1.45 2023-10-30 [1] CRAN (R 4.3.1) #> lifecycle 1.0.3 2022-10-07 [1] CRAN (R 4.3.1) #> magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.3.1) #> pillar 1.9.0 2023-03-22 [1] CRAN (R 4.3.1) #> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.3.1) #> purrr 1.0.2 2023-08-10 [1] CRAN (R 4.3.1) #> R.cache 0.16.0 2022-07-21 [1] CRAN (R 4.3.1) #> R.methodsS3 1.8.2 2022-06-13 [1] CRAN (R 4.3.0) #> R.oo 1.25.0 2022-06-12 [1] CRAN (R 4.3.0) #> R.utils 2.12.2 2022-11-11 [1] CRAN (R 4.3.1) #> R6 2.5.1 2021-08-19 [1] CRAN (R 4.3.1) #> reprex 2.0.2 2022-08-17 [1] CRAN (R 4.3.1) #> rlang 1.1.1 2023-04-28 [1] CRAN (R 4.3.1) #> rmarkdown 2.25 2023-09-18 [1] CRAN (R 4.3.1) #> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.3.1) #> styler 1.10.2 2023-08-29 [1] CRAN (R 4.3.1) #> tibble * 3.2.1 2023-03-20 [1] CRAN (R 4.3.1) #> tidyselect 1.2.0 2022-10-10 [1] CRAN (R 4.3.1) #> tinytex 0.48 2023-10-13 [1] CRAN (R 4.3.1) #> utf8 1.2.4 2023-10-22 [1] CRAN (R 4.3.1) #> vctrs 0.6.4 2023-10-12 [1] CRAN (R 4.3.1) #> vitae * 0.5.3 2023-03-21 [1] CRAN (R 4.3.1) #> withr 2.5.2 2023-10-30 [1] CRAN (R 4.3.1) #> xfun 0.40 2023-08-09 [1] CRAN (R 4.3.1) #> yaml 2.3.7 2023-01-23 [1] CRAN (R 4.3.0) #> #> [1] C:/Program Files/R/R-4.3.1/library #> #> ────────────────────────────────────────────────────────────────────────────── ```
jooyoungseo commented 1 year ago

In the generated .tex file, \bibitem lines cause the error:

\phantomsection\label{bibliography}
\bibitem[\citeproctext]{ref-R-vitae}
\CSLLeftMargin{1. }%
\CSLRightInline{O'Hara-Wild, M., \& Hyndman, R. (2023). \emph{Vitae:
    Curriculum vitae for r markdown}.
  \url{https://pkg.mitchelloharawild.com/vitae/}}

\bibitem[\citeproctext]{ref-R-tibble}
\CSLLeftMargin{2. }%
\CSLRightInline{Müller, K., \& Wickham, H. (2023). \emph{Tibble: Simple
    data frames}. \url{https://tibble.tidyverse.org/}}
jooyoungseo commented 1 year ago

I have found that this has to do with pandoc compatibility. There is no issue with pandoc v2.9.2 for example. However, it fails with the latest pandoc, such as v3.1.9.

julienvollering commented 1 year ago

I have the same issue. Pandoc v3.1.8.

rmarkdown::render(system.file("rmarkdown/templates/awesomecv/skeleton/skeleton.Rmd", 
    package = "vitae"))
#> processing file: skeleton.Rmd
#> output file: skeleton.knit.md
#> "C:/Users/julienv/AppData/Local/Pandoc/pandoc" +RTS -K512m -RTS skeleton.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output skeleton.tex --lua-filter "C:\Users\julienv\AppData\Local\R\win-library\4.3\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "C:\Users\julienv\AppData\Local\R\win-library\4.3\rmarkdown\rmarkdown\lua\latex-div.lua" --embed-resources --standalone --template "C:\Users\julienv\AppData\Local\R\win-library\4.3\vitae\rmarkdown\templates\awesomecv\resources\awesome-cv.tex" --highlight-style tango --pdf-engine xelatex --lua-filter "C:\Users\julienv\AppData\Local\Temp\RtmpUjGkj2/multiple-bibliographies.lua" --variable page_total=TRUE --variable show_footer=TRUE
#> ! LaTeX Error: Lonely \item--perhaps a missing list environment.
#> Error: LaTeX failed to compile skeleton.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See skeleton.log for more info.
Session info

``` sessioninfo::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────── #> setting value #> version R version 4.3.1 (2023-06-16 ucrt) #> os Windows 10 x64 (build 19044) #> system x86_64, mingw32 #> ui RTerm #> language (EN) #> collate English_United Kingdom.utf8 #> ctype English_United Kingdom.utf8 #> tz Europe/Oslo #> date 2023-11-10 #> pandoc 3.1.8 @ C:/Users/julienv/AppData/Local/Pandoc/ (via rmarkdown) #> #> ─ Packages ─────────────────────────────────────────────────────────────────── #> package * version date (UTC) lib source #> cli 3.6.1 2023-03-23 [1] CRAN (R 4.3.1) #> digest 0.6.33 2023-07-07 [1] CRAN (R 4.3.1) #> evaluate 0.22 2023-09-29 [1] CRAN (R 4.3.1) #> fastmap 1.1.1 2023-02-24 [1] CRAN (R 4.3.1) #> fs 1.6.3 2023-07-20 [1] CRAN (R 4.3.1) #> glue 1.6.2 2022-02-24 [1] CRAN (R 4.3.1) #> htmltools 0.5.6 2023-08-10 [1] CRAN (R 4.3.1) #> knitr 1.44 2023-09-11 [1] CRAN (R 4.3.1) #> lifecycle 1.0.3 2022-10-07 [1] CRAN (R 4.3.1) #> reprex 2.0.2 2022-08-17 [1] CRAN (R 4.3.1) #> rlang 1.1.1 2023-04-28 [1] CRAN (R 4.3.1) #> rmarkdown 2.25 2023-09-18 [1] CRAN (R 4.3.1) #> rstudioapi 0.15.0 2023-07-07 [1] CRAN (R 4.3.1) #> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.3.2) #> withr 2.5.1 2023-09-26 [1] CRAN (R 4.3.1) #> xfun 0.40 2023-08-09 [1] CRAN (R 4.3.1) #> yaml 2.3.7 2023-01-23 [1] CRAN (R 4.3.0) #> #> [1] C:/Users/julienv/AppData/Local/R/win-library/4.3 #> [2] C:/Program Files/R/R-4.3.1/library #> ```

adamhsparks commented 1 year ago

I thought I was going crazy when this suddenly stopped working with my CV but I'd not made any changes aside from adding a new publication or two.

Thank you for confirming it's not me and at least providing the cause.

mitchelloharawild commented 1 year ago

It seems like the appropriate CSLReferences environment isn't being produced here, and it applies to all templates whenever bibliography_entries() is used. Probably relating to the lua filter for in-place multiple bibliographies.

mitchelloharawild commented 1 year ago

Thanks all for reporting this problem, special thanks for identifying the source of the problem in the generated tex. I've updated the csl-refs template from pandoc and updated the multiple bibliographies code to match the more recently updated version here: https://github.com/pandoc-ext/multibib/

I will publish an updated version to CRAN shortly after some further testing - let me know if you still have issues with this.

julienvollering commented 1 year ago

Thanks very much for your help with this, @mitchelloharawild. I just tried with the development version and got this error:

rmarkdown::render(system.file("rmarkdown/templates/awesomecv/skeleton/skeleton.Rmd", 
    package = "vitae"))
#> processing file: skeleton.Rmd
#> output file: skeleton.knit.md
#> "C:/Users/julienv/AppData/Local/Pandoc/pandoc" +RTS -K512m -RTS skeleton.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output skeleton.tex --lua-filter "C:\Users\julienv\AppData\Local\R\win-library\4.3\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "C:\Users\julienv\AppData\Local\R\win-library\4.3\rmarkdown\rmarkdown\lua\latex-div.lua" --embed-resources --standalone --template "C:\Users\julienv\AppData\Local\R\win-library\4.3\vitae\rmarkdown\templates\awesomecv\resources\awesome-cv.tex" --highlight-style tango --pdf-engine xelatex --lua-filter "C:/Users/julienv/AppData/Local/R/win-library/4.3/vitae/multiple-bibliographies.lua" --variable page_total=TRUE --variable show_footer=TRUE
#> Error: pandoc document conversion failed with error 83

Created on 2023-11-23 with reprex v2.0.2

Standard output and standard error ``` sh Error running filter C:/Users/julienv/AppData/Local/R/win-library/4.3/vitae/multiple-bibliographies.lua: File C:92c1fe1acb.yaml not found in resource path stack traceback: ...ocal/R/win-library/4.3/vitae/multiple-bibliographies.lua:72: in function <...ocal/R/win-library/4.3/vitae/multiple-bibliographies.lua:59> ```
Session info ``` r sessioninfo::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────── #> setting value #> version R version 4.3.1 (2023-06-16 ucrt) #> os Windows 10 x64 (build 19044) #> system x86_64, mingw32 #> ui RTerm #> language (EN) #> collate English_United Kingdom.utf8 #> ctype English_United Kingdom.utf8 #> tz Europe/Oslo #> date 2023-11-23 #> pandoc 3.1.8 @ C:/Users/julienv/AppData/Local/Pandoc/ (via rmarkdown) #> #> ─ Packages ─────────────────────────────────────────────────────────────────── #> package * version date (UTC) lib source #> cli 3.6.1 2023-03-23 [1] CRAN (R 4.3.1) #> digest 0.6.33 2023-07-07 [1] CRAN (R 4.3.1) #> dplyr * 1.1.3 2023-09-03 [1] CRAN (R 4.3.1) #> evaluate 0.23 2023-11-01 [1] CRAN (R 4.3.2) #> fansi 1.0.4 2023-01-22 [1] CRAN (R 4.3.1) #> fastmap 1.1.1 2023-02-24 [1] CRAN (R 4.3.1) #> fs 1.6.3 2023-07-20 [1] CRAN (R 4.3.1) #> generics 0.1.3 2022-07-05 [1] CRAN (R 4.3.1) #> glue 1.6.2 2022-02-24 [1] CRAN (R 4.3.1) #> htmltools 0.5.6 2023-08-10 [1] CRAN (R 4.3.1) #> jsonlite 1.8.7 2023-06-29 [1] CRAN (R 4.3.1) #> knitr 1.45 2023-10-30 [1] CRAN (R 4.3.2) #> lifecycle 1.0.4 2023-11-07 [1] CRAN (R 4.3.2) #> magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.3.1) #> pillar 1.9.0 2023-03-22 [1] CRAN (R 4.3.1) #> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.3.1) #> purrr 1.0.2 2023-08-10 [1] CRAN (R 4.3.1) #> R.cache 0.16.0 2022-07-21 [1] CRAN (R 4.3.2) #> R.methodsS3 1.8.2 2022-06-13 [1] CRAN (R 4.3.1) #> R.oo 1.25.0 2022-06-12 [1] CRAN (R 4.3.1) #> R.utils 2.12.3 2023-11-18 [1] CRAN (R 4.3.2) #> R6 2.5.1 2021-08-19 [1] CRAN (R 4.3.1) #> reprex 2.0.2 2022-08-17 [1] CRAN (R 4.3.1) #> rlang 1.1.1 2023-04-28 [1] CRAN (R 4.3.1) #> rmarkdown 2.25 2023-09-18 [1] CRAN (R 4.3.1) #> rstudioapi 0.15.0 2023-07-07 [1] CRAN (R 4.3.1) #> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.3.2) #> styler 1.10.2 2023-08-29 [1] CRAN (R 4.3.2) #> tibble * 3.2.1 2023-03-20 [1] CRAN (R 4.3.1) #> tidyselect 1.2.0 2022-10-10 [1] CRAN (R 4.3.1) #> utf8 1.2.3 2023-01-31 [1] CRAN (R 4.3.1) #> vctrs 0.6.3 2023-06-14 [1] CRAN (R 4.3.1) #> vitae * 0.5.3.9000 2023-11-23 [1] Github (mitchelloharawild/vitae@738a98c) #> withr 2.5.2 2023-10-30 [1] CRAN (R 4.3.2) #> xfun 0.40 2023-08-09 [1] CRAN (R 4.3.1) #> yaml 2.3.7 2023-01-23 [1] CRAN (R 4.3.0) #> #> [1] C:/Users/julienv/AppData/Local/R/win-library/4.3 #> [2] C:/Program Files/R/R-4.3.1/library #> #> ────────────────────────────────────────────────────────────────────────────── ```
mitchelloharawild commented 1 year ago

Strange, thanks! This looks like a windows specific bug with file paths. Could you run with keep_md: true and send through the result (or look at the bibliography entry in the yaml)?

julienvollering commented 1 year ago

Sure! Took me a moment to figure out I had to render with clean = FALSE to keep the md, but here it is:

---
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
email: Marie.Curie@ens.fr
twitter: mariecurie
github: mariecurie
linkedin: mariecurie
date: November 2023
output:
  vitae::awesomecv:
    keep_md: yes
    page_total: yes
bibliography:
  8a04b61006b8ea185bd670c9ddec2523: C:\Users\julienv\AppData\Local\Temp\Rtmp8OuTCo\filed14720c109d.yaml
nocite: '@R-vitae, @R-tibble'
csl: C:/Users/julienv/AppData/Local/R/win-library/4.3/vitae/vitae.csl

---

# Some stuff about me

...

# Publications

::: {#refs-8a04b61006b8ea185bd670c9ddec2523}
:::
mitchelloharawild commented 1 year ago

Great, thanks - looks like \ is used instead of / for the file path. I've re-added a fix I've made for this in the past (was hoping this was fixed upstream, but seemingly not).

Could you try again with the latest dev version?

julienvollering commented 1 year ago

Yep, renders fine now with the latest dev version. Thanks! I do currently get warnings for all my bib entries (below), but I suppose that's a separate issue. I don't get the warning for skeleton.Rmd. [WARNING] Citeproc: citation {citationkey} not found

mitchelloharawild commented 1 year ago

Great, thanks! I'm not sure why this warning is shown, maybe double check that all of your citations are showing in the output? Maybe one of your entries has a problematic key.

flyaflya commented 11 months ago

Is there something more that needs to be done other than running:

remotes::install_github("mitchelloharawild/vitae")

I had an awesomeCV that was working and now it is not. I get the ! LaTeX Error: Something's wrong--perhaps a missing \item. error.

For example, do I have to update awesomecv-cv.cls or another file?

Thanks!

flyaflya commented 11 months ago

This is reproducible using posit cloud. Run these two lines:

install.packages("remotes")
remotes::install_github("mitchelloharawild/vitae")

Then start a vitae from R Markdown template and once knitted, the missing \item error appears. So I think there is a step I might be missing in working around the bug identified here.

harrycheon commented 11 months ago

I am having the same issue as @flyaflya. I was planning on playing around with vitae via the template, but am constantly running into this error. The .rmd file knits without the aforementioned bibliography_entries.

OS: MacOS R: 4.3 Vitae: 0.5.4

JJGabe commented 10 months ago

I am also still experiencing this problem. I removed the vitae package and reinstalled using remotes:: and it gave me the same version, 0.5.4.

OS: Ubuntu 22.04 R: 4.3.2 vitae: 0.5.4

adamhsparks commented 10 months ago

Yes, with the CRAN version and the GitHub versions, both, I still get this error on a brand new MacBook and fresh installation of everything.

adamhsparks commented 10 months ago

OK, the plot thickens.

It works on a Windows laptop but not on my new MacBook, both are fresh installs of {tinytex}.

Here is my CV, https://codeberg.org/adamhsparks/AHSparks_CV

Windows session details:

R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale:
[1] LC_COLLATE=English_Australia.1252  LC_CTYPE=English_Australia.1252    LC_MONETARY=English_Australia.1252
[4] LC_NUMERIC=C                       LC_TIME=English_Australia.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.8.3      pillar_1.9.0      compiler_4.0.3    plyr_1.8.7        tools_4.0.3       digest_0.6.29     jsonlite_1.8.8   
 [8] lubridate_1.9.3   evaluate_0.15     lifecycle_1.0.4   tibble_3.2.1      timechange_0.2.0  pkgconfig_2.0.3   rlang_1.1.3      
[15] bibtex_0.4.2.3    cli_3.6.2         rstudioapi_0.15.0 yaml_2.3.5        xfun_0.41         fastmap_1.1.0     RefManageR_1.4.0 
[22] dplyr_1.1.4       stringr_1.5.1     httr_1.4.7        knitr_1.38        xml2_1.3.3        hms_1.1.3         generics_0.1.2   
[29] vctrs_0.6.5       tidyselect_1.2.0  vitae_0.5.4       glue_1.6.2        R6_2.5.1          fansi_1.0.3       rmarkdown_2.25   
[36] bookdown_0.37     purrr_1.0.2       tidyr_1.3.0       tzdb_0.3.0        readr_2.1.5       magrittr_2.0.3    htmltools_0.5.2  
[43] utf8_1.2.2        tinytex_0.49      stringi_1.7.6     pak_0.7.1

MacOS session details:

R version 4.3.2 (2023-10-31)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.1

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Australia/Perth
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] utf8_1.2.4        generics_0.1.3    tidyr_1.3.0       xml2_1.3.6        stringi_1.8.3    
 [6] rsthemes_0.4.0    hms_1.1.3         digest_0.6.33     magrittr_2.0.3    evaluate_0.23    
[11] timechange_0.2.0  bookdown_0.37     fastmap_1.1.1     plyr_1.8.9        jsonlite_1.8.8   
[16] backports_1.4.1   vitae_0.5.4       httr_1.4.7        purrr_1.0.2       fansi_1.0.6      
[21] bibtex_0.5.1      cli_3.6.2         rlang_1.1.3       yaml_2.3.8        tools_4.3.2      
[26] tzdb_0.4.0        dplyr_1.1.4       credentials_2.0.1 curl_5.2.0        vctrs_0.6.5      
[31] R6_2.5.1          lifecycle_1.0.4   lubridate_1.9.3   RefManageR_1.4.0  stringr_1.5.1    
[36] pkgconfig_2.0.3   pillar_1.9.0      later_1.3.2       rsconnect_1.2.0   glue_1.7.0       
[41] Rcpp_1.0.11       xfun_0.41         tibble_3.2.1      tidyselect_1.2.0  rstudioapi_0.15.0
[46] sys_3.4.2         knitr_1.45        htmltools_0.5.7   rmarkdown_2.25    readr_2.1.4      
[51] compiler_4.3.2    askpass_1.2.0     openssl_2.1.1    
mitchelloharawild commented 10 months ago

Seems to be a tricky issue - I'm also encountering this in other projects, my best guess is that it relates to pandoc versions. Any insight is appreciated.

JJGabe commented 10 months ago

Just to assist in the troubleshooting (sorry, I'm not good enough in R or LaTeX to really investigate it) I wanted to point out that I'm still able to do everything I need with vitae 0.5.3. I'm running R version 4.3.2 on Ubuntu 22.04, though I can't say with certainly which pandoc version rmarkdown uses to render. In RStudio, I have pandoc 0.2.0 in my package list but rmarkdown::pandoc_version() outputs 3.1.1 and running pandoc --version in a terminal outputs 2.9.2.1.

antshevans commented 10 months ago

I've also been hitting this issue on macOS 14.2.1 even after updating vitae to the latest dev version. Thanks to @JJGabe I checked pandoc --version in terminal and got command not found. Manually installing pandoc from their website to 3.1.11.1 now matches the output from rmarkdown::pandoc_version(), and more importantly has fixed the issue for me.

I don't know enough about LaTeX to offer insight but perhaps this is useful for others.

JJGabe commented 10 months ago

Nice. Out of curiosity @antshevans, did upgrading the pandoc version solve the problem for you while still using vitae v0.5.4? Or did you still need to revert to vitae v0.5.3?

antshevans commented 10 months ago

It works with v0.5.4 without any reverting needed. Your comment couldn't have been better timed, today was the first time updating my CV in months!

Here's my session info with vitae loaded:

R version 4.3.1 (2023-06-16)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.2.1

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/London
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils    
[5] datasets  methods   base     

other attached packages:
[1] vitae_0.5.4

loaded via a namespace (and not attached):
 [1] utf8_1.2.4        R6_2.5.1         
 [3] xfun_0.41         tidyselect_1.2.0 
 [5] magrittr_2.0.3    glue_1.7.0       
 [7] tibble_3.2.1      knitr_1.45       
 [9] pkgconfig_2.0.3   dplyr_1.1.4      
[11] generics_0.1.3    lifecycle_1.0.4  
[13] cli_3.6.2         fansi_1.0.6      
[15] vctrs_0.6.5       compiler_4.3.1   
[17] rstudioapi_0.15.0 tools_4.3.1      
[19] pillar_1.9.0      rlang_1.1.3
adamhsparks commented 10 months ago

I suspect it's a Pandoc version thing too. I'll try tomorrow with the latest version and see if I get any love. Thanks for the work on this @mitchelloharawild. Aside from this issue, it's made my life much easier for several years now!

JJGabe commented 10 months ago

Cool, I'll test this later on my machine. The only difference I can see is that you are running R 4.3.1 and I'm running 4.3.2, released 2023-10-31

Crismoc commented 10 months ago

Hi, I just want to contribute that just by updating pandoc it started working again, all else remaining the same. Before the update, it was not possible to compile. I'm running R 4.3.0 in Ubuntu 22.04, vitae 0.5.4.

JJGabe commented 10 months ago

The update to pandoc v 3.1.11.1 also worked for me when using vitae 0.5.4! However, during the rendering I get a bunch of warning messages saying [WARNING] Citeproc: citation X not found. I get the warning multiple times for each entry and in one case, I get the warning for a reference that is not even in the bibtex file I'm bringing in (that one really confuses me). I did not get those warnings when using vitae 0.5.3 just a few hours ago.

In the end though, the pdf renders as it is supposed to and all the necessary references are there, so aside from irking my obsessive nature (I hate seeing warnings) everything seems to be working fine on my machine!

OS: Ubuntu 22.04 R: 4.3.2 pandoc: 3.1.11.1 vitae: 0.5.4

FinYang commented 10 months ago

This issue is introduced in v0.5.4, and more specifically 738a98ce68f822fd8a5d3d0baa61a11acecd36ba. It is introduced into each template separately. For example, in awesomecv it is this line: https://github.com/mitchelloharawild/vitae/blob/738a98ce68f822fd8a5d3d0baa61a11acecd36ba/inst/rmarkdown/templates/awesomecv/resources/awesome-cv.tex#L156 with this \begin{list} and later the \end{list}. (Don't know latex or pandoc well enough to know what it means, sorry)

I had this issue with the pandoc v3.1.1 shipped with Rstudio. Removing these lists can fix the issue. Installing v3.1.11.1 separately also works. It seems rmarkdown compiles with the highest version pandoc that is available on the machine. Looks like this syntax might not be supported in an older version. So the very commit that was originally used to solve this very issue, dealing with the changes in pandoc, used a fix that is only possible with the new changes of pandoc, and introduced a bug with older versions...

Also getting the [WARNING] Citeproc: citation X not founds

mitchelloharawild commented 10 months ago

Thanks for looking into it @FinYang, the list element is from the latest version of pandoc.

https://github.com/jgm/pandoc/blob/734f86061893e81a14ef94432555f4edd24b2b8f/data/templates/default.latex#L370-L404

Perhaps the template can be changed to support both versions.

adamhsparks commented 10 months ago

I'm not so sure it's fixed with Pandoc v3.1.11.1. That's what is currently on the machine (MacBook w/ Sonoma) I'm using now and I still get this error. 🙁

eikeluedeling commented 10 months ago

Updating Pandoc solved the problem for me! Thanks @mitchelloharawild for pointing to this solution.

Kale-23 commented 10 months ago

For those who aren't able to fix this issue permanently and need to generate a CV quickly, if you go into the generated .tex file and add \item between each entry between the \begin{CSLReferences}{1}{0} and \end{CSLReferences} section, you will be able to generate a complete CV including that reference section. You will have to add the \items each time you knit the Rmd file

JJGabe commented 10 months ago

Thanks, @Kale-23. Even though my CV is working now, I was still curious where that list was showing up that required an \item. I also understand the whole build process better now, too!

jslingsby commented 9 months ago

Same issue, but updating RStudio resolved it

rmarkdown::pandoc_version() returned 3.1.1, and pandoc --version returned nothing. Installing from pandoc directly (v3.1.12.1) did not fix the problem, but updating RStudio did (rmarkdown::pandoc_version() now returns 3.1.12.1).

mitchelloharawild commented 9 months ago

Great, good to know that the latest version of RStudio includes a compatible version of pandoc - thanks! So for now (and probably for a while, unless someone can suggest a fix) updating RStudio or pandoc is a workable solution.

michielvandijk commented 8 months ago

In my case it did not resolve the issue. I installed the latest RStudio version: 2023.12.1 Build 402 but when I run rmarkdown::pandoc_version() it says: ‘3.1.1’. I guess my problem is that I need Pandoc version 3.1.12.1 instead of 3.1.1. How do I update pandoc in Rstudio to the correct version as apparently, in my case, installing the latest version of RStudio did not work? Note that I use R version 4.3.2 on a Windows machine and have installed the development version of Vitae.

XinweiBuffalo commented 8 months ago

In my case it did not resolve the issue. I installed the latest RStudio version: 2023.12.1 Build 402 but when I run rmarkdown::pandoc_version() it says: ‘3.1.1’. I guess my problem is that I need Pandoc version 3.1.12.1 instead of 3.1.1. How do I update pandoc in Rstudio to the correct version as apparently, in my case, installing the latest version of RStudio did not work? Note that I use R version 4.3.2 on a Windows machine and have installed the development version of Vitae.

@michielvandijk I tried to update/reinstall pandoc in terminal and the version is now 3.1.12.1, however I couldn't use this version in rmarkdown. So I copied the path from youtpath <- pandoc::pandoc_locate() and then rmarkdown::find_pandoc(cache = FALSE, dir = yourpath). But this is not enough for render your .rmd file. pandoc::with_pandoc_version( version = '3.1.12.2', rmarkdown::render('your/rmd/file.Rmd') ) can produce the correct output

XinweiBuffalo commented 8 months ago

@michielvandijk one more option: just add knit: ( \(input, ...) pandoc::with_pandoc_version("3.1.12.2", rmarkdown::render(input)) ) in the header after output: vitae::awesomecv: page_total: true

arnold-c commented 7 months ago

Another data point to this - I found that renaming the ::::: {#refs .refs} block to ::::: {#bib .refs} in my Rmd file did the trick, though it now just produces [WARNING] Citeproc: citation X not found warning (though no errors in the PDF produced), and the font is slightly different.

The reason for keeping the block is that I use the following lua filter to find reference blocks and then bold my name.

❯ pandoc -v
pandoc 3.1.13
Features: +server +lua
Scripting engine: Lua 5.4
$> rmarkdown::pandoc_version()
‘3.1.13’

 r$> Sys.info()
sysname "Darwin"
release "23.4.0"
version "Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:41 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T8103"
nodename X
machine "arm64"
login X
user X
effective_user X

 r$> sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.4.1

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/Toronto
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base

other attached packages:
 [1] glue_1.7.0      here_1.0.1      readxl_1.4.2    lubridate_1.9.2 forcats_1.0.0   stringr_1.5.0   dplyr_1.1.4     purrr_1.0.1     readr_2.1.4     tidyr_1.3.0
[11] tibble_3.2.1    ggplot2_3.4.2   tidyverse_2.0.0 icons_0.2.0     rorcid_0.7.0    vitae_0.5.4

loaded via a namespace (and not attached):
 [1] gtable_0.3.3      xfun_0.43         lattice_0.21-9    tzdb_0.4.0        vctrs_0.6.5       tools_4.3.2       generics_0.1.3    curl_5.0.1        fansi_1.0.6
[10] pkgconfig_2.0.3   httpgd_1.3.1      lifecycle_1.0.4   compiler_4.3.2    tinytex_0.50      munsell_0.5.0     htmltools_0.5.8.1 yaml_2.3.8        later_1.3.1
[19] pillar_1.9.0      crayon_1.5.2      whisker_0.4.1     tidyselect_1.2.1  digest_0.6.35     stringi_1.7.12    rsvg_2.4.0        rprojroot_2.0.3   fastmap_1.1.1
[28] grid_4.3.2        colorspace_2.1-0  cli_3.6.2         magrittr_2.0.3    crul_1.4.0        utf8_1.2.4        withr_3.0.0       scales_1.2.1      rappdirs_0.3.3
[37] timechange_0.2.0  rmarkdown_2.26.1  httr_1.4.6        cellranger_1.1.0  zoo_1.8-12        hms_1.1.3         evaluate_0.23     knitr_1.45        rlang_1.1.3
[46] Rcpp_1.0.10       httpcode_0.3.0    xml2_1.3.4        renv_0.15.4-44    fauxpas_0.5.2     rstudioapi_0.14   jsonlite_1.8.8    R6_2.5.1          systemfonts_1.0.4
michielvandijk commented 7 months ago

With help of @XinweiBuffalo I managed to solve the problem. I did the following:

paezha commented 6 months ago

I had it working in this configuration:

R version 4.3.3 (2024-02-29 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8

time zone: Europe/Paris tzcode source: internal

attached base packages: [1] stats graphics grDevices datasets utils methods base

loaded via a namespace (and not attached): [1] vctrs_0.6.5 cli_3.6.2 knitr_1.46 rlang_1.1.3 xfun_0.43
[6] stringi_1.8.3 purrr_1.0.2 renv_1.0.5 generics_0.1.3 glue_1.7.0
[11] colorspace_2.1-0 htmltools_0.5.8.1 fansi_1.0.6 scales_1.3.0 rmarkdown_2.26
[16] grid_4.3.3 evaluate_0.23 munsell_0.5.1 tibble_3.2.1 fastmap_1.1.1
[21] yaml_2.3.8 lifecycle_1.0.4 stringr_1.5.1 compiler_4.3.3 dplyr_1.1.4
[26] pkgconfig_2.0.3 timechange_0.3.0 rstudioapi_0.16.0 digest_0.6.35 R6_2.5.1
[31] tidyselect_1.2.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 ggthemes_5.1.0
[36] vitae_0.5.2 tools_4.3.3 gtable_0.3.4 lubridate_1.9.3 ggplot2_3.5.0

AND:

RStudio 2023.12.1+402 "Ocean Storm" Release (4da58325ffcff29d157d9264087d4b1ab27f7204, 2024-01-29) for windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2023.12.1+402 Chrome/116.0.5845.190 Electron/26.2.4 Safari/537.36

Then I updated RStudio to 2024.04.0 and it stopped working. I reverted to RStudio 2023.12.1 and it works again.

mitchelloharawild commented 5 months ago

I've added a pandoc version check which should hopefully fix this issue for all versions of pandoc. Let me know if you're still having issues with the development version of the package.

plbaldoni commented 2 months ago

I am still having issues, even using package version 0.5.4. Others seem to be experiencing the same issue as well #266

paulparedes commented 1 month ago

Maybe this will help someone: I had the same problem until today even using vitae 0.5.3 which used to work. What I did was to reinstall pandoc in Rstudio, but when I tried to follow the step pointed out by @michielvandijk of pandoc::pandoc_install() when typing that command the following popup message appeared: Error in fetch(key) : lazy-load database '/home/paul/R/x86_64-pc-linux-gnu-library/4.2/pandoc/help/pandoc.rdb' is corrupt. What I did was: close Rstudio; then, rm -rf /home/paul/R/x86_64-pc-linux-gnu-library/4.2/pandoc/help/pandoc.rdb; then, install.packages(“pandoc”); then, update.packages(ask = FALSE); I restarted Rstudio and total happiness. Vitae is now working with version 0.6.0.

This is my session info:

sessionInfo() R version 4.2.2 Patched (2022-11-10 r83330) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Debian GNU/Linux 12 (bookworm)

Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.11.0 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.11.0

locale: [1] LC_CTYPE=es_PE.UTF-8 LC_NUMERIC=C LC_TIME=es_PE.UTF-8 LC_COLLATE=es_PE.UTF-8
[5] LC_MONETARY=es_PE.UTF-8 LC_MESSAGES=es_PE.UTF-8 LC_PAPER=es_PE.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=es_PE.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached): [1] fansi_1.0.6 utf8_1.2.4 digest_0.6.37 dplyr_1.1.4 rappdirs_0.3.3 R6_2.5.1
[7] lifecycle_1.0.4 magrittr_2.0.3 evaluate_1.0.0 pillar_1.9.0 rlang_1.1.4 cli_3.6.3
[13] fs_1.6.4 rstudioapi_0.16.0 generics_0.1.3 vctrs_0.6.5 rmarkdown_2.28 tools_4.2.2
[19] glue_1.7.0 xfun_0.47 yaml_2.3.10 fastmap_1.2.0 compiler_4.2.2 pkgconfig_2.0.3
[25] pandoc_0.2.0 htmltools_0.5.8.1 vitae_0.6.0 tidyselect_1.2.1 knitr_1.48 tibble_3.2.1

plbaldoni commented 1 month ago

I now realize what the real issue was for me.

I split my reference section in my CV into subsections (peer reviewed papers, preprints, etc.) and one of the subsections had no entries. This caused the following lines in my .tex document to trigger the error ! LaTeX Error: Something's wrong--perhaps a missing \item.:

\begin{CSLReferences}{0}{0}
\end{CSLReferences}