--- format: Markdown ... Using gitit =========== Wiki links and formatting ------------------------- For instructions on editing pages and creating links, see the "Help" page. Gitit interprets links with empty URLs as wikilinks. Thus, in markdown pages, `[Front Page]()` creates an internal wikilink to the page `Front Page`. In reStructuredText pages, `` `Front Page <>`_ `` has the same effect. If you want to link to a directory listing for a subdirectory, use a trailing slash: `[foo/bar/]()` creates a link to the directory for `foo/bar`. Page metadata ------------- Pages may optionally begin with a metadata block. Here is an example: --- format: latex+lhs categories: haskell math toc: no title: Haskell and Category Theory ... \section{Why Category Theory?} The metadata block consists of a list of key-value pairs, each on a separate line. If needed, the value can be continued on one or more additional line, which must begin with a space. (This is illustrated by the "title" example above.) The metadata block must begin with a line `---` and end with a line `...` optionally followed by one or more blank lines. (The metadata block is a valid YAML document, though not all YAML documents will be valid metadata blocks.) Currently the following keys are supported: format : Overrides the default page type as specified in the configuration file. Possible values are `markdown`, `rst`, `latex`, `html`, `markdown+lhs`, `rst+lhs`, `latex+lhs`. (Capitalization is ignored, so you can also use `LaTeX`, `HTML`, etc.) The `+lhs` variants indicate that the page is to be interpreted as literate Haskell. If this field is missing, the default page type will be used. categories : A space or comma separated list of categories to which the page belongs. toc : Overrides default setting for table-of-contents in the configuration file. Values can be `yes`, `no`, `true`, or `false` (capitalization is ignored). title : By default the displayed page title is the page name. This metadata element overrides that default. Highlighted source code ----------------------- If gitit was compiled against a version of pandoc that has highlighting support (see above), you can get highlighted source code by using [delimited code blocks]: ~~~ {.haskell .numberLines} qsort [] = [] qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++ qsort (filter (>= x) xs) ~~~ To see what languages your pandoc was compiled to highlight: pandoc -v [delimited code blocks]: http://pandoc.org/README.html#delimited-code-blocks Adding support for math ----------------------- To write math on a markdown-formatted wiki page, just enclose it in dollar signs, as in LaTeX: Here is a formula: $\frac{1}{\sqrt{c^2}}$ You can write display math by enclosing it in double dollar signs: $$\frac{1}{\sqrt{c^2}}$$ Gitit can display TeX math in three different ways, depending on the setting of `math` in the configuration file: 1. `mathjax` (default): Math will be rendered using the [MathJax] javascript. 2. `mathml`: Math will be converted to MathML using [texmath]. This method works with IE+mathplayer, Firefox, and Opera, but not Safari. 3. `raw`: Math will be rendered as raw LaTeX codes. [MathJax]: https://www.mathjax.org/