Asciidoc Syntax Overview
·1 min
Basic Text Formatting
Bold:
bold textorbold textItalic:
italic textoritalic textMonospace:monospace textSuperscript:
superscriptSubscript:
subscript
Headings
Document Title (Level 0)
Level 1 Section
Level 2 Section
Level 3 Section
Level 4 Section
Lists
Unordered Lists
Item 1
Item 2
Nested item
Item 3
Ordered Lists
First item
Second item
Nested item
Third item
Links and Images
Link:
Link TextImage:
image::path/to/image.png[Alt Text]Block image:
image::path/to/image.png[Alt Text, width=300]
Code Blocks
def hello():
print("Hello, World!")Tables
| Header 1 | Header 2 | Header 3 |
|---|---|---|
Cell 1 | Cell 2 | Cell 3 |
Cell 4 | Cell 5 | Cell 6 |
Admonitions
Note | This is a note. |
Tip | This is a tip. |
Important | This is important. |
Warning | This is a warning. |
Caution | Use caution here. |
Block Quotes
This is a block quote.
— Author Name
Callouts in Code Blocks
def fetch_data(): # <b class="conum">(1)</b>
return requests.get('/api/data') # <b class="conum">(2)</b>Fetches data from the API.
Returns the response object.