# Formats and compatibility

> Every format carta reads and writes, the extensions each accepts, and the gaps that remain.

carta names formats the way pandoc does, so a command written for one runs against the other. A format name may carry extension toggles (`markdown+hard_line_breaks-raw_html`), and `carta --list-extensions=<format>` prints the set a given format accepts.

## Formats

### Markdown family

| Format                   | Names               | Reader           | Writer        | Cargo features                       |
| ------------------------ | ------------------- | ---------------- | ------------- | ------------------------------------ |
| CommonMark               | `commonmark`        | ✅ Usable         | ✅ Usable      | `read-commonmark` `write-commonmark` |
| CommonMark-X             | `commonmark_x`      | ✅ Usable         | ✅ Usable      | `read-commonmark` `write-markdown`   |
| Djot                     | `djot`              | ❌ Not started    | ❌ Not started | —                                    |
| GitHub-Flavored Markdown | `gfm`               | ✅ Usable         | ✅ Usable      | `read-commonmark` `write-gfm`        |
| Pandoc Markdown          | `markdown`          | ✅ Usable         | ✅ Usable      | `read-commonmark` `write-markdown`   |
| GitHub Markdown, legacy  | `markdown_github`   | ✅ Usable         | ✅ Usable      | `read-commonmark` `write-markdown`   |
| MultiMarkdown            | `markdown_mmd`      | ✅ Usable         | ✅ Usable      | `read-commonmark` `write-markdown`   |
| PHP Markdown Extra       | `markdown_phpextra` | ✅ Usable         | ✅ Usable      | `read-commonmark` `write-markdown`   |
| Markdown strict          | `markdown_strict`   | ✅ Usable         | ✅ Usable      | `read-commonmark` `write-markdown`   |
| Markua                   | `markua`            | ➖ Not applicable | ❌ Not started | —                                    |

### HTML & slides

| Format       | Names          | Reader           | Writer        | Cargo features           |
| ------------ | -------------- | ---------------- | ------------- | ------------------------ |
| Beamer       | `beamer`       | ➖ Not applicable | ✅ Usable      | `write-beamer`           |
| Chunked HTML | `chunkedhtml`  | ➖ Not applicable | ❌ Not started | —                        |
| DZSlides     | `dzslides`     | ➖ Not applicable | ❌ Not started | —                        |
| HTML         | `html` `html5` | ✅ Usable         | ✅ Usable      | `read-html` `write-html` |
| HTML 4       | `html4`        | ➖ Not applicable | ✅ Usable      | `write-html4`            |
| PowerPoint   | `pptx`         | ❌ Not started    | ❌ Not started | —                        |
| reveal.js    | `revealjs`     | ➖ Not applicable | ✅ Usable      | `write-revealjs`         |
| S5           | `s5`           | ➖ Not applicable | ❌ Not started | —                        |
| Slideous     | `slideous`     | ➖ Not applicable | ❌ Not started | —                        |
| Slidy        | `slidy`        | ➖ Not applicable | ❌ Not started | —                        |

### TeX & typesetting

| Format  | Names     | Reader           | Writer        | Cargo features             |
| ------- | --------- | ---------------- | ------------- | -------------------------- |
| ConTeXt | `context` | ➖ Not applicable | ❌ Not started | —                          |
| LaTeX   | `latex`   | ✅ Usable         | ✅ Usable      | `read-latex` `write-latex` |
| PDF     | `pdf`     | ➖ Not applicable | ❌ Not started | —                          |
| Texinfo | `texinfo` | ➖ Not applicable | ❌ Not started | —                          |
| Typst   | `typst`   | ❌ Not started    | ✅ Usable      | `write-typst`              |

### Lightweight markup

| Format           | Names             | Reader           | Writer           | Cargo features         |
| ---------------- | ----------------- | ---------------- | ---------------- | ---------------------- |
| AsciiDoc         | `asciidoc`        | ❌ Not started    | ✅ Usable         | `write-asciidoc`       |
| AsciiDoc legacy  | `asciidoc_legacy` | ➖ Not applicable | ❌ Not started    | —                      |
| Asciidoctor      | `asciidoctor`     | ➖ Not applicable | ❌ Not started    | —                      |
| Haddock          | `haddock`         | ❌ Not started    | ❌ Not started    | —                      |
| Muse             | `muse`            | ❌ Not started    | ❌ Not started    | —                      |
| Org mode         | `org`             | ✅ Usable         | ✅ Usable         | `read-org` `write-org` |
| Perl POD         | `pod`             | ❌ Not started    | ➖ Not applicable | —                      |
| reStructuredText | `rst`             | ✅ Usable         | ✅ Usable         | `read-rst` `write-rst` |
| txt2tags         | `t2t`             | ❌ Not started    | ➖ Not applicable | —                      |
| Textile          | `textile`         | ❌ Not started    | ❌ Not started    | —                      |

### Wikis

| Format    | Names       | Reader           | Writer           | Cargo features                     |
| --------- | ----------- | ---------------- | ---------------- | ---------------------------------- |
| Creole    | `creole`    | ❌ Not started    | ➖ Not applicable | —                                  |
| DokuWiki  | `dokuwiki`  | ✅ Usable         | ✅ Usable         | `read-dokuwiki` `write-dokuwiki`   |
| Jira      | `jira`      | ✅ Usable         | ✅ Usable         | `read-jira` `write-jira`           |
| MediaWiki | `mediawiki` | ✅ Usable         | ✅ Usable         | `read-mediawiki` `write-mediawiki` |
| TikiWiki  | `tikiwiki`  | ❌ Not started    | ➖ Not applicable | —                                  |
| TWiki     | `twiki`     | ❌ Not started    | ➖ Not applicable | —                                  |
| Vimwiki   | `vimwiki`   | ❌ Not started    | ➖ Not applicable | —                                  |
| XWiki     | `xwiki`     | ➖ Not applicable | ❌ Not started    | —                                  |
| ZimWiki   | `zimwiki`   | ➖ Not applicable | ❌ Not started    | —                                  |

### roff

| Format | Names    | Reader           | Writer           | Cargo features         |
| ------ | -------- | ---------------- | ---------------- | ---------------------- |
| man    | `man`    | ✅ Usable         | ✅ Usable         | `read-man` `write-man` |
| mdoc   | `mdoc`   | ❌ Not started    | ➖ Not applicable | —                      |
| ms     | `ms`     | ➖ Not applicable | ❌ Not started    | —                      |
| vimdoc | `vimdoc` | ➖ Not applicable | ❌ Not started    | —                      |

### Word processor, ebook & notebook

| Format            | Names                  | Reader           | Writer           | Cargo features             |
| ----------------- | ---------------------- | ---------------- | ---------------- | -------------------------- |
| Word              | `docx`                 | ✅ Usable         | ✅ Usable         | `read-docx` `write-docx`   |
| EPUB              | `epub` `epub2` `epub3` | ✅ Usable         | ✅ Usable         | `read-epub` `write-epub`   |
| FictionBook2      | `fb2`                  | ❌ Not started    | ❌ Not started    | —                          |
| InDesign ICML     | `icml`                 | ➖ Not applicable | ❌ Not started    | —                          |
| Jupyter Notebook  | `ipynb`                | ✅ Usable         | ✅ Usable         | `read-ipynb` `write-ipynb` |
| OpenDocument Text | `odt`                  | ✅ Usable         | ✅ Usable         | `read-odt` `write-odt`     |
| OpenDocument      | `opendocument`         | ➖ Not applicable | ❌ Not started    | —                          |
| Rich Text Format  | `rtf`                  | ✅ Usable         | ✅ Usable         | `read-rtf` `write-rtf`     |
| Spreadsheet       | `xlsx`                 | ❌ Not started    | ➖ Not applicable | —                          |

### XML & publishing

| Format      | Names                                                             | Reader           | Writer           | Cargo features |
| ----------- | ----------------------------------------------------------------- | ---------------- | ---------------- | -------------- |
| BITS        | `bits`                                                            | ❌ Not started    | ➖ Not applicable | —              |
| DocBook     | `docbook` `docbook4` `docbook5`                                   | ❌ Not started    | ❌ Not started    | —              |
| JATS        | `jats` `jats_archiving` `jats_articleauthoring` `jats_publishing` | ❌ Not started    | ❌ Not started    | —              |
| TEI         | `tei`                                                             | ➖ Not applicable | ❌ Not started    | —              |
| Generic XML | `xml`                                                             | ❌ Not started    | ❌ Not started    | —              |

### Bibliography

| Format      | Names        | Reader        | Writer           | Cargo features |
| ----------- | ------------ | ------------- | ---------------- | -------------- |
| BibLaTeX    | `biblatex`   | ❌ Not started | ❌ Not started    | —              |
| BibTeX      | `bibtex`     | ❌ Not started | ❌ Not started    | —              |
| CSL JSON    | `csljson`    | ❌ Not started | ❌ Not started    | —              |
| EndNote XML | `endnotexml` | ❌ Not started | ➖ Not applicable | —              |
| RIS         | `ris`        | ❌ Not started | ➖ Not applicable | —              |

### Data, interchange & terminal

| Format            | Names                                                                                     | Reader           | Writer           | Cargo features               |
| ----------------- | ----------------------------------------------------------------------------------------- | ---------------- | ---------------- | ---------------------------- |
| ANSI terminal     | `ansi`                                                                                    | ➖ Not applicable | ❌ Not started    | —                            |
| BBCode            | `bbcode` `bbcode_fluxbb` `bbcode_hubzilla` `bbcode_phpbb` `bbcode_steam` `bbcode_xenforo` | ➖ Not applicable | ❌ Not started    | —                            |
| CSV               | `csv`                                                                                     | ✅ Usable         | ➖ Not applicable | `read-csv`                   |
| Pandoc JSON       | `json`                                                                                    | ✅ Usable         | ✅ Usable         | `read-json` `write-json`     |
| Native Pandoc AST | `native`                                                                                  | ✅ Usable         | ✅ Usable         | `read-native` `write-native` |
| OPML              | `opml`                                                                                    | ✅ Usable         | ✅ Usable         | `read-opml` `write-opml`     |
| Plain text        | `plain`                                                                                   | ➖ Not applicable | ✅ Usable         | `write-plain`                |
| TSV               | `tsv`                                                                                     | ✅ Usable         | ➖ Not applicable | `read-tsv`                   |

## Extensions

#### Supported

`smart``strikeout``superscript``subscript``pipe_tables``footnotes``task_lists``autolink_bare_uris``tex_math_dollars``fenced_divs``bracketed_spans``hard_line_breaks``raw_html``header_attributes``fenced_code_attributes``inline_code_attributes``link_attributes``attributes``definition_lists``grid_tables``multiline_tables``simple_tables``table_captions``line_blocks``fancy_lists``example_lists``startnum``yaml_metadata_block``pandoc_title_block``auto_identifiers``gfm_auto_identifiers``implicit_header_references``implicit_figures``raw_attribute``inline_notes``native_divs``native_spans``markdown_in_html_blocks``raw_tex``citations``table_attributes``blank_before_blockquote``blank_before_header``mark``emoji``alerts``tex_math_single_backslash``tex_math_double_backslash``lists_without_preceding_blankline``intraword_underscores``backtick_code_blocks``fenced_code_blocks``escaped_line_breaks``space_in_atx_header``all_symbols_escapable``spaced_reference_links``short_subsuperscripts``mmd_title_block``mmd_header_identifiers``abbreviations``markdown_attribute`

#### Recognized, behavior not yet modeled

These names are already recognized internally, but the reader does not yet branch on the construct:

`latex_macros``wikilinks_title_after_pipe``wikilinks_title_before_pipe``ascii_identifiers``mmd_link_attributes``old_dashes``east_asian_line_breaks``four_space_rule``literate_haskell``rebase_relative_paths``gutenberg``angle_brackets_escapable``ignore_line_breaks``raw_markdown`
