Skip to content

Commit

Permalink
Document some PDF 2.0 tags
Browse files Browse the repository at this point in the history
  • Loading branch information
dwarring committed Nov 7, 2023
1 parent a6947c2 commit 7fc85e3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/PDF/Tags.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Synopsis
my $body-font = $pdf.core-font: :family<Helvetica>;

my PDF::Tags $tags .= create: :$pdf;
my PDF::Tags::Elem $doc = $tags.Document;
my PDF::Tags::Elem $doc = $tags.Document: :Lang<en-NZ>;

$page.graphics: -> $gfx {
$doc.Paragraph: $gfx, {
Expand Down
4 changes: 2 additions & 2 deletions docs/PDF/Tags/Node/Parent.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<LBody>[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

Expand All @@ -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

Expand Down
7 changes: 7 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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):

Expand Down
2 changes: 1 addition & 1 deletion lib/PDF/Tags.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class PDF::Tags:ver<0.1.14> {
my $body-font = $pdf.core-font: :family<Helvetica>;
my PDF::Tags $tags .= create: :$pdf;
my PDF::Tags::Elem $doc = $tags.Document;
my PDF::Tags::Elem $doc = $tags.Document: :Lang<en-NZ>;
$page.graphics: -> $gfx {
$doc.Paragraph: $gfx, {
Expand Down

0 comments on commit 7fc85e3

Please sign in to comment.