5.2 KiB
- Headlines
- Emphasis
- Code Blocks
- Links
- External Links
- Lists
- Properties Drawer
- Tags
- Flashcard Structure
- Export Blocks
- Comments
- Block Quotes
- Example Blocks
- Horizontal Rules
- Tables
- footnotes
- Special Symbols
- Todo States
- Radio Targets
- Statistics Cookies
This document covers org-mode syntax for creating flashcards.
Headlines
Front
How do you create headlines in org-mode?
Back
* Heading 1 (one asterisk)
** Heading 2 (two asterisks)
*** Heading 3 (etc.)
* Top Level
** Second Level
*** Third Level
Emphasis
Front
How do you bold, italic, and code in org-mode?
Back
*bold* :: bold
/italic / :: italic
~code~ :: code (inline code, like backticks)
=verbatim= :: verbatim (literal text)
_underline_ :: underline
Code Blocks
Front
How do you write a source code block in org-mode?
Back
#+begin_src cpp
std::vector<int> v;
#+end_src
Supported languages: cpp, c, python, bash, javascript, sql, json, html, css, rust, go, etc.
Links
Front
How do you write links in org-mode?
Back
[[https://example.com][Description]]
[[https://example.com]] (auto-named)
[[file:path/to/file.org][Local file]]
External Links
Front
How do you link to external URLs in org-mode?
Back
Plain URL or with description:
https://example.com
[[https://example.com][Example Site]]
Lists
Front
How do you write bullet and numbered lists in org-mode?
Back
- Bullet item
- Another item
- Sub-item (indent with spaces)
1. Numbered item
2. Second item
- [ ] Unchecked task
- [X] Checked task
Properties Drawer
Front
How do you add properties to a flashcard heading?
Back
* Card Title :tag1:tag2:
:PROPERTIES:
:ANKI_NOTE_TYPE: Basic
:ANKI_NOTE_ID: 1234567890
:END:
** Front
Question
** Back
Answer
Properties drawer goes directly after the heading, before Front.
Tags
Front
How do you add tags to a headline?
Back
Tags go after the heading, separated by colons:
* My Card :cpp:containers:stl:
Tags can be inherited by subheadings.
Flashcard Structure
Front
What is the complete structure of an org-mode flashcard?
Back
* Question/Title :tag:
:PROPERTIES:
:ANKI_NOTE_TYPE: Basic
:END:
** Front
The question or prompt
** Back
The answer (often includes source blocks)
#+begin_src cpp
code here
#+end_src
Export Blocks
Front
How do you create a block that exports to a specific format?
Back
#+begin_export html
HTML content here
#+end_export
#+begin_export latex
LaTeX content here
#+end_export
Comments
Front
How do you add comments in org-mode?
Back
#+COMMENT: This entire line is a comment
# Also a comment (headline-level)
Block Quotes
Front
How do you create a block quote in org-mode?
Back
#+begin_quote
Your quote text here.
It can span multiple lines.
#+end_quote
Example Blocks
Front
How do you create an example block (literal text)?
Back
#+begin_example
This text is literal - no emphasis processing.
*not bold*
#+end_example
Horizontal Rules
Front
How do you create a horizontal rule in org-mode?
Back
Five or more dashes:
-----
Tables
Front
How do you create a table in org-mode?
Back
| Header 1 | Header 2 |
|----------+----------|
| Cell 1 | Cell 2 |
| Cell 3 | Cell 4 |
Tables need at least one dash in the separator row.
footnotes
Front
How do you add footnotes in org-mode?
Back
Some text with a footnote[fn:1]
[fn:1] This is the footnote content.
Special Symbols
Front
How do you insert special symbols in org-mode?
Back
Using org-entities:
\alpha → \alpha
\beta → \beta
\sum → \sum
\pm → \pm
\rightarrow → \rightarrow
Also works: \egal (𝑎𝑏𝑐), ~abc~ (code)
Todo States
Front
How do you mark a headline as a todo item?
Back
TODO Some task
DONE Completed task
Common states: TODO, DONE, NEXT, WAITING, CANCELLED
Radio Targets
Front
What is a radio target in org-mode?
Back
Links that jump to specific locations in the same file:
<<target name>>
[[target name]] or [[*target name]]
Statistics Cookies
Front
How do you show task progress in org-mode?
Back
[50%] - percentage
[3/5] - completed/total
Often used in lists like: [- 2/5]