Skip to content

Cheat Sheet

The whole syntax, one page. Carve's mnemonic: the markup looks like its output.

Inline

WriteGetMnemonic
/italic/italicslashes lean like italics
*bold*boldasterisks are heavy
/*bold italic*/bothcombined
_underline_underlinethe line sits below
~strike~striketilde runs through
^super^super­scriptcaret points up
,sub,sub­scriptcommas pull down
=highlight=highlightlike a highlighter pen
`code`codebackticks
[text](url)link
[Page Name][]wiki-style linkresolves to a heading
<https://url>autolink
</#section-id>cross-referencelink text cloned from the target
![alt](img.jpg)image
[^1] / ^[inline note]footnotereference / inline form
[span]{.class}span{…} adds class, id, or attributes
:youtube[ID]extension:type[content]{attrs}
@user #tagmention / tagsocial conventions
\*literal\*escapebackslash + any ASCII punctuation
-- --- ... -> (c)– — … → ©smart typography
\ at end of linehard break\ (backslash-space) = no-break space
`<br>`{=html}raw inlineemitted only for that output format

Bare delimiters work only at word boundaries; force one intraword with the brace form, e.g. H{,2,}O, mc{^2^}.

Blocks

carve
# H1   ## H2   ### H3        (ATX headings 1-6; put attributes on the
                              line above: {#id .class})

---                          (thematic break: --- *** ___)

- unordered      1. ordered  (dialects: a. A. i. I. and the ) delimiter;
- [ ] task        - [x] done  more task states: [-] [_] [>] [?])
-{.c} styled item            (attrs abutting the marker target the <li>)

- step one                   (lone + attaches the next flush-left block
+                             to the item - no deep indenting)
> note for step one

:: term                      (definition list)
:  definition

> blockquote
^ Attribution                (caption / attribution: ^ prefix)

```language [Label]
code block
```

```=html
<div>passed through when the output format matches</div>
```

::: note                     (admonition: note tip warning danger
body                          info success example quote;
:::                           any other word = <div class="word">)

:::: outer                   (longer fences nest shorter ones)
::: note
inner
:::
::::

::: |                        (preserves per-line layout)
Roses are red,
  Violets are blue.
:::

Tables

carve
|= Header |= Header |        (|= marks a header cell; also works in body
| Cell    | Cell    |         rows for ROW headers)
^ Table caption

|= Name |=> Age |=~ City |   (column alignment glued to |=: < ~ >;
| Sum    |< 12   | NYC    |   a data-cell marker overrides per cell)

| Name  | Age |              (GFM separator row accepted as a
|-------|----:|               compatibility alias: marks the header
| Alice |  30 |               row + column alignment)

| ^      | spanned |         (^ = rowspan)
| Header | <       |         (< = colspan)
+ continuation cell |        (+ = multi-line cell)

Captions (images, quotes, tables, code listings, equations)

carve
![Photo](img.jpg)
^ Figure 1: Caption text      (one ^ adds a semantic <figcaption>)

{#fig-sun}
![A sunset](sun.jpg)
^ Figure #: A sunset          (# = auto number; </#fig-sun> then renders
                               as "Figure 1")

A ^ caption after a fenced code block makes a numbered listing; after a standalone $$-math block, a numbered equation.

Attributes & metadata

carve
{#id .class key=value}        (attach to the preceding/following element)

*[HTML]: HyperText Markup Language   (abbreviation definition)

---
title: My Document            (frontmatter: leading --- block,
tags: [carve, markup]          held raw; add ---toml / ---json for
---                            other formats)

Math, comments, editorial

carve
Inline $`e^{i\pi}+1=0`        Display $$`\int_0^1 x\,dx`

%% line comment
text %% trailing comment
%%%
block comment
%%%

{+inserted+}  {-deleted-}  {~old~>new~}  {#a comment#}   (CriticMarkup)

Next

Released under the MIT License.