metanorma / metanorma-gb

Metanorma processor for GB: write Chinese Standards using GbDoc
BSD 2-Clause "Simplified" License
2 stars 3 forks source link

Word/HTML Terms section #46

Closed ronaldtse closed 6 years ago

ronaldtse commented 6 years ago

"Terms" section HTML is not compliant -- we need to change them to actual sections instead of thing like <p class=TermNum>. They should be tagged and styled just like normal sections.

Was seen here: https://github.com/riboseinc/gbdoc-style/pull/3

May need to be fixed in asciidoctor-iso too.

opoudjis commented 6 years ago

What do you mean by "actual sections"? <div>?

ronaldtse commented 6 years ago

Right now the sections are generated into HTML like this:

  <p class="Terms">&#x7B97;&#x6CD5;&#x6807;&#x8BC6; algorithm identifier</p> 
  <p id="_631032ae-0ba9-4d5f-8b16-b90825d5c140">&#x7528;&#x4E8E;&#x6807;&#x660E;&#x7B97;&#x6CD5;&#x673A;&#x5236;&#x7684;&#x6570;&#x5B57;&#x5316;&#x4FE1;&#x606F;</p>

However, normal sections are like this:

  <h2 id="5f7fa4af-6da3-40d4-b7bf-97f88ddc4f25">6.1. SM2&#x79C1;&#x94A5;</h2>
  <p id="_fac04e6f-324e-41f7-b951-8c1fad1c4b90">SM2&#x79C1;&#x94A5;&#x662F;&#x4E00;&#x4E2A;&#x5927;&#x4E8E;&#x7B49;&#x4E8E; <tt>1</tt> &#x4E14;&#x5C0F;&#x4E8E; <tt>n-1</tt> &#x7684;&#x6574;&#x6570;&#xFF08; <tt>n</tt> &#x4E3A;SM2&#x7B97;&#x6CD5;&#x7684;&#x9636;&#xFF0C;&#x5176;&#x503C;&#x53C2;&#x89C1;

We want to apply the same styling to both, right?

opoudjis commented 6 years ago

Only in HTML output, not in Word output: need to keep para there to prevent terms from being indexed in ToC. Will need to skip h2 class=Terms in compiling ToC. Applies to isodoc.

opoudjis commented 6 years ago

Merge into https://github.com/riboseinc/isodoc/issues/50