Paragraph supports mixed inline styling — it takes IEnumerable<TextRun> and has
Add(string, TextStyle?). No other text-bearing element does.
| Element |
Constructor |
Content |
Paragraph |
Paragraph(IEnumerable<TextRun>), Add(string, TextStyle?) |
runs |
Heading |
Heading(string text, TextStyle? style) |
one string, one style |
ListItem |
ListItem(string text, TextStyle? style) |
one string, one style |
Cell |
Cell(string content) |
one string — see L0c |
ListItem.AddChild adds nested list items, not inline content, so it does not help.
What that makes impossible
Ordinary things, not exotic ones:
- bolding or italicising a word in a heading — "The
Save method", "Ceci and cela"
- a link inside a list item — arguably the single most common thing a list item contains
- a superscript, a subscript, or a footnote reference (L12) anywhere but a paragraph
- a differently-languaged run inside a heading, which PDF/UA-2 §8.4.4 requires be declarable at the
point the language changes — currently only Heading.Language exists, applying to the whole heading
That last one is a conformance consequence, not just a convenience one.
Scope
Heading and ListItem take runs, exactly as Paragraph does. The single-string constructors stay —
they are Shipped, and they are the common case — as conveniences over the general form.
This is the same content-model problem as L0c, and the three should be solved together with one shape
rather than three similar ones.
Acceptance
- A heading with a bolded word and an inline code span.
- A list item containing a link and a footnote reference.
- A run in a different language inside a heading, emitting
/Lang on the right structure element.
- Existing single-string constructors produce byte-identical output.
- Structure tree correct: inline runs inside a heading are content items of one
Hn, not separate
elements — the same principle L0a establishes for fragments.
Relates to
- L0c — table cells, the third member of this family.
- L0a — one structure element per logical element.
- L12, L26, L28 — footnote references, decoration and links, all of which need somewhere inline to live.
Plan labels used above, resolved: L0a #285 · L0c #287 · L12 #297 · L28 #299 · L26 #305.
Paragraphsupports mixed inline styling — it takesIEnumerable<TextRun>and hasAdd(string, TextStyle?). No other text-bearing element does.ParagraphParagraph(IEnumerable<TextRun>),Add(string, TextStyle?)HeadingHeading(string text, TextStyle? style)ListItemListItem(string text, TextStyle? style)CellCell(string content)ListItem.AddChildadds nested list items, not inline content, so it does not help.What that makes impossible
Ordinary things, not exotic ones:
Savemethod", "Ceci and cela"point the language changes — currently only
Heading.Languageexists, applying to the whole headingThat last one is a conformance consequence, not just a convenience one.
Scope
HeadingandListItemtake runs, exactly asParagraphdoes. The single-string constructors stay —they are Shipped, and they are the common case — as conveniences over the general form.
This is the same content-model problem as L0c, and the three should be solved together with one shape
rather than three similar ones.
Acceptance
/Langon the right structure element.Hn, not separateelements — the same principle L0a establishes for fragments.
Relates to
Plan labels used above, resolved: L0a #285 · L0c #287 · L12 #297 · L28 #299 · L26 #305.