Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 25 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,37 @@ follow semantic versioning; release dates are ISO 8601.

### Public API

- **A DOCX timeline's dots, and drawings centred on a line, move with their text too.** A
drawing in a table cell went into that cell only when the cell held it across, and a dot
set in a column of its own beside its entry's text — `CharcoalGold`'s timeline, a row of
date, gap, dot, gap and text — had no paragraph to go to, so it stayed on the page. It now goes
into the first paragraph of the cell of the same row that holds it, placed from the row's top:
measured in Word 16.0.20430 and LibreOffice, both start each cell's first paragraph there
where the cells set their content from the top, every cell of a row taking the row's largest
top margin. A drawing in the body may now also rise above its paragraph's top by its own height,
24pt at most, as a dot centred on the paragraph's first line does; both editors place it
there and draw it whole. In a table cell it still rises by a stroke's width at most: a rule
placed 1pt above its paragraph in a contact row's cell moved that row's text 1.8pt in
LibreOffice on Linux. Word's editing protocol finds 132 of the 231 shapes beside text
that moved moving with it, against 104 of 228, and 20 of the 35 documents with drawings
passing, against 19. Unedited, no shape stands more than 1.5pt from where it stood in Word,
and no line of text moves in Word or in LibreOffice on Windows or Linux.
- **A DOCX's drawings move with the text they stand beside.** Most shapes the page paints — a
timeline's dot, an icon by a heading, a skill's bar, a badge — were placed from the page's
edges, so when a reader edited the text above one, the text moved and the shape stayed. A shape
standing beside a paragraph's text is now anchored in that paragraph and placed down from its
top: the paragraph whose text is nearest, within 48pt, when the shape hangs from it rather than
rising above it and, in a table cell, when the cell holds it across, its line is set from the
left and its row is not a repeated header. When the nearest paragraph cannot hold the shape, it
stays on the page rather than going to one further off. The paragraph's top is where
Word places from, the space above its first line included and its line where Word stands it,
measured in Word 16.0.20430 and LibreOffice to a tenth of a point. Only the first paragraph holding
text that a paragraph node is written as offers its place yet; beside a table's own cell text or a list's
top: the paragraph whose text is nearest, within 48pt, when the shape rises above its top by a
stroke's width at most (the entry above widens this) and, in a table cell, when the cell holds it across, its line is set from the left and its
row is not a repeated header. When the nearest paragraph cannot hold the shape, it stays on the
page rather than going to one further off. The paragraph's top is where Word places from, the
space above its first line included and its line where Word stands it, measured in Word
16.0.20430 and LibreOffice to a tenth of a point. Only the first paragraph holding text that a
paragraph node is written as offers its place yet; beside a table's own cell text or a list's
items, in the gap between two columns or far from any text, a shape stays on the page. Word's
editing protocol, with a new `drawings-follow-text` scenario that lengthens a paragraph, finds
104 of the 228 shapes
beside text that moved moving with it, against 12, and 19 of the 35 documents with drawings
passing, against 15. Unedited, no shape stands more than 1.5pt from where it stood in Word.
104 of the 228 shapes beside text that moved moving with it, against 12, and 19 of the 35
documents with drawings passing, against 15. Unedited, no shape stands more than 1.5pt from
where it stood in Word.
In LibreOffice the same holds but for `OrangeOps`'s header separator, which follows its line
of text where LibreOffice already sets that line 78pt low.
- **Restyling Normal reaches a DOCX's body text when the body is in runs or tables.** Normal is
Expand Down
17 changes: 12 additions & 5 deletions docs/recipes/docx-export.md
Original file line number Diff line number Diff line change
Expand Up @@ -838,11 +838,18 @@ it as approximated. A shape standing beside a paragraph's text — a timeline's
entry, an icon by its heading, a skill's bar by its label — is anchored in that paragraph
and placed down from its top, so it moves with the paragraph when a reader edits the text
above it. The paragraph is the one whose text is nearest the shape, within 48pt across
and down together, when the shape hangs from it rather than rising above it; one in a table
cell carries the shape only when its cell holds it across, its line is set from the left and
its row is not a repeated header, and places it from the cell's text column. When the
nearest paragraph cannot carry the shape, it stays on the page rather than going to a
paragraph further off, which is not the text it stands by. The paragraph's top is where Word places from:
and down together, when the shape rises above its top by its own height at most, 24pt at
most, as a dot centred on its first line does — in a table cell by a stroke's width at most:
a rule placed 1pt above its paragraph in a cell moved its row's text in LibreOffice on Linux.
In a table cell, the cell that holds the shape across takes
it, from its text column: the paragraph's own cell, or another of its row from that cell's
first paragraph — a timeline's dot in a column of its own beside its entry's text. Both
editors start each cell's first paragraph at the row's top where the cells set their content
from the top, and give every cell of a row the row's largest top margin, so the other cell's
first paragraph starts where the text's does; one with a border above it is not used; a row whose top is not known that way, a line not set
from the left and a repeated header row carry none. When the nearest paragraph cannot carry
the shape, it stays on the page rather than going to a paragraph further off, which is not
the text it stands by. The paragraph's top is where Word places from:
the space written above its first line included, and the line where Word stands it — an
exact line's baseline four fifths of the way down it, raised by the run's position —
measured in Word 16.0.20430 and LibreOffice to a tenth of a point. Only the first paragraph
Expand Down
Loading
Loading