Writing Markdown and LaTeX in Nebula
Nebula uses Markdown to format text. Markdown is a lightweight markup language with plain text formatting syntax. It is designed so that it can be converted to HTML and many other formats using a tool by the same name. Markdown is often used to format readme files, for writing messages in online discussion forums, and to create rich text using a plain text editor.
Nebula uses Mathjax to render LaTeX math. This means that you can write LaTeX math in your markdown.
Interactive examples
All examples in this page are interactive. Feel free to play around with them!
Select the Source
tab to see the markdown source code or select Side-by-side
to see the rendered markdown and the source code side-by-side.
Table of contents
Learn more
Sirius A organises a Yearly LaTeX workshop. Keep an eye on the Sirius A announcements chat for more information.
For more information on Markdown, see Markdown Documentation.
For more information on Latex, see here.
For more information on Mathjax, see here.
Writing Mathemathics in Nebula
While nebula uses latex style notation for math, not all latex commands are supported. For a list of supported commands, see here. Some notations are slightly different as well. So if you’re having trouble with a specific command, take a look at the documentation below, look at documentation for mathjax, or contact Cosmic Web.
Some things to keep in mind:
- You might have to escape
\
characters. For example, in matrices you have to write\\\\
instead of\\
to add a new row.
LaTeX Math Cheat Sheet
A nice LaTeX math cheat sheet can be found here.
Advanced math
More advanced math can be found below in the More mathematical typesetting section.
Inline math
Inline math is written between dollar signs. For example:
$ x^2 + y^2 = z^2 $
… will render as:
Display math
Display math is written between double dollar signs. Display math is centered and takes up the full width of the page.
For example:
$$ x^2 + y^2 = z^2 $$
… will render as:
Numbered equations
Numbered equations are written between \begin{equation}
and \end{equation}
. For example:
\begin{equation}
x^2 + y^2 = z^2
\end{equation}
\begin{equation}
x^2 + y^2 = z^2
\end{equation}
… will render as:
References
You can reference numbered equations using \eqref{}
or \ref{}
. For example:
\begin{equation}
x^2 + y^2 = z^2
\label{eq:pythagorean}
\end{equation}
\begin{equation}
x^2 + y^2 = z^2
\label{eq:pythagorean2}
\end{equation}
Equation \eqref{eq:pythagorean} is the same as equation \eqref{eq:pyrhagorean2}.
… will render as:
Formatting text with markdown
Headers
Headers are written with the #
symbol. The number of #
symbols determines the size of the header.
# Header
## Subheader
### Subsubheader
… will render as:
Lists
Unordered lists
Unordered lists are written with the -
symbol.
- Item 1
- Item 2
- Item 3
… will render as:
Ordered lists
To create an ordered list use 1.
for each item.
1. Item 1
1. Item 2
1. Item 3
… will render as:
Images
Images are written with the following syntax:

Example
Links
Links are written with the following syntax:
[Link description](https://example.com)
Example
Tables
Tables are written with the following syntax:
| Header 1 | Header 2 | Header 3 |
| -------- | -------- | -------- |
| Item 1 | Item 2 | Item 3 |
| Item 4 | Item 5 | Item 6 |
… will render as:
More information
More information on tables can be found here.
Code
Inline code
Inline code is written between backticks.
This is a line with `inline code`!
… will render as:
Code blocks
Code blocks are written between triple backticks.
```
def function():
print("This is a code block!")
```
Syntax highlighting
A language can be specified after the first set of backticks. This will enable syntax highlighting.
```python
def function():
print("This is a python code block!")
```
```c
#include<stdio.h>
int main() {
printf("Hello World with C!");
return 0;
}
```
… will render as:
Supported languages
A list of supported languages can be found here.
More mathematical typesetting
The following examples will only be shown in the editor. To look at the source code, select the Source
or Side-by-side
tab.
Source
These examples were adapted from this page.