Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jooyoungseo opened this issue Nov 2, 2023 · 41 comments
Assignees
Labels
bug Something isn't working priority

Comments

@jooyoungseo
Copy link
Contributor

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
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
Copy link
Contributor Author

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
Copy link
Contributor Author

jooyoungseo commented Nov 3, 2023

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
Copy link

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
Copy link

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 mitchelloharawild self-assigned this Nov 23, 2023
@mitchelloharawild mitchelloharawild added bug Something isn't working priority labels Nov 23, 2023
@mitchelloharawild mitchelloharawild changed the title awsomecv: LaTeX Error: Lonely \item--perhaps a missing list environment. bibliography_entries(): Lonely \item--perhaps a missing list environment. Nov 23, 2023
@mitchelloharawild
Copy link
Owner

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
Copy link
Owner

mitchelloharawild commented Nov 23, 2023

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
Copy link

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
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
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
Copy link
Owner

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
Copy link

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: [email protected]
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
Copy link
Owner

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
Copy link

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
Copy link
Owner

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
Copy link

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
Copy link

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
Copy link

harrycheon commented Dec 23, 2023

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
Copy link

JJGabe commented Jan 7, 2024

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
Copy link

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
Copy link

adamhsparks commented Jan 11, 2024

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
Copy link
Owner

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
Copy link

JJGabe commented Jan 22, 2024

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
Copy link

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
Copy link

JJGabe commented Jan 22, 2024

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
Copy link

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
Copy link

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
Copy link

JJGabe commented Jan 22, 2024

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
Copy link

Crismoc commented Jan 22, 2024

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
Copy link

JJGabe commented Jan 22, 2024

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
Copy link

FinYang commented Jan 22, 2024

This issue is introduced in v0.5.4, and more specifically 738a98c. It is introduced into each template separately. For example, in awesomecv it is this line:


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
Copy link
Owner

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
Copy link

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
Copy link

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

@Kale-23
Copy link

Kale-23 commented Jan 27, 2024

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
Copy link

JJGabe commented Jan 28, 2024

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
Copy link

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
Copy link
Owner

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
Copy link

michielvandijk commented Mar 1, 2024

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
Copy link

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
Copy link

@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
Copy link

arnold-c commented Apr 20, 2024

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.13r$> 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
Copy link

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

  • Installed the R pandoc package.
  • pandoc::pandoc_install() to install the latest version of pandoc (now 3.1.13). I also installed this version from the pandoc website before but then R could not find it. Not sure where R pandoc stores it but I assume it also sets the location for R somehow.
  • Added: knit: (function(input, ...) { pandoc::with_pandoc_version("3.1.13", rmarkdown::render(input)) }) in the yaml (so between ---) of the rmarkdown CV file.
    When pressing knit, the CV is created without the error as before.

@paezha
Copy link

paezha commented May 4, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority
Projects
None yet
Development

No branches or pull requests