Introduction to Markdown
This section is a continuation from the first-time-user’s guide. It contains a more comprehensive introduction to the Markdown Syntax and introduces special elements that Zettlr supports.
Tip
Even this section only contains the most important syntax elements to get you started. You can find the full and unabridged documentation of all elements you can use in our dedicated section.
Basic Elements
To format Markdown documents, there are a few basic formatting rules that you should know and which we list here:
| Formatting | Syntax | Output |
|---|---|---|
| Emphasis | _italics_ or *italics* | italics |
| Bold | __bold__ or **bold** | bold |
| Strikethrough | ~~text~~ | text |
| Link | [Text](www.example.com) | Text |
| Image |  | |
| Heading | # Heading | Heading |
| Heading 2 | ## Heading 2 | Heading 2 |
| Heading 3 | ### Heading 3 | Heading 3 |
| Heading 4 | #### Heading 4 | Heading 4 |
| Heading 5 | ##### Heading 5 | Heading 5 |
| Heading 6 | ###### Heading 6 | Heading 6 |
| Bullet list | * List item (or + or -) | • List item |
| Item list | 1. List item (or 1)) | 1. List item |
| Footnotes | Some text[^1]. | Some text¹. |
| Footnote reference | [^1]: Footnote text. | ¹ Footnote text. |
| Comment | <!-- Commented out --> | (Not visible) |
| Inline math | $E = mc^2$ | |
| Block math | $$\nE = mc^2\n$ | |
| Horizontal line | *** or --- | |
| Block quote | > Some quote | Some quote |
This list is not exhaustive. Zettlr supports many more elements, which are introduced in their own section.
Keyboard Shortcuts
Zettlr offers a plethora of keyboard shortcuts that make writing Markdown even more efficient, as it will spare you from having to write formatting characters altogether.
You can think of Zettlr’s keyboard shortcuts as being divided into two logical groups. The first group contains common shortcuts that most other apps also incorporate — it follows conventions such as using Cmd/Ctrl+B to make text bold. The second group however comes from writing code — it allows you to both move around your text, and move your text around much more efficiently than most word processors.
Note
Across this documentation, you will often see the "key" Cmd/Ctrl. By that we mean that you'll need to press the Command-key on macOS, and the Control-key otherwise.
- Cmd/Ctrl+B: Make text bold
- Cmd/Ctrl+I: Emphasize text
- Cmd/Ctrl+K: Create a new link. Selected text (if any) will become the link text. If there is a URL in the clipboard, Zettlr automatically uses it as the link target.
- Cmd/Ctrl+Shift+I: Insert an image. Selected text (if any) will become the image title. If there is a URL in the clipboard, Zettlr automatically uses it as the image source.
- Tab: Indent any given list one level. If there is no list, insert a tab character. (If you are using a screen reader and need to use the keyboard to move around the app, press Esc before pressing Tab to un-focus the editor.)
- Shift+Tab: Un-indent a list one level.
- Cmd/Ctrl+C: Copy text as plain
- Cmd/Ctrl+Alt+C: Copy text with formatting (e.g., to paste formatted text into Microsoft Word)
- Cmd/Ctrl+X: Cut text. If there is no selection, this command cuts the entire line.
- Cmd/Ctrl+V: Paste text (if you copied formatted text, this will convert it to Markdown before insertion)
- Cmd/Ctrl+Shift+V: Paste text as plain
- Cmd/Ctrl+Z: Undo
- Cmd/Ctrl+Shift+Z: Redo
- Alt+ArrowUp: Swap current line with the previous
- Alt+ArrowDown: Swap current line with the next
- Alt+Shift+ArrowUp: Copy the current line above
- Alt+Shift+ArrowDown: Copy the current line above
- Alt+L (Ctrl+L on macOS): Select the current line
- Cmd/Ctrl+F: Open the search panel
- Cmd/Ctrl+G: Next occurrence
- Cmd/Ctrl+Shift+G: Previous occurrence
- Cmd/Ctrl+D: Select next occurrence
Note
Zettlr also offers two advanced writing modes: Emacs and Vim. Whenever you activate one of these modes, they will change many keybindings and offer new ones. Those settings are recommended for advanced users only.
Multi-Cursor Editing
To save time during the editing process, you can use multi-cursor editing to make concurrent changes across your document. Then, your keystrokes apply simultaneously to all active cursors or selected areas.
To add cursors, hold down either the Cmd (macOS) or Ctrl (Windows/Linux) keys while clicking inside your text.
To create multiple selections from the cursors, additionally hold down Shift, and any of the arrow keys.
Zettlr’s Markdown Dialect
Unfortunately, there is not “one” Markdown specification that would define every element you may ever need. Historically, different companies and software products have adopted Markdown at various time points throughout history, and implemented custom elements wherever necessary.
This has led to the formation of various so-called “dialects” of Markdown. For example, there is GitHub Markdown, there is CommonMark (an attempt at standardizing the syntax), and there is Pandoc Markdown.
Zettlr supports almost all elements in the most comprehensive and all-encompassing dialect: Zettlr Markdown. In comparison to other dialects, the Zettlr dialect includes out-of-the-box support for many elements that academics need, including, but not limited to:
- Complex tables
- Figures
- Footnotes
- Citations and cross-references
- … and more
Warning
While Markdown dialects are, for the most part, compatible with each other, this is not always the case. Some dialects may, for example, not support citation syntax, or use a slightly different way to create tables. If you want to write Markdown for a specific system, always make sure to check which elements that system supports.
Special Elements in Zettlr Markdown
Zettlr supports many special elements, some of which no other tool supports. All of these are introduced in the section on Zettlr Markdown. Here is a short primer:
- Text highlighting
- Text underlining
- Math blocks and equations
- Mermaid diagrams
- Footnotes
- Tables
- Citations
- Cross-references
- Admonitions (also known as callouts or alerts)
- Attribute syntax
- Bracketed Spans and Fenced Divs
- Hashtags
- Wiki links
- … and more.
