在我学习使用markdown表示算式过程中,搜罗到的有用的博客或者连接,在此罗列出,以便以后查阅使用,不定时补充。如有不妥请指出,感谢。
序号后蓝色字体均为连接,点击可跳转查看。
Typora
我安装了Typora编译器。Typora如何导入pandoc参考:
pandoc和Typora简介-安装-简易操作
markdown + pandoc 生成 docx / pdf
pandoc参考文档:pandoc通用文档转换器
使用:
# 打开终端窗口,windows下打开cmd
#将input.txt文件转换为output.html文件。-o参数表示输出文件
pandoc -o output.html input.txt
-f: 指定输入格式,比如docx、epub、md、html等
-t: 指定输出格式,比如docx、epub、md、html等
-o: 输出到file文件
–verbost: 显示详细调试信息
–log: 指定输出日志信息
–list-input-formats:列出支持的输入格式。
–list-output-formats:列出支持的输出格式。
–list-extensions:列表支持Markdown扩展,后面跟一个+或者-说明是否在pandoc的Markdown中默认启用。
–list-highlight-languages:列出语法突出显示支持的语言。
–list-highlight-styles:列出支持语法高亮的样式。。
-v: 打印版本信息。
-h:显示语法帮助
# 一些例子
# 可以通过自定义样式使其更加美观:
pandoc -s test.md -o test.docx
pandoc -s test.md --reference-doc reference.docx -o test.docx
# 转PDF
pandoc -s test.md --pdf-engine=xelatex -o test.pdf --number-sections --template pm-template.latex
1
# 获取网页内容,并将其转换为markdown格式
pandoc -f html -t markdown http://www.fsf.org
# 将input.txt文件作为markdown输入,转换为latex
pandoc -f markdown -t latex input.txt
# 如果未指定-f、-t,pandoc则会根据输入文件输出文件的后缀来转换
pandoc input.txt -o output.pdf
# pandoc要求输入输出使用utf8编码,可以使用iconv命令进行编码转换
iconv -t utf-8 input.txt | pandoc | iconv -f utf-8
# 如果需要使用tex生成pdf文件,则需要下载latex编译器
`
MarkDown
( ´ ▽ ‘ ʃ ƪ ) \color{blue}{(´▽`ʃƪ)} (´▽‘ʃƪ)
1.MarkDown符号大全
2.MathJax basic tutorial and quick reference
3.使用Typora添加数学公式
我使用过的符号合集:
效果 | 代码 |
---|---|
a b \frac{a}{b} ba | \frac{a}{b} |
∞ \infty ∞ | \infty |
≠ \neq ̸= | \neq |
a n a_n an | 在"$$"中为a_n |
an | 普通为~符号 |
≤ \leq ≤ | \leq |
≥ \geq ≥ | \geq |
lim n → ∞ \lim_{n\to \infty} n→∞lim | \lim_{n\to \infty} |
ε \varepsilon ε | \varepsilon |
∀ \forall ∀ | \forall |
∃ \exists ∃ | \exists |
∈ \in ∈ | \in |
∑ j = 0 10 \sum_{j=0}^{10} j=0∑10 | \sum_{j=0}^{10} |
⋂ ⋃ \bigcap \bigcup ⋂⋃ | \bigcap \bigcup |
4.mark down编辑器如何加空格
半方大的空白 或 
全方大的空白 或 
不断行的空白格 或 
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
−
\color{yellow}{--------------------------------------------------------------------}
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
以下是优快云/Typora中Markdown使用。优快云中并不一定可以兼容所有使用方法,需要自行尝试:
1.在优快云-Markdown中书写多行大括号公式
方法一:
$$ f(x)=\left\{
\begin{aligned}
x & = & \cos(t) \\
y & = & \sin(t) \\
z & = & \frac xy
\end{aligned}
\right.
$$
方法二:
$$ F^{HLLC}=\left\{
\begin{array}{rcl}
F_L & & {0 < S_L}\\
F^*_L & & {S_L \leq 0 < S_M}\\
F^*_R & & {S_M \leq 0 < S_R}\\
F_R & & {S_R \leq 0}
\end{array} \right. $$
方法三:
$$f(x)=
\begin{cases}
0& \text{x=0}\\
1& \text{x!=0}
\end{cases}$$
2.优快云的MarkDown图片大小的调整
关键调整图片代码:
<img src="连接" width="60%" alt=""/>
例如:
<img src="https://img-blog.youkuaiyun.com/20170120190855355?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdTAxMDQxNjEwMQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" width="60%" alt=""/>
3. typora中使用流程图
参考链接:【mermaid】01 typora中使用流程图
关键信息:
1.流程图
方向是:
TB - 从上到下
BT - 从下到上
RL - 从右到左
LR - 从左到右
TD - 与TB相同
节点形状见事例。
```mermaid
graph LR
A[长方形] -- 链接 --> B((圆))
A -.-> C(圆角长方形)
B --> D{菱形}
C --> D
D -->E>特殊]
E -->F["特殊字符:#9829;"]
```
效果:
2.子图
```mermaid
graph TB
c1-->a2
subgraph one
a1-->a2
end
subgraph two
b1-->b2
end
subgraph three
c1-->c2
end
```
效果:
3.样式链接
```mermaid
graph LR
id1(Start)-->id2(Stop)
style id1 fill:#f9f,stroke:#333,stroke-width:4px
style id2 fill:#ccf,stroke:#f66,stroke-width:2px,stroke-dasharray: 5, 5
```
效果:
4.对fontawesome的基本支持
图标通过语法fa:#icon class name#来获取
```mermaid
graph TD
B["fa:fa-twitter 和平"]
B-->C[fa:fa-ban 禁止]
B-->D(fa:fa-spinner);
B-->E(A fa:fa-camera-retro 也许?);
```
效果:
居中
<center></center>