适配为文章模版
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
author: "中国科学院生态环境研究中心"
|
||||
lang: zh
|
||||
date: today
|
||||
csl: _extensions/inst/china-national-standard-gb-t-7714-2015-numeric.csl
|
||||
csl: _extensions/inst/tex/china-national-standard-gb-t-7714-2015-numeric.csl
|
||||
format:
|
||||
html:
|
||||
theme: cosmo
|
||||
keep-md: true
|
||||
css: _extensions/inst/style.css
|
||||
css: _extensions/inst/css/style.css
|
||||
code-link: true
|
||||
epub: default
|
||||
pdf:
|
||||
@@ -28,7 +28,7 @@ format:
|
||||
docx:
|
||||
toc: false
|
||||
highlight-style: github
|
||||
reference-doc: _extensions/inst/repcn.docx
|
||||
reference-doc: _extensions/inst/word/repcn.docx
|
||||
---
|
||||
|
||||
::: {.content-visible when-format="html"}
|
||||
@@ -1,72 +0,0 @@
|
||||
---
|
||||
author: "中国科学院生态环境研究中心"
|
||||
lang: zh
|
||||
date: today
|
||||
csl: _extensions/inst/china-national-standard-gb-t-7714-2015-numeric.csl
|
||||
format:
|
||||
html:
|
||||
theme: cosmo
|
||||
keep-md: true
|
||||
css: _extensions/inst/style.css
|
||||
code-link: true
|
||||
epub: default
|
||||
pdf:
|
||||
pdf-engine: xelatex
|
||||
keep-tex: false
|
||||
toc-title: 目录
|
||||
classoption:
|
||||
- 12pt
|
||||
- lang=cn
|
||||
- chinesefont=founder # founder|ctexfont|nofont
|
||||
- scheme=chinese
|
||||
- color=blue # blue|green|
|
||||
- titlestyle=hang
|
||||
# - twoside
|
||||
header-includes:
|
||||
- \usepackage{ctex}
|
||||
- \linespread{1.5}
|
||||
docx:
|
||||
toc: false
|
||||
highlight-style: github
|
||||
reference-doc: _extensions/inst/repcn.docx
|
||||
---
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
::: {.content-visible when-format="html"}
|
||||
# Color tip {.unnumbered}
|
||||
|
||||
- [Something should be deleted]{.del}
|
||||
- [Something bad]{.bad}
|
||||
- [Something good]{.good}
|
||||
- [Something todo]{.todo}
|
||||
- [Something should be added]{.add}
|
||||
- [I am a comment]{.com}
|
||||
:::
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# 摘要
|
||||
|
||||
# 项目背景与国内外现状介绍
|
||||
|
||||
# 主要进展1
|
||||
|
||||
# 主要进展2
|
||||
|
||||
# 结论与下一步计划
|
||||
|
||||
|
||||
# 参考文献{-}
|
||||
+14
-3
@@ -1,5 +1,6 @@
|
||||
---
|
||||
subtitle: "研究报告"
|
||||
lang: "zh"
|
||||
---
|
||||
|
||||
```{r}
|
||||
@@ -12,9 +13,19 @@ rmdify::rmd_init()
|
||||
|
||||
```{r}
|
||||
#| output: asis
|
||||
dir(".", pattern = "[_-]") |>
|
||||
purrr::map(~paste0("## [", .x, "](", .x, "/index.qmd)\n\n")) |>
|
||||
unlist() |>
|
||||
|
||||
data.frame(fd = dir(".", pattern = "[-_]")) |>
|
||||
dplyr::mutate(fn = purrr::map_chr(fd, ~ file.path(.x, dir(.x,
|
||||
pattern = "index.qmd|index.doc|index.pdf|index.ppt")))) |>
|
||||
dplyr::transmute(htmlstr = purrr::map_chr(fn, ~ paste0("## [", .x, "](", .x, ")\n\n",
|
||||
ifelse(!grepl("qmd$", .x), "",
|
||||
paste0("<iframe title='",
|
||||
gsub("^.*[_-]([^\\/]*)\\/.*$", "\\1", .x),
|
||||
"' width=800 height=600 src = '",
|
||||
gsub("qmd$", "html", .x),
|
||||
"'></iframe>\n\n"))))) |>
|
||||
dplyr::pull(htmlstr) |>
|
||||
paste(collapse = "") |>
|
||||
cat()
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user