Skip to content

Formatting

Zensical provides support for several HTML elements that can be used to highlight sections of a document or apply specific formatting.

Configuration

This configuration enables support for keyboard keys, defining sub- and superscript and highlighting text. Add the following lines to your configuration:

[project.markdown_extensions.pymdownx.caret]
[project.markdown_extensions.pymdownx.keys]
[project.markdown_extensions.pymdownx.mark]
[project.markdown_extensions.pymdownx.tilde]
markdown_extensions:
  - pymdownx.caret
  - pymdownx.keys
  - pymdownx.mark
  - pymdownx.tilde

See additional configuration options:

Usage

Highlight text

When Caret, Mark & Tilde are enabled, text can be highlighted with a simple syntax, which is more convenient that directly using the corresponding mark, ins and del HTML tags:

Text with highlighting
- ==This was marked (highlight)==
- ^^This was inserted (underline)^^
- ~~This was deleted (strikethrough)~~
  • This was marked (highlight)
  • This was inserted (underline)
  • This was deleted (strikethrough)

Sub- and superscripts

When Caret & Tilde are enabled, text can be sub- and superscripted with a simple syntax, which is more convenient than directly using the corresponding sub and sup HTML tags:

Text with sub- and superscripts
- H~2~O
- A^T^A
  • H2O
  • ATA

Add keyboard keys

When Keys is enabled, keyboard keys can be rendered with a simple syntax. Consult the Python Markdown Extensions documentation to learn about all available shortcodes:

Keyboard keys
++ctrl+alt+del++

Ctrl+Alt+Del