Skip to content

Commit

Permalink
1.将R project类型由“Quarto Books”更改为“Quarto Website”
Browse files Browse the repository at this point in the history
2.重构导航栏、侧边栏结构。重新编排单细胞数据分析的章节
3.重新设计主页。将原有的主页和介绍页合并为一个页面
4.新的主题
5.重新优化修复全部章节交叉引用
6.重新整理、优化参考文献。取消了最后附录中的单独参考文献页面,现在参考文献在各自页面下方显示。
7.完善章节《循环》
  • Loading branch information
杜俊宏 authored and 杜俊宏 committed Jan 26, 2024
1 parent 6446355 commit 915ef0b
Show file tree
Hide file tree
Showing 300 changed files with 20,712 additions and 20,713 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"hash": "bbcd541a11bf22f7657cd6623994d004",
"hash": "550d2411c7decf29ac29b7a2bfa29b32",
"result": {
"markdown": "---\nexecute:\n eval: false\n warning: false\n---\n\n\n# 交叉引用 {#sec-cross_reference}\n\n如果要使用交叉引用,则每个待引用对象需要有以下两个元素:\n\n- `label`:标签。\n\n ::: callout-caution\n - 必须以类型为前缀,如#fig-1、#tbl-1、#fig-boxplot\n\n - 标签名不能重复\n\n - 标签名最好由英文+下划线组成\n :::\n\n- `caption`:标题。\n\n拥有了这两个元素的对象会被自动加上序号,如Figure 1,并可以被交叉引用。 可引用的对象包括:图表、公式、章节、代码和定理等。注意在交叉引用时要在两端加上空格。\n\n::: callout-tip\n有关交叉引用的详细指南,参考:<https://quarto.org/docs/authoring/cross-references.html>。\n:::\n\n## 标题/节的交叉引用\n\n只需通过`sec-`定义`label`,基本语法:Introduction `{#sec-introduction}`。注意:要使用节的引用,需要在YAML开启标题编号(`number-sections: true`),以便读者能够看到这些编号。\n\n## 图片的交叉引用 {#sec-Cross_referencing_of_figs}\n\n实现的方法:\n\n- 方法一:在源代码模式下修改被引用对象的属性,如:`![Example for cross reference](images/crossref-figure.png){#fig-elephant width=\"290\"}`。其中,方括号内的是对象的`caption`,小括号内是图片所在的目录,\"{}\"内的内容是图像的`label`以及其他可选设置。\n- 方法二:点击待引用对象右上角的三个点,进入对象设置。分别输入`caption`和`ID`(即`label`)(@fig-demo )。\n\n::: {#fig-demo layout-ncol=\"2\"}\n![](images/screenshot_2023-11-09%2009.39.02.png){width=\"240\"}\n\n![](images/screenshot_2023-11-09%2009.39.13-01.png){width=\"244\"}\n\n交叉引用的设置\n:::\n\n例如下面的图片,可以被引用:@fig-elephant 。\n\n![Example for cross reference](images/crossref-figure.png){#fig-elephant width=\"290\"}\n\n### 组图的交叉引用\n\n基本语法:\n\n![](images/screenshot_2023-11-09%2015.13.14.png)\n\n案例:\n\n::: {#fig-组图的交叉引用 layout-ncol=\"2\"}\n![素描大象](images/crossref-figure.png){#fig-组图_素描大象 width=\"219\"}\n\n![油画大象](images/screenshot_2023-11-09%2015.02.31.png){#fig-组图-油画大象 width=\"292\"}\n\n组图的交叉引用\n:::\n\n现在,我们就可以将组图一起引用(@fig-组图的交叉引用 ),或是单独引用组图内的某一张图(@fig-组图-油画大象 ,@fig-组图_素描大象 )。\n\n## 表格的交叉引用\n\n### Markdown表格的引用\n\n只需在表格后加上`: My Caption {#tbl-letters}`即可使该表格能够被引用。如下面的表格 @tbl-表格交叉引用 。\n\n| Col1 | Col2 | Col3 |\n|------|------|------|\n| A | B | C |\n| E | F | G |\n| A | G | G |\n\n: 表格的交叉引用示例 {#tbl-表格交叉引用}\n\n### 代码输出表格的引用\n\n- `label:tbl-`:表格的标签。\n\n- `tbl-cap`:表格的标题。\n\n- knitr包提供了一个 `kable()` 函数可以用来把数据框或矩阵转化成有格式的表格,支持HTML、docx、LaTeX等格式。\n\n\n::: {#tbl-iris .cell tbl-cap='Iris数据' hash='cross_references_cache/html/tbl-iris_e6f74e03256dd432e65bef336562cf1e'}\n\n````{.cell-code}\n```{{r}}\n#| eval: true\n#| label: tbl-iris\n#| tbl-cap: \"Iris数据\"\n\nlibrary(knitr)\nkable(head(iris))\n```\n````\n\n::: {.cell-output-display}\n| Sepal.Length| Sepal.Width| Petal.Length| Petal.Width|Species |\n|------------:|-----------:|------------:|-----------:|:-------|\n| 5.1| 3.5| 1.4| 0.2|setosa |\n| 4.9| 3.0| 1.4| 0.2|setosa |\n| 4.7| 3.2| 1.3| 0.2|setosa |\n| 4.6| 3.1| 1.5| 0.2|setosa |\n| 5.0| 3.6| 1.4| 0.2|setosa |\n| 5.4| 3.9| 1.7| 0.4|setosa |\n:::\n:::\n\n\n现在,就可以通过 @tbl-iris 来引用该表格了。\n\n::: callout-note\n关于表格的详细指南,参考:<https://quarto.org/docs/authoring/tables.html>。\n:::\n",
"markdown": "---\ntitle: \"交叉引用\"\nexecute:\n eval: false\n warning: false\n---\n\n\n如果要使用交叉引用,则每个待引用对象需要有以下两个元素:\n\n- `label`:标签。\n\n ::: callout-caution\n - 必须以类型为前缀,如#fig-1、#tbl-1、#fig-boxplot\n\n - 标签名不能重复\n\n - 标签名最好由英文+下划线组成\n :::\n\n- `caption`:标题。\n\n拥有了这两个元素的对象会被自动加上序号,如Figure 1,并可以被交叉引用。 可引用的对象包括:图表、公式、章节、代码和定理等。注意在交叉引用时要在两端加上空格。\n\n::: callout-tip\n有关交叉引用的详细指南,参考:<https://quarto.org/docs/authoring/cross-references.html>。\n:::\n\n## 标题/节的交叉引用\n\n只需通过`sec-`定义`label`,基本语法:Introduction `{#sec-introduction}`。注意:要使用节的引用,需要在YAML开启标题编号(`number-sections: true`),以便读者能够看到这些编号。\n\n## 图片的交叉引用 {#sec-Cross_referencing_of_figs}\n\n实现的方法:\n\n- 方法一:在源代码模式下修改被引用对象的属性,如:`![Example for cross reference](images/crossref-figure.png){#fig-elephant width=\"290\"}`。其中,方括号内的是对象的`caption`,小括号内是图片所在的目录,\"{}\"内的内容是图像的`label`以及其他可选设置。\n- 方法二:点击待引用对象右上角的三个点,进入对象设置。分别输入`caption`和`ID`(即`label`)(@fig-demo )。\n\n::: {#fig-demo layout-ncol=\"2\"}\n![](images/screenshot_2023-11-09%2009.39.02.png){width=\"240\"}\n\n![](images/screenshot_2023-11-09%2009.39.13-01.png){width=\"244\"}\n\n交叉引用的设置\n:::\n\n例如下面的图片,可以被引用:@fig-elephant 。\n\n![Example for cross reference](images/crossref-figure.png){#fig-elephant width=\"290\"}\n\n### 组图的交叉引用\n\n基本语法:\n\n![](images/screenshot_2023-11-09%2015.13.14.png)\n\n案例:\n\n::: {#fig-组图的交叉引用 layout-ncol=\"2\"}\n![素描大象](images/crossref-figure.png){#fig-组图_素描大象 width=\"219\"}\n\n![油画大象](images/screenshot_2023-11-09%2015.02.31.png){#fig-组图-油画大象 width=\"292\"}\n\n组图的交叉引用\n:::\n\n现在,我们就可以将组图一起引用(@fig-组图的交叉引用 ),或是单独引用组图内的某一张图(@fig-组图-油画大象 ,@fig-组图_素描大象 )。\n\n## 表格的交叉引用\n\n### Markdown表格的引用\n\n只需在表格后加上`: My Caption {#tbl-letters}`即可使该表格能够被引用。如下面的表格 @tbl-表格交叉引用 。\n\n| Col1 | Col2 | Col3 |\n|------|------|------|\n| A | B | C |\n| E | F | G |\n| A | G | G |\n\n: 表格的交叉引用示例 {#tbl-表格交叉引用}\n\n### 代码输出表格的引用\n\n- `label:tbl-`:表格的标签。\n\n- `tbl-cap`:表格的标题。\n\n- knitr包提供了一个 `kable()` 函数可以用来把数据框或矩阵转化成有格式的表格,支持HTML、docx、LaTeX等格式。\n\n\n::: {#tbl-iris .cell tbl-cap='Iris数据' hash='cross_references_cache/html/tbl-iris_e6f74e03256dd432e65bef336562cf1e'}\n\n````{.cell-code}\n```{{r}}\n#| eval: true\n#| label: tbl-iris\n#| tbl-cap: \"Iris数据\"\n\nlibrary(knitr)\nkable(head(iris))\n```\n````\n\n::: {.cell-output-display}\n| Sepal.Length| Sepal.Width| Petal.Length| Petal.Width|Species |\n|------------:|-----------:|------------:|-----------:|:-------|\n| 5.1| 3.5| 1.4| 0.2|setosa |\n| 4.9| 3.0| 1.4| 0.2|setosa |\n| 4.7| 3.2| 1.3| 0.2|setosa |\n| 4.6| 3.1| 1.5| 0.2|setosa |\n| 5.0| 3.6| 1.4| 0.2|setosa |\n| 5.4| 3.9| 1.7| 0.4|setosa |\n:::\n:::\n\n\n现在,就可以通过 @tbl-iris 来引用该表格了。\n\n::: callout-note\n关于表格的详细指南,参考:<https://quarto.org/docs/authoring/tables.html>。\n:::\n",
"supporting": [],
"filters": [
"rmarkdown/pagebreak.lua"
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"hash": "35d7fea9ed678ac182de9dd84964984b",
"hash": "cda40e567bdb442975541aa3fb05d665",
"result": {
"markdown": "---\nexecute:\n eval: false\n warning: false\n---\n\n\n# 插入其他内容 {#sec-Insert_other_content}\n\n## 插入参考文献\n\n在插入菜单中选择\"Citation\":\n\n![参考文献的引用](images/screenshot_2023-11-09%2022.02.13.png){#fig-参考文献的引用 width=\"231\"}\n\n然后通过DOI或标题检索参考文献,选择目标文献:\n\n![参考文献的选择](images/screenshot_2023-11-09%2022.02.44.png){#fig-参考文献的选择 width=\"539\"}\n\n现在就会出现参考文献的交叉引用,如: [@fujii2023] 、[@sprumont2023]。并且会在文档最后生成参考文献列表,同时YAML中会新增参考文献的配置选项:`bibliography: references.bib`。同时根目录下会生成一个名为\"references.bib\"的参考文献配置文件。\n\n如果想改变参考文献展示的位置,可以在YAML中设置,如:\n\n\n::: {.cell hash='insert_other_content_cache/html/unnamed-chunk-1_4403cba6c93a255070c567b14376b146'}\n\n```{.r .cell-code}\n---\ncitation-location: margin\n---\n```\n:::\n\n\n可用的值参见 @tbl-图表标题位置设置 。这份文档的参考文献就设置为了在页面最后展示(`citation-location: document`)。\n\n::: callout-note\n关于参考文献和脚注的详细指南,参考:<https://quarto.org/docs/authoring/footnotes-and-citations.html>。\n:::\n\n## 插入Callouts\n\nCallouts**会生成一个标注框,可以用来标注重要内容:**\n\n![](images/screenshot_2023-11-09%2022.21.46.png){width=\"248\"}\n\n例如:\n\n::: callout-tip\n这是一个Callouts示例。\n:::\n\n**其样式包括:**\n\n- `callout-note`\n\n ![](images/screenshot_2023-11-09%2022.23.12.png)\n\n- `callout-tip`\n\n ![](images/screenshot_2023-11-09%2022.23.59.png)\n\n- `callout-important`\n\n ![](images/screenshot_2023-11-09%2022.24.45.png)\n\n- `callout-caution`\n\n ![](images/screenshot_2023-11-09%2022.26.12.png)\n\n- `callout-warning`\n\n ![](images/screenshot_2023-11-09%2022.27.16.png)\n\n## 插入在线视频\n\n通过以下语法可以在输出文档中插入可直接播放的在线视频:\n\n\n::: {.cell hash='insert_other_content_cache/html/unnamed-chunk-2_3f0f7c362d13bbf0b3caa5e67cbad902'}\n\n```{.r .cell-code}\n{{< video https://www.youtube.com/embed/wo9vZccmqwc >}}\n```\n:::\n",
"markdown": "---\ntitle: \"插入其他内容\"\nexecute:\n eval: false\n warning: false\n---\n\n\n# 插入参考文献\n\n在插入菜单中选择\"Citation\":\n\n![参考文献的引用](images/screenshot_2023-11-09%2022.02.13.png){#fig-参考文献的引用 width=\"231\"}\n\n然后通过DOI或标题检索参考文献,选择目标文献:\n\n![参考文献的选择](images/screenshot_2023-11-09%2022.02.44.png){#fig-参考文献的选择 width=\"539\"}\n\n现在就会出现参考文献的交叉引用,如: [@fujii2023] 、[@sprumont2023]。并且会在文档最后生成参考文献列表,同时YAML中会新增参考文献的配置选项:`bibliography: references.bib`。同时根目录下会生成一个名为\"references.bib\"的参考文献配置文件。\n\n如果想改变参考文献展示的位置,可以在YAML中设置,如:\n\n\n::: {.cell hash='insert_other_content_cache/html/unnamed-chunk-1_4403cba6c93a255070c567b14376b146'}\n\n```{.r .cell-code}\n---\ncitation-location: margin\n---\n```\n:::\n\n\n可用的值参见 @tbl-图表标题位置设置 。这份文档的参考文献就设置为了在页面最后展示(`citation-location: document`)。\n\n::: callout-note\n关于参考文献和脚注的详细指南,参考:<https://quarto.org/docs/authoring/footnotes-and-citations.html>。\n:::\n\n# 插入Callouts\n\nCallouts**会生成一个标注框,可以用来标注重要内容:**\n\n![](images/screenshot_2023-11-09%2022.21.46.png){width=\"248\"}\n\n例如:\n\n::: callout-tip\n这是一个Callouts示例。\n:::\n\n**其样式包括:**\n\n- `callout-note`\n\n ![](images/screenshot_2023-11-09%2022.23.12.png)\n\n- `callout-tip`\n\n ![](images/screenshot_2023-11-09%2022.23.59.png)\n\n- `callout-important`\n\n ![](images/screenshot_2023-11-09%2022.24.45.png)\n\n- `callout-caution`\n\n ![](images/screenshot_2023-11-09%2022.26.12.png)\n\n- `callout-warning`\n\n ![](images/screenshot_2023-11-09%2022.27.16.png)\n\n# 插入在线视频\n\n通过以下语法可以在输出文档中插入可直接播放的在线视频:\n\n\n::: {.cell hash='insert_other_content_cache/html/unnamed-chunk-2_3f0f7c362d13bbf0b3caa5e67cbad902'}\n\n```{.r .cell-code}\n{{< video https://www.youtube.com/embed/wo9vZccmqwc >}}\n```\n:::\n\n\n# References {.unnumbered}\n\n::: {#refs}\n:::\n",
"supporting": [],
"filters": [
"rmarkdown/pagebreak.lua"
Expand Down

Large diffs are not rendered by default.

Loading

0 comments on commit 915ef0b

Please sign in to comment.