Markdown插件测试

代码高亮

Php代码

function sayHello() {
    return 'Hello! World.';
}

echo sayHello();

C代码

int main() {
    printf("Hello! World.\n");
    return 0;
}

数学公式

Katex块公式

f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi

KaTex 行內公式 f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi

mathjax块公式

\color{black} f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi

mathjax行内公式f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi

mermaid图

sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts prevail...
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!

流程图

graph TD
    A[Start] --> B{Is it?};
    B -->|Yes| C[OK];
    C --> D[Rethink];
    D --> B;
    B ---->|No| E[End];

顺序图

A->B: Message
B->C: Message
C->A: Message

上述功能源码

### 代码高亮

Php代码

\```php
function sayHello() {
    return 'Hello! World.';
}

echo sayHello();
\```

C代码
\```c
int main() {
    printf("Hello! World.\n");
    return 0;
}
\```

### 数学公式

Katex块公式

\```katex
f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi
\```

KaTex 行內公式 `$$ f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi $$`

mathjax块公式

\```mathjax
\color{black} f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi
\```

mathjax行内公式`$ f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi $`

### mermaid图
\```mermaid
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts prevail...
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
\```

### 流程图

\```mermaid
graph TD
    A[Start] --> B{Is it?};
    B -->|Yes| C[OK];
    C --> D[Rethink];
    D --> B;
    B ---->|No| E[End];
\```

### 顺序图

\```seq
A->B: Message
B->C: Message
C->A: Message
\```

奇怪的是就算将MD格式源码塞进代码块里系统还是会自动识别为独立的代码块并将之转换为对应的格式,所以为了规避不得不将所有代码块识别符号前加了一个’\’,如果复制请将之删掉

2 comments

  1. 到达博客最高层!太美丽了md,诶呀这不KaTeX吗,还是看看远方的mermaid吧家人们

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注