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

use Asciidoc for termdef boilerplate: https://github.com/metanorma/me… #414

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 "isodoc", git: "https://github.com/metanorma/isodoc", branch: "fix/yaml-no-xml"
gem "metanorma-standoc", git: "https://github.com/metanorma/metanorma-standoc", branch: "fix/yaml-no-xml"
3 changes: 2 additions & 1 deletion lib/isodoc/ieee/i18n-en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ doctype_abbrev:
standard: Std.
recommended-practice: Rec. Prac.
guide: Gde.
term_def_boilerplate: "<p>For the purposes of this document, the following terms and definitions apply. The <em>IEEE Standards Dictionary Online</em> should be consulted for terms not defined in this clause.<fn reference='_boilerplate_term1'><p><em>IEEE Standards Dictionary Online</em> is available at: <link target='http://dictionary.ieee.org'/>. An IEEE Account is required for access to the dictionary, and one can be created at no charge on the dictionary sign-in page.</p></fn></p>"
term_def_boilerplate: |
For the purposes of this document, the following terms and definitions apply. The _IEEE Standards Dictionary Online_ should be consulted for terms not defined in this clause.footnote:[_IEEE Standards Dictionary Online_ is available at: http://dictionary.ieee.org[]. An IEEE Account is required for access to the dictionary, and one can be created at no charge on the dictionary sign-in page.]
norm_with_refs_pref: The following referenced documents are indispensable for the application of this document (i.e., they must be understood and used, so each referenced document is cited in text and its relationship to this document is explained). For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments or corrigenda) applies.
biblio_pref: Bibliographical references are resources that provide additional or helpful material but do not need to be understood or used to implement this standard. Reference to these resources is made for informational use only.
note_inform_fn: Notes to text, tables, and figures are for information only and do not contain requirements needed to implement the standard.
Expand Down
77 changes: 71 additions & 6 deletions lib/metanorma/ieee/basicdoc.rng
Original file line number Diff line number Diff line change
Expand Up @@ -1000,14 +1000,14 @@
<define name="PureTextElement">
<choice>
<text/>
<ref name="em"/>
<ref name="strong"/>
<ref name="pure_em"/>
<ref name="pure_strong"/>
<ref name="sub"/>
<ref name="sup"/>
<ref name="tt"/>
<ref name="underline"/>
<ref name="strike"/>
<ref name="smallcap"/>
<ref name="pure_tt"/>
<ref name="pure_underline"/>
<ref name="pure_strike"/>
<ref name="pure_smallcap"/>
<ref name="br"/>
</choice>
</define>
Expand All @@ -1031,6 +1031,13 @@
</zeroOrMore>
</element>
</define>
<define name="pure_em">
<element name="em">
<zeroOrMore>
<ref name="PureTextElement"/>
</zeroOrMore>
</element>
</define>
<define name="strong">
<element name="strong">
<zeroOrMore>
Expand All @@ -1046,6 +1053,13 @@
</zeroOrMore>
</element>
</define>
<define name="pure_strong">
<element name="strong">
<zeroOrMore>
<ref name="PureTextElement"/>
</zeroOrMore>
</element>
</define>
<define name="tt">
<element name="tt">
<zeroOrMore>
Expand All @@ -1060,6 +1074,13 @@
</zeroOrMore>
</element>
</define>
<define name="pure_tt">
<element name="tt">
<zeroOrMore>
<ref name="PureTextElement"/>
</zeroOrMore>
</element>
</define>
<define name="keyword">
<element name="keyword">
<zeroOrMore>
Expand Down Expand Up @@ -1090,13 +1111,42 @@
<zeroOrMore>
<choice>
<ref name="PureTextElement"/>
<ref name="stem"/>
<ref name="eref"/>
<ref name="xref"/>
<ref name="hyperlink"/>
<ref name="index"/>
<ref name="index-xref"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="pure_strike">
<element name="strike">
<zeroOrMore>
<ref name="PureTextElement"/>
</zeroOrMore>
</element>
</define>
<define name="underline">
<element name="underline">
<optional>
<attribute name="style"/>
</optional>
<zeroOrMore>
<choice>
<ref name="PureTextElement"/>
<ref name="stem"/>
<ref name="eref"/>
<ref name="xref"/>
<ref name="hyperlink"/>
<ref name="index"/>
<ref name="index-xref"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="pure_underline">
<element name="underline">
<optional>
<attribute name="style"/>
Expand All @@ -1107,6 +1157,21 @@
</element>
</define>
<define name="smallcap">
<element name="smallcap">
<zeroOrMore>
<choice>
<ref name="PureTextElement"/>
<ref name="stem"/>
<ref name="eref"/>
<ref name="xref"/>
<ref name="hyperlink"/>
<ref name="index"/>
<ref name="index-xref"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="pure_smallcap">
<element name="smallcap">
<zeroOrMore>
<ref name="PureTextElement"/>
Expand Down
4 changes: 3 additions & 1 deletion lib/metanorma/ieee/biblio.rng
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,9 @@
<optional>
<ref name="formattedref"/>
</optional>
<ref name="btitle"/>
<oneOrMore>
<ref name="btitle"/>
</oneOrMore>
<optional>
<ref name="bplace"/>
</optional>
Expand Down
3 changes: 3 additions & 0 deletions lib/metanorma/ieee/isodoc.rng
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,9 @@
<value>LatexMath</value>
</choice>
</attribute>
<optional>
<attribute name="number-format"/>
</optional>
<attribute name="block">
<data type="boolean"/>
</attribute>
Expand Down
3 changes: 3 additions & 0 deletions lib/metanorma/ieee/reqt.rng
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
<ref name="MultilingualRenderingType"/>
</attribute>
</optional>
<optional>
<attribute name="class"/>
</optional>
<optional>
<ref name="reqtitle"/>
</optional>
Expand Down
6 changes: 3 additions & 3 deletions spec/metanorma/terms_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
apply. The
<em>IEEE Standards Dictionary Online</em>
should be consulted for terms not defined in this clause.
<fn reference='_boilerplate_term1'>
<fn reference='1'>
<p id='_'>
<em>IEEE Standards Dictionary Online</em>
is available at:
Expand Down Expand Up @@ -145,7 +145,7 @@
apply. The
<em>IEEE Standards Dictionary Online</em>
should be consulted for terms not defined in this clause.
<fn reference='_boilerplate_term1'>
<fn reference='1'>
<p id='_'>
<em>IEEE Standards Dictionary Online</em>
is available at:
Expand Down Expand Up @@ -293,7 +293,7 @@
apply. The
<em>IEEE Standards Dictionary Online</em>
should be consulted for terms not defined in this clause.
<fn reference='_boilerplate_term1'>
<fn reference='1'>
<p id='_'>
<em>IEEE Standards Dictionary Online</em>
is available at:
Expand Down
Loading