2024-10-03 22:03:47 +08:00
|
|
|
|
Title: CrossDown示例
|
|
|
|
|
Summary: 够简洁的了
|
|
|
|
|
Authors: CrossDark
|
|
|
|
|
Date: __date__
|
|
|
|
|
base_url: http://crossdark.net:3000/crossdark/CrossDown
|
2024-09-26 19:08:17 +08:00
|
|
|
|
|
2024-09-30 17:12:54 +08:00
|
|
|
|
[TOC]
|
2024-09-26 19:08:17 +08:00
|
|
|
|
|
2024-09-08 10:20:05 +08:00
|
|
|
|
# CrossDown
|
2024-10-04 21:00:23 +08:00
|
|
|
|
自制的markdown,添加了一些自定义的语法
|
2024-09-08 21:24:40 +08:00
|
|
|
|
效果请见[README.html](https://github.com/CrossDark/CrossDown/blob/main/README.html)
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-07 19:55:44 +08:00
|
|
|
|
1 基本语法
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-07 19:55:44 +08:00
|
|
|
|
1.1 标题
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-07 19:55:44 +08:00
|
|
|
|
# 一级标题
|
|
|
|
|
## 二级标题
|
|
|
|
|
### 三级标题
|
|
|
|
|
#### 四级标题
|
|
|
|
|
##### 五级标题
|
|
|
|
|
###### 六级标题
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-07 19:55:44 +08:00
|
|
|
|
1.2 样式
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-07 19:55:44 +08:00
|
|
|
|
1.2.1 *斜体*
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-07 19:55:44 +08:00
|
|
|
|
1.2.2 **粗体**
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-07 19:55:44 +08:00
|
|
|
|
1.2.3 ***粗斜体***
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-07 19:55:44 +08:00
|
|
|
|
1.2.4 ~下划线~
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-07 19:55:44 +08:00
|
|
|
|
1.2.5 ~~删除线~~
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-07 19:55:44 +08:00
|
|
|
|
1.2.6 ==高亮==
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-07 19:55:44 +08:00
|
|
|
|
1.2.7 [在文本的正上方添加一行小文本]^(主要用于标拼音)
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-07 19:55:44 +08:00
|
|
|
|
1.2.8 [在指定的文本里面隐藏一段文本]-(只有鼠标放在上面才会显示隐藏文本)
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-07 19:55:44 +08:00
|
|
|
|
1.2.9 分割线
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-07 19:55:44 +08:00
|
|
|
|
---
|
|
|
|
|
___
|
|
|
|
|
***
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-07 19:55:44 +08:00
|
|
|
|
1.3 链接
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-08 22:15:57 +08:00
|
|
|
|
1.3.1 普通链接
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-08 22:15:57 +08:00
|
|
|
|
[链接文本](链接地址)
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-08 22:15:57 +08:00
|
|
|
|
[CrossDark](https://crossdark.com)
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
|
|
|
|
<https://crossdark.net/>
|
|
|
|
|
|
2024-09-08 22:15:57 +08:00
|
|
|
|
1.3.2 图片
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-08 22:15:57 +08:00
|
|
|
|
![链接图片](链接地址)
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-15 20:59:19 +08:00
|
|
|
|
![sea](https://crossdark.com/wp-content/uploads/2024/05/1715259682-sea.jpg)
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-17 10:39:01 +08:00
|
|
|
|
1.3.3 变量链接
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-17 10:39:01 +08:00
|
|
|
|
[链接文本][变量]
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-17 10:39:01 +08:00
|
|
|
|
[变量]: https://crossdark.com
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-04 21:00:23 +08:00
|
|
|
|
2 缩写
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-07 19:55:44 +08:00
|
|
|
|
2.1 定义
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-04 21:00:23 +08:00
|
|
|
|
*[缩写]: 长的文本
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-07 19:55:44 +08:00
|
|
|
|
2.2 赋值
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
直接在文本中使用 缩写 即可
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
3 锚点
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-07 18:11:00 +08:00
|
|
|
|
3.1 定义
|
|
|
|
|
|
2024-10-20 12:02:11 +08:00
|
|
|
|
{{#锚点名}}
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-07 18:11:00 +08:00
|
|
|
|
3.2 页内链接
|
|
|
|
|
|
2024-10-20 12:02:11 +08:00
|
|
|
|
{{锚点名}}
|
2024-10-07 18:11:00 +08:00
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
4 代码块
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
4.1 `单行`
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
4.1.1 LaTex
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-09 22:25:56 +08:00
|
|
|
|
这是`$CO_2$`二氧化碳
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-09 22:25:56 +08:00
|
|
|
|
这是`$H_2O$`水
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-13 22:13:10 +08:00
|
|
|
|
`$\lg\left(\frac{目标生物的理智值}{稳定折磨型工具人的理智值}\right)$`
|
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
4.1.2 函数
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-22 19:44:35 +08:00
|
|
|
|
`¥y=x*2+1¥` // 不定义范围
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-22 19:44:35 +08:00
|
|
|
|
`¥y=x**2¥€-50,50€` // 定义了x范围
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-22 19:44:35 +08:00
|
|
|
|
`¥y=x**3¥€-50,50|-100,100€` // 定义了y范围
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
4.1.3 强调
|
2024-10-02 21:04:14 +08:00
|
|
|
|
|
|
|
|
|
`{强调文本}`
|
|
|
|
|
|
2024-10-13 22:13:10 +08:00
|
|
|
|
`{强调变量}`
|
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
4.2 多行
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
4.2.1 YAML
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
```yaml
|
2024-09-07 19:55:44 +08:00
|
|
|
|
A:
|
|
|
|
|
1. a
|
|
|
|
|
2. b
|
|
|
|
|
3. c
|
|
|
|
|
B:
|
|
|
|
|
- a
|
|
|
|
|
- b
|
|
|
|
|
- c
|
2024-10-22 19:10:46 +08:00
|
|
|
|
{[强调变量]}:
|
|
|
|
|
- a
|
|
|
|
|
- b
|
2024-10-04 21:31:07 +08:00
|
|
|
|
```
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
4.2.2 Python
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
```python
|
2024-10-20 12:02:11 +08:00
|
|
|
|
#! usr/bin/python3.11
|
2024-10-14 19:43:20 +08:00
|
|
|
|
def main():
|
|
|
|
|
print('CrossDown')
|
2024-10-04 21:31:07 +08:00
|
|
|
|
```
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
4.2.3 Mermaid
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
```mermaid
|
2024-10-10 18:32:52 +08:00
|
|
|
|
graph TD
|
|
|
|
|
A[开始]-->B[流程]
|
|
|
|
|
B-->C{判断}
|
|
|
|
|
C-->|结果1|D[结束1]
|
|
|
|
|
C-->|结果2|E[结束2]
|
2024-10-04 21:31:07 +08:00
|
|
|
|
```
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-14 19:43:20 +08:00
|
|
|
|
4.2.4 shell
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
cd ../..
|
2024-10-20 12:02:11 +08:00
|
|
|
|
ls
|
2024-10-14 19:43:20 +08:00
|
|
|
|
```
|
|
|
|
|
|
2024-10-15 19:03:59 +08:00
|
|
|
|
4.2.5 latex
|
|
|
|
|
|
|
|
|
|
```latex
|
|
|
|
|
\documentclass{article}
|
|
|
|
|
\title{我的第一个LaTeX文档}
|
|
|
|
|
\author{作者姓名}
|
|
|
|
|
\date{\today}
|
|
|
|
|
|
|
|
|
|
\begin{document}
|
|
|
|
|
|
|
|
|
|
\maketitle
|
|
|
|
|
|
|
|
|
|
这是我的第一个LaTeX文档。它包含了一个标题、作者信息、日期和一个简单的正文部分。
|
|
|
|
|
|
|
|
|
|
\section{引言}
|
|
|
|
|
|
|
|
|
|
这是引言部分,可以简要介绍文档的主题和目的。
|
|
|
|
|
|
|
|
|
|
\section{正文}
|
|
|
|
|
|
|
|
|
|
这是正文部分,可以详细阐述你的观点或研究内容。你可以根据需要添加更多的章节和子章节。
|
|
|
|
|
|
|
|
|
|
\subsection{子章节示例}
|
|
|
|
|
|
|
|
|
|
这是一个子章节的示例,用于展示如何在LaTeX文档中创建层次结构。
|
|
|
|
|
|
|
|
|
|
\end{document}
|
|
|
|
|
```
|
|
|
|
|
|
2024-10-19 14:16:44 +08:00
|
|
|
|
4.2.6 HTML
|
|
|
|
|
|
|
|
|
|
```html
|
|
|
|
|
*斜体***粗体**~下划线~~~删除线~~==高亮==
|
|
|
|
|
```
|
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
5 转义
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-08 22:22:30 +08:00
|
|
|
|
\\
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-08 22:22:30 +08:00
|
|
|
|
\a
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-08 22:22:30 +08:00
|
|
|
|
\*
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
6 引用
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-17 10:45:26 +08:00
|
|
|
|
> 一级引用
|
|
|
|
|
>> 二级引用
|
|
|
|
|
>>> 三级引用
|
|
|
|
|
>>>> 四级引用
|
|
|
|
|
>>>>> 五级引用
|
|
|
|
|
>>>>>> 六级引用
|
|
|
|
|
>
|
|
|
|
|
> 引文内添加*斜体***粗体**~下划线~~~删除线~~==高亮==
|
2024-09-15 20:59:19 +08:00
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
7 提纲
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
7.1 提纲号
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-22 12:42:46 +08:00
|
|
|
|
以数字和点组成,通过空格与提纲名分隔,例如:
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
7.1.1 提纲号示例
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-22 12:42:46 +08:00
|
|
|
|
点不能出现在开头或结尾,例如
|
2024-09-22 12:48:28 +08:00
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
.7.1.2 错误示范
|
2024-09-22 12:48:28 +08:00
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
7.1.3. 错误示范
|
2024-09-22 12:48:28 +08:00
|
|
|
|
|
2024-09-22 19:58:48 +08:00
|
|
|
|
不能出现两个及以上连续的点,例如:
|
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
7..1...4 错误示范
|
2024-09-22 19:58:48 +08:00
|
|
|
|
|
2024-10-20 12:02:11 +08:00
|
|
|
|
提纲号会被自动配置为锚点,可直接使用{{7}}{{7.1}}
|
2024-09-22 12:48:28 +08:00
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
8 注释
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-19 14:16:44 +08:00
|
|
|
|
|==| 注释
|
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
8.1 强注释
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-07 19:55:44 +08:00
|
|
|
|
|=
|
|
|
|
|
无论如何都会被移除
|
|
|
|
|
`放在代码块里也没用`
|
|
|
|
|
=|
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
8.2 弱注释
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-30 18:03:40 +08:00
|
|
|
|
<!-- 这是注释 -->
|
|
|
|
|
|
2024-09-07 19:55:44 +08:00
|
|
|
|
只有在 // 后面才会被移除
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-08 22:15:57 +08:00
|
|
|
|
`// 代码中的注释弱不会被移除`
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
9 列表
|
|
|
|
|
|
|
|
|
|
9.1 有序列表
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
2024-09-15 20:59:19 +08:00
|
|
|
|
1. a
|
|
|
|
|
2. b
|
|
|
|
|
3. c
|
|
|
|
|
4. d
|
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
9.2 无序列表
|
2024-10-06 22:22:53 +08:00
|
|
|
|
|
2024-09-15 20:59:19 +08:00
|
|
|
|
- A
|
|
|
|
|
- B
|
|
|
|
|
- C
|
|
|
|
|
- D
|
2024-09-17 10:39:01 +08:00
|
|
|
|
|
2024-10-16 19:24:51 +08:00
|
|
|
|
9.3 释义列表
|
|
|
|
|
|
|
|
|
|
A
|
|
|
|
|
: 1. a
|
|
|
|
|
2. b
|
|
|
|
|
3. c
|
|
|
|
|
|
|
|
|
|
B
|
|
|
|
|
: - a
|
|
|
|
|
- b
|
|
|
|
|
- c
|
|
|
|
|
|
|
|
|
|
`{强调变量}`
|
|
|
|
|
: - a
|
|
|
|
|
- b
|
|
|
|
|
- c
|
|
|
|
|
|
|
|
|
|
Apple
|
|
|
|
|
: Pomaceous fruit of plants of the genus Malus in
|
|
|
|
|
the family Rosaceae.
|
|
|
|
|
|
|
|
|
|
Orange
|
|
|
|
|
: The fruit of an evergreen tree of the genus Citrus.
|
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
10 表格
|
2024-09-24 19:27:03 +08:00
|
|
|
|
|
|
|
|
|
| 表头1 | 表头2 | 表头3 |
|
|
|
|
|
|:----:|:----:|:----:|
|
2024-09-17 10:39:01 +08:00
|
|
|
|
| 单元格1 | 单元格2 | 单元格3 |
|
|
|
|
|
| 单元格4 | 单元格5 | 单元格6 |
|
2024-09-26 19:08:17 +08:00
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
11 警告
|
2024-09-28 12:49:37 +08:00
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
!!! warning "警告标题"
|
|
|
|
|
警告内容
|
2024-09-28 12:49:37 +08:00
|
|
|
|
|
2024-10-04 21:31:07 +08:00
|
|
|
|
12 Emoji
|
2024-09-28 12:49:37 +08:00
|
|
|
|
|
2024-09-29 19:10:34 +08:00
|
|
|
|
:person_biking:
|
2024-09-28 12:49:37 +08:00
|
|
|
|
|
2024-10-05 17:55:30 +08:00
|
|
|
|
这是一个笑脸:grinning_face_with_big_eyes:图案
|
2024-09-30 18:03:40 +08:00
|
|
|
|
|
2024-10-05 14:11:25 +08:00
|
|
|
|
13 脚注
|
|
|
|
|
|
2024-10-05 14:22:39 +08:00
|
|
|
|
13.1 使用
|
|
|
|
|
|
2024-10-05 14:11:25 +08:00
|
|
|
|
这是一个[^脚注]
|
|
|
|
|
|
2024-10-05 14:22:39 +08:00
|
|
|
|
13.2 定义
|
|
|
|
|
|
2024-10-05 14:11:25 +08:00
|
|
|
|
[^脚注]: 一段长的文本用于说明
|
2024-10-05 14:22:39 +08:00
|
|
|
|
|
|
|
|
|
13.3 放置
|
|
|
|
|
|
2024-10-05 17:55:30 +08:00
|
|
|
|
通过一下代码可以将文章中所有的脚注定义集中于一处
|
|
|
|
|
|
2024-10-05 14:22:39 +08:00
|
|
|
|
///Footnotes Go Here///
|
2024-10-05 17:55:30 +08:00
|
|
|
|
|
|
|
|
|
否则所有定义将被集中在文章末尾
|
|
|
|
|
|
2024-10-06 18:15:24 +08:00
|
|
|
|
14 外框
|
|
|
|
|
|
|
|
|
|
14.1 警告
|
|
|
|
|
|
2024-10-06 22:22:53 +08:00
|
|
|
|
这是一个!!!警告!!!……
|
2024-10-06 18:15:24 +08:00
|
|
|
|
|
|
|
|
|
!!!
|
|
|
|
|
这是一条警告
|
|
|
|
|
!!!
|
2024-10-06 22:00:55 +08:00
|
|
|
|
|
|
|
|
|
14.2 提醒
|
|
|
|
|
|
2024-10-19 14:16:44 +08:00
|
|
|
|
这是一个!!提醒!!……
|
2024-10-06 22:22:53 +08:00
|
|
|
|
|
2024-10-19 14:16:44 +08:00
|
|
|
|
!!
|
2024-10-06 22:00:55 +08:00
|
|
|
|
这是一条提醒
|
2024-10-19 14:16:44 +08:00
|
|
|
|
!!
|
2024-10-13 14:32:15 +08:00
|
|
|
|
|
|
|
|
|
14.3 安心
|
|
|
|
|
|
|
|
|
|
这是一个,,,安心,,,……
|
|
|
|
|
|
|
|
|
|
,,,
|
|
|
|
|
这是一条安心
|
|
|
|
|
,,,
|
|
|
|
|
|
|
|
|
|
14.4 怀疑
|
|
|
|
|
|
2024-10-19 14:16:44 +08:00
|
|
|
|
这是一个,,怀疑,,……
|
2024-10-13 14:32:15 +08:00
|
|
|
|
|
2024-10-19 14:16:44 +08:00
|
|
|
|
,,
|
2024-10-13 14:32:15 +08:00
|
|
|
|
这是一条怀疑
|
2024-10-19 14:16:44 +08:00
|
|
|
|
,,
|
2024-10-13 14:38:11 +08:00
|
|
|
|
|
|
|
|
|
15 内部链接
|
|
|
|
|
|
|
|
|
|
[[Bracketed]]
|
2024-10-19 14:16:44 +08:00
|
|
|
|
|
|
|
|
|
16 变量
|
|
|
|
|
|
|
|
|
|
{[强调变量]}
|
2024-10-20 12:02:11 +08:00
|
|
|
|
|
|
|
|
|
17 属性设置
|
|
|
|
|
|
|
|
|
|
可以设置文段的字体{@style=font-family: sans-serif;}为sans-serif
|
|
|
|
|
|
|
|
|
|
可以设置文段的字体{@style=font-family: Helvetica;}为Helvetica
|
|
|
|
|
|
|
|
|
|
可以设置文段的自定义字体{@style=font-family: SetoFont;}为小赖字体
|
|
|
|
|
|
2024-10-22 19:10:46 +08:00
|
|
|
|
可以设置文本的黄色外框{@style=display: inline-block; border: 1px solid yellow;}
|