Tinytex: RMarkdown Knit-to-PDF problem: PDF file created with code but no output

Created on 9 Feb 2021  路  2Comments  路  Source: yihui/tinytex

Hello Yihui,

I encountered a problem with the process of producing the PDF version of RMarkdown files. Before clicking on the Knit-to-pdf button, I already ran every chunk of code and every output was shown right under (see picture 1). After hitting the Knit-to-PDF button, the PDF file was successfully produced, but it only contains the code I wrote but did not contain any output of the code (see picture 2). So could you give me a hand and provide any suggestions to solve this problem? Thanks!

image

image

question

All 2 comments

Hi @FrederickZhengHe,

Can you follow the issue guide please: https://yihui.org/issue/ ?

It would help us to have a reproducible example.

I don't think this is something related to tinytex - I believe this is something specific to skimr.

As you can see in the doc website (https://docs.ropensci.org/skimr), this package have some requirements on fonts, and may not work perfectly for PDF output (at least differently than for HTML). You should follow the advices there (look at the article about fonts).

If issue, you should ask a question on RStudio Community which have a broader audience, and for sure some people who may have tried already what you want.

It is possible it is an issue in skimr, but I don't see what could be done in tinytex.

Are you ok with that ?

And also, this simple example works ok (if you have the fonts installed - it is required for the histogram or sparkline to show)

````markdown

title: "Test"
mainfont: DejaVu Sans
output:
pdf_document:
latex_engine: xelatex

font-family: Times New Roman

{r} library(skimr) faithful %>% skim()
````

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nickp60 picture nickp60  路  6Comments

Sakura-gh picture Sakura-gh  路  6Comments

RogerRodrigo1 picture RogerRodrigo1  路  5Comments

MilesMcBain picture MilesMcBain  路  5Comments

matthewgson picture matthewgson  路  3Comments