Skip to content

Commit

Permalink
Merge branch 'zotero-chinese:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Chikit-L authored Sep 24, 2023
2 parents 5558112 + de4776b commit e9c5838
Show file tree
Hide file tree
Showing 29 changed files with 928 additions and 243 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build-on-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build on Pull Request

on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# 如果你文档需要 Git 子模块,取消注释下一行
# submodules: true

- name: 设置 Node.js
uses: actions/setup-node@v3
with:
node-version: 18
# cache: npm

- name: 安装依赖
run: npm install

- name: 构建文档
env:
NODE_OPTIONS: --max_old_space_size=8192
run: |-
npm run docs:build
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: 部署文档

on:
Expand All @@ -21,16 +20,14 @@ jobs:
# 如果你文档需要 Git 子模块,取消注释下一行
# submodules: true



- name: 设置 Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
# cache: npm

- name: 安装依赖
run: npm ci
run: npm install

- name: 构建文档
env:
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Lint 文档

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DavidAnson/markdownlint-cli2-action@v13
with:
globs: |
**/*.md
!test/*.md
1 change: 1 addition & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"MD035": {
"style": "---"
},
"MD036": false,
"MD040": false,
"MD046": false,
"MD049": false
Expand Down
2 changes: 1 addition & 1 deletion src/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { searchProPlugin } from "vuepress-plugin-search-pro";
// import { baiduTongjiPlugin } from "@vuepress-plume/vuepress-plugin-baidu-tongji";

export default defineUserConfig({
base: "/",
base: process.env.NETLIFY ? "/" : "/wiki/",

locales: {
"/": {
Expand Down
10 changes: 10 additions & 0 deletions src/.vuepress/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ export default hopeTheme({
align: true,
attrs: true,
chart: true,
checkLinks: {
// 仅在开发模式下检查链接
status: "always",
ignore: [
// 忽略以 `/api/` 开头的链接
/^\/api\//,
// 忽略 `/playground.html`
"/playground.html",
],
},
codetabs: true,
// demo: true,
// echarts: true,
Expand Down
26 changes: 13 additions & 13 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ bgImageDark: https://theme-hope-assets.vuejs.press/bg/6-dark.svg
bgImageStyle:
background-attachment: fixed
heroText: Zotero 中文小组
tagline: Zotero 非官方中文小组,维护中文文档等
tagline: Zotero 非官方中文小组,维护中文文档等
actions:
- text: Zotero 用户手册 💡
link: /user-guide/
Expand All @@ -30,17 +30,17 @@ highlights:
features:
- title: Zotero 百科全书
icon: article
details: Zotero 中文教程一站式解决
details: Zotero 中文教程一站式解决
link: /user-guide/

- title: 插件商店
icon: config
details: 好用的 Zotero 插件收录,提供国内镜像下载地址
details: 好用的 Zotero 插件收录,提供国内镜像下载地址
link: https://plugins.zotero-chinese.com/

- title: 中文 CSL 样式
icon: format
details: 支持双语排版的 CSL 样式
details: 支持双语排版的 CSL 样式
link: https://github.com/redleafnew/Chinese-STD-GB-T-7714-related-csl/

- title: 插件开发手册
Expand All @@ -50,12 +50,12 @@ highlights:

- title: CSL 开发手册
icon: code
details: 来看如何自定义一个自己需要的参考文献格式
details: 来看如何自定义一个自己需要的参考文献格式
link: /csl-dev-guide/

- title: 更多
icon: advance
details: 贡献指南、关于页面等
details: 贡献指南、关于页面等
link: /about/

- header: Zotero 官方
Expand All @@ -71,17 +71,17 @@ highlights:

- title: Zotero 官方文档(英文)
icon: article
details: Zotero 官方提供的使用手册,最为准确,但仅维护英文
details: Zotero 官方提供的使用手册,最为准确,但仅维护英文
link: https://www.zotero.org/support/

- title: Zotero 官方论坛(英文)
icon: community
details: Zotero 官方运营的论坛,你可以在这里发布求助、反馈问题等
details: Zotero 官方运营的论坛,你可以在这里发布求助、反馈问题等
link: https://forums.zotero.org/discussions

- title: CSL 官方样式
icon: decorate
details: 在这里可以预览并下载 Citation Language Style 组织下的样式
details: 在这里可以预览并下载 Citation Language Style 组织下的样式
link: https://www.zotero.org/styles

- header: 参与社区建设
Expand All @@ -92,22 +92,22 @@ highlights:
highlights:
- title: GitHub ISSUE
icon: github
details: 你可以在 ISSUE 里提出文档等的不足、改进建议
details: 你可以在 ISSUE 里提出文档等的不足、改进建议
link: https://github.com/zotero-chinese/wiki/issues

- title: Gitee 讨论
icon: gitee
details: 你可以在 Gitee 里提出关于 Zotero 使用的问题
details: 你可以在 Gitee 里提出关于 Zotero 使用的问题
link: https://gitee.com/zotero-chinese/zotero-chinese/issues

- title: 贡献者指南
icon: like
details: 查看如何为项目做出贡献
details: 查看如何为项目做出贡献
link: /contributing/

- title: QQ 群
icon: group
details: 加入群聊,独学而无友,则孤陋而寡闻
details: 加入群聊,独学而无友,则孤陋而寡闻
link: #

# - title: 更多
Expand Down
Binary file added src/assets/image-miniconda-install.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/image-python-install.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/image-run-cmd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/image-run-python-version.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/image-wps-install.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/image-wps-plugin-ui-buttons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/image-wps-plugin-ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/image-wps-success.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/image-wps-vba-plugin-install-path.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/image-wps-warn1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/image-wps-warn2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/image-zotero-layers.acceleration.disabled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/image-zotero-我同意承担风险.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/image-zotero-编辑器.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/image-zotero-黑色遮挡.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/wps-pluginfile-list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/wps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
84 changes: 41 additions & 43 deletions src/csl-dev-guide/primer.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,18 @@ updated: 2023-07-22 20:42:39

# CSL 介绍

> [!warning] WORK IN PROGRESS
> 此页面正在施工中。
### 前言
## 前言

`CSL` 是一种基于 `XML` 的开放 (开源) 语言,用来描述引用和参考文献的格式。对 `CSL` 更加技术和详细的描述见 [CSL 规范](specification.md)

### CSL 是什么
## CSL 是什么

如果你写过论文的话,你可能在其中引用了别人的论文。参考文献在学术交流中很重要,因为它可以提供引用的来源,并且可以把已经发表的研究联系到一起。但是,手动设置引用格式和参考文献目录非常耗时,而且不同的期刊有自己的引用格式。

参考文献管理软件可以解决上面的问题。像 Zotero、Mendeley、Papers 等软件不仅能帮助你管理参考文献,而且可以自动地生成引用的参考文献目录。为了设置特定的引用格式,这些软件需要能识别的对引用格式的描述,这种描述就是 Citation Style Language(CSL)。

## 引文格式

> [!warning] WORK IN PROGRESS
> 此页面正在施工中。
引文格式有很多很多种,我们最常用的就是国标(信息与文献 参考文献著录规则),最新的国标代号是 `(GB/T 7714-2015)`。大多数的引用格式都属于几个基本类别,如下:

### In-text Styles
Expand All @@ -33,72 +27,79 @@ updated: 2023-07-22 20:42:39

`CSL` 中,每个单独的 `pointer` 称为一个引用。例如,引文 `“(Doe et al. 2002, Smith 1997)”` 包含两个引用:一个是 `Doe et al.` 在 2002 年发表的文献,另外一个是 `Smith`1997 年发表的文献。

#### author-dateauthor 格式
#### `author-date``author` 格式

`author-date` 引用格式会显示作者的名字和发表的日期,比如:`(Van der Klei et al. 1991; Zwart et al. 1983)``author` 只显示作者名字,例如:`(Gidijala et al.)`。参考文献条目一般使用字母表顺序对作者进行排序。

应该注意的是,许多引用格式使用了令人疑惑的 `Harvard` 术语来指代 `author-date` 格式,但是大多数这些格式与哈佛大学并没有关系。而且也并不存在一个官方的 `Harvard` 格式。

**参考文献条目实例**
::: note 参考文献条目实例

Gidijala L, Bovenberg RA, Klaassen P, van der Klei IJ, Veenhuis M, et al. (2008) Production of functionally active *Penicillium chrysogenum* isopenicillin N synthase in the yeast *Hansenula polymorpha*. BMC Biotechnol 8: 29.

van der Klei IJ, Harder W, Veenhuis M (1991) Methanol metabolism in a peroxisome-deficient mutant of *Hansenula polymorpha*: a physiological study. Arch Microbiol 156: 15-23.

> Gidijala L, Bovenberg RA, Klaassen P, van der Klei IJ, Veenhuis M, et al. (2008) Production of functionally active *Penicillium chrysogenum* isopenicillin N synthase in the yeast *Hansenula polymorpha*. BMC Biotechnol 8: 29.
>
> van der Klei IJ, Harder W, Veenhuis M (1991) Methanol metabolism in a peroxisome-deficient mutant of *Hansenula polymorpha*: a physiological study. Arch Microbiol 156: 15-23.
>
> Zwart KB, Veenhuis M, Harder W (1983) Significance of yeast peroxisomes in the metabolism of choline and ethanolamine. Antonie van Leeuwenhoek 49: 369-385.
Zwart KB, Veenhuis M, Harder W (1983) Significance of yeast peroxisomes in the metabolism of choline and ethanolamine. Antonie van Leeuwenhoek 49: 369-385.

#### “numeric”格式
:::

#### `numeric` 格式

`numeric` 格式由数字组成,比如 `[1,2]``[3]`。参考文献条目一般使用作者首字母排序或者使用第一次在正文中的引用顺序排序。国标就是一种典型的 `numeric` 格式。

**参考文献条目实例**
::: note 参考文献条目实例

1. Gidijala L, Bovenberg RA, Klaassen P, van der Klei IJ, Veenhuis M, et al. (2008) Production of functionally active *Penicillium chrysogenum* isopenicillin N synthase in the yeast *Hansenula polymorpha*. BMC Biotechnol 8: 29.

>1. Gidijala L, Bovenberg RA, Klaassen P, van der Klei IJ, Veenhuis M, et al. (2008) Production of functionally active *Penicillium chrysogenum* isopenicillin N synthase in the yeast *Hansenula polymorpha*. BMC Biotechnol 8: 29.
2. Zwart KB, Veenhuis M, Harder W (1983) Significance of yeast peroxisomes in the metabolism of choline and ethanolamine. Antonie van Leeuwenhoek 49: 369-385.

>2. Zwart KB, Veenhuis M, Harder W (1983) Significance of yeast peroxisomes in the metabolism of choline and ethanolamine. Antonie van Leeuwenhoek 49: 369-385.
3. van der Klei IJ, Harder W, Veenhuis M (1991) Methanol metabolism in a peroxisome-deficient mutant of *Hansenula polymorpha*: a physiological study. Arch Microbiol 156: 15-23.

>3. van der Klei IJ, Harder W, Veenhuis M (1991) Methanol metabolism in a peroxisome-deficient mutant of *Hansenula polymorpha*: a physiological study. Arch Microbiol 156: 15-23.
:::

#### "numeric" 复合格式
#### `numeric` 复合格式

复合格式是 `numeric` 格式的变体。这种风格在化学领域很流行。`CSL` 中暂时不支持这种格式,这里也不多作介绍。

**参考文献条目实例**
::: note 参考文献条目实例

1. Gidijala L, et al. (2008) BMC Biotechnol 8: 29.

>1. Gidijala L, et al. (2008) BMC Biotechnol 8: 29.
2. a) Zwart KB, et al. (1983) Antonie van Leeuwenhoek 49: 369-385, b) van der Klei IJ, et al. (1991) Arch Microbiol 156: 15-23.

>2. a) Zwart KB, et al. (1983) Antonie van Leeuwenhoek 49: 369-385, b) van der Klei IJ, et al. (1991) Arch Microbiol 156: 15-23.
:::

#### 标签格式

这种引用格式由 `keys` 构成,例 `GBKv2008]``[ZwVH1983; vaHV1991]``CSL` 对这种格式支持有限,这里也不多作介绍。
这种引用格式由 `keys` 构成,例 `[GBKv2008]``[ZwVH1983; vaHV1991]``CSL` 对这种格式支持有限,这里也不多作介绍。

**参考文献条目实例**
::: note 参考文献条目实例

> [GBKv2008] Gidijala L, Bovenberg RA, Klaassen P, van der Klei IJ, Veenhuis M, et al. (2008) Production of functionally active *Penicillium chrysogenum* isopenicillin N synthase in the yeast *Hansenula polymorpha*. BMC Biotechnol 8: 29.
>
> [vaHV1991] van der Klei IJ, Harder W, Veenhuis M (1991) Methanol metabolism in a peroxisome-deficient mutant of *Hansenula polymorpha*: a physiological study. Arch Microbiol 156: 15-23.
>
> [ZwVH1983] Zwart KB, Veenhuis M, Harder W (1983) Significance of yeast peroxisomes in the metabolism of choline and ethanolamine. Antonie van Leeuwenhoek 49: 369-385.
\[GBKv2008] Gidijala L, Bovenberg RA, Klaassen P, van der Klei IJ, Veenhuis M, et al. (2008) Production of functionally active *Penicillium chrysogenum* isopenicillin N synthase in the yeast *Hansenula polymorpha*. BMC Biotechnol 8: 29.

\[vaHV1991] van der Klei IJ, Harder W, Veenhuis M (1991) Methanol metabolism in a peroxisome-deficient mutant of *Hansenula polymorpha*: a physiological study. Arch Microbiol 156: 15-23.

\[ZwVH1983] Zwart KB, Veenhuis M, Harder W (1983) Significance of yeast peroxisomes in the metabolism of choline and ethanolamine. Antonie van Leeuwenhoek 49: 369-385.

:::

### Note Styles

引用格式的第二类为 `Note` 格式。引用中的 `marker` 可以是数字或者符号,例如 `[*]` 或者 `[†]`。每个 `marker` 指向脚注或者尾注。`CSL` 不能设置使用哪些数字或者符号用于 `marker`,这些应该用字处理软件 (比如 `word`) 设置。与上面的 `in-text` 格式不同,尾注或者脚注通常显示的信息更多。

**参考文献条目实例**
::: note 参考文献条目实例

> [*] Voyage to St. Kilda’ (3rd edit. 1753), p. 37.
>
> [] Sir J. E. Tennent, ‘Ceylon,’ vol. ii. 1859, p. 107.
\[*] Voyage to St. Kilda’ (3rd edit. 1753), p. 37.

## CSL 生态
\[] Sir J. E. Tennent, ‘Ceylon,’ vol. ii. 1859, p. 107.

> [!warning] WORK IN PROGRESS
> 此页面正在施工中。
:::

## CSL 生态

要明白 `CSL` 是怎么运作的,首先要了解 `CSL` 的生态。`Style` 指的是 CSL 样式,`Item Metadata` 指的是每篇参考文献的作者,题目等信息,`Locale Files` 是为实现与语言无关(指英语,汉语等)的格式的本地化文件,`Citation Details` 指的是影响引文信息或参考文献列表表现的细节,比如顺序,位置等。

![](https://docs.citationstyles.org/en/stable/_images/csl-infrastructure.png)
![csl-infrastructure](https://docs.citationstyles.org/en/stable/_images/csl-infrastructure.png)

### 独立格式和从属格式

Expand Down Expand Up @@ -152,9 +153,6 @@ updated: 2023-07-22 20:42:39

## 理解 CSL 格式

> [!warning] WORK IN PROGRESS
> 此页面正在施工中。
到现在为止,我们已经知道什么是 `CSL`、怎么使用它、以及它怎么运作的。接下来我们将深入到 `CSL` 文件内部,分析它的 `XML` 代码。`XML基础.md` 文件中简单介绍了 `XML`,看完后可以读懂并编辑简单的 `XML` 文件。如果想更多的了解 `XML`,可以在网上查找 `XML` 教程。

### 从属格式解析
Expand Down Expand Up @@ -444,7 +442,7 @@ updated: 2023-07-22 20:42:39

**注:**以下为了方便描述,将对应的 `macro` 元素直接以 `name` 指代,例:`name``author``macro` 元素直接称为 `author` 元素。

``author` 元素的 `name`的属性指定了名称,`variable`属性保存了具体的作者值,`initialize-with` 表明作者值为首字母缩写,每个首字母后面为 `.`。
`author` 元素的 `name`的属性指定了名称,`variable`属性保存了具体的作者值,`initialize-with` 表明作者值为首字母缩写,每个首字母后面为 `.`

`issued-year` 元素以分支语句开始,分支语句以 `choose` 元素定义,其中包含 `if``else` 元素。如果参考文献有日期,则保存在 `issued` 变量中,如果 `issued-year` 元素被引用,日期的年份将被印出,否则就印出 `no date`

Expand Down
Loading

0 comments on commit e9c5838

Please sign in to comment.