Skip to content

Commit

Permalink
update list construction pattern so that sublists are added to actual…
Browse files Browse the repository at this point in the history
… ListItems

Signed-off-by: Panos Vagenas <[email protected]>
  • Loading branch information
vagenas committed Feb 24, 2025
1 parent 78e211f commit 7aa36a0
Show file tree
Hide file tree
Showing 13 changed files with 83 additions and 77 deletions.
2 changes: 1 addition & 1 deletion test/data/doc/constructed_doc.dt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Affiliation 2</text>
<ordered_list><list_item>list item 3.c.i</list_item>
</ordered_list>
</ordered_list>
<list_item>list item 4</list_item>
</unordered_list>
<list_item>list item 4</list_item>
<otsl><fcel>Product<fcel>Years<lcel><nl><ucel><fcel>2016<fcel>2017<nl><fcel>Apple<fcel>49823<fcel>695944<nl><caption>This is the caption of table 1.</caption></otsl>
<picture><caption>This is the caption of figure 1.</caption></picture>
<picture><caption>This is the caption of figure 2.</caption></picture>
Expand Down
2 changes: 1 addition & 1 deletion test/data/doc/constructed_doc.dt.gt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Affiliation 2</text>
<ordered_list><list_item>list item 3.c.i</list_item>
</ordered_list>
</ordered_list>
<list_item>list item 4</list_item>
</unordered_list>
<list_item>list item 4</list_item>
<otsl><fcel>Product<fcel>Years<lcel><nl><ucel><fcel>2016<fcel>2017<nl><fcel>Apple<fcel>49823<fcel>695944<nl><caption>This is the caption of table 1.</caption></otsl>
<picture><caption>This is the caption of figure 1.</caption></picture>
<picture><caption>This is the caption of figure 2.</caption></picture>
Expand Down
2 changes: 1 addition & 1 deletion test/data/doc/constructed_doc.embedded.html.gt
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
<li>list item 3.c.i</li>
</ol>
</ol>
<li>list item 4</li>
</ul>
<li>list item 4</li>
<table><caption>This is the caption of table 1.</caption><tbody><tr><td rowspan="2">Product</td><td colspan="2">Years</td></tr><tr><td>2016</td><td>2017</td></tr><tr><td>Apple</td><td>49823</td><td>695944</td></tr></tbody></table>
<figure><figcaption>This is the caption of figure 1.</figcaption></figure>
<figure><figcaption>This is the caption of figure 2.</figcaption><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAAIklEQVR4nO3BAQ0AAADCoPdPbQ8HFAAAAAAAAAAAAAAA8G4wQAABiwCo9wAAAABJRU5ErkJggg=="></figure>
Expand Down
33 changes: 18 additions & 15 deletions test/data/doc/constructed_doc.embedded.json.gt
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@
{
"$ref": "#/texts/7"
},
{
"$ref": "#/groups/2"
},
{
"$ref": "#/texts/12"
}
Expand All @@ -118,7 +115,7 @@
{
"self_ref": "#/groups/2",
"parent": {
"$ref": "#/groups/1"
"$ref": "#/texts/7"
},
"children": [
{
Expand All @@ -129,9 +126,6 @@
},
{
"$ref": "#/texts/10"
},
{
"$ref": "#/groups/3"
}
],
"content_layer": "body",
Expand All @@ -141,7 +135,7 @@
{
"self_ref": "#/groups/3",
"parent": {
"$ref": "#/groups/2"
"$ref": "#/texts/10"
},
"children": [
{
Expand Down Expand Up @@ -197,9 +191,6 @@
},
{
"$ref": "#/texts/20"
},
{
"$ref": "#/groups/7"
}
],
"content_layer": "body",
Expand All @@ -209,7 +200,7 @@
{
"self_ref": "#/groups/7",
"parent": {
"$ref": "#/groups/6"
"$ref": "#/texts/20"
},
"children": [
{
Expand Down Expand Up @@ -369,7 +360,11 @@
"parent": {
"$ref": "#/groups/1"
},
"children": [],
"children": [
{
"$ref": "#/groups/2"
}
],
"content_layer": "body",
"label": "list_item",
"prov": [],
Expand Down Expand Up @@ -411,7 +406,11 @@
"parent": {
"$ref": "#/groups/2"
},
"children": [],
"children": [
{
"$ref": "#/groups/3"
}
],
"content_layer": "body",
"label": "list_item",
"prov": [],
Expand Down Expand Up @@ -545,7 +544,11 @@
"parent": {
"$ref": "#/groups/6"
},
"children": [],
"children": [
{
"$ref": "#/groups/7"
}
],
"content_layer": "body",
"label": "list_item",
"prov": [],
Expand Down
18 changes: 9 additions & 9 deletions test/data/doc/constructed_doc.embedded.yaml.gt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ groups:
- $ref: '#/texts/5'
- $ref: '#/texts/6'
- $ref: '#/texts/7'
- $ref: '#/groups/2'
- $ref: '#/texts/12'
content_layer: body
label: list
Expand All @@ -82,20 +81,19 @@ groups:
- $ref: '#/texts/8'
- $ref: '#/texts/9'
- $ref: '#/texts/10'
- $ref: '#/groups/3'
content_layer: body
label: ordered_list
name: group
parent:
$ref: '#/groups/1'
$ref: '#/texts/7'
self_ref: '#/groups/2'
- children:
- $ref: '#/texts/11'
content_layer: body
label: ordered_list
name: group
parent:
$ref: '#/groups/2'
$ref: '#/texts/10'
self_ref: '#/groups/3'
- children:
- $ref: '#/groups/5'
Expand All @@ -118,7 +116,6 @@ groups:
- children:
- $ref: '#/texts/19'
- $ref: '#/texts/20'
- $ref: '#/groups/7'
content_layer: body
label: list
name: group
Expand All @@ -133,7 +130,7 @@ groups:
label: list
name: group
parent:
$ref: '#/groups/6'
$ref: '#/texts/20'
self_ref: '#/groups/7'
- children:
- $ref: '#/texts/22'
Expand Down Expand Up @@ -474,7 +471,8 @@ texts:
prov: []
self_ref: '#/texts/6'
text: list item 2
- children: []
- children:
- $ref: '#/groups/2'
content_layer: body
enumerated: false
label: list_item
Expand Down Expand Up @@ -507,7 +505,8 @@ texts:
prov: []
self_ref: '#/texts/9'
text: list item 3.b
- children: []
- children:
- $ref: '#/groups/3'
content_layer: body
enumerated: false
label: list_item
Expand Down Expand Up @@ -611,7 +610,8 @@ texts:
prov: []
self_ref: '#/texts/19'
text: item 1 of neighboring list
- children: []
- children:
- $ref: '#/groups/7'
content_layer: body
enumerated: false
label: list_item
Expand Down
2 changes: 1 addition & 1 deletion test/data/doc/constructed_doc.placeholder.html.gt
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
<li>list item 3.c.i</li>
</ol>
</ol>
<li>list item 4</li>
</ul>
<li>list item 4</li>
<table><caption>This is the caption of table 1.</caption><tbody><tr><td rowspan="2">Product</td><td colspan="2">Years</td></tr><tr><td>2016</td><td>2017</td></tr><tr><td>Apple</td><td>49823</td><td>695944</td></tr></tbody></table>
<figure><figcaption>This is the caption of figure 1.</figcaption></figure>
<figure><figcaption>This is the caption of figure 2.</figcaption></figure>
Expand Down
2 changes: 1 addition & 1 deletion test/data/doc/constructed_doc.referenced.html.gt
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
<li>list item 3.c.i</li>
</ol>
</ol>
<li>list item 4</li>
</ul>
<li>list item 4</li>
<table><caption>This is the caption of table 1.</caption><tbody><tr><td rowspan="2">Product</td><td colspan="2">Years</td></tr><tr><td>2016</td><td>2017</td></tr><tr><td>Apple</td><td>49823</td><td>695944</td></tr></tbody></table>
<figure><figcaption>This is the caption of figure 1.</figcaption></figure>
<figure><figcaption>This is the caption of figure 2.</figcaption><img src="constructed_images/image_000001_f3cc103136423a57975750907ebc1d367e2985ac6338976d4d5a439f50323f4a.png"></figure>
Expand Down
33 changes: 18 additions & 15 deletions test/data/doc/constructed_doc.referenced.json.gt
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@
{
"$ref": "#/texts/7"
},
{
"$ref": "#/groups/2"
},
{
"$ref": "#/texts/12"
}
Expand All @@ -118,7 +115,7 @@
{
"self_ref": "#/groups/2",
"parent": {
"$ref": "#/groups/1"
"$ref": "#/texts/7"
},
"children": [
{
Expand All @@ -129,9 +126,6 @@
},
{
"$ref": "#/texts/10"
},
{
"$ref": "#/groups/3"
}
],
"content_layer": "body",
Expand All @@ -141,7 +135,7 @@
{
"self_ref": "#/groups/3",
"parent": {
"$ref": "#/groups/2"
"$ref": "#/texts/10"
},
"children": [
{
Expand Down Expand Up @@ -197,9 +191,6 @@
},
{
"$ref": "#/texts/20"
},
{
"$ref": "#/groups/7"
}
],
"content_layer": "body",
Expand All @@ -209,7 +200,7 @@
{
"self_ref": "#/groups/7",
"parent": {
"$ref": "#/groups/6"
"$ref": "#/texts/20"
},
"children": [
{
Expand Down Expand Up @@ -369,7 +360,11 @@
"parent": {
"$ref": "#/groups/1"
},
"children": [],
"children": [
{
"$ref": "#/groups/2"
}
],
"content_layer": "body",
"label": "list_item",
"prov": [],
Expand Down Expand Up @@ -411,7 +406,11 @@
"parent": {
"$ref": "#/groups/2"
},
"children": [],
"children": [
{
"$ref": "#/groups/3"
}
],
"content_layer": "body",
"label": "list_item",
"prov": [],
Expand Down Expand Up @@ -545,7 +544,11 @@
"parent": {
"$ref": "#/groups/6"
},
"children": [],
"children": [
{
"$ref": "#/groups/7"
}
],
"content_layer": "body",
"label": "list_item",
"prov": [],
Expand Down
18 changes: 9 additions & 9 deletions test/data/doc/constructed_doc.referenced.yaml.gt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ groups:
- $ref: '#/texts/5'
- $ref: '#/texts/6'
- $ref: '#/texts/7'
- $ref: '#/groups/2'
- $ref: '#/texts/12'
content_layer: body
label: list
Expand All @@ -82,20 +81,19 @@ groups:
- $ref: '#/texts/8'
- $ref: '#/texts/9'
- $ref: '#/texts/10'
- $ref: '#/groups/3'
content_layer: body
label: ordered_list
name: group
parent:
$ref: '#/groups/1'
$ref: '#/texts/7'
self_ref: '#/groups/2'
- children:
- $ref: '#/texts/11'
content_layer: body
label: ordered_list
name: group
parent:
$ref: '#/groups/2'
$ref: '#/texts/10'
self_ref: '#/groups/3'
- children:
- $ref: '#/groups/5'
Expand All @@ -118,7 +116,6 @@ groups:
- children:
- $ref: '#/texts/19'
- $ref: '#/texts/20'
- $ref: '#/groups/7'
content_layer: body
label: list
name: group
Expand All @@ -133,7 +130,7 @@ groups:
label: list
name: group
parent:
$ref: '#/groups/6'
$ref: '#/texts/20'
self_ref: '#/groups/7'
- children:
- $ref: '#/texts/22'
Expand Down Expand Up @@ -474,7 +471,8 @@ texts:
prov: []
self_ref: '#/texts/6'
text: list item 2
- children: []
- children:
- $ref: '#/groups/2'
content_layer: body
enumerated: false
label: list_item
Expand Down Expand Up @@ -507,7 +505,8 @@ texts:
prov: []
self_ref: '#/texts/9'
text: list item 3.b
- children: []
- children:
- $ref: '#/groups/3'
content_layer: body
enumerated: false
label: list_item
Expand Down Expand Up @@ -611,7 +610,8 @@ texts:
prov: []
self_ref: '#/texts/19'
text: item 1 of neighboring list
- children: []
- children:
- $ref: '#/groups/7'
content_layer: body
enumerated: false
label: list_item
Expand Down
Loading

0 comments on commit 7aa36a0

Please sign in to comment.