markup.DocBook 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. <sect1 id="markdown">
  2. <title>Markdown</title>
  3. <para>
  4. This wiki's pages are written in
  5. <ulink url="http://pandoc.org">pandoc</ulink>'s
  6. extended form of
  7. <ulink url="http://daringfireball.net/projects/markdown">markdown</ulink>.
  8. If you're not familiar with markdown, you should start by looking at
  9. the
  10. <ulink url="http://daringfireball.net/projects/markdown/basics">markdown
  11. &quot;basics&quot; page</ulink> and the
  12. <ulink url="http://daringfireball.net/projects/markdown/syntax">markdown
  13. syntax description</ulink>. Consult the
  14. <ulink url="http://pandoc.org/README.html">pandoc
  15. User's Guide</ulink> for information about pandoc's syntax for
  16. footnotes, tables, description lists, and other elements not present
  17. in standard markdown.
  18. </para>
  19. <para>
  20. Markdown is pretty intuitive, since it is based on email
  21. conventions. Here are some examples to get you started:
  22. </para>
  23. <table>
  24. <tr>
  25. <td>
  26. <literal>*emphasized text*</literal>
  27. </td>
  28. <td>
  29. <emphasis>emphasized text</emphasis>
  30. </td>
  31. </tr>
  32. <tr>
  33. <td>
  34. <literal>**strong emphasis**</literal>
  35. </td>
  36. <td>
  37. <emphasis role="strong">strong emphasis</emphasis>
  38. </td>
  39. </tr>
  40. <tr>
  41. <td>
  42. <literal>`literal text`</literal>
  43. </td>
  44. <td>
  45. <literal>literal text</literal>
  46. </td>
  47. </tr>
  48. <tr>
  49. <td>
  50. <literal>\*escaped special characters\*</literal>
  51. </td>
  52. <td>
  53. *escaped special characters*
  54. </td>
  55. </tr>
  56. <tr>
  57. <td>
  58. <literal>[external link](http://google.com)</literal>
  59. </td>
  60. <td>
  61. <ulink url="http://google.com">external link</ulink>
  62. </td>
  63. </tr>
  64. <tr>
  65. <td>
  66. <literal>![folder](/img/icons/folder.png)</literal>
  67. </td>
  68. <td>
  69. <inlinemediaobject>
  70. <imageobject>
  71. <imagedata fileref="/img/icons/folder.png" />
  72. </imageobject>
  73. </inlinemediaobject>
  74. </td>
  75. </tr>
  76. <tr>
  77. <td>
  78. Wikilink: <literal>[Front Page]()</literal>
  79. </td>
  80. <td>
  81. Wikilink: <ulink url="">Front Page</ulink>
  82. </td>
  83. </tr>
  84. <tr>
  85. <td>
  86. <literal>H~2~O</literal>
  87. </td>
  88. <td>
  89. H<subscript>2</subscript>O
  90. </td>
  91. </tr>
  92. <tr>
  93. <td>
  94. <literal>10^100^</literal>
  95. </td>
  96. <td>
  97. 10<superscript>100</superscript>
  98. </td>
  99. </tr>
  100. <tr>
  101. <td>
  102. <literal>~~strikeout~~</literal>
  103. </td>
  104. <td>
  105. <emphasis role="strikethrough">strikeout</emphasis>
  106. </td>
  107. </tr>
  108. <tr>
  109. <td>
  110. <literal>$x = \frac{{ - b \pm \sqrt {b^2 - 4ac} }}{{2a}}$</literal>
  111. </td>
  112. <td>
  113. $x = \frac{{ - b \pm \sqrt {b^2 - 4ac} }}{{2a}}$<footnote>
  114. <para>
  115. If this looks like code, it's because MathJax is not installed on
  116. your system. Contact your administrator to request it.
  117. </para>
  118. </footnote>
  119. </td>
  120. </tr>
  121. <tr>
  122. <td>
  123. <literal>A simple footnote.^[Or is it so simple?]</literal>
  124. </td>
  125. <td>
  126. A simple footnote.<footnote>
  127. <para>
  128. Or is it so simple?
  129. </para>
  130. </footnote>
  131. </td>
  132. </tr>
  133. <tr>
  134. <td>
  135. <pre>
  136. > an indented paragraph,
  137. > usually used for quotations
  138. </pre>
  139. </td>
  140. <td>
  141. <blockquote>
  142. <para>
  143. an indented paragraph, usually used for quotations
  144. </para>
  145. </blockquote>
  146. </td>
  147. <tr>
  148. <td>
  149. <pre>
  150. #!/bin/sh -e
  151. # code, indented four spaces
  152. echo "Hello world"
  153. </pre>
  154. </td>
  155. <td>
  156. <programlisting>
  157. #!/bin/sh -e
  158. # code, indented four spaces
  159. echo &quot;Hello world&quot;
  160. </programlisting>
  161. </td>
  162. </tr>
  163. <tr>
  164. <td>
  165. <pre>
  166. * a bulleted list
  167. * second item
  168. - sublist
  169. - and more
  170. * back to main list
  171. 1. this item has an ordered
  172. 2. sublist
  173. a) you can also use letters
  174. b) another item
  175. </pre>
  176. </td>
  177. <td>
  178. <itemizedlist spacing="compact">
  179. <listitem>
  180. <para>
  181. a bulleted list
  182. </para>
  183. </listitem>
  184. <listitem>
  185. <para>
  186. second item
  187. </para>
  188. <itemizedlist spacing="compact">
  189. <listitem>
  190. <para>
  191. sublist
  192. </para>
  193. </listitem>
  194. <listitem>
  195. <para>
  196. and more
  197. </para>
  198. </listitem>
  199. </itemizedlist>
  200. </listitem>
  201. <listitem>
  202. <para>
  203. back to main list
  204. </para>
  205. <orderedlist numeration="arabic" spacing="compact">
  206. <listitem>
  207. <para>
  208. this item has an ordered
  209. </para>
  210. </listitem>
  211. <listitem>
  212. <para>
  213. sublist
  214. </para>
  215. <orderedlist numeration="loweralpha" spacing="compact">
  216. <listitem>
  217. <para>
  218. you can also use letters
  219. </para>
  220. </listitem>
  221. <listitem>
  222. <para>
  223. another item
  224. </para>
  225. </listitem>
  226. </orderedlist>
  227. </listitem>
  228. </orderedlist>
  229. </listitem>
  230. </itemizedlist>
  231. </td>
  232. </tr>
  233. <tr>
  234. <td>
  235. <pre>
  236. Fruit Quantity
  237. -------- -----------
  238. apples 30,200
  239. oranges 1,998
  240. pears 42
  241. Table: Our fruit inventory
  242. </pre>
  243. </td>
  244. <td>
  245. <table>
  246. <title>
  247. Our fruit inventory
  248. </title>
  249. <tgroup cols="2">
  250. <colspec align="left" />
  251. <colspec align="right" />
  252. <thead>
  253. <row>
  254. <entry>
  255. Fruit
  256. </entry>
  257. <entry>
  258. Quantity
  259. </entry>
  260. </row>
  261. </thead>
  262. <tbody>
  263. <row>
  264. <entry>
  265. apples
  266. </entry>
  267. <entry>
  268. 30,200
  269. </entry>
  270. </row>
  271. <row>
  272. <entry>
  273. oranges
  274. </entry>
  275. <entry>
  276. 1,998
  277. </entry>
  278. </row>
  279. <row>
  280. <entry>
  281. pears
  282. </entry>
  283. <entry>
  284. 42
  285. </entry>
  286. </row>
  287. </tbody>
  288. </tgroup>
  289. </table>
  290. </td>
  291. </tr>
  292. </table>
  293. <para>
  294. For headings, prefix a line with one or more <literal>#</literal>
  295. signs: one for a major heading, two for a subheading, three for a
  296. subsubheading. Be sure to leave space before and after the heading.
  297. </para>
  298. <programlisting>
  299. # Markdown
  300. Text...
  301. ## Some examples...
  302. Text...
  303. </programlisting>
  304. <sect2 id="wiki-links">
  305. <title>Wiki links</title>
  306. <para>
  307. Links to other wiki pages are formed this way:
  308. <literal>[Page Name]()</literal>. (Gitit converts markdown links
  309. with empty targets into wikilinks.)
  310. </para>
  311. <para>
  312. To link to a wiki page using something else as the link text:
  313. <literal>[something else](Page Name)</literal>.
  314. </para>
  315. <para>
  316. Note that page names may contain spaces and some special
  317. characters. They need not be CamelCase. CamelCase words are
  318. <emphasis>not</emphasis> automatically converted to wiki links.
  319. </para>
  320. <para>
  321. Wiki pages may be organized into directories. So, if you have
  322. several pages on wine, you may wish to organize them like so:
  323. </para>
  324. <programlisting>
  325. Wine/Pinot Noir
  326. Wine/Burgundy
  327. Wine/Cabernet Sauvignon
  328. </programlisting>
  329. <para>
  330. Note that a wiki link <literal>[Burgundy]()</literal> that occurs
  331. inside the <literal>Wine</literal> directory will link to
  332. <literal>Wine/Burgundy</literal>, and not to
  333. <literal>Burgundy</literal>. To link to a top-level page called
  334. <literal>Burgundy</literal>, you'd have to use
  335. <literal>[Burgundy](/Burgundy)</literal>.
  336. </para>
  337. <para>
  338. To link to a directory listing for a subdirectory, use a trailing
  339. slash: <literal>[Wine/]()</literal> will link to a listing of the
  340. <literal>Wine</literal> subdirectory.
  341. </para>
  342. </sect2>
  343. </sect1>