这个 Github 存储库在 Rmarkdown 中托管我的论文模板,我正在尝试将其更新为四开本。但是,我无法摆脱 qmd 版本中的 TOC、LOT 和 LOF 标题。
我试过了
\addto\captionsportuguese{% since I'm setting Babel to Brazil
\renewcommand{\contentsname}%
{Whatever}%
}
Run Code Online (Sandbox Code Playgroud)
和
\renewcommand{\contentsname}{Whatever}
Run Code Online (Sandbox Code Playgroud)
当然,toc-title: ''在 yaml 中设置没有成功。它仍然打印“目录”。
有没有办法让 ggplot 图表采用 {xaringan} 演示文稿的所有幻灯片?如果我将其导出为 .png 并将其作为背景图片,我就可以做到这一点。但是直接从块输出呢?
是否可以使用 html 代码进行注释?我试图只为几个单词而不是整个文本着色。
library(tidyverse)
#> Warning: package 'ggplot2' was built under R version 4.0.2
mtcars %>%
ggplot(aes(x = hp, y = mpg)) +
geom_point() +
annotate(geom = "text", label = "I'm <span style='color: red;'>red</span> \n and i'm <span style='color: orange;'>orange</span>",
x = 250, y = 25)
Run Code Online (Sandbox Code Playgroud)

由reprex 包(v0.3.0)于 2020 年 8 月 22 日创建
fig.align='center'不会将Diagrammer绘图集中在Xaringan演示文稿中。有什么想法吗?
请参阅下面的代表。
---
title: "Title"
encoding: "UTF-8"
output:
xaringan::moon_reader:
self_contained: true
lib_dir: libs
css: [default]
nature:
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
ratio: "16:9"
---
exclude: true
```{r setup, include=FALSE}
knitr::opts_chunk$set(
echo = FALSE,
warning=FALSE,
message=FALSE,
comment = NA)
```
---
# TITLE
.center[Some text]
```{r title, out.height='50%', fig.align='center'}
DiagrammeR::grViz("
digraph {
# a 'graph' statement
graph [layout = twopi, overlap = false]
# several 'node' statements
node [shape = circle,
fontname = 'Century Gothic', …Run Code Online (Sandbox Code Playgroud)