mitchelloharawild / vitae

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

bibliography_entries() propblems on missing "\item" for every publication list (bug) #251

Closed byronchu77 closed 2 weeks ago

byronchu77 commented 3 months ago

There is a now in the bibliography_entries() function, which is likely due to a missing "\item" for the lists of publications. I use the template of Hyndman to test this, the error message comes as "! LaTeX Error: Something's wrong--perhaps a missing \item." When I checked the .tex file, and found the problem lies in these code:

\section{Publications}\label{publications}}

\hypertarget{refs-9ab79af7a94489e94e6182750a67b967}{}
\begin{CSLReferences}{0}{0}
\leavevmode\vadjust pre{\hypertarget{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/}}

\leavevmode\vadjust pre{\hypertarget{ref-R-tibble}{}}%
\CSLLeftMargin{2. }%
\CSLRightInline{Müller, K., \& Wickham, H. (2023). \emph{Tibble: Simple
data frames}. \url{https://tibble.tidyverse.org/}}

\end{CSLReferences}

I tried to insert an "\item" in front of each list, and it worked.

\begin{CSLReferences}{0}{0}
    \item \leavevmode\vadjust pre{\hypertarget{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/}}

    \item \leavevmode\vadjust pre{\hypertarget{ref-R-tibble}{}}%
        \CSLLeftMargin{2. }%
        \CSLRightInline{Müller, K., \& Wickham, H. (2023). \emph{Tibble: Simple data frames}. \url{https://tibble.tidyverse.org/}}
\end{CSLReferences}

I figured it because the function, "bibliography_entries()", needed to be updated since I did not have this problem one month ago. The issue might be due to the recent update in R or latex itself.

Thank you.

the-tave commented 2 months ago

Thanks for describing this issue! I kept getting an Error saying "! LaTeX Error: Something's wrong--perhaps a missing \item." and I couldn't figure it out. Is there a possible work-around directly in the Rmd file? Or maybe a patch coming up? Cheers

plbaldoni commented 1 month ago

I am experiencing the same issue

jdtonkin commented 1 month ago

Same here

mitchelloharawild commented 1 month ago

This is discussed further in #246, I believe it is a pandoc versioning issue. Any fixes which work with all versions of pandoc are welcomed.

mitchelloharawild commented 2 weeks ago

Closing as duplicate of #246