From 7fc85e37acfc8d61b0e7ddfea2a75bec7861012b Mon Sep 17 00:00:00 2001 From: David Warring Date: Tue, 7 Nov 2023 16:14:50 +1300 Subject: [PATCH] Document some PDF 2.0 tags --- docs/PDF/Tags.md | 2 +- docs/PDF/Tags/Node/Parent.md | 4 ++-- docs/index.md | 7 +++++++ lib/PDF/Tags.rakumod | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/PDF/Tags.md b/docs/PDF/Tags.md index 1d844ec..2978eba 100644 --- a/docs/PDF/Tags.md +++ b/docs/PDF/Tags.md @@ -23,7 +23,7 @@ Synopsis my $body-font = $pdf.core-font: :family; my PDF::Tags $tags .= create: :$pdf; - my PDF::Tags::Elem $doc = $tags.Document; + my PDF::Tags::Elem $doc = $tags.Document: :Lang; $page.graphics: -> $gfx { $doc.Paragraph: $gfx, { diff --git a/docs/PDF/Tags/Node/Parent.md b/docs/PDF/Tags/Node/Parent.md index a6acc04..4989c57 100644 --- a/docs/PDF/Tags/Node/Parent.md +++ b/docs/PDF/Tags/Node/Parent.md @@ -60,7 +60,7 @@ Returns an XPath expression to locate the node in the document tree. Returns a Hash of child nodes (arrays of lists) and attributes (prefixed by '@') say $tags.first('Document/L[1]').Hash[0].text; # text of first list-item - say $tags.first('Document/L[1]').Hash<@ListNumbering>; # lit numbering attribute + say $tags.first('Document/L[1]').Hash<@ListNumbering>; # list numbering attribute ### Alias methods @@ -84,7 +84,7 @@ Table, TableRow(TR), TableHeader(TH), TableData(TD), TableBody(TBody), TableFoot #### Inline Element Tags -Span, Quotation(Quote), Note, Reference, BibliographyEntry(BibEntry), Code, Link, Annotation(Annot), Ruby, RubyPunctutation(RP), RubyBaseText(RB), RubyText(RT), Warichu, WarichuPunctutation(RP), WarichuText(RT), Artifact, +Span, Quotation(Quote), Note, Reference, BibliographyEntry(BibEntry), Code, Link, Annotation(Annot), Artifact, Ruby, RubyPunctutation(RP), RubyBaseText(RB), RubyText(RT), Warichu, WarichuPunctutation(RP), WarichuText(RT), #### Illustration Tags diff --git a/docs/index.md b/docs/index.md index d260958..7857df6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -99,6 +99,11 @@ TOCI | TableOfContentsItem | Table of contents (leaf) item Index | | An index of keywords and topics, usually at the end of the document (text with accompanying Reference content) NonStruct | NonStructural | non-structural grouping element (element itself not intended to be exported to other formats like HTML, but 'transparent' to its content which is processed normally) Private | | Content only meaningful to the creator (element and its content not intended to be exported to other formats like HTML) +DocumentFragment | | A partial document fragment (PDF 2.0) +Aside | | Distinct side content (PDF 2.0) +Sub | Subdivision | A subdivision (PDF 2.0) +Title | | Encloses a title of a document or section (PDF 2.0) +FENote | | Used to markup end notes and footnotes (PDF 2.0) ### "Block" elements: @@ -144,6 +149,8 @@ RP | RubyPunctuation | Warichu | | Japanese/Chinese longer description WT | WarichuText WP | WarichuPunctuation +Emphasis | Em | (PDF 2.0) +Strong | | (PDF 2.0) ### "Illustration" elements (should have Alt and/or ActualText set): diff --git a/lib/PDF/Tags.rakumod b/lib/PDF/Tags.rakumod index 641fa20..f05f812 100644 --- a/lib/PDF/Tags.rakumod +++ b/lib/PDF/Tags.rakumod @@ -136,7 +136,7 @@ class PDF::Tags:ver<0.1.14> { my $body-font = $pdf.core-font: :family; my PDF::Tags $tags .= create: :$pdf; - my PDF::Tags::Elem $doc = $tags.Document; + my PDF::Tags::Elem $doc = $tags.Document: :Lang; $page.graphics: -> $gfx { $doc.Paragraph: $gfx, {