Skip to main content

1. Headings

SoMarkDown supports six heading levels following CommonMark, using # symbols.

2. Text Styles

Basic Styles

Underline

Wrap text with ++. Every pair of + adds one underline level — you can stack levels by adding more +:

Blockquote


3. Special Symbols

Emoji

Uses markdown-it-emoji syntax: :emoji_name:

4. Lists

Ordered List

Unordered List

Any of *, +, or - work as list markers:

5. Table of Contents

Insert [[TOC]] anywhere in the document to generate an automatic table of contents based on headings.
Reference: markdown-it-table-of-contents

6. Code

Code highlighting is powered by highlight.js. Use highlight.js language identifiers for the language tag.

Inline Code

Code Block

Common language identifiers: python, javascript, typescript, java, c, cpp, bash, sql, json. If you want the overview and installation notes first, go back to the SoMarkDown overview. See the full list.

7. Math Formulas

Math is rendered by KaTeX using standard LaTeX syntax.

Inline Math

Display Math


8. Images

SoMarkDown repurposes the Markdown alt-text field as the location for AI-generated semantic understanding of the image. In SoMarkDown renderers, the text in brackets is displayed as a semantic annotation. This design is backward compatible with standard Markdown.
Control whether image descriptions are displayed via the imgDescEnabled config option:

9. Tables

SoMarkDown uses HTML <table> tags for tables instead of the native Markdown pipe syntax. This provides full support for merged cells (rowspan / colspan).

10. Captions

Captions can annotate a Figure or Table. They start with : (colon + space).
Rules:
  • Must start with : (a colon followed by exactly one space)
  • Must be directly adjacent to the target component (above or below), with blank lines allowed but no other elements in between
  • If captions exist on both sides, the one above takes priority
Reference: Pandoc caption extension

11. Chemical Equations

Chemical equations use \ce{} syntax rendered by mhchem, and must be placed inside a math environment.

Inline

Display


12. Chemical Structures (SMILES)

Chemical structures use \smiles{} syntax rendered by SmilesDrawer, and must be placed inside a math environment.
SoMarkDown treats SMILES notation as a special symbol within the math environment. This is because: (1) structures appear inside chemical equations; (2) like math formulas, they need both inline and display layout modes; (3) it keeps the integration consistent with chemical equations.

Inline Structure

Display Structure

Mixed Chemical Structure Equations (mhchem + SMILES)

SoMarkDown innovatively supports embedding \smiles{} inside \ce{}, merging structural and equation notation in a single expression:
SMILES rendering can be customized via configuration:

13. Diagrams — Mermaid (Coming Soon)

Mermaid diagram support is in development. The planned syntax: