Skip to content
Discussion options

You must be logged in to vote

I investigated this a bit further and found the template which knitr uses for tikz engines. It's located at .../AppData/Local/R/win-library/4.5/knitr/misc/tikz2pdf.tex and is essentially this:

\documentclass[
%% TIKZ_CLASSOPTION %%
tikz
]{standalone}
\usepackage{amsmath}
\usetikzlibrary{matrix}
%% EXTRA_TIKZ_PREAMBLE_CODE %%
\begin{document}
%% TIKZ_CODE %%
\end{document}

Trying to render this with pdflatex revealed that I was missing some package, which I then could install and everything works now. The issue at hand is that I'm using MiKTeX which shows an installation popup for missing packages which can't be handled by knitr.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mcanouil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
knitr diagrams About Diagram Quarto feature
2 participants