Text Formatting
Markdown lets you express yourself easier by formatting text using a special set of rules. To alter your text display, type your message normally and add these special rules to your text to have it displayed differently.
Text Style
You can use either an underscore _
or a star *
around a word to make it italic. Use two of the same characters to make the text render in bold.
_italics_
renders as italics**bold**
renders as bold**_bold-italic_**
renders as~~strikethrough~~
renders as
Emojis
Open the emoji autocomplete by typing a colon :
followed by two characters. A full list of emojis can be found here.
:smile: :+1: :sheep:
Renders as:
Links
Create labeled links by putting the desired text in square brackets and the associated link in normal brackets.
[Boomea!](https://boomea.com/)
Renders as: Boomea!
Headings
Make a heading by typing # and a space before your title. For smaller headings, use more #’s.
## Large Heading
### Smaller Heading
#### Even Smaller Heading
Renders as:
Lists
Create a list by using stars *
or hyphens -
as bullets. You’ll need to type the character then a space, and then your text. Indent the next bullet by adding 2 spaces in your text before the *
or -
. Always use SHIFT + ENTER
to start a new line without sending the chat message.
* item one
* item two
* item two sub-point
Renders as:
- item one
- item two
- item two sub-point
Make it a numbered list
1. Item one
1. Item two
1. item three
Renders as:
- Item one
- Item two
- Item three
You can also start a list at any number:
4. The first list number is 4.
1. The second list number is 5.
1. The third list number is 6.
Renders as:
- The first list number is 4.
- The second list number is 5.
- The third list number is 6.
Make a task list by including square brackets:
- [ ] Item one
- [ ] Item two
- [x] Completed item
Renders as:
Code Block
Creating a fixed width code block is recommended for pasting multi-line blocks of code or other text output that is easier to read with fixed width font alignment. Examples include block text snippets, ASCII tables, and log files.
This can be accomplished in one of two ways:
- Placing 3x backtics
```
on the line directly above and directly below your code
```
this is my
code block
```
- TIP – Enter 3x backticks
```
,SHIFT + ENTER
,<type_your_code>
,SHIFT + ENTER
, and finally 3x backticks```
.
- Indenting each line by four spaces
this is my
code block
^^^^ 4x spaces
Syntax Highlighting
To add syntax highlighting, type the language to be highlighted after the ```
at the beginning of the code block. Mattermost also offers four different code themes (GitHub, Solarized Dark, Solarized Light, Monokai) that can be changed in Account Settings > Display > Theme > Custom Theme > Center Channel Styles
Supported languages are: actionscript
, applescript
, bash
, clojure
, coffeescript
, cpp
, cs
, css
, d
, dart
, delphi
, diff
,
django
, dockerfile
, erlang
, fortran
, fsharp
, gcode
, go
, groovy
, handlebars
, haskell
, haxe
, java
, javascript
, json
,
julia
, kotlin
, less
, lisp
, lua
, makefile
, markdown
, matlab
, objectivec
, ocaml
, perl
, php
, powershell
, puppet
,
python
, r
, ruby
, rust
, scala
, scheme
, scss
, smalltalk
, sql
, stylus
, swift
, tex
, text
, vbnet
, vbscript
, verilog
,
xml
, yaml
Example:
``` go
package main
import "fmt"
func main() {
fmt.Println("Hello, 世界")
}
```
Renders as:
GitHub Theme
Solarized Dark Theme
Solarized Light Theme
Monokai Theme
In-line Code
Create in-line monospaced font by surrounding it with backticks (`), not with single quotes (‘).
`monospace`
Renders as: monospace
.
Lines
Create a line by using three *
, _
, or -
.
***
renders as:
Block quotes
Create block quotes using >
.
> block quotes
renders as:
Tables
Create a table by placing a dashed line under the header row and separating the columns with a pipe |
. (The columns don’t need to line up exactly for it to work). Choose how to align table columns by including colons :
within the header row.
| Left-Aligned | Center Aligned | Right Aligned |
| :------------ |:---------------:| -----:|
| Left column 1 | this text | $100 |
| Left column 2 | is | $10 |
| Left column 3 | centered | $1 |
Renders as:
Math Formulas
Create formulas by using LaTeX in a latex
Code Block
```latex
X_k = \sum_{n=0}^{2N-1} x_n \cos \left[\frac{\pi}{N} \left(n+\frac{1}{2}+\frac{N}{2}\right) \left(k+\frac{1}{2}\right) \right]
```
Renders as: