标签集未在Rmarkdown中创建标签

时间:2020-03-25 12:46:44

标签: tabs r-markdown

我遇到了与本文相同的问题,.tabset突然停止工作: Tabs not rendering when knitting rmarkdown to html

我不知道如何使用devtools下载markdown的最新版本,无论如何这是一个过时的帖子,我敢肯定我确实有最新版本(2.1),没有其他安装方法它?哪个是正确的版本?还是有其他原因导致其无法正常工作? 它在我的办公室计算机上可以正常工作,但是现在我在家工作时无法访问它,我感到非常困惑。

提前感谢您的任何建议

编辑:我也在RStudio Cloud上尝试过,所以问题似乎出在某些软件包版本上,而不是我的计算机上,但是我不知道该怎么做

编辑2:另一个令人困惑的事情是,如果我从链接到的帖子中复制粘贴代码,它就可以工作!但是当我编写自己的文件(完全相同的方式)时却不行,而且我所有的旧文件也无法正常工作。但是我在这里发布代码时遇到了麻烦,因为#标签和代码块破坏了流程...我如何使它停留在一个代码块之内?

---
title: "Plot Tabs"
output: html_document
---

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

## Title {.tabset .tabset-fade .tabset-pills}

### tab 1

```{r}
plot(cars)
```

### tab 2

```{r}
plot(pressure)
```

如果有帮助,我在编织结束时收到的消息是:

输出文件:test2.knit.md

“ C:/ Users / Agata / AppData / Local / Pandoc / pandoc” + RTS -K512m -RTS test2.utf8.md --to html4 --from markdown + autolink_bare_uris + tex_math_single_backslash + smart --output test2.html --email混淆无-自包含--standalone --section-divs --template“ C:\ Users \ Agata \ Documents \ R \ win-library \ 3.6 \ rmarkdown \ rmd \ h \ default.html” --no-highlight --variable highlightjs = 1 --variable“ theme:bootstrap” --include-in-header“ C:\ Users \ Agata \ AppData \ Local \ Temp \ RtmpGm8blg \ rmarkdown-str232057c511a8.html”- mathjax-变量“ mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML” --lua-filter“ C:/Users/Agata/Documents/R/win-library/3.6/rmarkdown/rmd/lua/pagebreak.lua”- lua-filter“ C:/Users/Agata/Documents/R/win-library/3.6/rmarkdown/rmd/lua/latex-div.lua”

创建的输出:test2.html

最终编辑:似乎这部分是由于没有在标签后面加上空格,这也许是新markdown版本中的要求,尽管我仍然在最后收到奇怪的消息。我的会话信息是:

> sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252   
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.6.3 tools_3.6.3```

0 个答案:

没有答案
相关问题