Error: LaTeX failed to compile CV-Example.tex

I was trying to Knit an Rmd file - CV-Example from CV Template to pdf. I got an error:

output file: CV-Example.knit.md

! LaTeX Error: Something's wrong--perhaps a missing \item.

Error: LaTeX failed to compile CV-Example.tex. See The R package tinytex - Helper Functions to Manage TinyTeX, and Compile LaTeX Documents - Yihui Xie | 谢益辉 for debugging tips. See CV-Example.log for more info.
Execution halted

Could someone please help with it?

Hard to say exactly without seeing the source tex file. General situation:

The LaTeX error ! LaTeX Error: Something's wrong--perhaps a missing \item. typically occurs in a list environment, such as itemize, enumerate, or description. This error suggests that LaTeX was expecting an \item command but didn't find it. Here are a few possible reasons for this error:

  1. Missing \item Command: The most common cause is simply forgetting to put the \item command before each item in a list.

    \begin{itemize}
    \item First item
    \item Second item
    % If you forget \item here, you'll get the error
    Third item
    \end{itemize}
    
  2. Misplaced Text or Commands: Sometimes, text or commands that are not part of an item might be placed within a list environment, and if this text isn't preceded by an \item, it can trigger the error.

    \begin{enumerate}
    \item First item
    Text without an item tag
    \item Second item
    \end{enumerate}
    
  3. Nested Lists: If you have nested lists, ensure that each inner list item also starts with \item. Missing \item in nested lists can cause this error.

    \begin{itemize}
    \item First item
      \begin{enumerate}
      \item Nested item
      Missing \item here
      \end{enumerate}
    \item Second item
    \end{itemize}
    
  4. Corrupted Auxiliary Files: In rare cases, corrupted auxiliary files (.aux, .toc, etc.) can cause weird errors. Rebuilding the LaTeX document from scratch can sometimes fix these issues.

To resolve the error, check the list environments in your LaTeX document and ensure that each item begins with an \item command. Also, look for any misplaced text or commands within these environments. If the problem persists, try rebuilding the document from scratch to rule out issues with auxiliary files.

This is the source file. It is pretty straightforward.

---
name: Marie
surname: Curie
position: "Professor"
address: "School of Physics & Chemistry, École Normale Supérieure"
phone: +1 22 3333 4444
pronouns: she/her
profilepic: mariecurie.jpg
www: mariecurie.com
email: "Marie.Curie@ens.fr"
twitter: mariecurie
github: mariecurie
linkedin: mariecurie
date: "`r format(Sys.time(), '%B %Y')`"
aboutme: "Marie is a Polish and naturalized-French physicist and chemist who conducts pioneering research on radioactivity."
output: vitae::twentyseconds
---
knitr::opts_chunk$set(echo = FALSE

* List item

, warning = FALSE, message = FALSE)
library(vitae)
# Some stuff about me

 * I poisoned myself doing research.
 * I was the first woman to win a Nobel prize
 * I was the first person and only woman to win a Nobel prize in two different sciences.

# Education

```{r}
library(tibble)
tribble(
  ~ Degree, ~ Year, ~ Institution, ~ Where,
  "Informal studies", "1889-91", "Flying University", "Warsaw, Poland",
  "Master of Physics", "1893", "Sorbonne Université", "Paris, France",
  "Master of Mathematics", "1894", "Sorbonne Université", "Paris, France"
) %>% 
  detailed_entries(Degree, Year, Institution, Where)
# Nobel Prizes

```{r}
tribble(
  ~Year, ~Type, ~Desc,
  1903, "Physics", "Awarded for her work on radioactivity with Pierre Curie and Henri Becquerel",
  1911, "Chemistry", "Awarded for the discovery of radium and polonium"
) %>% 
  brief_entries(
    glue::glue("Nobel Prize in {Type}"),
    Year, 
    Desc
  )
# Publications

```{r}
library(dplyr)
knitr::write_bib(c("vitae", "tibble"), "packages.bib")

bibliography_entries("packages.bib") %>%
  arrange(desc(author$family), issued)
1 Like

That won't work with the * List item. Make the setup chunk look like

'```{r setup}
library(dplyr)
library(tibble)
library(vitae)
knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE)
'```

after fixing the delimiting fence.

Then fix the setup chunk not to echo. There's no LaTeX related error.

Hi there, I am having the same issue working on Coursera. I have followed this conversation and still no luck. Did you figure it out? Could you please help?

I suppose the quoted yaml statement leads to a pdf-output. Is it possible to get an html output from this package/template? If so try that first, to be sure that there are no errors in your R-code.

When copying Rmd- input to this forum enclose the input by four backticks (`) to make it easy to see the various code and text blocks.

Heads to some of you in the thread: Please do format you Rmd code correctly !

FAQ: How to Format R Markdown Source

This will make your post easier to read and copy-paste to reproduce.

Thank you !

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.