asciidoctor-rsd 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +130 -0
- data/LICENSE +25 -0
- data/README.adoc +275 -0
- data/Rakefile +6 -0
- data/asciidoctor-rsd.gemspec +51 -0
- data/bin/console +14 -0
- data/bin/rspec +18 -0
- data/bin/setup +8 -0
- data/lib/asciidoctor-rsd.rb +4 -0
- data/lib/asciidoctor/rsd.rb +7 -0
- data/lib/asciidoctor/rsd/biblio.rng +602 -0
- data/lib/asciidoctor/rsd/converter.rb +174 -0
- data/lib/asciidoctor/rsd/html/dots-w@2x.png +0 -0
- data/lib/asciidoctor/rsd/html/dots@2x.png +0 -0
- data/lib/asciidoctor/rsd/html/header.html +184 -0
- data/lib/asciidoctor/rsd/html/html_rsd_intro.html +8 -0
- data/lib/asciidoctor/rsd/html/html_rsd_titlepage.html +95 -0
- data/lib/asciidoctor/rsd/html/htmlstyle.scss +793 -0
- data/lib/asciidoctor/rsd/html/rsd.scss +541 -0
- data/lib/asciidoctor/rsd/html/scripts.html +68 -0
- data/lib/asciidoctor/rsd/isodoc.rng +1035 -0
- data/lib/asciidoctor/rsd/isostandard.rng +952 -0
- data/lib/asciidoctor/rsd/rsd.rng +134 -0
- data/lib/asciidoctor/rsd/rsdconvert.rb +135 -0
- data/lib/asciidoctor/rsd/version.rb +5 -0
- metadata +383 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e600f35535daad5ebeccf2765478ae2fc67abe54
|
4
|
+
data.tar.gz: d49de17fab0044853b6f76462fedf9adab00f485
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9b293246a06287cf493b4d1d3813a9fe02b7377d4536c22fc3119d0856867fb0cdabd84a7988eaf8d2e6b65f8c2f17063d8c53433d6113decfd03f218212da85
|
7
|
+
data.tar.gz: 4f943d516a1e18b973604df7eb21c6db73561c202b04f44673dceca06858afdf2324284246087e80c48fb2a94e4aac0805bcebbc79ff0b16fb08ff5ecc44f529
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
.DS_Store
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at ronald.tse@ribose.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in ribose.gemspec
|
4
|
+
gem "isodoc",
|
5
|
+
git: "https://github.com/riboseinc/isodoc.git"
|
6
|
+
gem "asciidoctor-iso",
|
7
|
+
git: "https://github.com/riboseinc/asciidoctor-iso.git"
|
8
|
+
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
|
9
|
+
|
10
|
+
# Specify your gem's dependencies in asciidoctor-rsd.gemspec
|
11
|
+
gemspec
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,130 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
asciidoctor-rsd (0.1.0)
|
5
|
+
asciidoctor (~> 1.5.6)
|
6
|
+
asciimath
|
7
|
+
htmlentities (~> 4.3.4)
|
8
|
+
image_size
|
9
|
+
mime-types
|
10
|
+
nokogiri (~> 1.8.1)
|
11
|
+
ruby-jing
|
12
|
+
ruby-xslt
|
13
|
+
thread_safe
|
14
|
+
uuidtools
|
15
|
+
|
16
|
+
GEM
|
17
|
+
remote: https://rubygems.org/
|
18
|
+
specs:
|
19
|
+
asciidoctor (1.5.6.1)
|
20
|
+
asciimath (1.0.4)
|
21
|
+
ast (2.4.0)
|
22
|
+
byebug (9.1.0)
|
23
|
+
coderay (1.1.2)
|
24
|
+
diff-lcs (1.3)
|
25
|
+
docile (1.1.5)
|
26
|
+
equivalent-xml (0.6.0)
|
27
|
+
nokogiri (>= 1.4.3)
|
28
|
+
ffi (1.9.18)
|
29
|
+
formatador (0.2.5)
|
30
|
+
guard (2.14.2)
|
31
|
+
formatador (>= 0.2.4)
|
32
|
+
listen (>= 2.7, < 4.0)
|
33
|
+
lumberjack (>= 1.0.12, < 2.0)
|
34
|
+
nenv (~> 0.1)
|
35
|
+
notiffany (~> 0.0)
|
36
|
+
pry (>= 0.9.12)
|
37
|
+
shellany (~> 0.0)
|
38
|
+
thor (>= 0.18.1)
|
39
|
+
guard-compat (1.2.1)
|
40
|
+
guard-rspec (4.7.3)
|
41
|
+
guard (~> 2.1)
|
42
|
+
guard-compat (~> 1.1)
|
43
|
+
rspec (>= 2.99.0, < 4.0)
|
44
|
+
htmlentities (4.3.4)
|
45
|
+
image_size (1.5.0)
|
46
|
+
json (2.1.0)
|
47
|
+
listen (3.1.5)
|
48
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
49
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
50
|
+
ruby_dep (~> 1.2)
|
51
|
+
lumberjack (1.0.12)
|
52
|
+
method_source (0.9.0)
|
53
|
+
mime-types (3.1)
|
54
|
+
mime-types-data (~> 3.2015)
|
55
|
+
mime-types-data (3.2016.0521)
|
56
|
+
mini_portile2 (2.3.0)
|
57
|
+
nenv (0.3.0)
|
58
|
+
nokogiri (1.8.2)
|
59
|
+
mini_portile2 (~> 2.3.0)
|
60
|
+
notiffany (0.1.1)
|
61
|
+
nenv (~> 0.1)
|
62
|
+
shellany (~> 0.0)
|
63
|
+
optout (0.0.2)
|
64
|
+
parallel (1.12.1)
|
65
|
+
parser (2.4.0.2)
|
66
|
+
ast (~> 2.3)
|
67
|
+
powerpack (0.1.1)
|
68
|
+
pry (0.11.3)
|
69
|
+
coderay (~> 1.1.0)
|
70
|
+
method_source (~> 0.9.0)
|
71
|
+
rainbow (3.0.0)
|
72
|
+
rake (12.3.0)
|
73
|
+
rb-fsevent (0.10.2)
|
74
|
+
rb-inotify (0.9.10)
|
75
|
+
ffi (>= 0.5.0, < 2)
|
76
|
+
rspec (3.7.0)
|
77
|
+
rspec-core (~> 3.7.0)
|
78
|
+
rspec-expectations (~> 3.7.0)
|
79
|
+
rspec-mocks (~> 3.7.0)
|
80
|
+
rspec-core (3.7.1)
|
81
|
+
rspec-support (~> 3.7.0)
|
82
|
+
rspec-expectations (3.7.0)
|
83
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
84
|
+
rspec-support (~> 3.7.0)
|
85
|
+
rspec-mocks (3.7.0)
|
86
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
87
|
+
rspec-support (~> 3.7.0)
|
88
|
+
rspec-support (3.7.1)
|
89
|
+
rubocop (0.52.1)
|
90
|
+
parallel (~> 1.10)
|
91
|
+
parser (>= 2.4.0.2, < 3.0)
|
92
|
+
powerpack (~> 0.1)
|
93
|
+
rainbow (>= 2.2.2, < 4.0)
|
94
|
+
ruby-progressbar (~> 1.7)
|
95
|
+
unicode-display_width (~> 1.0, >= 1.0.1)
|
96
|
+
ruby-jing (0.0.1)
|
97
|
+
optout (>= 0.0.2)
|
98
|
+
ruby-progressbar (1.9.0)
|
99
|
+
ruby-xslt (0.9.10)
|
100
|
+
ruby_dep (1.5.0)
|
101
|
+
shellany (0.0.1)
|
102
|
+
simplecov (0.15.1)
|
103
|
+
docile (~> 1.1.0)
|
104
|
+
json (>= 1.8, < 3)
|
105
|
+
simplecov-html (~> 0.10.0)
|
106
|
+
simplecov-html (0.10.2)
|
107
|
+
thor (0.20.0)
|
108
|
+
thread_safe (0.3.6)
|
109
|
+
timecop (0.9.1)
|
110
|
+
unicode-display_width (1.3.0)
|
111
|
+
uuidtools (2.1.5)
|
112
|
+
|
113
|
+
PLATFORMS
|
114
|
+
ruby
|
115
|
+
|
116
|
+
DEPENDENCIES
|
117
|
+
asciidoctor-rsd!
|
118
|
+
bundler (~> 1.15)
|
119
|
+
byebug (~> 9.1)
|
120
|
+
equivalent-xml (~> 0.6)
|
121
|
+
guard (~> 2.14)
|
122
|
+
guard-rspec (~> 4.7)
|
123
|
+
rake (~> 12.0)
|
124
|
+
rspec (~> 3.6)
|
125
|
+
rubocop (~> 0.50)
|
126
|
+
simplecov (~> 0.15)
|
127
|
+
timecop (~> 0.9)
|
128
|
+
|
129
|
+
BUNDLED WITH
|
130
|
+
1.16.1
|
data/LICENSE
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
BSD 2-Clause License
|
2
|
+
|
3
|
+
Copyright (c) 2018, Ribose
|
4
|
+
All rights reserved.
|
5
|
+
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
8
|
+
|
9
|
+
* Redistributions of source code must retain the above copyright notice, this
|
10
|
+
list of conditions and the following disclaimer.
|
11
|
+
|
12
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
14
|
+
and/or other materials provided with the distribution.
|
15
|
+
|
16
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
17
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
18
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
19
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
20
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
21
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
22
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
23
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
24
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
25
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/README.adoc
ADDED
@@ -0,0 +1,275 @@
|
|
1
|
+
= AsciiRSD: Asciidoctor processor for RSD standards
|
2
|
+
|
3
|
+
image:https://img.shields.io/gem/v/asciidoctor-rsd.svg["Gem Version", link="https://rubygems.org/gems/asciidoctor-rsd"]
|
4
|
+
image:https://img.shields.io/travis/riboseinc/asciidoctor-rsd/master.svg["Build Status", link="https://travis-ci.org/riboseinc/asciidoctor-rsd"]
|
5
|
+
image:https://codeclimate.com/github/riboseinc/asciidoctor-rsd/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/riboseinc/asciidoctor-rsd"]
|
6
|
+
|
7
|
+
WARNING: This gem is still under development.
|
8
|
+
|
9
|
+
== Functionality
|
10
|
+
|
11
|
+
This gem processes http://asciidoctor.org/[Asciidoctor] documents following
|
12
|
+
a template for generating RSD International Standards.
|
13
|
+
|
14
|
+
The gem currently inherits from the https://github.com/riboseinc/asciidoctor-iso
|
15
|
+
gem, and aligns closely to it. Refer to the ISO gem
|
16
|
+
for guidance, including https://github.com/riboseinc/asciidoctor-iso/wiki/Guidance-for-authoring
|
17
|
+
|
18
|
+
The following outputs are generated.
|
19
|
+
|
20
|
+
* (Optional) An HTML preview generated directly from the Asciidoctor document,
|
21
|
+
using native Asciidocot formatting.
|
22
|
+
** http://asciimath.org[AsciiMathML] is to be used for mathematical formatting.
|
23
|
+
The gem uses the https://github.com/asciidoctor/asciimath[Ruby AsciiMath parser],
|
24
|
+
which is syntactically stricter than the common MathJax processor;
|
25
|
+
if you do not get expected results, try bracketting terms your in AsciiMathML
|
26
|
+
expressions.
|
27
|
+
* an XML representation of the document, intended as a document model for RSD
|
28
|
+
International Standards.
|
29
|
+
* The XML representation is processed in turn to generate the following outputs
|
30
|
+
as end deliverable RSD standard drafts.
|
31
|
+
** Microsoft Word output (`.doc`), following the style conventions of the
|
32
|
+
https://www.rsd.org/rsd-templates.html[RSD Standard Microsoft Word template].
|
33
|
+
(In development)
|
34
|
+
** PDF (forthcoming)
|
35
|
+
** HTML (forthcoming)
|
36
|
+
|
37
|
+
This AsciiDoc syntax for writing RSD standards is hereby named "AsciiRSD".
|
38
|
+
|
39
|
+
== Usage
|
40
|
+
|
41
|
+
[source,console]
|
42
|
+
----
|
43
|
+
$ asciidoctor a.adoc # HTML output of Asciidoc file
|
44
|
+
$ asciidoctor -b rsd -r 'asciidoctor-rsd' a.adoc # RSD XML output
|
45
|
+
----
|
46
|
+
|
47
|
+
The gem translates the document into RSD XML format, and then
|
48
|
+
validates its output against the RSD XML document model; errors are
|
49
|
+
reported to console against the XML, and are intended for users to
|
50
|
+
check that they have provided all necessary components of the
|
51
|
+
document.
|
52
|
+
|
53
|
+
TODO: The gem will then convert the XML to Word Document, HTML, and
|
54
|
+
PDF, and output those files with the appropriate file suffixes.
|
55
|
+
`lib/asciidoctor/rsd/rsd2wordhtml.rb` is work in progress, and not yet
|
56
|
+
integrated into the executable.
|
57
|
+
|
58
|
+
=== Content Warnings
|
59
|
+
|
60
|
+
The gem also realises several format checks as prescribed in ISO/IEC
|
61
|
+
DIR 2, and warns the user about them in the console:
|
62
|
+
|
63
|
+
* Numbers with what looks like dots instead of commas for decimal points.
|
64
|
+
|
65
|
+
* Groups of numbers without spacing for every three digits. (The gem attempts
|
66
|
+
to ignore RSD references.)
|
67
|
+
|
68
|
+
* No space before percent sign.
|
69
|
+
|
70
|
+
* No bracketing of tolerance in percentage (e.g. `15 ± 7 % .`)
|
71
|
+
|
72
|
+
* No recommendations, permissions or requirements (detected by keyword) in:
|
73
|
+
foreword, scope, introduction, term examples and examples, notes, footnotes.
|
74
|
+
|
75
|
+
* No subclauses that are the only child of a clause. (In clauses, annexes, or
|
76
|
+
scopes.)
|
77
|
+
|
78
|
+
* 5 levels of subclause nesting. (Never actuated, AsciiDoc only permits 4
|
79
|
+
levels of subsections.)
|
80
|
+
|
81
|
+
* Non-RSD/IEC reference turning up as normative.
|
82
|
+
|
83
|
+
* Term definition starts with an article, or ends with a period.
|
84
|
+
|
85
|
+
* Title intro or title part appears in only one of French or English.
|
86
|
+
|
87
|
+
== Approach
|
88
|
+
|
89
|
+
=== Document model
|
90
|
+
|
91
|
+
The RSD Standard Document model is an instance of the
|
92
|
+
https://github.com/riboseinc/isodoc-models[StandardDocument model].
|
93
|
+
|
94
|
+
The RSD format ("RSD XML") intends to introduce rigour into the RSD
|
95
|
+
standards authoring process, and is prescribed in a separate document.
|
96
|
+
|
97
|
+
RSD XML is still under development, but it already contains all the markup
|
98
|
+
needed to render a RSD document into HTML.
|
99
|
+
|
100
|
+
WARNING: The current RNG model of RSD XML is out of sync with the UML.
|
101
|
+
|
102
|
+
=== Asciidoctor
|
103
|
+
|
104
|
+
Asciidoctor has been selected as the authoring tool to generate the document
|
105
|
+
model representation of RSD standards. It is a document formatting tool like
|
106
|
+
Markdown and DocBook, which combines the relative ease of use of the former
|
107
|
+
(using relatively lightweight markup), and the rigour and expressively of the
|
108
|
+
latter (it has a well-defined syntax, and was in fact initially developed as a
|
109
|
+
DocBook document authoring tool). Asciidoctor has built-in capability to output
|
110
|
+
Text, DocBook and HTML; so it can be used to preview the file as it is being
|
111
|
+
authored.
|
112
|
+
|
113
|
+
Note that in order to generate HTML preview output close to what is intended
|
114
|
+
in the RSD standard, the Asciidoc
|
115
|
+
document includes a fair amount of formatting instructions (e.g. disabling
|
116
|
+
section numbering where appropriate, the titling of Appendixes as Annexes), as
|
117
|
+
well as RSD boilerplate text, and predefined section headers (sections are
|
118
|
+
recognised by fixed titles such as `Normative References`). Authoring RSD
|
119
|
+
standards in this fashion assumes that users will be populating an Asciidoc
|
120
|
+
template, and not removing needed formatting instructions.
|
121
|
+
|
122
|
+
=== Features not visible in HTML preview
|
123
|
+
|
124
|
+
The gem uses built-in Asciidoc formatting as much as possible, so that users
|
125
|
+
can retain the ability to preview documents; for _Terms and Definitions_
|
126
|
+
clauses, which have a good deal of explicit structure, macros have been
|
127
|
+
introduced for semantic markup (admitted terms, deprecated terms, etc). The
|
128
|
+
default HTML output of an Asciidoc-formatted RSD document is quite close to the
|
129
|
+
intended final output, with the following exceptions. Note that the final
|
130
|
+
outputs of the conversion (Microsoft Word, PDF, HTML) do not have these exceptions,
|
131
|
+
and comply with the RSD Standard specifications.
|
132
|
+
|
133
|
+
* _Terms and Definitions_: each term is marked up as an unnumbered subclause,
|
134
|
+
the semantic markup of alternate and other terms is not rendered visually.
|
135
|
+
|
136
|
+
* _Formulas_: Asciidoctor has no provision for the automated numbering of
|
137
|
+
rsdlated block formulas ("stem"), and does not display the number assigned a
|
138
|
+
block formula in its default HTML processor—although it does provide automated
|
139
|
+
numbering of examples. Formula numbering is provided in the final outputs
|
140
|
+
of the conversion.
|
141
|
+
|
142
|
+
* _Missing elements_: The document model does not yet include Asciidoc elements
|
143
|
+
that do not appear to be relevant to RSD Standards; these will be ignored in
|
144
|
+
generating RSD XML. Those elements include:
|
145
|
+
* sidebars (`aside`) (as distinct from warnings),
|
146
|
+
* ASCII art/preformatted text (`literal`) (as distinct from sourcecode listings),
|
147
|
+
* page breaks (`thematic break`).
|
148
|
+
|
149
|
+
* _Markup_: Some connecting text which is used to convey markup structure is
|
150
|
+
left out: in particular, `DEPRECATED` and `SOURCE` (replaced by formatting
|
151
|
+
macros).
|
152
|
+
|
153
|
+
* _Tables_: Table footnotes are treated like all other footnotes: they are
|
154
|
+
rendered at the bottom of the document, rather than the bottom of the table,
|
155
|
+
and they are not numbered separately.
|
156
|
+
|
157
|
+
* _Cross-references_: Footnoted cross-references are indicated with the reference
|
158
|
+
text `fn` in rsdlation, or `fn:` as a prefix to the reference text. The default
|
159
|
+
HTML processor leaves these as is: if no reference text is given, only `fn`
|
160
|
+
will be displayed (though it will still hyperlink to the right reference).
|
161
|
+
|
162
|
+
* _References_: The convention for references is that RSD documents are cited
|
163
|
+
without brackets by RSD number, and optionally year, whether they are normative
|
164
|
+
or in the bibliography (e.g. `RSD 20483:2013`); while all other references are
|
165
|
+
cited by bracketed number in the bibliography (e.g. `[1]`). The default HTML
|
166
|
+
processor treats all references the same, and will bracket them (e.g. `[RSD
|
167
|
+
20483:2013]`). For the same reason, RSD references listed in the bibliography
|
168
|
+
will be listed under an RSD reference, rather than a bracketed number.
|
169
|
+
|
170
|
+
* _References_: References are rendered cited throughout, since they are
|
171
|
+
automated. For that reason, if reference is to be made to both an undated and a
|
172
|
+
dated version of an RSD reference, these need to be explicitly listed as
|
173
|
+
separate references. (This is not done in the Rice model document, which lists
|
174
|
+
RSD 6646, but under _Terms and Definitions_ cites the dated RSD 6646:2011.
|
175
|
+
|
176
|
+
* _References_: RSD references that are undated but published have their date
|
177
|
+
indicated under the RSD standards format in an explanatory footnote. Because of
|
178
|
+
constraints introduced by Asciidoctor, that explanation is instead given in
|
179
|
+
square brackets in Asciidoc format.
|
180
|
+
|
181
|
+
* _Annexes_: Subheadings cannot preserve subsection numbering, while also
|
182
|
+
appearing inline with their text (e.g. Rice document, Annex B.2): they appear
|
183
|
+
as headings in separate lines.
|
184
|
+
|
185
|
+
* _Annexes_: Cross-references to Annex subclauses are automatically prefixed
|
186
|
+
with `Clause` rather than `Annex` or nothing.
|
187
|
+
|
188
|
+
* _Metadata_: Document metadata such as document numbers, technical committees
|
189
|
+
and title wording are not rendered in the default HTML output.
|
190
|
+
|
191
|
+
* _Patent Notice_: Patent notices are treated and rendered as a subsection of
|
192
|
+
the introduction, with an explicit subheading.
|
193
|
+
|
194
|
+
* _Numbering_: The numbering of figures and tables is sequential in the default
|
195
|
+
HTML processor: it does not include the Clause or Annex number. This,
|
196
|
+
_Figure 1_, not _Figure A.1_.
|
197
|
+
|
198
|
+
* _Notes_: There is no automatic note numbering by the default HTML processor.
|
199
|
+
|
200
|
+
* _Review Notes_: The reviewer on the review note is not displayed.
|
201
|
+
|
202
|
+
* _Keys_: Keys to formulas and figures are expected to be marked up as
|
203
|
+
definition lists consistently, rather than as inline prose.
|
204
|
+
|
205
|
+
* _Figures_: Simple figures are marked up as images, figures containing
|
206
|
+
subfigures as examples. Numbering by the default HTML processor may be
|
207
|
+
inconsistent. Subfigures are automatically numbered as independent figures.
|
208
|
+
|
209
|
+
* _Markup_: The default HTML processor does not support CSS extensions such as
|
210
|
+
small caps or strike through, though these can be marked up as CSS classes
|
211
|
+
through custom macros in Asciidoctor: a custom CSS stylesheet will be needed to
|
212
|
+
render them.
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
TODO: May need to only encode figures as examples.
|
217
|
+
|
218
|
+
== Document Attributes
|
219
|
+
|
220
|
+
The gem relies on Asciidoctor document attributes to provide necessary
|
221
|
+
metadata about the document. These include:
|
222
|
+
|
223
|
+
`:edition:`:: The document edition
|
224
|
+
|
225
|
+
`:revdate:`:: The date the document was last updated
|
226
|
+
|
227
|
+
`:copyright-year:`:: The year which will be claimed as when the copyright for
|
228
|
+
the document was issued
|
229
|
+
|
230
|
+
`:title:`:: The main component of the English title of the document
|
231
|
+
(mandatory). (The first line of the AsciiDoc document, which contains the title
|
232
|
+
introduced with `=`, is ignored)
|
233
|
+
|
234
|
+
`:doctype:`:: The document type (see RSD deliverables: The different types of
|
235
|
+
RSD publications) (mandatory). The permitted types are:
|
236
|
+
+
|
237
|
+
--
|
238
|
+
code:: Code Artifact
|
239
|
+
presentation:: Presentation
|
240
|
+
proposal:: Proposal; includes IETF DRAFT
|
241
|
+
standard:: Recommendation; includes IETF RFC
|
242
|
+
report:: report
|
243
|
+
--
|
244
|
+
|
245
|
+
`:status:``:: The document status. The permitted types are: `proposal`,
|
246
|
+
`working-draft`, `committee-draft`, `draft-standard`, `final-draft`,
|
247
|
+
`published`, `withdrawn`.
|
248
|
+
|
249
|
+
`:technical-committee:`:: The name of the relevant RSD technical committee
|
250
|
+
(mandatory)
|
251
|
+
|
252
|
+
`:language:` :: The language of the document (only `en` for now) (mandatory)
|
253
|
+
|
254
|
+
|
255
|
+
The attribute `:draft:`, if present, includes review notes in the XML output;
|
256
|
+
these are otherwise suppressed.
|
257
|
+
|
258
|
+
== AsciiRSD features not also present in AsciiISO
|
259
|
+
|
260
|
+
* `+[keyword]#...#+`: encodes keywords, such as "MUST", "MUST NOT". (Encoded as
|
261
|
+
`<span class="keyword">...</span>`.
|
262
|
+
|
263
|
+
== Data Models
|
264
|
+
|
265
|
+
The RSD Standard Document format is an instance of the
|
266
|
+
https://github.com/riboseinc/isodoc-models[StandardDocument model]. Details of
|
267
|
+
this general model can be found on its page. Details of the RSD modifications
|
268
|
+
to this general model can be found on the https://github.com/riboseinc/rsd[RSD model]
|
269
|
+
repository.
|
270
|
+
|
271
|
+
== Examples
|
272
|
+
|
273
|
+
* link:spec/examples/rfc6350.adoc[] is an AsciiRSD version of https://tools.ietf.org/html/rfc6350[RFC 6350].
|
274
|
+
* link:spec/examples/rfc6350.html[] is an HTML file generated from the AsciiRSD.
|
275
|
+
* link:spec/examples/rfc6350.doc[] is a Word document generated from the AsciiRSD.
|