Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caption refactor Presentation XML: https://github.com/metanorma/isodo… #618

Merged
merged 79 commits into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from 67 commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
084e820
Caption refactor Presentation XML: https://github.com/metanorma/isodo…
opoudjis Nov 13, 2024
bab7aca
rationalise note, admon processing: https://github.com/metanorma/isod…
opoudjis Nov 13, 2024
941a9a2
formula label delims, figure and sourcecode label processing, ToC ent…
opoudjis Nov 13, 2024
b40ded7
semantic annotation of complex xrefs: https://github.com/metanorma/is…
opoudjis Nov 13, 2024
8412745
rspec
opoudjis Nov 13, 2024
6d377ec
rspec
opoudjis Nov 13, 2024
76b1aeb
semantically annotate xref rendering contents: https://github.com/met…
opoudjis Nov 14, 2024
6ce108d
better handling of non-paragraph content in term notes: https://githu…
opoudjis Nov 14, 2024
670e9ae
ensure dl has fmt-name: https://github.com/metanorma/isodoc/issues/617
opoudjis Nov 14, 2024
1064f72
ensure dl, ol, ul have fmt-name: https://github.com/metanorma/isodoc/…
opoudjis Nov 14, 2024
17628e8
rspec
opoudjis Nov 14, 2024
5cd1f3b
rspec
opoudjis Nov 14, 2024
26f7ba2
rspec
opoudjis Nov 14, 2024
d76b42d
rspec
opoudjis Nov 14, 2024
85add8a
rspec
opoudjis Nov 15, 2024
4656410
ensure that anchors are preemptively inserted in ol/li in xrefs proce…
opoudjis Nov 15, 2024
2cd6ca0
rspec
opoudjis Nov 15, 2024
441f86e
rspec
opoudjis Nov 15, 2024
ffc5bbf
rspec
opoudjis Nov 16, 2024
b3413bd
rspec
opoudjis Nov 16, 2024
09bf8b4
deal with XML when doing CJK extend on titles: https://github.com/met…
opoudjis Nov 16, 2024
eedd8cf
localise obligation line of annex title separately for CJK parenthese…
opoudjis Nov 16, 2024
23ea27f
rspec
opoudjis Nov 16, 2024
6c38850
rspec
opoudjis Nov 16, 2024
54a1753
rspec
opoudjis Nov 16, 2024
db6bee5
debug
opoudjis Nov 17, 2024
35f81ee
rspec
opoudjis Nov 18, 2024
f2c8055
mark up connectives in Presentation XML xrefs: https://github.com/met…
opoudjis Nov 18, 2024
b4837a2
refactor figure captioning: https://github.com/metanorma/isodoc/issue…
opoudjis Nov 20, 2024
550be8b
markup up hierarchical caption components in provisions: https://gith…
opoudjis Nov 20, 2024
a936576
Presentation XML caption refactor: https://github.com/metanorma/isodo…
opoudjis Nov 20, 2024
9137e83
refactor annex_delim for configurability: https://github.com/metanorm…
opoudjis Nov 21, 2024
6413cf4
error
opoudjis Nov 21, 2024
c069d26
mark up annex obligation in title: https://github.com/metanorma/isodo…
opoudjis Nov 21, 2024
22ffc95
mark up annex obligation in title: https://github.com/metanorma/isodo…
opoudjis Nov 21, 2024
4256a67
insert spacing delimiter for note in fmt-name, to simplify downstream…
opoudjis Nov 21, 2024
24f12f8
semantically annotate hierarchically formed labels of bloocks: https:…
opoudjis Nov 23, 2024
d4cc283
rspec
opoudjis Nov 23, 2024
a89c7c8
break down hierarchical clause labels semantically: https://github.co…
opoudjis Nov 23, 2024
98b9937
hierarchically annotate clause numbers: https://github.com/metanorma/…
opoudjis Nov 24, 2024
7d4c8d6
semantically annotate hierarchically formed labels of bloocks: https:…
opoudjis Nov 24, 2024
1c499fb
remove redundant blank in termnote label template: https://github.com…
opoudjis Nov 25, 2024
1fd01f3
allow hierarchical xrefs on a set of clauses with consecutive numberi…
opoudjis Nov 25, 2024
ddc8f6e
xrefs to subclauses of unnumbered clauses: https://github.com/metanor…
opoudjis Nov 25, 2024
3601a8a
lower2cap sensitive to XML markup: https://github.com/metanorma/isodo…
opoudjis Nov 26, 2024
1256474
fmt-caption-label update: https://github.com/metanorma/isodoc/issues/617
opoudjis Nov 26, 2024
726b587
refactor: https://github.com/metanorma/isodoc/issues/617
opoudjis Nov 26, 2024
5772e2c
refactor: https://github.com/metanorma/isodoc/issues/617
opoudjis Nov 26, 2024
f7fe4f8
fallback parse fmt-name if embedded somewhere else: https://github.co…
opoudjis Nov 27, 2024
428e590
fallback parse fmt-name if embedded somewhere else: https://github.co…
opoudjis Nov 27, 2024
8974eb3
separate fmt-xref-label for container xrefs: https://github.com/metan…
opoudjis Nov 28, 2024
2cb2a65
separate fmt-xref-label for container xrefs: https://github.com/metan…
opoudjis Nov 28, 2024
bf95855
mark up containers in xref, add container instance of fmt-xref-label:…
opoudjis Nov 29, 2024
772c4f6
defensive programming: https://github.com/metanorma/mn-native-pdf/iss…
opoudjis Nov 30, 2024
4f31763
easier inheritance of clause_counter: https://github.com/metanorma/is…
opoudjis Nov 30, 2024
5d613cf
easier inheritance of clause_counter: https://github.com/metanorma/is…
opoudjis Nov 30, 2024
f31a7cd
https://github.com/metanorma/isodoc/issues/617
opoudjis Nov 30, 2024
48e0642
configurable figure + subfigure label: https://github.com/metanorma/i…
opoudjis Nov 30, 2024
7d7a91c
separate config of figure and requirement hierarchical autonum delimi…
opoudjis Nov 30, 2024
a78a6b7
inherit container status of parent in subfigure xrefs: https://github…
opoudjis Nov 30, 2024
8ad7e31
https://github.com/metanorma/isodoc/issues/617
opoudjis Nov 30, 2024
ffb75c4
https://github.com/metanorma/isodoc/issues/617
opoudjis Dec 1, 2024
bd11f5a
https://github.com/metanorma/isodoc/issues/617
opoudjis Dec 1, 2024
7e83e7f
Preserve floating-title as Semantic XML in Presentation XML: https://…
opoudjis Dec 2, 2024
7d78c96
better detection of empty components in name markup in captions: http…
opoudjis Dec 2, 2024
8b434d7
https://github.com/metanorma/isodoc/issues/617
opoudjis Dec 2, 2024
76f1ab0
https://github.com/metanorma/isodoc/issues/617
opoudjis Dec 2, 2024
e1c2335
https://github.com/metanorma/isodoc/issues/617
opoudjis Dec 2, 2024
0784b03
no semx markup in citeas: https://github.com/metanorma/isodoc/issues/617
opoudjis Dec 2, 2024
7328475
rspec
opoudjis Dec 3, 2024
52bbf76
https://github.com/metanorma/isodoc/issues/617
opoudjis Dec 3, 2024
8a9bcc5
bugfix: reversing order of multiple preface elements with same name i…
opoudjis Dec 3, 2024
2714726
bugfix: reversing order of multiple preface elements with same name i…
opoudjis Dec 3, 2024
a28908b
rspec
opoudjis Dec 4, 2024
6a37097
remove duplicate IDs between Semantic and Presentation XML captions: …
opoudjis Dec 5, 2024
ff926c7
remove duplicate index terms between Semantic and Presentation XML ca…
opoudjis Dec 5, 2024
cc0a013
Kanji for 'and' in Japanese: https://github.com/metanorma/isodoc/issu…
opoudjis Dec 7, 2024
07297c1
rspec
opoudjis Dec 8, 2024
e7db0c6
Merge branch 'main' into feature/presxml-autonum
opoudjis Dec 8, 2024
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
2 changes: 2 additions & 0 deletions Gemfile.devel
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
gem "mn-requirements", git: "https://github.com/metanorma/mn-requirements", branch: "feature/presxml-autonum"
gem "isodoc-i18n", git: "https://github.com/metanorma/isodoc-i18n", branch: "fix/markup-connectives"
18 changes: 9 additions & 9 deletions lib/isodoc-yaml/i18n-ar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ internal_external_terms_boilerplate: |
لأغراض هذه الوثيقة ،تنطبق المصطلحات والتعاريف الواردة في % وما يلي.
no_information_available: "[لا توجد معلومات متاحة]"
term_defined_in: "(%)"
binary_and: "%1 و %2"
multiple_and: "%1, و %2"
binary_or: "%1 او %2"
multiple_or: "%1, او %2"
chain_and: "%1 و %2"
chain_or: "%1 او %2"
chain_from: "%1 %من 2"
chain_to: "من %1 إلى %2"
nested_xref: "%1, %2"
binary_and: "%1 <conn>ﻭ</conn> %2"
multiple_and: "%1<enum-comma>,</enum-comma> <conn>ﻭ</conn> %2"
binary_or: "%1 <conn>ﺍﻭ</conn> %2"
multiple_or: "%1<enum-comma>,</enum-comma> <conn>ﺍﻭ</conn> %2"
chain_and: "%1 <conn>ﻭ</conn> %2"
chain_or: "%1 <conn>ﺍﻭ</conn> %2"
chain_from: "%1 <conn>%ﻢﻧ</conn> 2"
chain_to: "<conn>ﻢﻧ</conn> %1 <conn>ﺈﻟﻯ</conn> %2"
nested_xref: "%1<comma>,</comma> %2"
list_nested_xref: "%1 %2"
ordinal_keys: [gender]
SpelloutRules:
Expand Down
18 changes: 9 additions & 9 deletions lib/isodoc-yaml/i18n-de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ internal_external_terms_boilerplate: |
Für die Zwecke dieses Dokuments gelten die in % und im Folgenden aufgeführten Begriffe und Definitionen.
no_information_available: "[KEINE INFORMATION VERFÜGBAR]"
term_defined_in: "(%)"
binary_and: "%1 und %2"
multiple_and: "%1, und %2"
binary_or: "%1 oder %2"
multiple_or: "%1, oder %2"
chain_and: "%1 und %2"
chain_or: "%1 oder %2"
chain_from: "%1 von %2"
chain_to: "%1 bis %2"
nested_xref: "%1, %2"
binary_and: "%1 <conn>und</conn> %2"
multiple_and: "%1<enum-comma>,</enum-comma> <conn>und</conn> %2"
binary_or: "%1 <conn>oder</conn> %2"
multiple_or: "%1<enum-comma>,</enum-comma> <conn>oder</conn> %2"
chain_and: "%1 <conn>und</conn> %2"
chain_or: "%1 <conn>oder</conn> %2"
chain_from: "%1 <conn>von</conn> %2"
chain_to: "%1 <conn>bis</conn> %2"
nested_xref: "%1<comma>,</comma> %2"
list_nested_xref: "%1 %2"
ordinal_keys: [gender,number]
SpelloutRules:
Expand Down
18 changes: 9 additions & 9 deletions lib/isodoc-yaml/i18n-en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ internal_external_terms_boilerplate: |
For the purposes of this document, the terms and definitions given in % and the following apply.
no_information_available: "[NO INFORMATION AVAILABLE]"
term_defined_in: "(%)"
binary_and: "%1 and %2"
multiple_and: "%1, and %2"
binary_or: "%1 or %2"
multiple_or: "%1, or %2"
chain_and: "%1 and %2"
chain_or: "%1 or %2"
chain_from: "%1 from %2"
chain_to: "%1 to %2"
nested_xref: "%1, %2"
binary_and: "%1 <conn>and</conn> %2"
multiple_and: "%1<enum-comma>,</enum-comma> <conn>and</conn> %2"
binary_or: "%1 <conn>or</conn> %2"
multiple_or: "%1<enum-comma>,</enum-comma> <conn>or</conn> %2"
chain_and: "%1 <conn>and</conn> %2"
chain_or: "%1 <conn>or</conn> %2"
chain_from: "%1 <conn>from</conn> %2"
chain_to: "%1 <conn>to</conn> %2"
nested_xref: "%1<comma>,</comma> %2"
list_nested_xref: "%1 %2"
ordinal_keys: []
SpelloutRules: spellout-ordinal
Expand Down
18 changes: 9 additions & 9 deletions lib/isodoc-yaml/i18n-es.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ internal_external_terms_boilerplate: |
Para los propósitos de este documento, se aplican los términos y definiciones dados en % y los siguientes.
no_information_available: "[NO HAY INFORMACIÓN DISPONIBLE]"
term_defined_in: "(%)"
binary_and: "%1 y %2"
multiple_and: "%1, y %2"
binary_or: "%1 o %2"
multiple_or: "%1, o %2"
chain_and: "%1 y %2"
chain_or: "%1 o %2"
chain_from: "%1 del %2"
chain_to: "%1 al %2"
nested_xref: "%1, %2"
binary_and: "%1 <conn>y<//conn> %2"
multiple_and: "%1<enum-comma>,</enum-comma> <conn>y</conn> %2"
binary_or: "%1 <conn>o</conn> %2"
multiple_or: "%1<enum-comma>,</enum-comma> <conn>o</conn> %2"
chain_and: "%1 <conn>y</conn> %2"
chain_or: "%1 <conn>o</conn> %2"
chain_from: "%1 <conn>del</conn> %2"
chain_to: "%1 <conn>al</conn> %2"
nested_xref: "%1<comma>,</comma> %2"
list_nested_xref: "%1 %2"
ordinal_keys: [gender,number]
SpelloutRules:
Expand Down
18 changes: 9 additions & 9 deletions lib/isodoc-yaml/i18n-fr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ internal_external_terms_boilerplate: |
Pour les besoins du présent document, les termes et définitions de % ainsi que les suivants, s’appliquent.
no_information_available: "[PAS D’INFORMATION DISPONIBLE]"
term_defined_in: "(%)"
binary_and: "%1 et %2"
multiple_and: "%1, et %2"
binary_or: "%1 ou %2"
multiple_or: "%1, ou %2"
chain_and: "%1 et %2"
chain_or: "%1 ou %2"
chain_from: "%1 de %2"
chain_to: "%1 à %2"
nested_xref: "%1, %2"
binary_and: "%1 <conn>et</conn> %2"
multiple_and: "%1<enum-comma>,</enum-comma> <conn>et</conn> %2"
binary_or: "%1 <conn>ou</conn> %2"
multiple_or: "%1<enum-comma>,</enum-comma> <conn>ou</conn> %2"
chain_and: "%1 <conn>et</conn> %2"
chain_or: "%1 <conn>ou</conn> %2"
chain_from: "%1 <conn>de</conn> %2"
chain_to: "%1 <conn>à</conn> %2"
nested_xref: "%1<comma>,</comma> %2"
list_nested_xref: "%1 %2"
ordinal_keys: [gender,number]
SpelloutRules:
Expand Down
20 changes: 10 additions & 10 deletions lib/isodoc-yaml/i18n-ja.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ internal_external_terms_boilerplate: |
この規格で用いる主な用語及び定義は,次によるほか,% による。
no_information_available: "[情報はありません]"
term_defined_in: "(%)"
binary_and: "%1 and %2"
multiple_and: "%1, and %2"
binary_or: "%1 or %2"
multiple_or: "%1, or %2"
chain_and: "%1 and %2"
chain_or: "%1 or %2"
chain_from: "%1 from %2"
chain_to: "%1%2"
nested_xref: "%1の%2"
list_nested_xref: "%1の%2"
binary_and: "%1 <conn>および</conn> %2"
multiple_and: "%1<enum-comma>、</enum-comma>%2"
binary_or: "%1 <conn>または</conn> %2"
multiple_or: "%1<enum-comma>、</enum-comma> <conn>または</conn> %2"
chain_and: "%1 <conn>および</conn> %2"
chain_or: "%1 <conn>または</conn> %2"
chain_from: "%1 <conn>から</conn> %2"
chain_to: "%1<conn>~</conn>%2"
nested_xref: "%1<conn>の</conn>%2"
list_nested_xref: "%1<conn>の</conn>%2"
no_conflate_xref_locations: true
ordinal_keys: []
SpelloutRules: spellout-ordinal
Expand Down
18 changes: 9 additions & 9 deletions lib/isodoc-yaml/i18n-ru.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ internal_external_terms_boilerplate: |
Для целей этого документа применяются термины и определения, данные в % и следующие.
no_information_available: "[ИНФОРМАЦИЯ ОТСУТСТВУЕТ]"
term_defined_in: "(%)"
binary_and: "%1 и %2"
multiple_and: "%1, и %2"
binary_or: "%1 или %2"
multiple_or: "%1, или %2"
chain_and: "%1 и %2"
chain_or: "%1 или %2"
chain_from: "%1 от %2"
chain_to: "%1 до %2"
nested_xref: "%1, %2"
binary_and: "%1 <conn>и</conn> %2"
multiple_and: "%1<enum-comma>,</enum-comma> <conn>и</conn> %2"
binary_or: "%1 <conn>или</conn> %2"
multiple_or: "%1<enum-comma>,</enum-comma> <conn>или</conn> %2"
chain_and: "%1 <conn>и</conn> %2"
chain_or: "%1 <conn>или</conn> %2"
chain_from: "%1 <conn>от</conn> %2"
chain_to: "%1 <conn>до</conn> %2"
nested_xref: "%1<comma>,</comma> %2"
list_nested_xref: "%1 %2"
ordinal_keys: [gender,number,case]
SpelloutRules:
Expand Down
18 changes: 9 additions & 9 deletions lib/isodoc-yaml/i18n-zh-Hans.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ internal_external_terms_boilerplate: |
% 界定的以及下列术语和定义适用于本文件。
no_information_available: "[无资料]"
term_defined_in: "(%)"
binary_and: "%1和%2"
multiple_and: "%1、和%2"
binary_or: "%1或%2"
multiple_or: "%1、或%2"
chain_and: "%1和%2"
chain_or: "%1或%2"
chain_from: "%1从%2"
chain_to: "%1到%2"
nested_xref: "%1, %2"
binary_and: "%1<conn>和</conn>%2"
multiple_and: "%1<enum-comma>、</enum-comma><conn>和</conn>%2"
binary_or: "%1<conn>或</conn>%2"
multiple_or: "%1<enum-comma>、</enum-comma><conn>或</conn>%2"
chain_and: "%1<conn>和</conn>%2"
chain_or: "%1<conn>或</conn>%2"
chain_from: "%1<conn>从</conn>%2"
chain_to: "%1<conn>到</conn>%2"
nested_xref: "%1<comma>,</comma> %2"
list_nested_xref: "%1 %2"
ordinal_keys: []
SpelloutRules: spellout-ordinal
Expand Down
16 changes: 8 additions & 8 deletions lib/isodoc/function/blocks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ def figure_parse(node, out)
def figure_parse1(node, out)
out.div **figure_attrs(node) do |div|
node.children.each do |n|
parse(n, div) unless n.name == "name"
parse(n, div) unless n.name == "fmt-name"
end
figure_name_parse(node, div, node.at(ns("./name")))
figure_name_parse(node, div, node.at(ns("./fmt-name")))
end
end

Expand All @@ -37,9 +37,9 @@ def pseudocode_attrs(node)

def pseudocode_parse(node, out)
@in_figure = true
name = node.at(ns("./name"))
name = node.at(ns("./fmt-name"))
out.div **pseudocode_attrs(node) do |div|
node.children.each { |n| parse(n, div) unless n.name == "name" }
node.children.each { |n| parse(n, div) unless n.name == "fmt-name" }
sourcecode_name_parse(node, div, name)
end
@in_figure = false
Expand All @@ -57,7 +57,7 @@ def sourcecode_attrs(node)
end

def sourcecode_parse(node, out)
name = node.at(ns("./name"))
name = node.at(ns("./fmt-name"))
out.p **sourcecode_attrs(node) do |div|
sourcecode_parse1(node, div)
end
Expand All @@ -71,7 +71,7 @@ def sourcecode_parse1(node, div)
node.at("./ancestor::xmlns:table[@class = 'rouge-line-table']") and
@sourcecode = "table"
node.children.each do |n|
%w(name dl).include?(n.name) and next
%w(fmt-name dl).include?(n.name) and next
parse(n, div)
end
@sourcecode = false
Expand All @@ -93,7 +93,7 @@ def formula_parse1(node, out)
out.div **attr_code(class: "formula") do |div|
div.p do |_p|
parse(node.at(ns("./stem")), div)
if lbl = node&.at(ns("./name"))&.text
if lbl = node&.at(ns("./fmt-name"))&.text
insert_tab(div, 1)
div << lbl
end
Expand All @@ -109,7 +109,7 @@ def formula_parse(node, out)
out.div **formula_attrs(node) do |div|
formula_parse1(node, div)
node.children.each do |n|
%w(stem name).include? n.name and next
%w(stem fmt-name).include? n.name and next
parse(n, div)
end
end
Expand Down
Loading
Loading