NumberingRestartPolicies (0x1A41E) is three u32; the two triples seen
in the corpus are written. KeyboardDirection code 1 is
LeftToRightDirection. IDML writes AllNestedStyles only when the list
has items, on every style. The root value test checks values that the
observed root values still hold.
IDML writes a style's text attributes in ascending attribute ID order.
The IDs between known ones, with their payload types, place 79 more
attributes: ruby, kenten, tatechuyoko and warichu settings, OpenType
features, gap tints and colours, overprint flags, paragraph border
options and others. Styles and text runs write them wherever they are
stored; the root style values come from the INDD instead of the
observed values.
- BeforeGroupingLayerReference from the u32 at 0 of chunk 0x324, a
spread layer resolved to its layer.
- TableStyle CaptionPosition from DOM 21.5: attribute 0x1047D = 1 gives
BeforeTable, absent gives AfterTable.
- AIGeneratedAltText, AltTextGenerationError and AltTextCropSyncRect of
page items from chunks 0x1E262, 0x1E260 and 0x1E261.
- The Name of a nested style group is its full path joined by ':'.
An image without a link whose chunk 0x8C23 is 0 or absent keeps its
file in its preview (0x170D -> class 0x1708 -> 0x119 -> raw data
object). Images of InDesign 2.0 to 5.0 whose chunk 0x8C1B names a class
0x8C01 object keep the preview as a preview.
`read_previews` also collects the page items of graphic table cells and
the items of form field states, which the package holds as well. Over
the open corpus this adds previews for 657 graphics in cells and 385 in
states; every cell graphic without `Contents` has one. Items anchored in
cell text were already in the story anchors.
A preview chain that can't be read gives no preview instead of failing
the graphic, and with it the conversion.
The README and ARCHITECTURE.md say that every conversion looks up each
graphic's preview object; only `convert` reads the preview data.
`indd::convert` now returns `Conversion::previews`: InDesign's screen
preview (chunk 0x170D -> class 0x1708 -> chunk 0x119 -> raw data) of each
placed graphic without `Contents`, one entry per preview file with the
`Self` of every graphic that uses it. IDML has no place for a preview, so
the package is unchanged; an application can show the preview when it
cannot read a linked file. `convert_into` and `indd audit` do not read
previews.
Output: `diff_outputs.py --exclude own/` over 23 files (the fixtures and
part of the open corpus): 0 differing outputs, 0 changed warnings or
failures.
Stories and XML stories get the Ai* attributes from DOM 21.5; links the
Ai* attributes from 21.5 and SourceObjectName from 21.4; every typed
ContourOption the four contour parameters from 21.4; object styles
EpubAriaLabel and EpubAriaLabelSourceType from 21.2; designmap.xml
Html5ExportPreference from 21.1. LockPosition and AnchorSpaceAbove go on
every AnchoredObjectSetting with all ten settings, polygons included,
in place of the per-tag WhenWritten blocks.
Chunk 0x2C1A gives the clipping type (None, DetectEdges, AlphaChannel,
PhotoshopPath) and a flags byte (high-resolution image, invert and
restrict to frame). Graphics of types 1 to 3 write their chunk 0x162B
paths as ClippingPathGeometry; PhotoshopPath names come from key 0x7D
of the image properties when ASCII, AlphaChannel names from chunk
0x177C. Placed pages get the element with the values of graphics
without the chunk.
Chunk 0x808 of the preferences is the ruler origin (0 spread, 1 page,
2 spine). With PageOrigin a page guide is measured from its own page,
with SpineOrigin a vertical guide on a two-page spread from the spine.
The difference is taken after adding the spread's translation, which
gives IDML's 0 for guides on the origin.
A story without chunk 0x2EE has OpticalMarginSize 9.2125984251969 (13 Q)
when the text size unit is Q, and 12 otherwise: 33,351 of 33,351
stories of the trustworthy pairs. The preferences' size of new frames
does not give it (3 pairs differ).
Section chunk 0x4C02 stores IncludeSectionPrefix as a u16 after a u16 0.
The section Name is its prefix; pages of a section that includes the
prefix are named with it. The first section starts at its stored start
even when it continues numbering, and the page descriptor writes a
return in the marker as U+2029.
IDML starts a ParagraphStyleRange at every paragraph-style run record,
also between neighbouring records with equal formatting. Document the
rule and the paragraph length list of the records in objects.md, and
the remaining splits inside one record in unknowns.md.
An element whose start marker and last character lie in different
paragraph ranges wraps the paragraph ranges, which split after its start
marker and at its end marker; one within a paragraph range whose markers
lie in different character ranges wraps character ranges. Start markers
sit in a character range of the parent and end markers in none. Before
version 11 an element with a story as content ends its character range.
Elements are no longer left out when they span paragraphs.
A grid position's 0x10469 record names a graphic cell object (class
0x1046B, u32 at byte 70 of its first value) whose chunk 0x10466 lists
the cell's page items. Write them inside the Cell like nested items.
A plain rectangle has exactly four straight points along the axes. Other
frames take the one number from offset 0 of chunk 0x3723, whatever their
four insets, and before DOM 11 always have InsetSpacing.
Every ContourOption has ContourPathName: `$ID/`, or for an AlphaChannel
contour the first channel name of image chunk 0x177C. Frames take their
graphic's name; frames whose object style turns the text wrap category
on get a ContourOption with only the name. Object styles write `$ID/`.
A wrap path object (class 0x3702) flagged custom in chunk 0x3709 has its
0x162B paths written as TextWrapPreference/Properties/PathGeometry, before
TextWrapOffset.
Decode the 29-byte contour chunk (0x373D on placed graphics, 0x373F in
the preferences, 0x3777 on object styles): u32 contour type at 0 and
IncludeInsideEdges at 17. Graphics without the chunk take the
preferences' contour, else SameAsClipping; a frame with one graphic
takes its graphic's contour unless its object style turns the text wrap
category on; object styles without the chunk have SameAsClipping.
Over the trustworthy pairs every ContourType and IncludeInsideEdges the
converter writes equals the reference (graphics 9,535, frames 8,965,
object styles 5,556, preferences 1,251); 14 graphics get a ContourType
the reference leaves out.
kMojikumiDefaultName10 is LineEndAllOneEmEnum: the BasedOnMojikumiSet of
7 custom mojikumi tables in 7 trustworthy pairs (code 10).
kMojikumiDefaultName14 is LineEndPeriodOneEmEnum: the Mojikumi of one
paragraph range in one trustworthy pair. Codes 3, 5, 6, 9 and 11 have
no pair and stay unwritten (docs/format/unknowns.md).
compare.py --exclude own/: trustworthy values reproduced 28,699,017 ->
28,699,026 (+7 BasedOnMojikumiSet, +2 Mojikumi); coverage 99.484 % ->
99.485 %; extras 92,883 unchanged; no pair loses values.