metanorma-standoc 2.1.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/lib/metanorma/standoc/base.rb +3 -1
  3. data/lib/metanorma/standoc/biblio.rng +32 -34
  4. data/lib/metanorma/standoc/blocks.rb +8 -3
  5. data/lib/metanorma/standoc/blocks_notes.rb +3 -0
  6. data/lib/metanorma/standoc/cleanup.rb +1 -0
  7. data/lib/metanorma/standoc/cleanup_footnotes.rb +14 -9
  8. data/lib/metanorma/standoc/cleanup_inline.rb +17 -0
  9. data/lib/metanorma/standoc/cleanup_terms.rb +3 -1
  10. data/lib/metanorma/standoc/cleanup_text.rb +9 -4
  11. data/lib/metanorma/standoc/converter.rb +2 -0
  12. data/lib/metanorma/standoc/isodoc.rng +9 -0
  13. data/lib/metanorma/standoc/lists.rb +8 -3
  14. data/lib/metanorma/standoc/macros.rb +28 -1
  15. data/lib/metanorma/standoc/macros_note.rb +1 -6
  16. data/lib/metanorma/standoc/version.rb +1 -1
  17. data/metanorma-standoc.gemspec +1 -1
  18. data/spec/metanorma/base_spec.rb +41 -5
  19. data/spec/metanorma/blocks_spec.rb +53 -1
  20. data/spec/metanorma/cleanup_sections_spec.rb +5 -5
  21. data/spec/metanorma/cleanup_spec.rb +5 -5
  22. data/spec/metanorma/cleanup_terms_spec.rb +1 -1
  23. data/spec/metanorma/inline_spec.rb +3 -3
  24. data/spec/metanorma/lists_spec.rb +10 -4
  25. data/spec/metanorma/macros_spec.rb +21 -12
  26. data/spec/metanorma/refs_spec.rb +1 -1
  27. data/spec/metanorma/table_spec.rb +24 -6
  28. data/spec/spec_helper.rb +1 -1
  29. data/spec/vcr_cassettes/bsi16341.yml +64 -64
  30. data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +83 -83
  31. data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec1.yml +10 -10
  32. data/spec/vcr_cassettes/hide_refs.yml +55 -55
  33. data/spec/vcr_cassettes/isobib_get_123.yml +13 -13
  34. data/spec/vcr_cassettes/isobib_get_123_1.yml +25 -25
  35. data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +33 -33
  36. data/spec/vcr_cassettes/isobib_get_123_2001.yml +12 -12
  37. data/spec/vcr_cassettes/isobib_get_124.yml +12 -12
  38. data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +14 -14
  39. data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +47 -49
  40. data/spec/vcr_cassettes/std-link.yml +12 -12
  41. metadata +7 -8
  42. data/docs/quickstart.adoc +0 -375
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-standoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-16 00:00:00.000000000 Z
11
+ date: 2022-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -266,16 +266,16 @@ dependencies:
266
266
  name: metanorma-iso
267
267
  requirement: !ruby/object:Gem::Requirement
268
268
  requirements:
269
- - - ">="
269
+ - - "~>"
270
270
  - !ruby/object:Gem::Version
271
- version: '0'
271
+ version: 2.1.2
272
272
  type: :development
273
273
  prerelease: false
274
274
  version_requirements: !ruby/object:Gem::Requirement
275
275
  requirements:
276
- - - ">="
276
+ - - "~>"
277
277
  - !ruby/object:Gem::Version
278
- version: '0'
278
+ version: 2.1.2
279
279
  - !ruby/object:Gem::Dependency
280
280
  name: rake
281
281
  requirement: !ruby/object:Gem::Requirement
@@ -413,7 +413,6 @@ files:
413
413
  - README.adoc
414
414
  - Rakefile
415
415
  - bin/rspec
416
- - docs/quickstart.adoc
417
416
  - lib/asciidoctor/standoc/base.rb
418
417
  - lib/asciidoctor/standoc/blocks.rb
419
418
  - lib/asciidoctor/standoc/blocks_notes.rb
@@ -661,7 +660,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
661
660
  - !ruby/object:Gem::Version
662
661
  version: '0'
663
662
  requirements: []
664
- rubygems_version: 3.3.9
663
+ rubygems_version: 3.3.7
665
664
  signing_key:
666
665
  specification_version: 4
667
666
  summary: metanorma-standoc realises standards following the Metanorma standoc model
data/docs/quickstart.adoc DELETED
@@ -1,375 +0,0 @@
1
- = Quickstart Guide for AsciiISO
2
-
3
- This is a guide on how to get started using AsciiISO to create ISO standards documents compliant with http://www.iec.ch/members_experts/refdocs/iec/isoiecdir-2%7Bed7.0%7Den.pdf[ISO/IEC DIR 2 "Principles and rules for the structure and drafting of ISO and IEC documents"], in Microsoft Word and HTML formats.
4
-
5
- AsciiISO is the purposed-design syntax for creating ISO documents based on the AsciiDoc syntax.
6
-
7
- AsciiISO is currently used as input to the Asciidoctor-ISO renderer, which produces the corresponding https://github.com/metanorma/metanorma-model-standoc[Metanorma schema] (in `.xml`), which in turn uses the https://github.com/metanorma/isodoc[isodoc] gem to convert ISOXML into the final output formats, HTML (`.html`) and Word Document (`.doc`).
8
-
9
-
10
- == Even quicker summary
11
-
12
- In order to start a new ISO document, or migrate your document from Word:
13
-
14
- . Install <<installation>>
15
- . Clone the https://github.com/metanorma/isodoc-rice/[AsciiISO Rice]
16
-
17
- To migrate:
18
-
19
- . Use our https://github.com/metanorma/reverse_asciidoctor[reverse_asciidoctor] gem to help you convert a Word document into AsciiISO. That said, the conversion will not be 100% clean and you will have to manually fix some syntax (especially if your Word document contains an index, stray anchors, and equations).
20
- . Move the content back to the cloned isodoc-rice.
21
-
22
-
23
- [[installation]]
24
- == Installation instructions
25
-
26
- The Asciidoctor-ISO tool is a https://en.wikipedia.org/wiki/RubyGems[Ruby gem], and works on the command line. The https://en.wikipedia.org/wiki/Ruby_programming_language[Ruby programming language] can be installed on Windows (e.g. https://rubyinstaller.org), but is typically run on a Unix command line—including Linux and MacOS. The following instructions are for the Unix console.
27
-
28
- Asciidoctor-ISO in turn builds on the https://asciidoctor.org[Asciidoctor gem], which interprets the Asciidoctor markup language in Ruby. Installing the Asciidoctor-ISO gem will install the Asciidoctor gem, if it is not already installed.
29
-
30
- Ruby comes with Linux and MacOS. Asciidoctor-ISO uses Ruby 2.4.0, and you may need to update your Ruby instance to use that version. Refer to https://www.ruby-lang.org/en/documentation/installation/
31
-
32
- You can install the Asciidoctor-ISO gem, and all its dependencies, through the Ruby gem installer:
33
-
34
- [source,console]
35
- --
36
- gem install asciidoctor-iso
37
- --
38
-
39
- If you want the latest version of the gem (which is still heavily under development), you can install it from Github:
40
-
41
- [source,console]
42
- --
43
- git clone https://github.com/metanorma/metanorma-iso.git
44
- cd asciidoctor-iso
45
- gem build *.gemspec
46
- gem install *.gem
47
- --
48
-
49
- == How to set up a new project
50
-
51
- At its simplest, all you need is a text document in Asciidoctor format, which you compile using the Asciidoctor-ISO gem. To keep document dependencies in order, you should keep your document in a distinct folder:
52
-
53
- [source,console]
54
- --
55
- mkdir new_standard
56
- cd new_standard
57
- vi new_standard.adoc
58
- --
59
-
60
- To compile the document, execute the `asciidoctor` script, flagging it to use the ISO variant:
61
-
62
- [source,console]
63
- --
64
- asciidoctor --trace -b iso -r 'asciidoctor-iso' new_standard.adoc
65
- --
66
-
67
- NOTE: This command syntax will be changed soon.
68
-
69
- This will generate two files from the `new_standard.adoc` document (provided it is well-formed!): `new_standard.html` is a standalone HTML document, and `new_standard.doc` is a Word document (currently in the pre-2007 `.doc` format, but Microsoft Word will open it fine). Both these files are generated via an intermediate XML file, `new_standard.xml`, which represents the structure of the document following the rules of ISO/IEC DIR 2, as captured in the https://github.com/metanorma/metanorma-model-standoc[Metanorma schema].
70
-
71
- Even if there are no errors in the Asciidoctor syntax, the document may still raise warnings to the console as it is being validated. The validation comes from ISO/IEC DIR 2, and consists of two parts: warnings about document content (e.g. requiring space before a percentage sign; requiring that the scope not contain text that looks like a recommendation); and warnings about document structure. The latter are generated by running the generated XML against the ISOXML schema, and report the line numbers of the XML document where issues are observed.
72
-
73
- === Template
74
-
75
- To author Asciidoctor documents, you need to be familiar with the Asciidoctor syntax, as well as the Asciidoctor-ISO extensions to the syntax and conventions. The https://asciidoctor.org/docs/user-manual/[Asciidoctor User Manual] documents Asciidoctor itself; the https://github.com/metanorma/metanorma-iso/wiki/Guidance-for-authoring[Guidance for Authoring in Asciidoctor-ISO] and the https://github.com/metanorma/metanorma-iso/blob/master/README.adoc[Asciidoctor-ISO Readme] are the complete documentation for the ISO-specific extensions. But the simplest way to get started is to take a ready-made Asciidoctor-ISO document, and edit it, observing how it approaches various formatting tasks.
76
-
77
- The https://www.iso.org/publication/PUB100407.html["Rice document"] is the ISO's model document of an international standard. An Asciidoctor-ISO version of the document is available at https://github.com/metanorma/isodoc-rice/ . We suggest downloading the site, and editing it.
78
-
79
- The `iso-rice-en.adoc` document consists of a document header, and it references the separate `body/body-en.adoc` document for the document proper (`include::body/body-en.adoc[]`). You can just continue on with the document text after the document header—so long as you remember to leave a blank line between the two.
80
-
81
- == AsciiDoc syntax supported
82
-
83
- The Rice document illustrates almost the full range of formatting available via Asciidoctor; Annex E (which is not in the original) illustrates features not demonstrated in the original document.
84
-
85
- Syntax includes the following; the links are to the Asciidoctor User Manual. All examples are taken from the Asciidoctor-ISO Rice document.
86
-
87
- === https://asciidoctor.org/docs/user-manual/#doc-header[Document header]
88
-
89
- Attributes of the document, which typically appear in the coverpage (if at all), rather than in the document proper. The permitted attributes for Asciidoctor-ISO, and their expected values, are documented in the https://github.com/metanorma/metanorma-iso#document-attributes[Asciidoctor-ISO Readme]. Note that the author line expected in Asciidoctor is not used; the title line is likewise ignored, in favour of attributes describing the three-part bilingual title.
90
-
91
- [source,asciidoc]
92
- --
93
- = Rice model
94
- :docnumber: 17301
95
- :tc-docnumber: 17301
96
- :ref-docnumber: ISO 17301-1:2016(E)
97
- ...
98
- --
99
-
100
- === Inline formatting
101
-
102
- * https://asciidoctor.org/docs/user-manual/#text-formatting[Formatting marks]: bold, italic, monospace, subscript, superscript
103
-
104
- [source,asciidoc]
105
- --
106
- This document specifies minimum requirements and test methods for rice (_Oryza sativa L._).
107
- --
108
-
109
- * https://asciidoctor.org/docs/user-manual/#anchordef[Anchors] (for internal cross-references): these can be defined for any section or subsection, and any block (e.g. images, lists, examples, formulas, and so forth). The numbering of all blocks and clauses is automated, and does not need to be provided in the text.
110
- * https://asciidoctor.org/docs/user-manual/#internal-cross-references[Internal Cross-references] reference anchors within the document. By default, the text for these is also automated, to follow ISO/IEC DIR 2, including naming the container of a block where required (e.g. `B.6, Formula (B.1)` for a formula in an annex). However, cross-references can supply their own text as an override, following a comma (e.g. `<``<AnnexB,the following annex>``>`).
111
-
112
- [source,asciidoc]
113
- --
114
- The International Organization for Standardization (ISO) draws attention to the fact that it is claimed that compliance with this document may involve the use of a patent concerning sample dividers given in <<AnnexA>> and shown in <<figureA-1>>.
115
-
116
- ...
117
- [[figureA-1]]
118
- .Split-it-right sample divider
119
- image::images/rice_image1.png[]
120
- --
121
-
122
- * https://asciidoctor.org/docs/user-manual/#url[URLs]
123
-
124
- [source,asciidoc]
125
- --
126
- http://www.iso.org/obp[OBP]
127
- --
128
-
129
- * https://asciidoctor.org/docs/user-manual/#activating-stem-support[STEM support] (mathematical expressions), as both inline and block formatting. (ISO Formulae are expressed as stem blocks.) Asciidoctor natively uses http://asciimath.org[AsciiMath] for its mathematical expressions; the `:stem:` document attribute must be present for AsciiMath to be recognised. The gem will ensure that any AsciiMath is rendered in the HTML output, and converted to Microsoft Office's OOXML (via MathML) in the Word output. Asciidoctor also supports LaTeX, but the gem does not cater for converting LaTeX to a Word-compatible output.
130
-
131
- [source,asciidoc]
132
- --
133
- [[formulaA-1,A.1]]
134
- [stem]
135
- ++++
136
- w = (m_D) / (m_s)
137
- ++++
138
-
139
- where
140
-
141
- stem:[w]:: is the mass fraction of grains with a particular defect in the test sample;
142
- --
143
-
144
- * https://asciidoctor.org/docs/user-manual/#user-footnotes[Footnotes]. Note that footnotes are treated as inline formatting, so they cannot straightforwardly span more than a single paragraph in Asciidoctor. Footnotes within figures and tables are rendered within their blocks, as required by ISO/IEC DIR 2.
145
-
146
- [source,asciidoc]
147
- --
148
- containing a mass fraction of 4,1 % iodine and 6,3 % potassium iodide in deionized water such as Lugols.footnote:[Lugols is an example of a suitable product available commercially. This information is given for the convenience of users of this document and does not constitute an endorsement by ISO of this product.]
149
- --
150
-
151
- === Blocks
152
-
153
- Blocks are groupings of paragraphs and text into larger units, commonly https://asciidoctor.org/docs/user-manual/#delimited-blocks[delimited], and optionally including a https://asciidoctor.org/docs/user-manual/#title[title] and https://asciidoctor.org/docs/user-manual/#metadata-2[metadata].
154
-
155
- * https://asciidoctor.org/docs/user-manual/#unordered-lists[Unordered lists]
156
-
157
- [source,asciidoc]
158
- --
159
- The main changes compared to the previous edition are:
160
-
161
- * updated normative references;
162
- * deletion of 4.3.
163
- --
164
-
165
- * https://asciidoctor.org/docs/user-manual/#ordered-lists[Ordered lists]. Note that ISO/IEC presupposes that the first level of an ordered list is indexed with a lowercase letter. The gem automatically creates labels for the nested levels of ordered lists, and ignores any https://asciidoctor.org/docs/user-manual/#numbering-styles[numbering styles] indicated by the user.
166
-
167
- [source,asciidoc]
168
- --
169
- . the sampling method used;
170
- . the test method used;
171
- . the test result(s) obtained or, if the repeatability has been checked, the final quoted result obtained;
172
- --
173
-
174
- * https://asciidoctor.org/docs/user-manual/#labeled-list[Definition lists]. These are used for all keys of figures and formulae, and as the content of Symbols and Abbreviations clauses and subclauses:
175
-
176
- [source,asciidoc]
177
- --
178
- stem:[w]:: is the mass fraction of grains with a particular defect in the test sample;
179
- stem:[m_D]:: is the mass, in grams, of grains with that defect;
180
- stem:[m_S]:: is the mass, in grams, of the test sample.
181
- --
182
-
183
- Note that the key to a figure must be preceded by the paragraph `*Key*`, and the key to a formula must be preceded by the paragraph `where`.
184
-
185
- * https://asciidoctor.org/docs/user-manual/#tables[Tables]. Asciidoctor supports a rich range of table formatting (which the Asciidoctor-ISO gem extends further).
186
-
187
- [source,asciidoc]
188
- --
189
- [[tableD-1]]
190
- [cols="<,^,^,^,^",headerrows=2]
191
- .Repeatability and reproducibility of husked rice yield
192
- |===
193
- .2+| Description 4+| Rice sample
194
- | Arborio | Drago footnote:[Parboiled rice.] | Balilla | Thaibonnet
195
-
196
- | Number of laboratories retained after eliminating outliers | 13 | 11 | 13 | 13
197
- | Mean value, g/100 g | 81,2 | 82,0 | 81,8 | 77,7
198
- |===
199
- --
200
-
201
- * https://asciidoctor.org/docs/user-manual/#images[Images], which are mapped to ISO figures, with accompanying titles:
202
-
203
- [source,asciidoc]
204
- --
205
- [[figureC-1]]
206
- .Typical gelatinization curve
207
- image::images/rice_image2.png[]
208
- footnote:[The time stem:[t_90] was estimated to be 18,2 min for this example.]
209
- --
210
-
211
- * https://asciidoctor.org/docs/user-manual/#admonition[Admonitions], which express Notes, Warnings, Cautions, etc.
212
-
213
- [source,asciidoc]
214
- --
215
- CAUTION: Only use paddy or parboiled rice for the determination of husked rice yield.
216
- --
217
-
218
- * https://asciidoctor.org/docs/user-manual/#prose-excerpts-quotes-and-verses[Block quotes]
219
-
220
- [source,asciidoc]
221
- --
222
- [quote, ISO, "ISO7301,clause 1"]
223
- _____
224
- This International Standard gives the minimum specifications for rice (_Oryza sativa_ L.) which is subject to international trade. It is applicable to the following types: husked rice and milled rice, parboiled or not, intended for direct human consumption. It is neither applicable to other products derived from rice, nor to waxy rice (glutinous rice).
225
- _____
226
- --
227
-
228
-
229
- * https://asciidoctor.org/docs/user-manual/#example[Examples]
230
- * https://asciidoctor.org/docs/user-manual/#listing-blocks[Listing blocks] (source code), including https://asciidoctor.org/docs/user-manual/#callouts[source code callouts]
231
-
232
- [source,asciidoc]
233
- ----
234
- .Sample Code
235
- ====
236
-
237
- [source,ruby]
238
- --
239
- puts "Hello, world."
240
- %w{a b c}.each do |x| <1>
241
- puts x
242
- end
243
- --
244
- <1> This is an annotation
245
- ====
246
- ----
247
-
248
- * https://asciidoctor.org/docs/user-manual/#comments[Comments] (which are *not* rendered in the output)
249
-
250
- [source,ruby]
251
- --
252
- // all terms and defs references are dated
253
- --
254
-
255
- === Sections
256
-
257
- * The Asciidoctor https://asciidoctor.org/docs/user-manual/#doc-preamble[Document preamble] is treated as the document Foreword: it is the text appearing between the document header and the first section header. (Note that the foreword is here given a https://asciidoctor.org/docs/user-manual/#title[block title], but that will be provided automatically anyway.)
258
-
259
- [source,asciidoc]
260
- --
261
- [[foreword]]
262
- .Foreword
263
- ISO (the International Organization for Standardization)
264
- --
265
-
266
- * The Asciidoctor https://asciidoctor.org/docs/user-manual/#sections[Sections] correspond to ISO clauses, starting with the Introduction (if present). Each section and subsection is delimited with a header; the number of equal signs before the header indicate the level of nesting of the section, starting with two equal signs. No numbering should be given for any header: numbering is done automatically by the gem.
267
-
268
- [source,asciidoc]
269
- --
270
- == Sampling
271
- Sampling shall be carried out in accordance with <<ISO24333,clause 5>>
272
-
273
- == Test methods
274
-
275
- === Moisture content
276
-
277
- Determine the mass fraction of moisture in accordance with the method specified in <<ISO712>>.
278
- ...
279
-
280
- --
281
-
282
-
283
- == Asciidoctor-ISO specific syntax
284
-
285
- Full details of Asciidoctor-ISO–specific markup and conventions is given in the https://github.com/metanorma/metanorma-iso/blob/master/README.adoc[Asciidoctor-ISO Readme] and the https://github.com/metanorma/metanorma-iso/wiki/Guidance-for-authoring[Guidance for authoring].
286
-
287
- https://asciidoctor.org/docs/user-manual/#section-styles[Section styles] are used to indicate specific types of section: `[bibliography]` for Normative References and Bibliography, `[appendix]` for Annexes, and `[%appendix]` for Appendixes (annexes of annexes). These styles must be provided for the sections to be processed correctly: bibliographic references will not be recognised as such, for example, without the `[bibliography]` style applied:
288
-
289
- [source,asciidoc]
290
- --
291
- [bibliography]
292
- == Bibliography
293
-
294
- * [[[ISO3696,ISO 3696]]], _Water for analytical laboratory use -- Specification and test methods_
295
- --
296
-
297
- The sections that have a fixed position according to ISO/IEC DIR 2 (Introduction, Scope, Normative References, Terms and Definitions, Symbols and Abbreviations, Bibliography) need to be titled as such, as first-level headings.
298
-
299
- === Terms and Definitions
300
-
301
- Terms and Definitions sections follow a strict grammar in their Asciidoctor-ISO markup, as ISO/IEC DIR 2 prescribes their structure so strictly. The following illustrates the complete structure of a term entry; the Rice document splits up these features among several terms.
302
-
303
- [source,asciidoc]
304
- --
305
- [[paddy]]
306
- === paddy
307
- alt:[paddy rice]
308
- alt:[rough rice]
309
- deprecated:[cargo rice]
310
- domain:[rice]
311
-
312
- rice retaining its husk after threshing
313
-
314
- [example]
315
- Foreign seeds, husks, bran, sand, dust.
316
-
317
- NOTE: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.
318
-
319
- [.source]
320
- <<ISO7301,section 3.2>>, The term "cargo rice" is shown as deprecated,
321
- and Note 1 to entry is not included here
322
- --
323
-
324
- Term banks such as the http://www.electropedia.org[IEV] must be treated like any other document, with terms treated as clauses; e.g. `<<IEV,clause 103-01-01>>`. The IEV by ISO convention will be left out of the output rendering of ISO standards.
325
-
326
- === References (Normative, Informative)
327
-
328
- All bibliographic entries must be given as unordered lists. Normative references are expected to include only ISO and related standards; informative references may include any source.
329
-
330
- For ISO and related standards, the reference is given as a bibliographic anchor (in triple brackets), consisting of an internal identifier followed by the ISO identifier. The internal identifier can be used in cross-references (citations). The date may be added to the ISO identifier, as required by ISO/IEC DIR 2; standards under preparation have their date given as `--`, and should be accompanied by a footnote detailing the status of the standard.
331
-
332
- [source,asciidoc]
333
- --
334
- Grade 3 quality as specified in <<ISO3696>>.
335
-
336
- ...
337
-
338
- * [[[ISO3696,ISO 3696]]], _Water for analytical laboratory use -- Specification and test methods_
339
- * [[[ISO7301,ISO 7301:2011]]], _Rice -- Specification_
340
- * [[[ISO16634,ISO 16634:--]]] footnote:[Under preparation. (Stage at the time of publication ISO/DIS 16634)], _Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs -- Determination of the total nitrogen content by combustion according to the Dumas principle and calculation of the crude protein content_
341
- --
342
-
343
- Non-ISO references under normative references are still cited by document identifier. Under informative references, non-ISO documents are both displayed and cited with reference numbers in brackets. In Asciidoctor-ISO, the cross-reference is a normal anchor identifier; the bracket numbering for informative references is automatic.
344
-
345
- [source,asciidoc]
346
- --
347
- For details concerning the use of the Dumas method, see References <<ref10>> and <<ref16>>.
348
-
349
- ...
350
-
351
- * [[[ref10,10]]] [smallcap]#Standard No I.C.C 167#. _Determination of the protein content in cereal and cereal products for food and animal feeding stuffs according to the Dumas combustion method_ (see http://www.icc.or.at)
352
-
353
- * [[[ref16,16]]] [smallcap]#Tkachuk R.# Nitrogen-to-protein conversion factors for cereals and oilseed meals. _Cereal Chem._ 1969, *46* (4) pp 419-423
354
- --
355
-
356
- In cross-references, bibliographic localities (e.g. page numbers, clause numbers) can be added directly after the comma, as part of the cross-reference text. Bibliographic localities are expressed as a sequence of lowercase locality type, then an equal sign, then by the locality number or range:
357
-
358
- [source,asciidoc]
359
- --
360
- <<ISO7301,clause=3.1>>
361
-
362
- NOTE: This table is based on <<ISO7301,table=1>>.
363
-
364
- Sampling shall be carried out in accordance with <<ISO24333,clause=5>>
365
- --
366
-
367
- ISO clause references in particular will suppress the word "Clause" before a subclause reference, following ISO/IEC DIR 2: `<``<ISO24333,clause=5>``>` will be rendered as _ISO 24333, Clause 5_, but `<``<ISO7301,clause=3.1>``>` will be rendered as _ISO 7301, 3.1_.
368
-
369
-
370
- === Annexes
371
-
372
- For ISO standards, annexes are treated as normative by default; if they are informative, they must additionally be tagged with an obligation of "informative" (so `[appendix, obligation=informative]`).
373
-
374
- The numbering of annexes and appendices is automatic: do not insert "Annex A" or "Appendix 1" as part of the title.
375
-