Carve is a lightweight markup language with one syntax, one meaning, and the same HTML
from every implementation. This page shows the newest addition -
inline literals - alongside the convergence behaviours worth
knowing when you author Carve. Every sample below is rendered live through the
syntax converter profile.
A ! before a code span renders its contents as literal text with no code styling - perfect for showing Carve syntax without it being interpreted or monospaced.
Type !`*strong*` and !`/emphasis/` to show the raw delimiters, while `regular code` still gets a code box.
Type *strong* and /emphasis/ to show the raw delimiters, while regular code still gets a code box.
Carve recognises done, dropped and deferred task states in addition to the plain checkbox.
- [x] Ship the gallery
- [ ] Write the docs
- [-] Drop the old approach
- [>] Defer the polish
A bare dot is Carve’s preferred ordered-list marker. It stays aligned as numbering grows.
. First item
. Second item
. Third item
The |= marker defines a header cell directly, without a Markdown separator row.
|= Lang |= Status |
| PHP | ready |
| JS | ready |
| Lang | Status |
|---|---|
| PHP | ready |
| JS | ready |
Alignment goes in braces right after the cell marker: {<} left, {~} center, {>} right. A header cell sets its column, and a body cell can override it.
|= Item |={>} Qty |={~} Note |
| Apple | 12 | fresh |
| Pear |{<} 3 | ripe |
| Item | Qty | Note |
|---|---|---|
| Apple | 12 | fresh |
| Pear | 3 | ripe |
A cell holding only ^ merges into the cell above it (rowspan), and a cell holding only < merges into the cell to its left (colspan).
|= Region |= Q1 |= Q2 |
| North | 10 | 12 |
| ^ | 11 | 13 |
| Total | 46 | < |
| Region | Q1 | Q2 |
|---|---|---|
| North | 10 | 12 |
| 11 | 13 | |
| Total | 46 | |
A row starting with + continues the row above: each non-empty cell is appended to the cell in the same column, so long cell text can wrap across source lines.
|= Item |= Note |
| Apple | fresh from |
+ | the orchard |
| Pear | ripe |
| Item | Note |
|---|---|
| Apple | fresh from the orchard |
| Pear | ripe |
A %% line comment between list items is dropped from the output and does not break the list or make it loose.
- Install the package
%% TODO: link the release notes
- Publish the config
- Render
Blank lines between items make a list loose: each item is wrapped in <p>, adding vertical rhythm. Without blank lines the list is tight and compact.
Tight:
- one
- two
- three
Loose:
- one
- two
- three
Tight:
Loose:
one
two
three
A term line starts with :: and each definition line starts with a colon and one space.
:: Carve
: A lightweight markup language for structured documents.
:: Renderer
: An engine that turns Carve source into HTML, text, Markdown, or ANSI.
A lone + attaches the next block to the open list item, quote, footnote or description, without indenting it. The list stays tight.
- Install the package
+
> Run composer from the project root.
- Publish the config
Run composer from the project root.
A {table} flag turns a csv or tsv fence into a table. The first record is the header, and RFC 4180 quoting lets a field hold a comma.
{table}
```csv
Item,Qty,Note
Apple,12,fresh
"Pear, green",3,ripe
```
{table}
```tsv
Lang Status
PHP ready
```
| Item | Qty | Note |
|---|---|---|
| Apple | 12 | fresh |
| Pear, green | 3 | ripe |
| Lang | Status |
|---|---|
| PHP | ready |
Two hyphens become an en dash, three become an em dash, and three dots become an ellipsis. Straight quotes curl into typographic quotes.
Pages 10--20 cover it -- but the details --- all of them --- come later... She said "it just works" and I agreed.
Pages 10–20 cover it – but the details — all of them — come later… She said “it just works” and I agreed.
A reference like [^1] links to a definition collected into an endnotes section, with a back-link to where it was cited.
A backslash keeps a block marker literal when it appears at the start of a line.
This paragraph is real.
\#\#\# This stays literal
# This is a real heading
This paragraph is real.
### This stays literal