metanorma-standoc 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/macos.yml +0 -7
- data/.github/workflows/ubuntu.yml +6 -11
- data/.github/workflows/windows.yml +0 -8
- data/.rubocop.yml +1 -1
- data/Rakefile +2 -0
- data/lib/asciidoctor/standoc/base.rb +28 -27
- data/lib/asciidoctor/standoc/biblio.rng +1 -1
- data/lib/asciidoctor/standoc/blocks.rb +25 -95
- data/lib/asciidoctor/standoc/blocks_notes.rb +89 -0
- data/lib/asciidoctor/standoc/cleanup.rb +10 -6
- data/lib/asciidoctor/standoc/cleanup_boilerplate.rb +11 -24
- data/lib/asciidoctor/standoc/cleanup_inline.rb +1 -1
- data/lib/asciidoctor/standoc/cleanup_ref.rb +47 -1
- data/lib/asciidoctor/standoc/cleanup_section.rb +72 -5
- data/lib/asciidoctor/standoc/cleanup_terms.rb +10 -0
- data/lib/asciidoctor/standoc/converter.rb +16 -2
- data/lib/asciidoctor/standoc/inline.rb +1 -1
- data/lib/asciidoctor/standoc/isodoc.rng +439 -6
- data/lib/asciidoctor/standoc/lists.rb +12 -12
- data/lib/asciidoctor/standoc/macros_yaml2text.rb +32 -15
- data/lib/asciidoctor/standoc/ref.rb +75 -34
- data/lib/asciidoctor/standoc/reqt.rb +11 -6
- data/lib/asciidoctor/standoc/reqt.rng +23 -0
- data/lib/asciidoctor/standoc/section.rb +27 -25
- data/lib/asciidoctor/standoc/table.rb +3 -2
- data/lib/asciidoctor/standoc/utils.rb +16 -0
- data/lib/asciidoctor/standoc/views/datamodel/model_representation.adoc.erb +1 -1
- data/lib/metanorma/standoc/processor.rb +5 -7
- data/lib/metanorma/standoc/version.rb +1 -1
- data/metanorma-standoc.gemspec +3 -2
- data/spec/asciidoctor-standoc/base_spec.rb +3 -2
- data/spec/asciidoctor-standoc/blocks_spec.rb +68 -32
- data/spec/asciidoctor-standoc/cleanup_spec.rb +1221 -17
- data/spec/asciidoctor-standoc/datamodel/attributes_table_preprocessor_spec.rb +35 -0
- data/spec/asciidoctor-standoc/inline_spec.rb +3 -3
- data/spec/asciidoctor-standoc/isobib_cache_spec.rb +4 -4
- data/spec/asciidoctor-standoc/lists_spec.rb +7 -5
- data/spec/asciidoctor-standoc/macros_spec.rb +4 -3
- data/spec/asciidoctor-standoc/refs_dl_spec.rb +8 -6
- data/spec/asciidoctor-standoc/refs_spec.rb +275 -30
- data/spec/asciidoctor-standoc/section_spec.rb +42 -38
- data/spec/asciidoctor-standoc/table_spec.rb +3 -3
- data/spec/asciidoctor-standoc/validate_spec.rb +56 -0
- data/spec/assets/{html.css → html.scss} +0 -0
- data/spec/assets/i18n.yaml +17 -2
- data/spec/assets/iso123.rxl +107 -0
- data/spec/assets/{word.css → word.scss} +0 -0
- data/spec/examples/datamodel/blank_definition_profile.adoc +4 -0
- data/spec/examples/datamodel/models/models/{Signature copy.yml → SignatureBlankDefinition.yml} +2 -2
- data/spec/fixtures/macros_datamodel/blank_definition_profile.xml +51 -0
- data/spec/metanorma/processor_spec.rb +5 -6
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +83 -83
- data/spec/vcr_cassettes/isobib_get_123.yml +19 -198
- data/spec/vcr_cassettes/isobib_get_123_1.yml +361 -0
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +19 -19
- data/spec/vcr_cassettes/isobib_get_124.yml +21 -21
- data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +10 -10
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +42 -42
- metadata +32 -18
- data/lib/asciidoctor-yaml/i18n-en.yaml +0 -20
- data/lib/asciidoctor-yaml/i18n-fr.yaml +0 -13
- data/lib/asciidoctor-yaml/i18n-zh-Hans.yaml +0 -15
- data/lib/asciidoctor/standoc/i18n.rb +0 -39
@@ -59,7 +59,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
59
59
|
[.nonterm]
|
60
60
|
==== General
|
61
61
|
|
62
|
-
==== Symbols
|
62
|
+
==== Symbols
|
63
63
|
|
64
64
|
== Abbreviated Terms
|
65
65
|
|
@@ -82,6 +82,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
82
82
|
INPUT
|
83
83
|
#{BLANK_HDR.sub(/<status>/, "<abstract> <p>Text</p> </abstract><status>")}
|
84
84
|
<preface><abstract id="_">
|
85
|
+
<title>Abstract</title>
|
85
86
|
<p id="_">Text</p>
|
86
87
|
</abstract><foreword id='_' obligation="informative">
|
87
88
|
<title>Foreword</title>
|
@@ -101,7 +102,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
101
102
|
</preface><sections>
|
102
103
|
|
103
104
|
|
104
|
-
<clause id="_" inline-header="false" obligation="normative">
|
105
|
+
<clause id="_" inline-header="false" obligation="normative" type="scope">
|
105
106
|
<title>Scope</title>
|
106
107
|
<p id="_">Text</p>
|
107
108
|
</clause>
|
@@ -143,14 +144,14 @@ RSpec.describe Asciidoctor::Standoc do
|
|
143
144
|
<preferred>Term2</preferred>
|
144
145
|
</term>
|
145
146
|
</terms>
|
146
|
-
<definitions id="_"><title>Symbols and
|
147
|
+
<definitions id="_" obligation="normative"><title>Symbols and abbreviated terms</title><clause id="_" inline-header="false" obligation="normative">
|
147
148
|
<title>General</title>
|
148
149
|
</clause>
|
149
|
-
<definitions id="_">
|
150
|
-
<title>Symbols
|
150
|
+
<definitions id="_" obligation="normative" type="symbols">
|
151
|
+
<title>Symbols</title>
|
151
152
|
</definitions></definitions></clause>
|
152
|
-
<definitions id="_">
|
153
|
-
<title>Abbreviated
|
153
|
+
<definitions id="_" obligation="normative" type="abbreviated_terms">
|
154
|
+
<title>Abbreviated terms</title>
|
154
155
|
</definitions>
|
155
156
|
<clause id="_" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="_" inline-header="false" obligation="normative">
|
156
157
|
<title>Introduction</title>
|
@@ -168,7 +169,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
168
169
|
<title>Annex A.1</title>
|
169
170
|
</clause>
|
170
171
|
</annex><bibliography><references id="_" obligation="informative" normative="true">
|
171
|
-
<title>Normative
|
172
|
+
<title>Normative references</title>
|
172
173
|
<p id="_">There are no normative references in this document.</p>
|
173
174
|
</references><clause id="_" obligation="informative">
|
174
175
|
<title>Bibliography</title>
|
@@ -256,7 +257,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
256
257
|
[language=en,script=Latn]
|
257
258
|
==== General
|
258
259
|
|
259
|
-
==== Symbols
|
260
|
+
==== Symbols
|
260
261
|
|
261
262
|
[language=en,script=Latn]
|
262
263
|
== Abbreviated Terms
|
@@ -287,6 +288,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
287
288
|
INPUT
|
288
289
|
#{BLANK_HDR.sub(/<status>/, "<abstract> <p>Text</p> </abstract><status>")}
|
289
290
|
<preface><abstract id="_" language="en" script="Latn">
|
291
|
+
<title>Abstract</title>
|
290
292
|
<p id="_">Text</p>
|
291
293
|
</abstract><foreword id='_' language='en' script='Latn' obligation='informative'>
|
292
294
|
<title>Foreword</title>
|
@@ -306,7 +308,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
306
308
|
</preface><sections>
|
307
309
|
|
308
310
|
|
309
|
-
<clause id="_" language="en" script="Latn" inline-header="false" obligation="normative">
|
311
|
+
<clause id="_" language="en" script="Latn" inline-header="false" obligation="normative" type="scope">
|
310
312
|
<title>Scope</title>
|
311
313
|
<p id="_">Text</p>
|
312
314
|
</clause>
|
@@ -348,14 +350,14 @@ RSpec.describe Asciidoctor::Standoc do
|
|
348
350
|
<preferred>Term2</preferred>
|
349
351
|
</term>
|
350
352
|
</terms>
|
351
|
-
<definitions id="_" language="en" script="Latn"><title>Symbols and
|
353
|
+
<definitions id="_" language="en" script="Latn" obligation="normative"><title>Symbols and abbreviated terms</title><clause id="_" language="en" script="Latn" inline-header="false" obligation="normative">
|
352
354
|
<title>General</title>
|
353
355
|
</clause>
|
354
|
-
<definitions id="_">
|
355
|
-
<title>Symbols
|
356
|
+
<definitions id="_" obligation="normative" type="symbols">
|
357
|
+
<title>Symbols</title>
|
356
358
|
</definitions></definitions></clause>
|
357
|
-
<definitions id="_" language="en" script="Latn">
|
358
|
-
<title>Abbreviated
|
359
|
+
<definitions id="_" language="en" script="Latn" obligation="normative" type="abbreviated_terms">
|
360
|
+
<title>Abbreviated terms</title>
|
359
361
|
</definitions>
|
360
362
|
<clause id="_" language="en" script="Latn" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="_" language="en" script="Latn" inline-header="false" obligation="normative">
|
361
363
|
<title>Introduction</title>
|
@@ -373,7 +375,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
373
375
|
<title>Annex A.1</title>
|
374
376
|
</clause>
|
375
377
|
</annex><bibliography><references id="_" language="en" script="Latn" obligation="informative" normative="true">
|
376
|
-
<title>Normative
|
378
|
+
<title>Normative references</title>
|
377
379
|
<p id="_">There are no normative references in this document.</p>
|
378
380
|
</references><clause id="_" language="en" script="Latn" obligation="informative">
|
379
381
|
<title>Bibliography</title>
|
@@ -420,10 +422,10 @@ RSpec.describe Asciidoctor::Standoc do
|
|
420
422
|
|
421
423
|
==== Term2
|
422
424
|
|
423
|
-
[heading=symbols
|
425
|
+
[heading=symbols]
|
424
426
|
=== Σύμβολα και Συντομογραφίες
|
425
427
|
|
426
|
-
[heading=
|
428
|
+
[heading=abbreviated terms]
|
427
429
|
== Σύμβολα και Συντομογραφίες
|
428
430
|
|
429
431
|
== Clause 4
|
@@ -445,6 +447,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
445
447
|
#{BLANK_HDR.sub(/<status>/, "<abstract> <p>Text</p> </abstract><status>")}
|
446
448
|
<preface>
|
447
449
|
<abstract id='_'>
|
450
|
+
<title>Abstract</title>
|
448
451
|
<p id='_'>Text</p>
|
449
452
|
</abstract>
|
450
453
|
<foreword id='_' obligation='informative'>
|
@@ -458,7 +461,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
458
461
|
</clause>
|
459
462
|
</introduction>
|
460
463
|
<acknowledgements id='_' obligation='informative'>
|
461
|
-
<title
|
464
|
+
<title>Acknowledgements</title>
|
462
465
|
</acknowledgements>
|
463
466
|
</preface>
|
464
467
|
<sections>
|
@@ -470,7 +473,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
470
473
|
</term>
|
471
474
|
</terms>
|
472
475
|
<clause id='_' obligation='normative'>
|
473
|
-
<title>Terms and
|
476
|
+
<title>Terms, definitions and symbols</title>
|
474
477
|
<p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
|
475
478
|
<terms id='_' obligation='normative'>
|
476
479
|
<title>Normal Terms</title>
|
@@ -478,12 +481,12 @@ RSpec.describe Asciidoctor::Standoc do
|
|
478
481
|
<preferred>Term2</preferred>
|
479
482
|
</term>
|
480
483
|
</terms>
|
481
|
-
<definitions id='_'>
|
482
|
-
<title
|
484
|
+
<definitions id='_' obligation="normative" type="symbols">
|
485
|
+
<title>Symbols</title>
|
483
486
|
</definitions>
|
484
487
|
</clause>
|
485
|
-
<definitions id='_'>
|
486
|
-
<title
|
488
|
+
<definitions id='_' obligation="normative" type="abbreviated_terms">
|
489
|
+
<title>Abbreviated terms</title>
|
487
490
|
</definitions>
|
488
491
|
<clause id='_' inline-header='false' obligation='normative'>
|
489
492
|
<title>Clause 4</title>
|
@@ -503,7 +506,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
503
506
|
</annex>
|
504
507
|
<bibliography>
|
505
508
|
<references id='_' obligation='informative' normative="true">
|
506
|
-
<title>Normative
|
509
|
+
<title>Normative references</title>
|
507
510
|
<p id="_">There are no normative references in this document.</p>
|
508
511
|
</references>
|
509
512
|
<clause id='_' obligation='informative'>
|
@@ -537,7 +540,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
537
540
|
<term id='_'>
|
538
541
|
<preferred>Term</preferred>
|
539
542
|
</term>
|
540
|
-
<definitions id='_'>
|
543
|
+
<definitions id='_' obligation="normative" type="symbols">
|
541
544
|
<title>Symbols</title>
|
542
545
|
</definitions>
|
543
546
|
</terms>
|
@@ -554,6 +557,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
554
557
|
|
555
558
|
=== Term
|
556
559
|
|
560
|
+
[heading="abbreviated terms"]
|
557
561
|
=== Symbols
|
558
562
|
|
559
563
|
INPUT
|
@@ -565,8 +569,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
565
569
|
<term id='_'>
|
566
570
|
<preferred>Term</preferred>
|
567
571
|
</term>
|
568
|
-
<definitions id='_'>
|
569
|
-
<title>
|
572
|
+
<definitions id='_' obligation="normative" type="abbreviated_terms">
|
573
|
+
<title>Abbreviated terms</title>
|
570
574
|
</definitions>
|
571
575
|
</terms>
|
572
576
|
</sections>
|
@@ -671,12 +675,12 @@ RSpec.describe Asciidoctor::Standoc do
|
|
671
675
|
#{BLANK_HDR}
|
672
676
|
<sections>
|
673
677
|
<terms id='_' obligation='normative'>
|
674
|
-
<title>Terms, definitions
|
678
|
+
<title>Terms, definitions and symbols</title>
|
675
679
|
<p id='_'>No terms and definitions are listed in this document.</p>
|
676
680
|
<clause id='_' inline-header='false' obligation='normative'>
|
677
681
|
<title>Terms and definitions</title>
|
678
682
|
</clause>
|
679
|
-
<definitions id='_'>
|
683
|
+
<definitions id='_' obligation="normative" type="symbols">
|
680
684
|
<title>Symbols</title>
|
681
685
|
</definitions>
|
682
686
|
</terms>
|
@@ -787,11 +791,11 @@ RSpec.describe Asciidoctor::Standoc do
|
|
787
791
|
#{BLANK_HDR.sub(%r{<language>en</language>}, "<language>fr</language>")}
|
788
792
|
<termdocsource bibitemid="iso1234"/><termdocsource bibitemid="iso5678"/>
|
789
793
|
<preface><foreword id='_' obligation="informative">
|
790
|
-
<title>
|
794
|
+
<title>Avant-propos</title>
|
791
795
|
<p id="_">Foreword</p>
|
792
796
|
</foreword></preface><sections>
|
793
797
|
<terms id="_" obligation="normative">
|
794
|
-
<title>Terms
|
798
|
+
<title>Terms et définitions</title>
|
795
799
|
<p id="_">Pour les besoins du présent document, les termes et définitions de <eref bibitemid="iso1234"/> et <eref bibitemid="iso5678"/> s’appliquent.</p>
|
796
800
|
|
797
801
|
|
@@ -820,11 +824,11 @@ RSpec.describe Asciidoctor::Standoc do
|
|
820
824
|
INPUT
|
821
825
|
#{BLANK_HDR.sub(%r{<language>en</language>}, "<language>zh</language>").sub(%r{<script>Latn</script>}, "<script>Hans</script>")}
|
822
826
|
<termdocsource bibitemid="iso1234"/><termdocsource bibitemid="iso5678"/><preface><foreword id='_' obligation="informative">
|
823
|
-
<title
|
827
|
+
<title>前言</title>
|
824
828
|
<p id="_">Foreword</p>
|
825
829
|
</foreword></preface><sections>
|
826
830
|
<terms id="_" obligation="normative">
|
827
|
-
<title
|
831
|
+
<title>术语和定义</title><p id="_"><eref bibitemid="iso1234"/>和<eref bibitemid="iso5678"/>界定的术语和定义适用于本文件。</p>
|
828
832
|
|
829
833
|
|
830
834
|
|
@@ -858,12 +862,12 @@ INPUT
|
|
858
862
|
#{BLANK_HDR}
|
859
863
|
<sections>
|
860
864
|
<terms id='tda' obligation='normative'>
|
861
|
-
<title>Terms, definitions
|
865
|
+
<title>Terms, definitions and symbols</title>
|
862
866
|
<p id='_'>No terms and definitions are listed in this document.</p>
|
863
867
|
<clause id='terms' inline-header='false' obligation='normative'>
|
864
868
|
<title>Terms and definitions</title>
|
865
869
|
</clause>
|
866
|
-
<definitions id='_'>
|
870
|
+
<definitions id='_' obligation="normative" type="symbols">
|
867
871
|
<title>Symbols</title>
|
868
872
|
</definitions>
|
869
873
|
</terms>
|
@@ -895,7 +899,7 @@ _time_ (<<term-time>>) on the _calendar_ (<<term-calendar>>) _time scale_ (<<ter
|
|
895
899
|
INPUT
|
896
900
|
#{BLANK_HDR}
|
897
901
|
<sections>
|
898
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
902
|
+
<clause id='_' inline-header='false' obligation='normative' type="scope">
|
899
903
|
<title>Scope</title>
|
900
904
|
</clause>
|
901
905
|
<clause id='tda' obligation='normative'>
|
@@ -963,7 +967,7 @@ INPUT
|
|
963
967
|
</preface>
|
964
968
|
<sections> </sections>
|
965
969
|
<annex id='_' obligation='' language='fr' script=''>
|
966
|
-
<definitions id='sym' language='fr'>
|
970
|
+
<definitions id='sym' language='fr' obligation="normative">
|
967
971
|
<title>Symbols and abbreviated terms</title>
|
968
972
|
</definitions>
|
969
973
|
</annex>
|
@@ -114,7 +114,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
114
114
|
it "processes complex tables" do
|
115
115
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
116
116
|
#{ASCIIDOC_BLANK_HDR}
|
117
|
-
[cols="<,^,^,^,^",options="header,footer",headerrows=2,alt="An extensive summary, and illustration, of tables",subsequence="A",options="unnumbered",summary="This is an extremely long, convoluted summary",width=70
|
117
|
+
[cols="<,^,^,^,^",options="header,footer",headerrows=2,alt="An extensive summary, and illustration, of tables",subsequence="A",options="unnumbered",summary="This is an extremely long, convoluted summary",width=70%,number="3",keep-with-next=true,keep-lines-together=true]
|
118
118
|
.Maximum _permissible_ mass fraction of defects
|
119
119
|
|===
|
120
120
|
.2+|Defect 4+^| Maximum permissible mass fraction of defects in husked rice +
|
@@ -144,13 +144,13 @@ RSpec.describe Asciidoctor::Standoc do
|
|
144
144
|
INPUT
|
145
145
|
#{BLANK_HDR}
|
146
146
|
<sections>
|
147
|
-
<table id="_" alt="An extensive summary, and illustration, of tables" unnumbered="true" subsequence="A" summary="This is an extremely long, convoluted summary" width="70%">
|
147
|
+
<table id="_" alt="An extensive summary, and illustration, of tables" unnumbered="true" subsequence="A" summary="This is an extremely long, convoluted summary" width="70%" number="3" keep-with-next="true" keep-lines-together="true">
|
148
148
|
<name>Maximum <em>permissible</em> mass fraction of defects</name>
|
149
149
|
<thead>
|
150
150
|
<tr>
|
151
151
|
<th rowspan="2" align="left">Defect</th>
|
152
152
|
<th colspan="4" align="center">Maximum permissible mass fraction of defects in husked rice<br/>
|
153
|
-
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>w</mi><
|
153
|
+
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>w</mi><mo>max</mo></msub></math></stem></th>
|
154
154
|
</tr>
|
155
155
|
<tr>
|
156
156
|
<th align="left">in husked rice</th>
|
@@ -9,6 +9,62 @@ RSpec.describe Asciidoctor::Standoc do
|
|
9
9
|
expect(File.exist?("spec/assets/xref_error.err")).to be true
|
10
10
|
end
|
11
11
|
|
12
|
+
it "warns about missing fields in asciibib" do
|
13
|
+
FileUtils.rm_f "test.err"
|
14
|
+
Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)
|
15
|
+
#{VALIDATING_BLANK_HDR}
|
16
|
+
|
17
|
+
[bibliography]
|
18
|
+
== Normative References
|
19
|
+
|
20
|
+
[%bibitem]
|
21
|
+
=== Standard
|
22
|
+
id:: iso123
|
23
|
+
type:: standard
|
24
|
+
contributor::
|
25
|
+
role::: publisher
|
26
|
+
organization:::
|
27
|
+
name:::: ISO
|
28
|
+
contributor::
|
29
|
+
role::: author
|
30
|
+
person:::
|
31
|
+
name::::
|
32
|
+
+
|
33
|
+
--
|
34
|
+
completename::
|
35
|
+
language::: en
|
36
|
+
content::: Fred
|
37
|
+
--
|
38
|
+
contributor::
|
39
|
+
role::: author
|
40
|
+
person:::
|
41
|
+
name::::
|
42
|
+
completename::::: Jack
|
43
|
+
|
44
|
+
INPUT
|
45
|
+
errf = File.read("test.err")
|
46
|
+
expect(errf).to include "Reference iso123 is missing a document identifier (docid)"
|
47
|
+
end
|
48
|
+
|
49
|
+
it "warns about missing fields in asciibib" do
|
50
|
+
FileUtils.rm_f "test.err"
|
51
|
+
Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)
|
52
|
+
#{VALIDATING_BLANK_HDR}
|
53
|
+
|
54
|
+
[bibliography]
|
55
|
+
== Normative References
|
56
|
+
|
57
|
+
[%bibitem]
|
58
|
+
=== Standard
|
59
|
+
type:: standard
|
60
|
+
contributor::
|
61
|
+
role::: publisher
|
62
|
+
organization:::
|
63
|
+
name:::: ISO
|
64
|
+
INPUT
|
65
|
+
errf = File.read("test.err")
|
66
|
+
expect(errf).to include "The following reference is missing an anchor"
|
67
|
+
end
|
12
68
|
it "warns about malformed LaTeX" do
|
13
69
|
FileUtils.rm_f "test.err"
|
14
70
|
Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)
|
File without changes
|
data/spec/assets/i18n.yaml
CHANGED
@@ -1,2 +1,17 @@
|
|
1
|
-
foreword:
|
2
|
-
|
1
|
+
foreword: Antaŭparolo
|
2
|
+
introduction: Enkonduko
|
3
|
+
clause: klaŭzo
|
4
|
+
table: Tabelo
|
5
|
+
source: SOURCE
|
6
|
+
modified: modified
|
7
|
+
scope: Amplekso
|
8
|
+
symbols: Simboloj kai mallongigitaj terminoj
|
9
|
+
annex: Aldono
|
10
|
+
normref: Normaj citaĵoj
|
11
|
+
bibliography: Bibliografio
|
12
|
+
inform_annex: informa
|
13
|
+
norm_annex: norma
|
14
|
+
all_parts: ĉiuj partoj
|
15
|
+
locality: {
|
16
|
+
table: Tabelo
|
17
|
+
}
|
@@ -0,0 +1,107 @@
|
|
1
|
+
<bibdata id='iso123' xmlns='http://www.example.com' type='standard'>
|
2
|
+
<fetched>2020-06-12</fetched>
|
3
|
+
<title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
|
4
|
+
<title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
|
5
|
+
<title type='main' format='text/plain' language='en' script='Latn'>Rubber latex – Sampling</title>
|
6
|
+
<title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
|
7
|
+
<title type='title-main' format='text/plain' language='fr' script='Latn'>Échantillonnage</title>
|
8
|
+
<title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc – Échantillonnage</title>
|
9
|
+
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
10
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
11
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
12
|
+
<docidentifier type='ISO'>ISO 123 (all parts)</docidentifier>
|
13
|
+
<docnumber>123</docnumber>
|
14
|
+
<date type='published'>
|
15
|
+
<on>2001</on>
|
16
|
+
</date>
|
17
|
+
<contributor>
|
18
|
+
<role type='publisher'/>
|
19
|
+
<organization>
|
20
|
+
<name>International Organization for Standardization</name>
|
21
|
+
<abbreviation>ISO</abbreviation>
|
22
|
+
<uri>www.iso.org</uri>
|
23
|
+
</organization>
|
24
|
+
</contributor>
|
25
|
+
<edition>3</edition>
|
26
|
+
<language>en</language>
|
27
|
+
<language>fr</language>
|
28
|
+
<script>Latn</script>
|
29
|
+
<status>
|
30
|
+
<stage>90</stage>
|
31
|
+
<substage>93</substage>
|
32
|
+
</status>
|
33
|
+
<copyright>
|
34
|
+
<from>2001</from>
|
35
|
+
<owner>
|
36
|
+
<organization>
|
37
|
+
<name>ISO</name>
|
38
|
+
</organization>
|
39
|
+
</owner>
|
40
|
+
</copyright>
|
41
|
+
<relation type='obsoletes'>
|
42
|
+
<bibitem type='standard'>
|
43
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
44
|
+
</bibitem>
|
45
|
+
</relation>
|
46
|
+
<relation type='instance'>
|
47
|
+
<bibitem type='standard'>
|
48
|
+
<fetched>2020-06-12</fetched>
|
49
|
+
<title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
|
50
|
+
<title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
|
51
|
+
<title type='main' format='text/plain' language='en' script='Latn'>Rubber latex – Sampling</title>
|
52
|
+
<title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
|
53
|
+
<title type='title-main' format='text/plain' language='fr' script='Latn'>Échantillonnage</title>
|
54
|
+
<title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc – Échantillonnage</title>
|
55
|
+
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
56
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
57
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
58
|
+
<docidentifier type='ISO'>ISO 123:2001</docidentifier>
|
59
|
+
<docnumber>123</docnumber>
|
60
|
+
<date type='published'>
|
61
|
+
<on>2001</on>
|
62
|
+
</date>
|
63
|
+
<contributor>
|
64
|
+
<role type='publisher'/>
|
65
|
+
<organization>
|
66
|
+
<name>International Organization for Standardization</name>
|
67
|
+
<abbreviation>ISO</abbreviation>
|
68
|
+
<uri>www.iso.org</uri>
|
69
|
+
</organization>
|
70
|
+
</contributor>
|
71
|
+
<edition>3</edition>
|
72
|
+
<language>en</language>
|
73
|
+
<language>fr</language>
|
74
|
+
<script>Latn</script>
|
75
|
+
<status>
|
76
|
+
<stage>90</stage>
|
77
|
+
<substage>93</substage>
|
78
|
+
</status>
|
79
|
+
<copyright>
|
80
|
+
<from>2001</from>
|
81
|
+
<owner>
|
82
|
+
<organization>
|
83
|
+
<name>ISO</name>
|
84
|
+
</organization>
|
85
|
+
</owner>
|
86
|
+
</copyright>
|
87
|
+
<relation type='obsoletes'>
|
88
|
+
<bibitem type='standard'>
|
89
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
90
|
+
</bibitem>
|
91
|
+
</relation>
|
92
|
+
<place>Geneva</place>
|
93
|
+
</bibitem>
|
94
|
+
</relation>
|
95
|
+
<relation type='instance'>
|
96
|
+
<bibitem type='standard'>
|
97
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
98
|
+
</bibitem>
|
99
|
+
</relation>
|
100
|
+
<relation type='instance'>
|
101
|
+
<bibitem type='standard'>
|
102
|
+
<formattedref format='text/plain'>ISO 123:1974</formattedref>
|
103
|
+
</bibitem>
|
104
|
+
</relation>
|
105
|
+
<place>Geneva</place>
|
106
|
+
</bibdata>
|
107
|
+
|