isodoc 0.10.4 → 1.0.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/Gemfile.lock +3 -4
- data/lib/isodoc/common.rb +1 -0
- data/lib/isodoc/function/blocks.rb +19 -77
- data/lib/isodoc/function/references.rb +56 -63
- data/lib/isodoc/function/reqt.rb +89 -0
- data/lib/isodoc/function/table.rb +5 -12
- data/lib/isodoc/function/to_word_html.rb +4 -2
- data/lib/isodoc/html_function/comments.rb +6 -0
- data/lib/isodoc/html_function/html.rb +37 -39
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/word_function/body.rb +7 -3
- data/lib/isodoc/word_function/postprocess.rb +7 -0
- data/spec/isodoc/blocks_spec.rb +32 -34
- data/spec/isodoc/footnotes_spec.rb +7 -20
- data/spec/isodoc/i18n_spec.rb +3 -3
- data/spec/isodoc/postproc_spec.rb +37 -6
- data/spec/isodoc/ref_spec.rb +1 -1
- data/spec/isodoc/section_spec.rb +1 -1
- data/spec/isodoc/table_spec.rb +28 -28
- data/spec/isodoc/xref_spec.rb +28 -28
- data/spec/spec_helper.rb +1 -1
- metadata +3 -2
| @@ -3,16 +3,10 @@ module IsoDoc::Function | |
| 3 3 |  | 
| 4 4 | 
             
                def table_title_parse(node, out)
         | 
| 5 5 | 
             
                  name = node.at(ns("./name"))
         | 
| 6 | 
            -
                  out.p **{ class: "TableTitle",  | 
| 6 | 
            +
                  out.p **{ class: "TableTitle", style: "text-align:center;" } do |p|
         | 
| 7 7 | 
             
                    lbl = anchor(node['id'], :label, false)
         | 
| 8 8 | 
             
                    lbl.nil? or p << l10n("#{@table_lbl} #{lbl}")
         | 
| 9 9 | 
             
                    name and !lbl.nil? and p << l10n(" — ")
         | 
| 10 | 
            -
            =begin
         | 
| 11 | 
            -
                    get_anchors[node['id']][:label].nil? or
         | 
| 12 | 
            -
                      p << l10n("#{@table_lbl} #{get_anchors[node['id']][:label]}")
         | 
| 13 | 
            -
                    name and !get_anchors[node['id']][:label].nil? and
         | 
| 14 | 
            -
                      p << l10n(" — ")
         | 
| 15 | 
            -
            =end
         | 
| 16 10 | 
             
                    name and name.children.each { |n| parse(n, p) }
         | 
| 17 11 | 
             
                  end
         | 
| 18 12 | 
             
                end
         | 
| @@ -52,9 +46,7 @@ module IsoDoc::Function | |
| 52 46 | 
             
                  attr_code(
         | 
| 53 47 | 
             
                    id: node["id"],
         | 
| 54 48 | 
             
                    class: "MsoISOTable",
         | 
| 55 | 
            -
                    border: | 
| 56 | 
            -
                    cellspacing: 0,
         | 
| 57 | 
            -
                    cellpadding: 0,
         | 
| 49 | 
            +
                    style: "border-width:1px;border-spacing:0;",
         | 
| 58 50 | 
             
                    title: node["alt"]
         | 
| 59 51 | 
             
                  )
         | 
| 60 52 | 
             
                end
         | 
| @@ -81,20 +73,21 @@ module IsoDoc::Function | |
| 81 73 |  | 
| 82 74 | 
             
                def make_tr_attr(td, row, totalrows)
         | 
| 83 75 | 
             
                  style = td.name == "th" ? "font-weight:bold;" : ""
         | 
| 76 | 
            +
                  td["align"] and style += "text-align:#{td['align']};"
         | 
| 84 77 | 
             
                  rowmax = td["rowspan"] ? row + td["rowspan"].to_i - 1 : row
         | 
| 85 78 | 
             
                  style += <<~STYLE
         | 
| 86 79 | 
             
                    border-top:#{row.zero? ? "#{SW} 1.5pt;" : 'none;'}
         | 
| 87 80 | 
             
                    border-bottom:#{SW} #{rowmax == totalrows ? '1.5' : '1.0'}pt;
         | 
| 81 | 
            +
                    padding:0;
         | 
| 88 82 | 
             
                  STYLE
         | 
| 89 83 | 
             
                  { rowspan: td["rowspan"], colspan: td["colspan"],
         | 
| 90 | 
            -
                     | 
| 84 | 
            +
                    style: style.gsub(/\n/, "") }
         | 
| 91 85 | 
             
                end
         | 
| 92 86 |  | 
| 93 87 | 
             
                def tr_parse(node, out, ord, totalrows, _header)
         | 
| 94 88 | 
             
                  out.tr do |r|
         | 
| 95 89 | 
             
                    node.elements.each do |td|
         | 
| 96 90 | 
             
                      attrs = make_tr_attr(td, ord, totalrows - 1)
         | 
| 97 | 
            -
                      # i, node.elements.size - 1, header)
         | 
| 98 91 | 
             
                      r.send td.name, **attr_code(attrs) do |entry|
         | 
| 99 92 | 
             
                        td.children.each { |n| parse(n, entry) }
         | 
| 100 93 | 
             
                      end
         | 
| @@ -42,7 +42,6 @@ module IsoDoc::Function | |
| 42 42 | 
             
                # is inserted before this CSS.
         | 
| 43 43 | 
             
                def define_head(html, filename, _dir)
         | 
| 44 44 | 
             
                  html.head do |head|
         | 
| 45 | 
            -
                    #head.title { |t| t << filename }
         | 
| 46 45 | 
             
                    if @standardstylesheet
         | 
| 47 46 | 
             
                      head.style do |style|
         | 
| 48 47 | 
             
                        stylesheet = File.read(@standardstylesheet, encoding: "utf-8").
         | 
| @@ -53,8 +52,11 @@ module IsoDoc::Function | |
| 53 52 | 
             
                  end
         | 
| 54 53 | 
             
                end
         | 
| 55 54 |  | 
| 55 | 
            +
                def body_attr
         | 
| 56 | 
            +
                  { lang: "#{@lang}" }
         | 
| 57 | 
            +
                end
         | 
| 58 | 
            +
             | 
| 56 59 | 
             
                def make_body(xml, docxml)
         | 
| 57 | 
            -
                  body_attr = { lang: "EN-US", link: "blue", vlink: "#954F72" }
         | 
| 58 60 | 
             
                  xml.body **body_attr do |body|
         | 
| 59 61 | 
             
                    make_body1(body, docxml)
         | 
| 60 62 | 
             
                    make_body2(body, docxml)
         | 
| @@ -6,18 +6,22 @@ module IsoDoc::HtmlFunction | |
| 6 6 | 
             
                end
         | 
| 7 7 |  | 
| 8 8 | 
             
                def comments(div)
         | 
| 9 | 
            +
            =begin
         | 
| 9 10 | 
             
                  return if @comments.empty?
         | 
| 10 11 | 
             
                  div.div **{ style: "mso-element:comment-list" } do |div1|
         | 
| 11 12 | 
             
                    @comments.each { |fn| div1.parent << fn }
         | 
| 12 13 | 
             
                  end
         | 
| 14 | 
            +
            =end
         | 
| 13 15 | 
             
                end
         | 
| 14 16 |  | 
| 15 17 | 
             
                def review_note_parse(node, out)
         | 
| 18 | 
            +
            =begin
         | 
| 16 19 | 
             
                  fn = @comments.length + 1
         | 
| 17 20 | 
             
                  make_comment_link(out, fn, node)
         | 
| 18 21 | 
             
                  @in_comment = true
         | 
| 19 22 | 
             
                  @comments << make_comment_text(node, fn)
         | 
| 20 23 | 
             
                  @in_comment = false
         | 
| 24 | 
            +
            =end
         | 
| 21 25 | 
             
                end
         | 
| 22 26 |  | 
| 23 27 | 
             
                def comment_link_attrs(fn, node)
         | 
| @@ -51,9 +55,11 @@ module IsoDoc::HtmlFunction | |
| 51 55 | 
             
                end
         | 
| 52 56 |  | 
| 53 57 | 
             
                def comment_cleanup(docxml)
         | 
| 58 | 
            +
            =begin
         | 
| 54 59 | 
             
                  move_comment_link_to_from(docxml)
         | 
| 55 60 | 
             
                  reorder_comments_by_comment_link(docxml)
         | 
| 56 61 | 
             
                  embed_comment_in_comment_list(docxml)
         | 
| 62 | 
            +
            =end
         | 
| 57 63 | 
             
                end
         | 
| 58 64 |  | 
| 59 65 | 
             
                COMMENT_IN_COMMENT_LIST =
         | 
| @@ -44,12 +44,14 @@ module IsoDoc::HtmlFunction | |
| 44 44 | 
             
                def toHTML(result, filename)
         | 
| 45 45 | 
             
                  result = (from_xhtml(html_cleanup(to_xhtml(result))))
         | 
| 46 46 | 
             
                  result = populate_template(result, :html)
         | 
| 47 | 
            -
                  #result = script_cdata(from_xhtml(move_images(to_xhtml(result))))
         | 
| 48 47 | 
             
                  result = from_xhtml(move_images(to_xhtml(result)))
         | 
| 49 | 
            -
                  result = script_cdata(inject_script(result))
         | 
| 50 | 
            -
                  File.open("#{filename}.html", "w:UTF-8")  | 
| 51 | 
            -
             | 
| 52 | 
            -
             | 
| 48 | 
            +
                  result = html5(script_cdata(inject_script(result)))
         | 
| 49 | 
            +
                  File.open("#{filename}.html", "w:UTF-8") { |f| f.write(result) }
         | 
| 50 | 
            +
                end
         | 
| 51 | 
            +
             | 
| 52 | 
            +
                def html5(doc)
         | 
| 53 | 
            +
                  doc.sub(%r{<!DOCTYPE html [^>]+>}, "<!DOCTYPE html>").
         | 
| 54 | 
            +
                    sub(%r{<\?xml[^>]+>}, "")
         | 
| 53 55 | 
             
                end
         | 
| 54 56 |  | 
| 55 57 | 
             
                def html_cleanup(x)
         | 
| @@ -63,9 +65,7 @@ module IsoDoc::HtmlFunction | |
| 63 65 | 
             
                MATHJAX = <<~"MATHJAX".freeze
         | 
| 64 66 | 
             
                  <script type="text/x-mathjax-config">
         | 
| 65 67 | 
             
                    MathJax.Hub.Config({
         | 
| 66 | 
            -
                      asciimath2jax: {
         | 
| 67 | 
            -
                        delimiters: [['OPEN', 'CLOSE']]
         | 
| 68 | 
            -
                      }
         | 
| 68 | 
            +
                      asciimath2jax: { delimiters: [['OPEN', 'CLOSE']] }
         | 
| 69 69 | 
             
                   });
         | 
| 70 70 | 
             
                  </script>
         | 
| 71 71 | 
             
                  <script src="#{MATHJAX_ADDR}?config=AM_HTMLorMML" async="async"></script>
         | 
| @@ -91,15 +91,6 @@ module IsoDoc::HtmlFunction | |
| 91 91 | 
             
                  HEAD
         | 
| 92 92 | 
             
                end
         | 
| 93 93 |  | 
| 94 | 
            -
                def toclevel
         | 
| 95 | 
            -
                  <<~HEAD.freeze
         | 
| 96 | 
            -
                function toclevel() { var i; var text = "";
         | 
| 97 | 
            -
                  for(i = 1; i <= #{@htmlToClevels}; i++) {
         | 
| 98 | 
            -
                    if (i > 1) { text += ","; } text += "h" + i + ":not(:empty):not(.TermNum)"; } 
         | 
| 99 | 
            -
                  return text;}
         | 
| 100 | 
            -
                  HEAD
         | 
| 101 | 
            -
                end
         | 
| 102 | 
            -
             | 
| 103 94 | 
             
                def html_head()
         | 
| 104 95 | 
             
                  <<~HEAD.freeze
         | 
| 105 96 | 
             
                <title>{{ doctitle }}</title>
         | 
| @@ -155,12 +146,10 @@ module IsoDoc::HtmlFunction | |
| 155 146 |  | 
| 156 147 | 
             
                def sourcecode_parse(node, out)
         | 
| 157 148 | 
             
                  name = node.at(ns("./name"))
         | 
| 158 | 
            -
                   | 
| 159 | 
            -
             | 
| 149 | 
            +
                  class1 = "prettyprint #{sourcecodelang(node&.at(ns('./@lang'))&.value)}"
         | 
| 150 | 
            +
                  out.pre **attr_code(id: node["id"], class: class1) do |div|
         | 
| 160 151 | 
             
                    @sourcecode = true
         | 
| 161 | 
            -
                    node.children.each  | 
| 162 | 
            -
                      parse(n, div) unless n.name == "name"
         | 
| 163 | 
            -
                    end
         | 
| 152 | 
            +
                    node.children.each { |n| parse(n, div) unless n.name == "name" }
         | 
| 164 153 | 
             
                    @sourcecode = false
         | 
| 165 154 | 
             
                    sourcecode_name_parse(node, div, name) if name
         | 
| 166 155 | 
             
                  end
         | 
| @@ -171,10 +160,6 @@ module IsoDoc::HtmlFunction | |
| 171 160 | 
             
                  html_intro(docxml) if @htmlintropage
         | 
| 172 161 | 
             
                  docxml.at("//body") << mathjax(@openmathdelim, @closemathdelim)
         | 
| 173 162 | 
             
                  docxml.at("//body") << sourcecode_highlighter
         | 
| 174 | 
            -
                  #if @scripts
         | 
| 175 | 
            -
                  #  scripts = File.read(@scripts, encoding: "UTF-8")
         | 
| 176 | 
            -
                  #  a = docxml.at("//body").add_child docxml.create_cdata(scripts)
         | 
| 177 | 
            -
                  #end
         | 
| 178 163 | 
             
                  html_main(docxml)
         | 
| 179 164 | 
             
                  docxml
         | 
| 180 165 | 
             
                end
         | 
| @@ -186,17 +171,15 @@ module IsoDoc::HtmlFunction | |
| 186 171 | 
             
                end
         | 
| 187 172 |  | 
| 188 173 | 
             
                def html_cover(docxml)
         | 
| 189 | 
            -
                   | 
| 190 | 
            -
                  coverxml = to_xhtml_fragment(cover)
         | 
| 174 | 
            +
                  doc = to_xhtml_fragment(File.read(@htmlcoverpage, encoding: "UTF-8"))
         | 
| 191 175 | 
             
                  d = docxml.at('//div[@class="title-section"]')
         | 
| 192 | 
            -
                  d.children.first.add_previous_sibling  | 
| 176 | 
            +
                  d.children.first.add_previous_sibling doc.to_xml(encoding: "US-ASCII")
         | 
| 193 177 | 
             
                end
         | 
| 194 178 |  | 
| 195 179 | 
             
                def html_intro(docxml)
         | 
| 196 | 
            -
                   | 
| 197 | 
            -
                  introxml = to_xhtml_fragment(intro)
         | 
| 180 | 
            +
                  doc = to_xhtml_fragment(File.read(@htmlintropage, encoding: "UTF-8"))
         | 
| 198 181 | 
             
                  d = docxml.at('//div[@class="prefatory-section"]')
         | 
| 199 | 
            -
                  d.children.first.add_previous_sibling  | 
| 182 | 
            +
                  d.children.first.add_previous_sibling doc.to_xml(encoding: "US-ASCII")
         | 
| 200 183 | 
             
                end
         | 
| 201 184 |  | 
| 202 185 | 
             
                def htmlstylesheet
         | 
| @@ -210,11 +193,14 @@ module IsoDoc::HtmlFunction | |
| 210 193 | 
             
                  return docxml unless @htmlstylesheet
         | 
| 211 194 | 
             
                  title = docxml.at("//*[local-name() = 'head']/*[local-name() = 'title']")
         | 
| 212 195 | 
             
                  head = docxml.at("//*[local-name() = 'head']")
         | 
| 196 | 
            +
            =begin
         | 
| 213 197 | 
             
                  css = htmlstylesheet
         | 
| 214 198 | 
             
                  if title.nil? then head.children.first.add_previous_sibling css
         | 
| 215 199 | 
             
                  else
         | 
| 216 200 | 
             
                    title.add_next_sibling css
         | 
| 217 201 | 
             
                  end
         | 
| 202 | 
            +
            =end
         | 
| 203 | 
            +
                  head << htmlstylesheet
         | 
| 218 204 | 
             
                  docxml
         | 
| 219 205 | 
             
                end
         | 
| 220 206 |  | 
| @@ -293,21 +279,33 @@ module IsoDoc::HtmlFunction | |
| 293 279 | 
             
                end
         | 
| 294 280 |  | 
| 295 281 | 
             
                def html_toc_entry(level, header)
         | 
| 296 | 
            -
                  %(<li class=" | 
| 282 | 
            +
                  %(<li class="#{level}"><a href="##{header['id']}">\
         | 
| 283 | 
            +
                  #{header_strip(header)}</a></li>)
         | 
| 297 284 | 
             
                end
         | 
| 298 285 |  | 
| 286 | 
            +
                def toclevel_classes
         | 
| 287 | 
            +
                  (1..@htmlToClevels).inject([]) { |m, i| m << "h#{i}" }
         | 
| 288 | 
            +
                end
         | 
| 289 | 
            +
             | 
| 290 | 
            +
                def toclevel
         | 
| 291 | 
            +
                  ret = toclevel_classes.map { |l| "#{l}:not(:empty):not(.TermNum):not(.noTOC)" }
         | 
| 292 | 
            +
                  <<~HEAD.freeze
         | 
| 293 | 
            +
                function toclevel() { return "#{ret.join(',')}";}
         | 
| 294 | 
            +
                  HEAD
         | 
| 295 | 
            +
                end
         | 
| 296 | 
            +
             | 
| 297 | 
            +
                # needs to be same output as toclevel
         | 
| 299 298 | 
             
                def html_toc(docxml)
         | 
| 300 | 
            -
            =begin
         | 
| 301 299 | 
             
                  idx = docxml.at("//div[@id = 'toc']") or return docxml
         | 
| 302 300 | 
             
                  toc = "<ul>"
         | 
| 303 | 
            -
                   | 
| 304 | 
            -
             | 
| 301 | 
            +
                  path = toclevel_classes.map do |l|
         | 
| 302 | 
            +
                    "//main//#{l}[not(@class = 'TermNum')][not(@class = 'noTOC')][not(text())]"
         | 
| 303 | 
            +
                  end
         | 
| 304 | 
            +
                  docxml.xpath(path.join(" | ")).each_with_index do |h, tocidx|
         | 
| 305 305 | 
             
                    h["id"] ||= "toc#{tocidx}"
         | 
| 306 | 
            -
                    toc += html_toc_entry(h.name | 
| 307 | 
            -
                    tocidx += 1
         | 
| 306 | 
            +
                    toc += html_toc_entry(h.name, h)
         | 
| 308 307 | 
             
                  end
         | 
| 309 308 | 
             
                  idx.children = "#{toc}</ul>"
         | 
| 310 | 
            -
            =end
         | 
| 311 309 | 
             
                  docxml
         | 
| 312 310 | 
             
                end
         | 
| 313 311 | 
             
              end
         | 
    
        data/lib/isodoc/version.rb
    CHANGED
    
    
| @@ -13,6 +13,10 @@ module IsoDoc::WordFunction | |
| 13 13 | 
             
                  end
         | 
| 14 14 | 
             
                end
         | 
| 15 15 |  | 
| 16 | 
            +
                def body_attr
         | 
| 17 | 
            +
                  { lang: "EN-US", link: "blue", vlink: "#954F72" }
         | 
| 18 | 
            +
                end
         | 
| 19 | 
            +
             | 
| 16 20 | 
             
                def make_body1(body, _docxml)
         | 
| 17 21 | 
             
                  FileUtils.rm_rf tmpimagedir
         | 
| 18 22 | 
             
                  FileUtils.mkdir tmpimagedir
         | 
| @@ -235,12 +239,12 @@ module IsoDoc::WordFunction | |
| 235 239 |  | 
| 236 240 |  | 
| 237 241 | 
             
                def make_table_attr(node)
         | 
| 238 | 
            -
                  {
         | 
| 242 | 
            +
                  super.merge({
         | 
| 239 243 | 
             
                    style: "mso-table-lspace:15.0cm;margin-left:423.0pt;"\
         | 
| 240 244 | 
             
                    "mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-bspace:14.2pt;"\
         | 
| 241 245 | 
             
                    "mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal:column;"\
         | 
| 242 | 
            -
                    "mso-table-overlap:never;"
         | 
| 243 | 
            -
                  } | 
| 246 | 
            +
                    "mso-table-overlap:never;border-spacing:0;border-width:1px;"
         | 
| 247 | 
            +
                  })
         | 
| 244 248 | 
             
                end
         | 
| 245 249 |  | 
| 246 250 | 
             
                def table_parse(node, out)
         | 
| @@ -60,6 +60,7 @@ xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"> | |
| 60 60 | 
             
                  word_table_separator(docxml)
         | 
| 61 61 | 
             
                  word_admonition_images(docxml)
         | 
| 62 62 | 
             
                  word_list_continuations(docxml)
         | 
| 63 | 
            +
                  word_example_cleanup(docxml)
         | 
| 63 64 | 
             
                  docxml
         | 
| 64 65 | 
             
                end
         | 
| 65 66 |  | 
| @@ -96,6 +97,12 @@ xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"> | |
| 96 97 | 
             
                def word_annex_cleanup(docxml)
         | 
| 97 98 | 
             
                end
         | 
| 98 99 |  | 
| 100 | 
            +
                def word_example_cleanup(docxml)
         | 
| 101 | 
            +
                  docxml.xpath("//div[@class = 'example']//p[not(@class)]").each do |p|
         | 
| 102 | 
            +
                    p["class"] = "example"
         | 
| 103 | 
            +
                  end
         | 
| 104 | 
            +
                end
         | 
| 105 | 
            +
             | 
| 99 106 | 
             
                def word_preface(docxml)
         | 
| 100 107 | 
             
                  word_cover(docxml) if @wordcoverpage
         | 
| 101 108 | 
             
                  word_intro(docxml, @wordToClevels) if @wordintropage
         | 
    
        data/spec/isodoc/blocks_spec.rb
    CHANGED
    
    | @@ -263,16 +263,16 @@ B</pre> | |
| 263 263 | 
             
                     <p id="_">The time <span class="stem">(#(t_90)#)</span> was estimated to be 18,2 min for this example.</p>
         | 
| 264 264 | 
             
                   </div></aside>
         | 
| 265 265 | 
             
                     <p><b>Key</b></p><dl><dt><p>A</p></dt><dd><p>B</p></dd></dl>
         | 
| 266 | 
            -
                   <p class="FigureTitle"  | 
| 266 | 
            +
                   <p class="FigureTitle" style="text-align:center;">Figure 1 — Split-it-right <i>sample</i> divider</p></div>
         | 
| 267 267 | 
             
                           <div class="figure" id="figure-B">
         | 
| 268 268 | 
             
            <pre>A <
         | 
| 269 269 | 
             
            B</pre>
         | 
| 270 | 
            -
            <p class="FigureTitle"  | 
| 270 | 
            +
            <p class="FigureTitle" style="text-align:center;">Figure 2</p>
         | 
| 271 271 | 
             
            </div>
         | 
| 272 272 | 
             
                           <div class="figure" id="figure-C">
         | 
| 273 273 | 
             
            <pre>A <
         | 
| 274 274 | 
             
            B</pre>
         | 
| 275 | 
            -
            <p class="FigureTitle"  | 
| 275 | 
            +
            <p class="FigureTitle" style="text-align:center;"/>
         | 
| 276 276 | 
             
            </div>
         | 
| 277 277 | 
             
                           </div>
         | 
| 278 278 | 
             
                           <p class="zzSTDTitle1"/>
         | 
| @@ -326,11 +326,11 @@ B</pre> | |
| 326 326 | 
             
                     <p id="_">The time <span class="stem">(#(t_90)#)</span> was estimated to be 18,2 min for this example.</p>
         | 
| 327 327 | 
             
                   </div></aside>
         | 
| 328 328 | 
             
                     <p><b>Key</b></p><table class="dl"><tr><td valign="top" align="left"><p align="left" style="margin-left:0pt;text-align:left;">A</p></td><td valign="top"><p>B</p></td></tr></table>
         | 
| 329 | 
            -
                   <p class="FigureTitle"  | 
| 329 | 
            +
                   <p class="FigureTitle" style="text-align:center;">Figure 1 — Split-it-right sample divider</p></div>
         | 
| 330 330 | 
             
                           <div class="figure" id="figure-B">
         | 
| 331 331 | 
             
            <pre>A <
         | 
| 332 332 | 
             
            B</pre>
         | 
| 333 | 
            -
                         <p class="FigureTitle"  | 
| 333 | 
            +
                         <p class="FigureTitle" style="text-align:center;">Figure 2</p>
         | 
| 334 334 | 
             
            </div>
         | 
| 335 335 | 
             
                         </div>
         | 
| 336 336 | 
             
                         <p> </p>
         | 
| @@ -426,7 +426,7 @@ B</pre> | |
| 426 426 | 
             
                           <br/>
         | 
| 427 427 | 
             
                           <div>
         | 
| 428 428 | 
             
                             <h1 class="ForewordTitle">Foreword</h1>
         | 
| 429 | 
            -
                             <pre id="samplecode" class="prettyprint lang-rb"><br/>    <br/>  puts x<br/><p class="SourceTitle"  | 
| 429 | 
            +
                             <pre id="samplecode" class="prettyprint lang-rb"><br/>    <br/>  puts x<br/><p class="SourceTitle" style="text-align:center;">Ruby <i>code</i></p></pre>
         | 
| 430 430 | 
             
                           </div>
         | 
| 431 431 | 
             
                           <p class="zzSTDTitle1"/>
         | 
| 432 432 | 
             
                         </div>
         | 
| @@ -461,7 +461,7 @@ B</pre> | |
| 461 461 | 
             
                         </p>
         | 
| 462 462 | 
             
                           <div>
         | 
| 463 463 | 
             
                             <h1 class="ForewordTitle">Foreword</h1>
         | 
| 464 | 
            -
                             <p id="samplecode" class="Sourcecode"><br/>    <br/>  puts x<br/><p class="SourceTitle"  | 
| 464 | 
            +
                             <p id="samplecode" class="Sourcecode"><br/>    <br/>  puts x<br/><p class="SourceTitle" style="text-align:center;">Ruby <i>code</i></p></p>
         | 
| 465 465 | 
             
                           </div>
         | 
| 466 466 | 
             
                              <p> </p>
         | 
| 467 467 | 
             
             </div>
         | 
| @@ -491,7 +491,7 @@ B</pre> | |
| 491 491 | 
             
                           <br/>
         | 
| 492 492 | 
             
                           <div>
         | 
| 493 493 | 
             
                             <h1 class="ForewordTitle">Foreword</h1>
         | 
| 494 | 
            -
                             <pre id="samplecode" class="prettyprint "><br/>    <br/>  <xml><br/><p class="SourceTitle"  | 
| 494 | 
            +
                             <pre id="samplecode" class="prettyprint "><br/>    <br/>  <xml><br/><p class="SourceTitle" style="text-align:center;">XML code</p></pre>
         | 
| 495 495 | 
             
                           </div>
         | 
| 496 496 | 
             
                           <p class="zzSTDTitle1"/>
         | 
| 497 497 | 
             
                         </div>
         | 
| @@ -508,7 +508,7 @@ B</pre> | |
| 508 508 | 
             
                   %w{a b c}.each do |x|
         | 
| 509 509 | 
             
                     puts x <callout target="B">2</callout>
         | 
| 510 510 | 
             
                   end<annotation id="A">
         | 
| 511 | 
            -
                     <p id="_">This is one callout</p>
         | 
| 511 | 
            +
                     <p id="_">This is <em>one</em> callout</p>
         | 
| 512 512 | 
             
                   </annotation><annotation id="B">
         | 
| 513 513 | 
             
                     <p id="_">This is another callout</p>
         | 
| 514 514 | 
             
                   </annotation></sourcecode>
         | 
| @@ -519,11 +519,7 @@ B</pre> | |
| 519 519 | 
             
                           <br/>
         | 
| 520 520 | 
             
                           <div>
         | 
| 521 521 | 
             
                             <h1 class="ForewordTitle">Foreword</h1>
         | 
| 522 | 
            -
                             <pre id="_" class="prettyprint ">puts "Hello, world."  <1><br/>   %w{a b c}.each do |x|<br/>     puts x  <2><br/>   end< | 
| 523 | 
            -
                        <p class="Sourcecode" id="_">This is one callout</p>
         | 
| 524 | 
            -
                      <span class="zzMoveToFollowing"><2> </span>
         | 
| 525 | 
            -
                        <p class="Sourcecode" id="_">This is another callout</p>
         | 
| 526 | 
            -
                      </pre>
         | 
| 522 | 
            +
                             <pre id="_" class="prettyprint ">puts "Hello, world."  <1><br/>   %w{a b c}.each do |x|<br/>     puts x  <2><br/>   end<br/><br/><1> This is one callout<br/><2> This is another callout</pre>
         | 
| 527 523 | 
             
                           </div>
         | 
| 528 524 | 
             
                           <p class="zzSTDTitle1"/>
         | 
| 529 525 | 
             
                         </div>
         | 
| @@ -546,7 +542,7 @@ B</pre> | |
| 546 542 | 
             
                           <br/>
         | 
| 547 543 | 
             
                           <div>
         | 
| 548 544 | 
             
                             <h1 class="ForewordTitle">Foreword</h1>
         | 
| 549 | 
            -
                             <div class="Admonition"><p class="AdmonitionTitle"  | 
| 545 | 
            +
                             <div class="Admonition"><p class="AdmonitionTitle" style="text-align:center;">CAUTION</p>
         | 
| 550 546 | 
             
                     <p id="_e94663cc-2473-4ccc-9a72-983a74d989f2">Only use paddy or parboiled rice for the determination of husked rice yield.</p>
         | 
| 551 547 | 
             
                   </div>
         | 
| 552 548 | 
             
                           </div>
         | 
| @@ -572,7 +568,7 @@ B</pre> | |
| 572 568 | 
             
                           <br/>
         | 
| 573 569 | 
             
                           <div>
         | 
| 574 570 | 
             
                             <h1 class="ForewordTitle">Foreword</h1>
         | 
| 575 | 
            -
                             <div class="Admonition"><p class="AdmonitionTitle"  | 
| 571 | 
            +
                             <div class="Admonition"><p class="AdmonitionTitle" style="text-align:center;">Title</p>
         | 
| 576 572 | 
             
                     <p id="_e94663cc-2473-4ccc-9a72-983a74d989f2">Only use paddy or parboiled rice for the determination of husked rice yield.</p>
         | 
| 577 573 | 
             
                   </div>
         | 
| 578 574 | 
             
                           </div>
         | 
| @@ -645,11 +641,11 @@ World</p> | |
| 645 641 | 
             
                           <br/>
         | 
| 646 642 | 
             
                           <div>
         | 
| 647 643 | 
             
                             <h1 class="ForewordTitle">Foreword</h1>
         | 
| 648 | 
            -
                             <p id="_08bfe952-d57f-4150-9c95-5d52098cc2a8"  | 
| 644 | 
            +
                             <p id="_08bfe952-d57f-4150-9c95-5d52098cc2a8" style="text-align:left;">Vache Equipment<br/>
         | 
| 649 645 | 
             
                   Fictitious<br/>
         | 
| 650 646 | 
             
                   World
         | 
| 651 647 | 
             
                       </p>
         | 
| 652 | 
            -
                       <p style="text-align:justify">Justify</p>
         | 
| 648 | 
            +
                       <p style="text-align:justify;">Justify</p>
         | 
| 653 649 | 
             
                           </div>
         | 
| 654 650 | 
             
                           <p class="zzSTDTitle1"/>
         | 
| 655 651 | 
             
                         </div>
         | 
| @@ -773,12 +769,12 @@ World</p> | |
| 773 769 | 
             
                <table id="_">
         | 
| 774 770 | 
             
                  <tbody>
         | 
| 775 771 | 
             
                    <tr>
         | 
| 776 | 
            -
                      <td  | 
| 777 | 
            -
                      <td  | 
| 772 | 
            +
                      <td style="text-align:left;">Object</td>
         | 
| 773 | 
            +
                      <td style="text-align:left;">Value</td>
         | 
| 778 774 | 
             
                    </tr>
         | 
| 779 775 | 
             
                    <tr>
         | 
| 780 | 
            -
                      <td  | 
| 781 | 
            -
                      <td  | 
| 776 | 
            +
                      <td style="text-align:left;">Mission</td>
         | 
| 777 | 
            +
                      <td style="text-align:left;">Accomplished</td>
         | 
| 782 778 | 
             
                    </tr>
         | 
| 783 779 | 
             
                  </tbody>
         | 
| 784 780 | 
             
                </table>
         | 
| @@ -812,6 +808,7 @@ World</p> | |
| 812 808 | 
             
                  <div>
         | 
| 813 809 | 
             
                    <h1 class="ForewordTitle">Foreword</h1>
         | 
| 814 810 | 
             
                    <div class="permission"><p class="AdmonitionTitle">Permission 1:<br/>/ogc/recommendation/wfs/2</p>
         | 
| 811 | 
            +
                    <p><i>Subject: user<br/>Control-class: Technical<br/>Priority: P0<br/>Family: System and Communications Protection<br/>Family: System and Communications Protocols</i></p>
         | 
| 815 812 |  | 
| 816 813 | 
             
              <div class="requirement-inherit">/ss/584/2015/level/1</div>
         | 
| 817 814 | 
             
              <div class="requirement-description">
         | 
| @@ -858,12 +855,12 @@ World</p> | |
| 858 855 | 
             
                <table id="_">
         | 
| 859 856 | 
             
                  <tbody>
         | 
| 860 857 | 
             
                    <tr>
         | 
| 861 | 
            -
                      <td  | 
| 862 | 
            -
                      <td  | 
| 858 | 
            +
                      <td style="text-align:left;">Object</td>
         | 
| 859 | 
            +
                      <td style="text-align:left;">Value</td>
         | 
| 863 860 | 
             
                    </tr>
         | 
| 864 861 | 
             
                    <tr>
         | 
| 865 | 
            -
                      <td  | 
| 866 | 
            -
                      <td  | 
| 862 | 
            +
                      <td style="text-align:left;">Mission</td>
         | 
| 863 | 
            +
                      <td style="text-align:left;">Accomplished</td>
         | 
| 867 864 | 
             
                    </tr>
         | 
| 868 865 | 
             
                  </tbody>
         | 
| 869 866 | 
             
                </table>
         | 
| @@ -896,7 +893,7 @@ World</p> | |
| 896 893 | 
             
                    <br/>
         | 
| 897 894 | 
             
                  <div>
         | 
| 898 895 | 
             
                    <h1 class="ForewordTitle">Foreword</h1>
         | 
| 899 | 
            -
                    <div class="require"><p class="AdmonitionTitle">Requirement:<br/>/ogc/recommendation/wfs/2. A New Requirement</p>
         | 
| 896 | 
            +
                    <div class="require"><p class="AdmonitionTitle">Requirement:<br/>/ogc/recommendation/wfs/2. A New Requirement</p><p><i>Subject: user</i></p>
         | 
| 900 897 |  | 
| 901 898 | 
             
              <div class="requirement-inherit">/ss/584/2015/level/1</div>
         | 
| 902 899 | 
             
              <div class="requirement-description">
         | 
| @@ -930,9 +927,11 @@ World</p> | |
| 930 927 | 
             
                expect(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
         | 
| 931 928 | 
             
                <iso-standard xmlns="http://riboseinc.com/isoxml">
         | 
| 932 929 | 
             
                <preface><foreword>
         | 
| 933 | 
            -
                <recommendation id="_">
         | 
| 930 | 
            +
                <recommendation id="_" obligation="shall,could">
         | 
| 934 931 | 
             
              <label>/ogc/recommendation/wfs/2</label>
         | 
| 935 932 | 
             
              <inherit>/ss/584/2015/level/1</inherit>
         | 
| 933 | 
            +
              <classification><tag>type</tag><value>text</value></classification>
         | 
| 934 | 
            +
              <classification><tag>language</tag><value>BASIC</value></classification>
         | 
| 936 935 | 
             
              <subject>user</subject>
         | 
| 937 936 | 
             
              <description>
         | 
| 938 937 | 
             
                <p id="_">I recommend <em>this</em>.</p>
         | 
| @@ -942,12 +941,12 @@ World</p> | |
| 942 941 | 
             
                <table id="_">
         | 
| 943 942 | 
             
                  <tbody>
         | 
| 944 943 | 
             
                    <tr>
         | 
| 945 | 
            -
                      <td  | 
| 946 | 
            -
                      <td  | 
| 944 | 
            +
                      <td style="text-align:left;">Object</td>
         | 
| 945 | 
            +
                      <td style="text-align:left;">Value</td>
         | 
| 947 946 | 
             
                    </tr>
         | 
| 948 947 | 
             
                    <tr>
         | 
| 949 | 
            -
                      <td  | 
| 950 | 
            -
                      <td  | 
| 948 | 
            +
                      <td style="text-align:left;">Mission</td>
         | 
| 949 | 
            +
                      <td style="text-align:left;">Accomplished</td>
         | 
| 951 950 | 
             
                    </tr>
         | 
| 952 951 | 
             
                  </tbody>
         | 
| 953 952 | 
             
                </table>
         | 
| @@ -980,8 +979,7 @@ World</p> | |
| 980 979 | 
             
                   <br/>
         | 
| 981 980 | 
             
                  <div>
         | 
| 982 981 | 
             
                    <h1 class="ForewordTitle">Foreword</h1>
         | 
| 983 | 
            -
             | 
| 984 | 
            -
             | 
| 982 | 
            +
            <div class="recommend"><p class="AdmonitionTitle">Recommendation 1:<br/>/ogc/recommendation/wfs/2</p><p><i>Obligation: shall,could<br/>Subject: user<br/>Type: text<br/>Language: BASIC</i></p>
         | 
| 985 983 | 
             
              <div class="requirement-inherit">/ss/584/2015/level/1</div>
         | 
| 986 984 | 
             
              <div class="requirement-description">
         | 
| 987 985 | 
             
                <p id="_">I recommend <i>this</i>.</p>
         |