update template to adapt new drwater extensions
This commit is contained in:
@@ -0,0 +1 @@
|
||||
/.quarto/
|
||||
@@ -0,0 +1 @@
|
||||
/.quarto/
|
||||
@@ -1,72 +0,0 @@
|
||||
---
|
||||
author: "中国科学院生态环境研究中心"
|
||||
lang: zh
|
||||
date: today
|
||||
csl: _extensions/inst/tex/china-national-standard-gb-t-7714-2015-numeric.csl
|
||||
format:
|
||||
html:
|
||||
theme: cosmo
|
||||
keep-md: true
|
||||
css: _extensions/inst/css/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/word/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
|
||||
|
||||
# 结论与下一步计划
|
||||
|
||||
|
||||
# 参考文献{-}
|
||||
@@ -1,34 +1,66 @@
|
||||
---
|
||||
author: "中国科学院生态环境研究中心"
|
||||
lang: zh
|
||||
date: today
|
||||
csl: _extensions/inst/tex/china-national-standard-gb-t-7714-2015-numeric.csl
|
||||
author: "中国科学院生态环境研究中心"
|
||||
csl: _extensions/drwater/dwinst/china-national-standard-gb-t-7714-2015-numeric.csl
|
||||
isbook: true
|
||||
top-level-division: chapter
|
||||
classoption:
|
||||
- fntef
|
||||
- UTF8
|
||||
- zihao=-4 # 正文字号小四
|
||||
- lang=cn
|
||||
# - chinesefont=founder # founder|ctexfont|nofont
|
||||
- scheme=chinese
|
||||
- color=blue # blue|green|
|
||||
- titlestyle=hang
|
||||
# classoption: [oneside]
|
||||
titlepage: true
|
||||
keep-tex: false
|
||||
titlepage-rule-color: "360049"
|
||||
titlepage-text-color: "360049"
|
||||
titlepage-rule-height: 0
|
||||
titlepage-background: "_extensions/drwater/dwev/inst/cover1.pdf"
|
||||
titlepage-halign: "center" # flushleft | flushright
|
||||
title-vskip: -30em
|
||||
title-size: "Huge"
|
||||
author-vskip: -4em
|
||||
date-vskip: -1em
|
||||
caption-justification: centering
|
||||
numbersections: true
|
||||
parindent: true
|
||||
# titlepage-logo: "inst/rceeslogo.pdf"
|
||||
# logo-width: 20mm
|
||||
# logo-vskip: -8em
|
||||
# logo-hskip: "-6em"
|
||||
lang: zh-CN # 不能改为cn,否则目录等不是中文
|
||||
CJK: true
|
||||
fig-pos: "!t"
|
||||
colorlinks: true
|
||||
urlcolor: blue
|
||||
header-left: "\\leftmark"
|
||||
header-center: "\\hspace{1cm}"
|
||||
header-right: "第\\thepage 页"
|
||||
footer-left: "\\hspace{1cm}" # \\thetitle
|
||||
footer-center: "\\includegraphics[height=1.5em]{_extensions/drwater/dwev/inst/drwater-gray1.pdf}"
|
||||
footer-right: "\\hspace{1cm}"
|
||||
toc: true
|
||||
toc-own-page: true
|
||||
fig-toc: true
|
||||
CJKmainfont: "Noto Serif CJK SC"
|
||||
CJKmainboldfont: "NotoSerifCJKsc-Bold"
|
||||
CJKmainitalicfont: "NotoSansCJKsc-Light"
|
||||
CJKsansfont: "Noto Sans CJK SC"
|
||||
CJKmonofont: "Noto Sans Mono CJK SC"
|
||||
CJKoptions: |
|
||||
AutoFakeBold=true
|
||||
# include-in-header: header.tex
|
||||
# watermark: "drwater"
|
||||
# watermark-color: "gray!3"
|
||||
format:
|
||||
html:
|
||||
theme: cosmo
|
||||
keep-md: true
|
||||
css: _extensions/inst/css/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/word/repcn.docx
|
||||
dwhm-html: default
|
||||
dwms-docx: default
|
||||
# epub: default
|
||||
dwev-pdf: default
|
||||
---
|
||||
|
||||
::: {.content-visible when-format="html"}
|
||||
@@ -48,19 +80,13 @@ format:
|
||||
#| include: false
|
||||
#| cache: false
|
||||
lang <- "cn"
|
||||
RM <- "F" # global rendermode, L: load pdata; F: fast load pdf
|
||||
RM <- "F" # global rendermode, L: load pdata; F: fast load pdf
|
||||
isRendering <- !isTRUE(getOption('knitr.in.progress'))
|
||||
require(lubridate)
|
||||
require(tidyverse)
|
||||
require(patchwork)
|
||||
require(drwateR)
|
||||
require(rmdify)
|
||||
rmdify::rmd_init()
|
||||
require(langeR)
|
||||
require(dateR)
|
||||
require(uniteR)
|
||||
require(limvis)
|
||||
require(sf)
|
||||
```
|
||||
|
||||
# 摘要
|
||||
|
||||
+33
-5
@@ -1,6 +1,7 @@
|
||||
---
|
||||
subtitle: "研究报告"
|
||||
lang: "zh"
|
||||
format: dwhm-html
|
||||
---
|
||||
|
||||
```{r}
|
||||
@@ -13,13 +14,40 @@ rmdify::rmd_init()
|
||||
|
||||
```{r}
|
||||
#| output: asis
|
||||
|
||||
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"))) |>
|
||||
dplyr::filter(!grepl("_files", fd)) |>
|
||||
dplyr::filter(!grepl("quarto", fd)) |>
|
||||
dplyr::mutate(
|
||||
fn = purrr::map_chr(
|
||||
fd,
|
||||
~ file.path(.x, dir(.x, pattern = "index.qmd|index.html"))[1]
|
||||
)
|
||||
) |>
|
||||
dplyr::transmute(
|
||||
htmlstr = purrr::map2_chr(
|
||||
fn,
|
||||
fd,
|
||||
~ paste0(
|
||||
"## [",
|
||||
.y,
|
||||
"](",
|
||||
.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