Wiki editing guide: Difference between revisions
More actions
No edit summary |
No edit summary |
||
| Line 16: | Line 16: | ||
We have a script that [https://gitlab.com/e62Lab/e62numcodes/blob/master/scripts/backup_wiki_static.sh copies wiki as static pages]. It is located in <code>scripts/</code> folder in our repo. | We have a script that [https://gitlab.com/e62Lab/e62numcodes/blob/master/scripts/backup_wiki_static.sh copies wiki as static pages]. It is located in <code>scripts/</code> folder in our repo. | ||
It can be run directly or by going into your build folder and running <code>make static_wiki</code>. | It can be run directly or by going into your build folder and running <code>make static_wiki</code>. | ||
==Adding figures== | |||
There is a drop option to upload an image. To actually insert it in the article (wanting to refer to it later) use the following example | |||
<syntaxhighlight lang="html" line> | |||
<figure id="fig:my_figure_label"> | |||
[[File:name_of_my_figure.png|thumb|upright=2|alt=An alternative text, that appears if the figure cannot be shown|<caption>The caption under the figure</caption>]] | |||
</figure> | |||
</syntaxhighlight> | |||
To make a reference to the image, use the code | |||
<syntaxhighlight lang="html" line> | |||
<xr id="fig:my_figure_label"/> | |||
</syntaxhighlight> | |||
Revision as of 15:21, 26 October 2016
MathJax
<nomathjax>User either $ $ or \( \) for inline math and $$ $$ or \[ \] for display style math. You can also use environments, such as align, align*, equation. Equations within numbered environments may be labeled with \label and referenced with \ref or, better, \eqref.</nomathjax>
New commands
New $\LaTeX$ command for the current document can be defined using \newcommand.
Globally, commands can be added as macros in the wiki/MathJax/config/default.js file around line 544.
Defined commands:
- \N, \Z, \Q, \R, \C for basic sets $\N, \Z, \Q, \R, \C$
- \T for matrix transpose $A^\T$.
- \b{x} for bold symbols (including greek letters $\b{\alpha}$.
Static pages
We have a script that copies wiki as static pages. It is located in scripts/ folder in our repo.
It can be run directly or by going into your build folder and running make static_wiki.
Adding figures
There is a drop option to upload an image. To actually insert it in the article (wanting to refer to it later) use the following example
<figure id="fig:my_figure_label">
[[File:name_of_my_figure.png|thumb|upright=2|alt=An alternative text, that appears if the figure cannot be shown|<caption>The caption under the figure</caption>]]
</figure>
To make a reference to the image, use the code
<xr id="fig:my_figure_label"/>