【发布时间】:2017-05-01 16:33:54
【问题描述】:
我在这里阅读了如何添加使我能够将页面更改为横向的内容: enter link description here
但是,我已经将 header.tex 文件保存在我能想到的所有地方,但我最终仍然收到以下错误:
Called from: (function (e)
{
if (inherits(e, "shiny.silent.error"))
return()
handle <- getOption("shiny.error")
if (is.function(handle))
handle()
})(list(message = "pandoc document conversion failed with error 43",
call = NULL))
Browse[1]>
我知道这对我输入 \blandscape 和 \elandscape 是有好处的,因为一旦我删除这些命令,PDF 就会工作。我需要帮助的是找出将 header.tex 文件保存到的位置,以便 Rmarkdown 知道如何找到它。提前感谢大家的帮助!
跟进: 接受 scoa 关于将其添加到我的标题的建议,我将我的 Rmd 文件的顶部编辑为以下内容。不幸的是,它仍然没有工作。
---
title: "Lake Report"
output: pdf_document
header-includes:
- \usepackage{lscape}
- \newcommand{\blandscape}{\begin{landscape}}
- \newcommand{\elandscape}{\end{landscape}}
---
\newpage
\blandscape
```{r Non-Seasonal MK results, echo=FALSE}
# MKanalysis <- reactive(HM_MK(data = NonSeasonalData(),n = 4))
kable(MKanalysis(), caption = "Non-Seasonal Trend Analysis")
```
The results of the Mann Kendall analysis....
\elandscape
Latex 程序/版本:pdfTex,版本 3.14159265-2.6-1.40.17
【问题讨论】:
-
为了调试问题,它通常有助于先转换为乳胶 (
pandoc input.md -o file.tex) 并使用pdflatex file.tex运行它以查看究竟是什么问题... -
问题是 Rmarkdown 无法识别命令 \blandscape 和 \elandscape。删除这两个命令后,PDF 导出。感谢您的帮助!
标签: r-markdown landscape pandoc shiny