add _extensions

This commit is contained in:
2026-05-21 13:37:53 +08:00
parent 6a9a5fc90e
commit 61bd0bea2f
252 changed files with 33972 additions and 1 deletions
@@ -0,0 +1,16 @@
title: TO DO
authors:
- name: Ming Su
email: mingsu@rcees.ac.cn
orcid: 0000-0001-9821-1268
url: https://drwater.net/team/ming-su/
- name: Lorenz A. Kapsner
orcid: 0000-0003-1866-860X
- name: Albert Krewinkel
orcid: 0000-0002-9455-0796
- name: Robert Winkler
version: 0.3.2
quarto-required: ">=1.3.0"
contributes:
filters:
- autocorrect.py
@@ -0,0 +1,61 @@
# Improve copywriting, correct spaces, words, and punctuations between CJK and English with AutoCorrect
# Copyright: © 2024Present Tom Ben
# License: MIT License
import autocorrect_py as autocorrect
import json
import panflute as pf
from panflute import elements as pf_elements
# Allow typst and comment raw blocks until upstream panflute adds support.
ADDITIONAL_RAW_FORMATS = {'typst', 'comment'}
if hasattr(pf_elements, 'RAW_FORMATS'):
pf_elements.RAW_FORMATS = set(pf_elements.RAW_FORMATS)
pf_elements.RAW_FORMATS.update(ADDITIONAL_RAW_FORMATS)
def load_config():
# yaml-language-server: $schema=https://huacnlee.github.io/autocorrect/schema.json
config = {
# 0 - off, 1 - error, 2 - warning
"rules": {
# Add space between some punctuations
"space-punctuation": 0,
# Add space between brackets (), [] when near the CJK
"space-bracket": 0,
# Add space between ``, when near the CJK
"space-backticks": 0,
# Add space between dash `-`
"space-dash": 0,
# Convert to fullwidth
"fullwidth": 0,
# To remove space arouned the fullwidth quotes “”, ‘’
"no-space-fullwidth-quote": 0,
# Fullwidth alphanumeric characters to halfwidth
"halfwidth-word": 1,
# Fullwidth punctuations to halfwidth in English
"halfwidth-punctuation": 1,
# Spellcheck
"spellcheck": 0
}
}
config_str = json.dumps(config)
autocorrect.load_config(config_str)
def correct_text(elem, doc):
if isinstance(elem, pf.Str):
# Apply autocorrect formatting to each text node
corrected_text = autocorrect.format(elem.text)
return pf.Str(corrected_text)
def main(doc=None):
# Load autocorrect configuration
load_config()
return pf.run_filter(correct_text, doc=doc)
if __name__ == "__main__":
main()
@@ -0,0 +1,116 @@
---
title: "MANUSCRIPT TITLE"
subtitle: "Supplementary Information"
submitjournal: "JOURNAL"
submitid:
lang: en
date: ""
# bibliography: [BB/Ref.bib, BB/localRef.bib]
affilstyle: alphabeta # number
author:
- name: Xxxxx Yyyy
affiliations:
- ref: kleac
# email: 13586740928@163.com
attributes:
corresponding: false
equal-contributor: true
role:
- data-curation: lead
- methodology: lead
- formalanalysis: lead
- writingoriginal: equal
- writingediting: eqaul
- visualisation: supporting
- name: Ming Su
email: mingsu@rcees.ac.cn
url: https://drwater.net/team/ming-su/
role:
- conceptualization: lead
- methodology: supporting
- formalanalysis: lead
- writingoriginal: equal
- writingediting: equal
- visualisation: lead
- projectadmin: lead
- supervision
affiliations:
- ref: kleac
- ref: ucas
attributes:
corresponding: true
equal-contributor: true
- name: Min Yang
email: yangmin@rcees.ac.cn
affiliations:
- ref: kleac
- ref: ucas
attributes:
corresponding: true
affiliations:
- id: kleac
name: State Key Laboratory of Environmental Aquatic Chemistry, Research Center for Eco-Environmental Sciences, Chinese Academy of Sciences
# address: No. 18 Shuangqing Road
city: Beijing
postal-code: 100085
country: China
url: https://www.skleac.ac.cn
- id: ucas
name: University of Chinese Academy of Sciences
# address: No. 19A Yuquan Road
city: Beijing
postal-code: 100049
country: China
url: https://www.ucas.ac.cn
prefer-html: true
format:
# elsevier-html:
# toc: true
# css: _extensions/drwater/dwms/inst/css/style.css
# docx:
# reference-doc: _extensions/drwater/dwms/inst/word/MS.docx
pdf:
fontsize: 12pt
keep-md: false
keep-tex: false
filters:
# - latex-environment
# - authoraffil
- autocorrect
---
```{r}
#| include: false
#| cache: false
lang <- "en"
isRendering <- isTRUE(getOption("knitr.in.progress"))
require(tidyverse)
require(drwateR)
require(patchwork)
rmdify::rmd_init()
dwfun::init()
```
{{< pagebreak >}}
# Abstract {-}
{{< pagebreak >}}
{{< pagebreak >}}
<!-- {{< include _est.qmd >}} -->
# References {-}
::: {#refs}
:::
{{< pagebreak >}}
<!-- {{< include _nature.qmd >}} -->