Comment commands#
A comment starting with hc: is a command. On its own line it applies to every following
line; at the end of a line it applies to that line. See
the guide for examples.
Flags#
Flag |
Long forms |
Context field |
Value |
Effect |
|---|---|---|---|---|
|
|
|
a format code |
Number format |
|
|
|
flag |
Break calculations over several lines |
|
|
|
flag |
Show target = result only |
|
|
(opens a grid) |
flag |
Grid of the following assignments, with comments |
|
|
|
integer |
Columns in parameter grids (default 3) |
|
|
(one-shot) |
flag |
Vertical space |
|
|
flag |
A boolean result is shown as a pass/fail mark ( |
|
|
(one-shot) |
flag |
Page break (see below) |
|
|
|
|
flag |
Leave lines out of the output |
|
|
|
flag |
Accepted; no effect in 2.0 |
Source: commands.
Page breaks#
# hc: --pagebreak on its own line breaks the page before the next line; at the end of
a line it breaks after that line. It is one-shot and never carried forward. It does
nothing at the end of a block header (if ...:) or inside a ; parameter line.
Renderer |
Output (class attribute |
|---|---|
ASCII |
a line holding a form feed ( |
LaTeX |
|
Markdown |
|
HTML |
|
Word |
a page break |
Excel |
a horizontal print page break after the row |
A custom renderer receives the break as the item handcalcs.renderers.base.PAGE_BREAK
("\f") in join_item.
Assignment form#
# hc: name = value[; name = value ...] sets context fields directly. The text is run as
Python; if that fails, it is parsed as flags.
Field |
Values |
|---|---|
|
a format code string |
|
|
|
|
|
integer |
|
the symbol between steps (default |
|
|
|
a dict of name → display spec, e.g. |
|
|
|
|
any other name |
stored on the context for custom renderers |