[tools] Markdown

添加 figure text 调整大小 text { width=70% } 给图片价格 tag,允许后面跳过来 text As shown in Fig. 1 fig result , the image is included below. { fig result width=75%} 如果是 qmd,tag 原文的标志是一样的。不过在文中添加link

添加 figure

![Figure caption](figures/myplot.png)

调整大小

![Figure caption](figures/myplot.png){ width=70% }

给图片价格 tag,允许后面跳过来

As shown in [Fig. 1](#fig-result), the image is included below.

![Example result figure.](figures/result.png){#fig-result width=75%}

如果是 qmd,tag 原文的标志是一样的。不过在文中添加link 的时候,需要用下面这个@格式

[Fig. 1 @fig-result]
[paper](http://....)

在()里用#tag,然后在相应的位置放{#tag}

[Method](#method)

## Method {#method}

This is the method section.

如果是 qmd,就用

@method
[Method @method]

添加equation

inline行内:

$a^2+b^2=c^2$

单行居中:

$$
E = mc^2
$$

多行对齐:

$$
\begin{aligned}
f(x) &= x^2 + 1 \\
g(x) &= 2x + 3
\end{aligned}
$$

添加 citation

zotero 导出 bib 文件。

打开 zotero,在左侧的 sidebar 里,右键要导出的 library -->export collection,然后 format 选择 BibLaTex(第一个),然后选中 Export Notes, ok 之后选择保存位置。

在 md 的 head 里,在 bibliography 里输入bib 文件名称,然后 link-citations 为 true。

添加 citation 的时候[@citation_tag]即可。文章末尾加上#References 即可自动导出。

---
title: "My Paper"
author: "Your Name"
bibliography: refs.bib
link-citations: true
---

This is a citation [@doe2024].

You can also cite multiple papers [@doe2024; @smith2023].

## References

md导出到 word

pandoc

pandoc example.md -o example.docx --citeproc

--citeproc 会 处理 citation tag,否则就会显示原来的 raw tag。

qmd 导出到 word/html

quarto render example.qmd --to html
quarto render example.qmd --to docx

md例子

---
title: "Minimal Example"
author:
  - "Alice Wang¹,Bob Li²,Carol Chen¹"
bibliography: ref.bib
link-citations: true
---

¹ Department of Example Department, Example University, City, State, Country

² Institute of Example, Example University, City, State, Country

## Minimal Example

To cite one paper [@newman_construction_2013].

An inline equation looks like $a^2+b^2=c^2$.

A display equation is shown below:

$$
E = mc^2
$$

A multi-line aligned equation is shown below:

$$
\begin{aligned}
f(x) &= x^2 + 1 \\
g(x) &= 2x + 3
\end{aligned}
$$

As shown in [Fig. 1](#fig-result), the image is included below.

![Example result figure.](figures/result.png){#fig-result width=75%}

## References

qmd 例子

---
title: "Minimal Example"
author: "Alice Wang¹, Bob Li², Carol Chen¹"
bibliography: ref.bib
link-citations: true
anchor-sections: true
toc-title: Contents
format: html
---

¹ Department of Example Department, Example University, City, State, Country\
² Institute of Example, Example University, City, State, Country

## Minimal Example {#sec-minimal-example}

See @sec-minimal-example and @fig-result.

To cite one paper [@newman_construction_2013].

An example display equation is shown below:

$$
E = mc^2
$$

![Example result figure.](figures/result.png){#fig-result width=75%}

## References