ein neues leeres Dokument .rmd Mit dieser Code funktioniert:R knitr PDF Probleme mit include
![](RainbowDolphin.png)
\begin{center}
\includegraphics[width=4in]{RainbowDolphin.png}
\end{center}
Aber ohne die erste Zeile, es funktioniert nicht:
\begin{center}
\includegraphics[width=4in]{RainbowDolphin.png}
\end{center}
ich ein Fehler:
! Undefined control sequence.
l.71 \includegraphics
pandoc.exe: Error producing PDF from TeX source
Error: pandoc document conversion failed with error 43
In addition: Warning message:
running command '"C:/Program Files/RStudio/bin/pandoc/pandoc" Sampling_03.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output Sampling_03.pdf --template "C:\PROGRA~1\R\R-31~1.2\library\RMARKD~1\rmd\latex\default.tex" --highlight-style tango --latex-engine pdflatex --variable "geometry:margin=1in"' had status 43
Execution halted
Seltsam. Jede Hilfe wird geschätzt!
Way sauberer als die andere Antwort , hat für mich gearbeitet. –
FWIW, dies wurde zum Standardverhalten in rmarkdown gemacht, also funktioniert es auch, wenn Sie in YAML nicht 'graphics: yes' haben: https://github.com/rstudio/rarkdown/pull/538 Die Änderung wird in angezeigt die nächste Version von rmarkdown. –