Using tikz graphdrawing library within RMarkdown … Need to use lualatex engine, but can't get it to work
问题 I have the following code in an rmd file which leverages tikz for diagrams: --- title: "TestNonTufteLua" author: "Me" output: pdf_document : latex_engine: lualatex --- Prove tikz works: ```{r tikTest1, engine = "tikz"} \usetikzlibrary{shapes} \begin{tikzpicture} \node[ellipse, draw=black, align = center] (Data) {Data $y_{n}$}; \end{tikzpicture} ``` Then, when you set `eval = TRUE` in the below code, it will not work. ```{r tikTest2, eval = FALSE, engine = "tikz"} \usetikzlibrary{graphs,