Rmarkdown:编织的PDF有太多的空白空间

问题描述

我是Rmarkdown的新手。我今天才开始使用R进行工作,我发现编织的PDF中有很多空白。标题之前和之后,代码块之前和之后,r输出之前和之后。起初我以为这是默认设置,但是在网上看到一些教程之后,我注意到我发现的所有示例都具有更加紧凑的针织PDF格式。也就是说,在我的PC上使用相同的rmd文件编织PDF会比在其他PC上产生更多的空白空间。以下是使用相同rmd代码的示例:

---
title: "Untitled"
output:
  html_document: default
  pdf_document: default
---

```{r setup,include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

## R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML,PDF,and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.

> This is a quote

This is a link: <http://rmarkdown.rstudio.com>

When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

```{r cars}
summary(cars)
```

在其他人的PC上,编织的PDF如下所示

enter image description here

在我的身上,看起来像这样

enter image description here

通知我的地方到处都有更大的差距。还是可以的,但是如果R输出绘图,由于绘图周围的所有空间,它基本上将占据整个页面。

一些背景故事:我在同一天安装了MikTex和R(我忘记了它们的安装顺序)。起初,我根本无法使用PDF。我搜索了一下,发现我需要安装tinytex,并且做到了。然后就变成了这样。我不知道我在想什么。我使用同一rmd编织的PDF与其他人的PDF有什么不同?

更新:我只是尝试重新安装所有内容。仍然不起作用。我尝试了uninstall.tinytex()并使用了MikTex。仍然不起作用。我真的很困惑我的PC如何生成不同的PDF ...

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...