首页 > 解决方案 > 在 Emacs 多模式中将 .Rmd 编​​织为 .pdf 和 .html 时如何获得簇绒样式的导出输出?

问题描述

在将文件(不是文件!)编织到 Emacs并在 Emacs 中使用polymode时,我试图获得簇绒样式的导出输出。但是,不考虑以下 YAML 代码... .Rmd.org.pdf.htmlknitr

---
title: "The title"
date: "2021-02-28"
draft: false
categories: [""]
runningheader: "The title" 
subtitle: ""
author: "Me"
output:
  tufte::tufte_handout:
  latex_engine: xelatex
tufte::tufte_book:
citation_package: natbib
latex_engine: xelatex
bibliography: library.bib
link-citations: no
header-includes:
- \usepackage{draftwatermark}
---

```{r, include=FALSE}
options(tinytex.verbose = TRUE)
```
---

```{r setup, include=FALSE}
library(tufte)
# invalidate cache when the tufte version changes
knitr::opts_chunk$set(cache.extra = packageVersion('tufte'))
options(htmltools.dir.version = FALSE)
```

polymode-export相反,当我在 Emacs 中使用命令时,polymode 使用其他输入来编织和导出。我现在想知道,polymode 从哪里获取输入,我该如何编辑它?

对于.pdf编织导致以下错误:

/usr/local/bin/pandoc +RTS -K512m -RTS kappa.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output /Users/joafr/Documents/phd/thesis/kappa/kappa-exported.tex --lua-filter /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --highlight-style tango --pdf-engine pdflatex --variable graphics --include-in-header /var/folders/nb/8g7b_8116yqccd8y72r8llh80000gn/T//RtmpUeFAws/rmarkdown-str525c5bcb4368.html --variable 'geometry:margin=1in' --citeproc 
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
I was unable to find any missing LaTeX packages from the error log kappa-exported.log.
! Undefined control sequence.
l.100 \newthought
                 {Collaborative approaches in research} are partly an 

Error: LaTeX failed to compile /Users/joafr/Documents/phd/thesis/kappa/kappa-exported.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See kappa-exported.log for more info.

至于.html输出,它呈现了一个语义正确的导出输出,但就我想要的字体和边注而言,样式不是 tufte 样式。

如果有人可以在这里帮助我,将不胜感激。而且我对使用 org-mode 不感兴趣,因为我更喜欢用 Rmarkdown 编写,所以请不要尝试将我转换为 org-mode。

标签: latexknitrpandocesstufte

解决方案


推荐阅读