diff options
| author | Ralph Amissah <ralph.amissah@gmail.com> | 2026-08-26 20:08:30 -0400 |
|---|---|---|
| committer | Ralph Amissah <ralph.amissah@gmail.com> | 2026-08-26 20:08:30 -0400 |
| commit | 604e7d5eafafe76d7e430ba6e821793a4dc263d6 (patch) | |
| tree | 3310ccdfb276f2f36a28bc94bc4ecff2827cd2f3 /format-specification.md | |
| parent | spec: image records, .image property (diff) | |
spec: correct drift between documented and emitted properties
Found while documenting the image record: the property reference
had fallen behind the emitter. Checked property by property against
src/sisudoc/ocda/abstraction/ssp.d and against .ssp output for
the_wealth_of_networks; documented and emitted sets now agree.
Corrected names:
- .heading_ancestors -> .heading_ancestors_text
- .links (one line, space separated) -> .stow_link (repeatable)
- .identifier: dropped, a heading's identifier is not a property,
it follows the level on the declaration line: [5] heading :1 id
Documented, previously absent: .children, .heading_lev_collapsed,
.parent_lev, .o_n_type, .is_of_type, .attrib, .meta_lang,
.meta_syntax, .segment_epub, .heading_lev_anchor, .anchor_tag,
.lev4_subtoc, and the images_no_dim flag of .has.
Also: heading_lev_collapsed was listed as not serialised while
being emitted; @make showed a breaks: line that is not emitted and
lacked auto_num_top_lv; omission rules extended to the properties
above, with .section and .anchor stated more precisely (each is
omitted when it repeats the enclosing section / the .segment
value).
(assisted by Claude-Code)
Diffstat (limited to 'format-specification.md')
| -rw-r--r-- | format-specification.md | 54 |
1 files changed, 43 insertions, 11 deletions
diff --git a/format-specification.md b/format-specification.md index 837f0e6..587b333 100644 --- a/format-specification.md +++ b/format-specification.md @@ -104,8 +104,8 @@ must be preserved exactly. @make { doc_type: book - breaks: new=:B; break=1 auto_num_top_at_level: 1 + auto_num_top_lv: 9 auto_num_depth: 2 } @@ -232,9 +232,19 @@ and before text content. Only non-default values are written. .dom_status_collapsed: 0 0 0 0 1 1 0 0 .dummy: true % dummy_heading .ocn_off: true % object_number_off -.identifier: ch1_intro % named identifier +.children: 20 45 70 % direct child heading OCNs +.heading_lev_collapsed: 2 % written when < 9 +.parent_lev: 1 % parent_lev_markup +.o_n_type: 1 % object number type +.is_of_type: para % para, block +.attrib: ... % metainfo.attrib +.meta_lang: en % block language (group, block, quote) +.meta_syntax: d % codeblock syntax (metainfo.syntax) ``` +A heading's identifier is not a property: it follows the level on the +object declaration line (`[5] heading :1 ch1_intro`). + **Text attribute properties** (from `attrib`): ``` @@ -246,10 +256,12 @@ and before text content. Only non-default values are written. **Presence flags** (from `has`): ``` -.has: links notes_reg notes_star images +.has: links notes_reg notes_star images images_no_dim ``` -Only present flags are listed. Absence means false. +Only present flags are listed. Absence means false. `images_no_dim` +marks an object whose markup gave no image dimensions (`w0h0`), which +spine then derived from the file. **Table properties** (from `table`, only for table objects): @@ -274,12 +286,17 @@ Only present flags are listed. Absence means false. .segment: ch1_intro % in_segment_html .segment_prev: acknowledgments .segment_next: ch2 -.anchor: ch1_intro % anchor_tag_html -.heading_ancestors: |The Wealth of Networks|||||| +.segment_epub: ch1_intro % segment_anchor_tag_epub +.anchor: ch1_intro % anchor_tag_html, when it differs + % from .segment +.heading_lev_anchor: h1 % heading_lev_anchor_tag +.heading_ancestors_text: |The Wealth of Networks|||||| +.anchor_tag: some_tag % repeatable, one per anchor tag +.lev4_subtoc: ... % repeatable, one per subtoc entry ``` -The `heading_ancestors` uses `|` as separator for the 8-element array, -with empty strings between consecutive `|` markers. +The `heading_ancestors_text` uses `|` as separator for the 8-element +array, with empty strings between consecutive `|` markers. **Digest** (from `metainfo`): @@ -372,8 +389,11 @@ not a grammar-bound serialisation. **Extracted links** (from `stow`): +Repeatable, one line per link: + ``` -.links: https://example.org https://other.org +.stow_link: https://example.org +.stow_link: https://other.org ``` ### Property Defaults (omission rules) @@ -383,10 +403,21 @@ Properties with default values are omitted to reduce verbosity: | Property | Default | Omit when | |---|---|---| | .part | "" | empty | -| .section | "" | empty | +| .section | "" | empty, or same as the enclosing section | | .parent | 0 | zero | | .last_descendant | 0 | zero | +| .children | (none) | no child headings | | .ancestors | 0 0 0 0 0 0 0 0 | all zeros | +| .ancestors_collapsed | 0 0 0 0 0 0 0 0 | all zeros | +| .dom_status | 0 0 0 0 0 0 0 0 | all zeros | +| .dom_status_collapsed | 0 0 0 0 0 0 0 0 | all zeros | +| .heading_lev_collapsed | 9 | 9 or greater | +| .parent_lev | 0 | zero | +| .o_n_type | 0 | zero | +| .is_of_type | "" | empty | +| .attrib | "" | empty | +| .meta_lang | "" | empty | +| .meta_syntax | "" | empty | | .indent | 0 0 | both zero | | .bullet | false | false | | .has | (none) | no flags set | @@ -394,13 +425,14 @@ Properties with default values are omitted to reduce verbosity: | .ocn_off | false | false | | .code_syntax | "" | empty | | .code_linenumbers | false | false | +| .anchor | "" | empty, or same as .segment | +| .stow_link | (none) | no links (repeatable, so no default) | | .image | (none) | object embeds no image (repeatable, so no default) | ### What is NOT serialized - `ptr` (DocObj_Pointer_) - runtime array indices, recomputed on load - Computed properties (object_number(), marked_up_level(), etc.) -- `heading_lev_collapsed` - derivable from `heading_lev_markup` ### What is optional |
