Advertisement
Guest User

Untitled

a guest
Apr 26th, 2018
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.13 KB | None | 0 0
  1. # Markdown syntax guide and writing on MWeb
  2.  
  3. ## Philosophy
  4.  
  5. > Markdown is intended to be as easy-to-read and easy-to-write as is feasible.
  6. > Readability, however, is emphasized above all else. A Markdown-formatted document should be publishable as-is, as plain text, without looking like it's been marked up with tags or formatting instructions.
  7. > Markdown's syntax is intended for one purpose: to be used as a format for *writing* for the web.
  8.  
  9. <!-- more -->
  10.  
  11. ## Notice
  12.  
  13. You can use `CMD + 4` or `CMD + R` to preview the result.
  14.  
  15. ## Headers
  16.  
  17. **Example:**
  18.  
  19. ```
  20. # This is an `<h1>` tag
  21. ## This is an `<h2>` tag
  22. ###### This is an `<h6>` tag
  23. ```
  24.  
  25. **Result:**
  26.  
  27. # This is an `<h1>` tag
  28. ## This is an `<h2>` tag
  29. ###### This is an `<h6>` tag
  30.  
  31. ## Emphasis
  32.  
  33. **Example:**
  34.  
  35. ```
  36. *This text will be italic*
  37. _This will also be italic_
  38.  
  39. **This text will be bold**
  40. __This will also be bold__
  41. ```
  42.  
  43. **Shortcuts:** `CMD + U`、`CMD + I`、`CMD + B`
  44. **Result:**
  45.  
  46. *This text will be italic*
  47. _This will also be italic_
  48.  
  49. **This text will be bold**
  50. __This will also be bold__
  51.  
  52. ## Newlines
  53.  
  54. End a line with two or more spaces + enter.
  55. Just typing enter to newline,please set:`Preferences` - `Themes` - `Translate newlines to <br> tags` enable ( default is enable )
  56.  
  57. ## Lists
  58.  
  59. ### Unordered
  60.  
  61. **Example:**
  62.  
  63. ```
  64. * Item 1 unordered list `* + SPACE`
  65. * Item 2
  66. * Item 2a unordered list `TAB + * + SPACE`
  67. * Item 2b
  68. ```
  69.  
  70. **Shortcuts:** `Option + U`
  71. **Result:**
  72.  
  73. * Item 1 unordered list `* + SPACE`
  74. * Item 2
  75. * Item 2a unordered list `TAB + * + SPACE`
  76. * Item 2b
  77.  
  78. ### Ordered
  79.  
  80. **Example:**
  81.  
  82. ```
  83. 1. Item 1 ordered list `Number + . + SPACE`
  84. 2. Item 2
  85. 3. Item 3
  86. 1. Item 3a ordered list `TAB + Number + . + SPACE`
  87. 2. Item 3b
  88. ```
  89.  
  90. **Result:**
  91.  
  92. 1. Item 1 ordered list `Number + . + SPACE`
  93. 2. Item 2
  94. 3. Item 3
  95. 1. Item 3a ordered list `TAB + Number + . + SPACE`
  96. 2. Item 3b
  97.  
  98. ### Task lists
  99.  
  100. **Example:**
  101.  
  102. ```
  103. - [ ] task one not finish `- + SPACE + [ ]`
  104. - [x] task two finished `- + SPACE + [x]`
  105. ```
  106.  
  107. **Result:**
  108.  
  109. - [ ] task one not finish `- + SPACE + [ ]`
  110. - [x] task two finished `- + SPACE + [x]`
  111.  
  112. ## Images
  113.  
  114. **Example:**
  115.  
  116. ```
  117. ![GitHub set up](https://help.github.com/assets/images/site/set-up-git.gif)
  118. Format: ![Alt Text](url)
  119. ```
  120.  
  121. **Shortcuts:** `Control + Shift + I`
  122. The Library's document support drag & drop or `CMD + V` paste or `CMD + Option + I` to insert the pictrue.
  123. **Result:**
  124.  
  125. ![GitHub set up](https://help.github.com/assets/images/site/set-up-git.gif)
  126.  
  127. In MWeb, you can use `-w + Number` to control image width, for example, set the image width 140px:
  128.  
  129. ![GitHub set up-w140](https://help.github.com/assets/images/site/set-up-git.gif)
  130.  
  131. ## Links
  132.  
  133. **Example:**
  134.  
  135. ```
  136. email <example@example.com>
  137. [GitHub](http://github.com)
  138. autolink <http://www.github.com/>
  139. ```
  140.  
  141. **Shortcuts:** `Control + Shift + L`
  142. The Library's document support drag & drop or `CMD + Option + I` to insert attachment.
  143. **Result:**
  144.  
  145. An email <example@example.com> link.
  146. [GitHub](http://github.com)
  147. Automatic linking for URLs
  148. Any URL (like <http://www.github.com/>) will be automatically converted into a clickable link.
  149.  
  150. ## Blockquotes
  151.  
  152. **Example:**
  153.  
  154. ```
  155. As Kanye West said:
  156. > We're living the future so
  157. > the present is our past.
  158. ```
  159.  
  160. **Shortcuts:** `CMD + Shift + B`
  161. **Result:**
  162.  
  163. As Kanye West said:
  164. > We're living the future so
  165. > the present is our past.
  166.  
  167. ## Inline code
  168.  
  169. **Example:**
  170.  
  171. ```
  172. I think you should use an
  173. `<addr>` `code` element here instead.
  174. ```
  175.  
  176. **Shortcuts:** `CMD + K`
  177. **Result:**
  178.  
  179. I think you should use an
  180. `<addr>` `code` element here instead.
  181.  
  182. ## Multi-line code
  183.  
  184. **Example:**
  185.  
  186. ```js
  187. function fancyAlert(arg) {
  188. if(arg) {
  189. $.facebox({div:'#foo'})
  190. }
  191.  
  192. }
  193. ```
  194.  
  195. **Shortcuts:** `CMD + Shift + K`
  196. **Result:**
  197.  
  198. ```js
  199. function fancyAlert(arg) {
  200. if(arg) {
  201. $.facebox({div:'#foo'})
  202. }
  203.  
  204. }
  205. ```
  206.  
  207. ## Sequence and Flow chart
  208.  
  209. **Example:**
  210.  
  211.  
  212. ```sequence
  213. Andrew->China: Says Hello
  214. Note right of China: China thinks about it
  215. China-->Andrew: How are you?
  216. Andrew->>China: I am good thanks!
  217. ```
  218.  
  219. ```flow
  220. st=>start: Start:>http://www.google.com[blank]
  221. e=>end:>http://www.google.com
  222. op1=>operation: My Operation
  223. sub1=>subroutine: My Subroutine
  224. cond=>condition: Yes
  225. or No?:>http://www.google.com
  226. io=>inputoutput: catch something...
  227.  
  228. st->op1->cond
  229. cond(yes)->io->e
  230. cond(no)->sub1(right)->op1
  231. ```
  232.  
  233.  
  234. **Result:** ( Please enable `Preferences` - `Themes` - `Enable sequence & flow chart`, default is enable. )
  235.  
  236. ```sequence
  237. Andrew->China: Says Hello
  238. Note right of China: China thinks about it
  239. China-->Andrew: How are you?
  240. Andrew->>China: I am good thanks!
  241. ```
  242.  
  243. ```flow
  244. st=>start: Start:>http://www.google.com[blank]
  245. e=>end:>http://www.google.com
  246. op1=>operation: My Operation
  247. sub1=>subroutine: My Subroutine
  248. cond=>condition: Yes
  249. or No?:>http://www.google.com
  250. io=>inputoutput: catch something...
  251.  
  252. st->op1->cond
  253. cond(yes)->io->e
  254. cond(no)->sub1(right)->op1
  255. ```
  256.  
  257.  
  258. More info: <http://bramp.github.io/js-sequence-diagrams/>, <http://adrai.github.io/flowchart.js/>
  259.  
  260.  
  261. ## Tables
  262.  
  263. **Example:**
  264.  
  265. ```
  266. First Header | Second Header
  267. ------------ | -------------
  268. Content from cell 1 | Content from cell 2
  269. Content in the first column | Content in the second column
  270. ```
  271.  
  272. You can create tables by assembling a list of words and dividing them with hyphens - (for the first row), and then separating each column with a pipe |:
  273.  
  274. **Result:**
  275.  
  276. First Header | Second Header
  277. ------------ | -------------
  278. Content from cell 1 | Content from cell 2
  279. Content in the first column | Content in the second column
  280.  
  281.  
  282. ## Strikethrough
  283.  
  284. **Example:**
  285.  
  286. (like ~~this~~)
  287.  
  288. **Result:**
  289.  
  290. Any word wrapped with two tildes (like ~~this~~) will appear crossed out.
  291.  
  292. ## Horizontal Rules
  293.  
  294. Following lines will produce a horizontal rule:
  295.  
  296. ***
  297.  
  298. *****
  299.  
  300. - - -
  301.  
  302. **Result:**
  303.  
  304. ***
  305.  
  306. *****
  307.  
  308. - - -
  309.  
  310. ## MathJax
  311.  
  312. Use double US dollors sign pair for Block level Math formula, and one US dollor sign pair for Inline Level.
  313.  
  314. ```
  315. For example this is a Block level $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}$$ formula, and this is an inline Level $x = {-b \pm \sqrt{b^2-4ac} \over 2a}$ formula.
  316.  
  317. \\[ \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} =
  318. 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}}
  319. {1+\frac{e^{-8\pi}} {1+\ldots} } } } \\]
  320.  
  321. ```
  322.  
  323. **Result:**
  324.  
  325. For example this is a Block level $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}$$ formula, and this is an inline Level $x = {-b \pm \sqrt{b^2-4ac} \over 2a}$ formula.
  326.  
  327. \\[ \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} =
  328. 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}}
  329. {1+\frac{e^{-8\pi}} {1+\ldots} } } } \\]
  330.  
  331. ## Footnote
  332.  
  333. **Example:**
  334.  
  335. ```
  336. This is a footnote:[^sample_footnote]
  337. ```
  338.  
  339. **Result:**
  340.  
  341. This is a footnote:[^sample_footnote]
  342.  
  343. [^sample_footnote]: footnote text detail...
  344.  
  345. ## Comment And Read More..
  346.  
  347. <!-- comment -->
  348. <!-- more -->
  349. Actions->Insert Read More Comment *OR* `CMD + .`
  350.  
  351. ## TOC
  352.  
  353. **Example:**
  354.  
  355. ```
  356. [TOC]
  357. ```
  358.  
  359. **Result:**
  360.  
  361. [TOC]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement