0%

notes on markdown

How to use markdown on Typora

[TOC]

1. Headline

use #headline to write a headline. The second headline is ##headline2 and so forth till 6th headline.

2. split line

use --- to establish a split line. more than three(included) - ,*, _, or +would also do.

3. font

**bold** for bold,

*italic* for italic,

***itlic bold*** for italic bold and

~~crossline~~ for crossline

4. quotation

1
2
3
4
5
code:
>first order quotation
>>second order quotation
...
>>>>>>>> Nth order quotion

first order quotation

second order quotation

Nth order quotion

5. Category creating

easy to use, simply type [TOC] and you get the category out of headlines

category

6. Code blocks

1. inline tags

use ` on both sides of tagged content for one line codes

1
`hello world, print()`

hello world, print()

2. Multiline code blocks

use ``` on both sides to creat code blocks

Code:

1
2
3
4
5
6
```python
a = 1
b = 2
a + b
>>> 3
```

Result:

1
2
3
4
a = 1
b = 2
a + b
>>>3

python closely after ````` tells what language and so what color of words to present

  1. [百度](https://www.baidu.com/)

百度

  1. [百度2][baidu]
    [baidu]: https://ww.baidu.com

  2. <https://www.baidu.com>

https://www.baidu.com

  1. Mail: <tuy@mail.sustc.edu.cn>

tuy@mail.sustc.edu.cn

  1. Pictures. (some might not load)

image-20191203153619763

  1. Online videos

    <iframe height=498 width=850 src='https://www.bilibili.com/video/av1205827/?spm_id_from=333.788.videocard.19' frameborder=0 'allowfullscreen'></iframe>

8. list

  1. this is list one

    1. 1. this is list one
  2. list 2

    • * list 2

    • list 2

      var a = 10; //code in lists

9. task management

- [x] Task 1

- [ ] Task 2

Remember that for undone tasks, you need to add space in [ ].

  • Task 1

  • Task 2

  • Task 3

10. Charts

1. table

start a new line with |----|----| and “enter” when finished. Adjustments could be made later like word/excel.

name gender major

2. Charts

11. Flow chart

  • notice that when typing st=>start: begining sentence there is a blankspace after : and the same for other five type of var: end, operation, subroutine, condition, and inputoutput

  • Also be careful that cond(yes) and cond(no) should come closely next to its former flow sentence and no blankspace should be placed. For example, codes like this doesn’t work:

    1
    2
    3
    st->op->cond

    cond(yes)->io->end
1
2
3
4
5
6
7
8
9
st=>start: input x
op=>operation: x + 1
cond=>condition: x > 10
io=>inputoutput: x
sub=>subroutine: x * 2
e=>end: end
st->op->cond
cond(yes)->io->e
cond(no)->sub(right)->op

12. Font color, size, face

13. Escape character (转义字符)

use HTML notations \ before every character that contrast with markdown programming.

code

1
2
3
4
\\  //反斜杠
\` //反引号
\* //星号
\{\} //大括号

demo

\

`

{}

14. Comment

Outside of comments <!-- comments --> outside of comments

Outside of commentsoutside of comments

15. In-text Jump-to

  • use HTML tags to achieve this purpose, only works on html formed file, unavilable on pdf; " "or ' 'or adding no quotation marks also works
  1. define a tag: <span id="jump">destination</span>

  2. jump to: [click to jump](#jump)

    Demo:

    this is for test in-text-jump

    hello

  • use link to jump, only works for headlines (does not work for webhtml)
  1. [click to jump](#8. List)

16. Cross reference

to be continued…

17 Math

  1. Parentheses: (\frac{}{}) gives small parentheses: $(\frac{\sqrt a}{y^3})$, while \left(...\right) helps adjust the size of parentheses. \left(\frac{1}{2a}\right) gives $\left(\frac{\sqrt a}{y^3}\right)$.

    \lbrace gives $\lbrace$ , \rbrace gives $\rbrace$. There are also invisible parentheses, denoted by .: \left.\frac12\right\rbrace is $\left.\frac12\right\rbrace$. \left\lbrace\frac12\right. is $\left\lbrace\frac12\right.$ which is useful in array or multilined equations.

  2. Fracetions: \frac{..}{..} and {..\over..} show the same thing ${a+\sqrt x \over \int_0^\infin x{\rm d}x}$. Remember that \cfrac gives continued fraction $\cfrac{a_1}{a_2+\cfrac{1}{a_3+\cfrac{1}{a_4}}}$. Also gives a larger and better format for $\cfrac{a+\sqrt x}{\int_0^\infty x{\rm d}x}$.

  3. special functions: \lim_{x\to 0} gives $\lim_{x\to 0}$, \displaystyle gives $\displaystyle \lim_{x\to 0}$. $\sum\limits_{x\to 0}^\infty$ gives $\sum\limits_{x\to 0}^\infty$

  4. space: a\ b gives a small space $a\ b$, while a\quad b gives a larger space $a\quad b$, a\qquad b rather larger $a\qquad b$.

  5. dots: \ldots gives $a_1,a_2,\ldots,a_n$ while \cdots gives $a_1+a_2+\cdots+a_n$. Note that there are vertical dots and inclined dots: \vdots and ddots give $\vdots$ and $\ddots$ which are useful in matrix. be careful that \ddot is $\ddot x$ and \dddot gives $\dddot x$

  6. aligned equations:

    1
    2
    3
    4
    \begin{align}
    y &= \sqrt {x^2} + \frac{ax^3+bx^2}{x^4+x^2} \\
    &= x + \frac{ax+b}{x^2+1}\\
    \end{align}

    is

    $$
    \begin{align}
    y &= \sqrt {x^2} + \frac{ax^3+bx^2}{x^4+x^2} \
    &= x + \frac{ax+b}{x^2+1}\
    \end{align}
    $$

  7. Custom command: $ \newcommand{\SES}[3]{0 \to #1 \to #2 \to #3 \to 0} $ gives $\newcommand{\SES}[3]{0 \to #1 \to #2 \to #3 \to 0}$ $\SES{A}{B}{C}$. (noting that there is a piece of code unseen before the result). \def does the same work: \def \ses#1#2#3{0\to #1\to #2\to #3\to 0}

18 New line

1
2
a b c space space shift+enter
a b

a b c
a b

1
2
3
a b c shit+enter
a b

a b c
a b

1
2
3
a b c enter
a b

a b c

a b

Line spaces are different between using shft+enter and enter alone, having two spaces before shift+enter creates new line in exported files like pdf while not having them doesn’t.

19. 两端对齐

1
2
3
<p style="text-align:justify; text-justify:inter-ideograph;>HTML如何让文本两端对齐HTML如何让文本两端对齐HTML如何让文本两端对齐HTML如何让文本两端对齐HTML如何让文本两端对齐HTML如何让文本两端对齐</p>
  text-align:justify:这是文本对齐标签只是英文字体有效果,中文字体没有作用,如果想中文也能两端对齐就加上text-justify:inter-ideograph。