(samizdat lightweight)

Reference

Overview

Commands that read lists and tables written as Markdown and Org write them.

@read-list{
- this parses things
  - a list with nested lists
- this is another post
  and this continues the list item above.
}

@read-table{
#+CAPTION: What they drink
| Name  | Cups | Of       |
|-------+------+----------|
| Alice |    3 | @em{tea} |
| Bob   |   12 | coffee   |
}

The body is still samizdat: a command in it works as in any other body. Both commands are in standard-commands of (samizdat commands).

See also: read-list, read-table

Reference

Functions

Functions

read-list

function ↑ Functions

(: read-list (-> Ctx Call (Vec Piece)))
(read-list cx c)

A command that reads a list written as Markdown and Org write one.

cx
The state of the document.
c
The call.
returns
An ItemList block, or nothing when the body is blank.
@read-list{
1. First
2. Second, with a list in it:
   - a
   - b
}

The rules are the rules of Markdown, with fewer cases:

These are rejected with refuse: arguments, a call with no body, a body whose first line is not an item, and a line after a blank line that is in no item.

See also: read-table

read-table

function ↑ Functions

(: read-table (-> Ctx Call (Vec Piece)))
(read-table cx c)

A command that reads a table written as Org or Markdown write one.

cx
The state of the document.
c
The call.
returns
A TableBlock, or nothing when the body has no rows.
@read-table[#:caption "Prices"]{
| Item   | Price |
|:-------|------:|
| Tea    |  2.50 |
| Coffee |  3.00 |
}

These are rejected with refuse: positional arguments, a keyword other than #:caption, a call with no body, and a line that is not a row, a rule or a #+ line.

See also: read-list