This document outlines the standard formatting rules for TypeUp documents.
Every document must begin with the following metadata in this order:
template = <template_url>
class = <document_class>
title = <document_title>
date = <YYYY-MM-DD>
author = <author_name>
- Use ATX-style headers (
#,##,###, etc.) - Maximum header depth is 6 levels
- Leave one blank line before headers (except at file start)
- Leave one blank line after headers
- Separate paragraphs with exactly one blank line
- Use soft wrapping for long lines
- Do not indent paragraphs
- Use
_single underscores_for emphasis (italics) - Do not use asterisks for emphasis
- Inline code: Use
%percentage signs% - Code blocks:
%% language code here %% - Always specify language for syntax highlighting when possible
- Inline math: Use
$single dollars$ - Math blocks:
$$formula$$ caption (optional)
- Use
[text](url)format - For bare URLs, use
[url]
- Start each item with a single hyphen (
-) - One space after the hyphen
- Indent nested items with one tab
- Start with
1.for all items (auto-numbering) - One space after the period
- Indent nested items with one tab
Term
: Definition
: Additional definition
!figure url
caption (optional)
!video url
caption (optional)
| Header 1 | Header 2 |
|----------|----------|
| Cell 1 | Cell 2 |
caption (optional)
- Use at least 3 dashes in separator row
- Align columns using colons in separator row:
- Left (default):
|-------| - Center:
|:-----:| - Right:
|-------:|
- Left (default):
- Maintain consistent column widths for readability
- Separate chapters with
=== - Start each chapter with a level 1 header
- Separate sections with
--- - Use appropriate header levels within sections
- Use relative paths:
!import filename - Place imports on their own line
- Add blank lines before and after imports
- Single line:
// comment - Multi-line:
/* Multi-line comment */ - Use comments sparingly and only when necessary
- Maintain consistent indentation
- Use semantic markup
- Provide descriptive captions for figures, tables, and math blocks
- Follow heading hierarchy (don't skip levels)
- Keep lines at a reasonable length (recommended 80-100 characters)
- Use blank lines judiciously
- Validate document output in target formats