Code Document Tags

This guide covers Code-only documents and assumes a basic understanding of Markdown and/or LaTeX.

Custom Structural & Formatting Tags

<tex>

The content wrapped with this tag will be rendered using the Computer Modern Font, which is KaTeX's default font. This is useful for large blocks of text that need to match formula typography.

# My Document
 
<tex>
This content uses the Computer Modern font.
</tex>
 
Normal font paragraph.

<math>

The content wrapped with this tag will render as Math/LaTeX, equivalent to using the standard $$ delimiters.

# My Formula

My formula:
<math>
C^2 = A^2 + B^2
</math>

Or:

$$
E = mc^2
$$

<justify>, <left>, <center>, <right>

These tags help control the horizontal alignment of the wrapped content, applying styling not always available in standard Markdown.

<justify>
This content is justified across the full width.
</justify>

<center>
This content is centered.
</center>

<right>
This content is aligned to the right.
</right>

<mermaid>

This tag is used to insert a Mermaid chart or diagram, allowing you to generate visuals directly from text definitions.

# My Flowchart

<mermaid>
graph TD;
  A[Start] --> B(Process);
  B --> C{Decision};
  C --> D[End];
</mermaid>

Learn Mermaid Syntax

<newpage/>

Inserts a page break. This will only be reflected when the document is printed (Ctrl+P or Command+P).

# Page 1

This is the content for the first page.

<newpage/>

# Page 2

This is the content for the second page.