Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF layout check: ISO/DIS 19135:2024 (check is for general layout and DIS) #1259

Open
ronaldtse opened this issue Dec 11, 2024 · 11 comments
Open
Assignees

Comments

@ronaldtse
Copy link
Contributor

ISO/DIS 19135:2024 has been published and we need to do a layout check for both the English and French version:

Source:

ISO PDFs:

There are some features we need to supplement in ISO:

  • "ISO-CEN Parallel Processing"
Screenshot 2024-12-11 at 9 45 48 PM
@github-project-automation github-project-automation bot moved this to 🆕 New in Metanorma Dec 11, 2024
@ronaldtse ronaldtse moved this from 🆕 New to 🏔 High priority in Metanorma Dec 11, 2024
@Intelligent2013
Copy link
Contributor

There are some features we need to supplement in ISO:

  • "ISO-CEN Parallel Processing"

The similar ticket is metanorma/mn-native-pdf#119.

@opoudjis could you add the document attribute :iso-cen-parallel: and these localized strings?

  • en: ISO/CEN PARALLEL PROCESSING
  • fr: TRAITEMENT PARALLÈLE ISO/CEN

@Intelligent2013
Copy link
Contributor

I've added document_2024.adoc with additional document attributes in https://github.com/metanorma/iso-19135/pull/73.

docidentifier type="iso-with-lang" doesn't contain the language:

<docidentifier type="ISO" primary="true">ISO/DIS 19135</docidentifier>
<docidentifier type="iso-reference">ISO/DIS 19135:2024(E)</docidentifier>
<docidentifier type="URN">urn:iso:std:iso:19135:stage-40.00:en</docidentifier>
<docidentifier type="iso-undated">ISO/DIS 19135</docidentifier>
<docidentifier type="iso-with-lang">ISO/DIS 19135(en)</docidentifier>
<docidentifier type="iso-tc">XXX</docidentifier>

I don't understand the reason.

Rendered PDF:
image

Original PDF:
image

opoudjis added a commit that referenced this issue Dec 24, 2024
@opoudjis
Copy link
Contributor

There are some features we need to supplement in ISO:

  • "ISO-CEN Parallel Processing"

The similar ticket is metanorma/mn-native-pdf#119.

@opoudjis could you add the document attribute :iso-cen-parallel: and these localized strings?

  • en: ISO/CEN PARALLEL PROCESSING
  • fr: TRAITEMENT PARALLÈLE ISO/CEN

Done:

    <bibdata>
        <ext>
          <iso-cen-parallel>true</iso-cen-parallel>
        </ext>
      </bibdata>

opoudjis added a commit to metanorma/metanorma.org that referenced this issue Dec 24, 2024
@opoudjis
Copy link
Contributor

@Intelligent2013 :

I've added document_2024.adoc with additional document attributes in metanorma/iso-19135#73.

docidentifier type="iso-with-lang" doesn't contain the language:

<docidentifier type="ISO" primary="true">ISO/DIS 19135</docidentifier>
<docidentifier type="iso-reference">ISO/DIS 19135:2024(E)</docidentifier>
<docidentifier type="URN">urn:iso:std:iso:19135:stage-40.00:en</docidentifier>
<docidentifier type="iso-undated">ISO/DIS 19135</docidentifier>
<docidentifier type="iso-with-lang">ISO/DIS 19135(en)</docidentifier>
<docidentifier type="iso-tc">XXX</docidentifier>

I don't understand the reason.

Rendered PDF: image

Original PDF: image

You mean, it doesn't contain the year.

That is intentional behaviour, and I'm confused why the metadata is the way it is.

If a document is indicated to be a draft, then there is no applicable publication year, and the year is deleted from the identifier. I consider this to be correct behaviour, and will not be removing it without explicit instruction to from ISO.

Your document has :docstage: 40. That's why the year is being removed, and if anything it should be being stripped from all docidentifier instances. Remove that document identifier (so that :docstage: reverts to 60), and the year reappears in the iso-with-lang docidentifier.

@Intelligent2013
Copy link
Contributor

Gemfile:

source "https://rubygems.org"

gem "metanorma-cli"
gem "metanorma-iso", git: "https://github.com/metanorma/metanorma-iso", branch: "main"

The command bundle exec metanorma -t iso -x presentation document_2024.adoc fails:

...
Style: (ID _701e4485-e384-3fee-f565-e079239a00db): may contain ambiguous provision: If approved to retire, do we need to contact the source that originally proposed this entry?
Style: (ID _misccontainer_anchor_aliases): Table should have title
Fatal Error: uninitialized constant Metanorma::Standoc::Validate::Iev

        @iev = Iev::Db.new(@iev_globalname, @iev_localname) unless @no_isobib
               ^^^
Did you mean?  Metanorma::Iec
               IEV
C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-standoc-2.10.4/lib/metanorma/standoc/validate_term.rb:10:in `init_iev': uninitialized constant Metanorma::Standoc::Validate::Iev (NameError)

        @iev = Iev::Db.new(@iev_globalname, @iev_localname) unless @no_isobib
               ^^^
Did you mean?  Metanorma::Iec
               IEV
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-standoc-2.10.4/lib/metanorma/standoc/validate_term.rb:15:in `iev_validate'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-standoc-2.10.4/lib/metanorma/standoc/validate.rb:20:in `content_validate'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/bundler/gems/metanorma-iso-138a1aa0fa69/lib/metanorma/iso/validate.rb:162:in `content_validate'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/bundler/gems/metanorma-iso-138a1aa0fa69/lib/metanorma/iso/validate.rb:197:in `validate'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-standoc-2.10.4/lib/metanorma/standoc/base.rb:101:in `makexml'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-standoc-2.10.4/lib/metanorma/standoc/base.rb:43:in `document1'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-standoc-2.10.4/lib/metanorma/standoc/base.rb:32:in `document'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-standoc-2.10.4/lib/metanorma/standoc/utils.rb:13:in `convert'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/asciidoctor-2.0.23/lib/asciidoctor/document.rb:956:in `convert'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/asciidoctor-2.0.23/lib/asciidoctor/convert.rb:120:in `convert'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-2.0.10/lib/metanorma/input/asciidoc.rb:13:in `process'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-2.0.10/lib/metanorma/processor/processor.rb:21:in `input_to_isodoc'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-2.0.10/lib/metanorma/compile/compile.rb:73:in `process_input_adoc'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-2.0.10/lib/metanorma/compile/compile.rb:55:in `process_input'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-2.0.10/lib/metanorma/compile/compile.rb:31:in `compile'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-cli-1.11.3/lib/metanorma/cli/compiler.rb:45:in `compile_file'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-cli-1.11.3/lib/metanorma/cli/compiler.rb:30:in `compile'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-cli-1.11.3/lib/metanorma/cli/compiler.rb:35:in `compile'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-cli-1.11.3/lib/metanorma/cli/command.rb:272:in `compile_document'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-cli-1.11.3/lib/metanorma/cli/command.rb:62:in `block in compile'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-cli-1.11.3/lib/metanorma/cli/command.rb:62:in `each'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-cli-1.11.3/lib/metanorma/cli/command.rb:62:in `compile'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/thor-1.3.2/lib/thor/command.rb:28:in `run'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/thor-hollaback-0.2.1/lib/thor/hollaback.rb:68:in `run'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/thor-1.3.2/lib/thor/invocation.rb:127:in `invoke_command'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/thor-1.3.2/lib/thor.rb:538:in `dispatch'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/thor-1.3.2/lib/thor/base.rb:584:in `start'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-cli-1.11.3/lib/metanorma/cli.rb:34:in `start'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-cli-1.11.3/exe/metanorma:25:in `block in <top (required)>'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/metanorma-cli-1.11.3/exe/metanorma:43:in `<top (required)>'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/bin/metanorma:25:in `load'
        from C:/tools/ruby31/lib/ruby/gems/3.1.0/bin/metanorma:25:in `<main>'

@Intelligent2013
Copy link
Contributor

I've added the separate issue.

Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Dec 25, 2024
@Intelligent2013
Copy link
Contributor

Done:

    <bibdata>
        <ext>
          <iso-cen-parallel>true</iso-cen-parallel>
        </ext>
      </bibdata>

@opoudjis thank you!
ISO XSLT updated.

You mean, it doesn't contain the year.

@opoudjis yes, I mean the 'year'.
I'm confused a bit. Currently, for the latest layout '2024' (document-scheme is 2024) I get the Reference number from <docidentifier type="iso-with-lang">ISO/DIS 19135(en)</docidentifier>. Also, there is <docidentifier type="iso-reference">ISO/DIS 19135:2024(E)</docidentifier>, but language is one letter value E, therefore I use docidentifier type="iso-with-lang".

My goal in this ticket is updating ISO XSLT to render the PDF identical to the original PDF:
https://github.com/metanorma/mn-samples-iso-private/tree/main/reference-docs/ISO_DIS_19135_2024.
The original PDF has stage:
image

and the Reference number with /DIS and year:
image

Is there a way to achieve such data via the document attributes?
Or this source ISO PDF document is wrong?

@Intelligent2013
Copy link
Contributor

Intelligent2013 commented Dec 27, 2024

The French rendered PDF has English stage name:
image
Original PDF:
image

ISO XSLT reads this value from /iso-standard/bibdata/ext/stagename:

<stagename abbreviation="DIS">Draft International Standard</stagename>

but need to read from /iso-standard/bibdata/status/stage:

<stage abbreviation="DIS" language="fr">Brouillon de la norme internationale</stage>

but in any base there is a difference between the original title PROJET Norme internationale and from the localized string Brouillon de la norme internationale.

Also there are differences between voting dates titles:

  • original PDF:
    image

  • rendered PDF:
    image

Currently, the draft comments is the hard-coded text in ISO XSLT and only English version is present.
image

image

We need to add them as localized strings in the metanorma-iso.
I'll add the tickets to track the issues separaterely.

@Intelligent2013
Copy link
Contributor

Original PDF:

  • cover page
    image

  • main section 1st page contains de after PROJET:
    image

Is it feature of French layout and do we need to support both titles?

Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Dec 27, 2024
@ronaldtse
Copy link
Contributor Author

ronaldtse commented Dec 30, 2024

@opoudjis the following statement is untrue.

If a document is indicated to be a draft, then there is no applicable publication year, and the year is deleted from the identifier. I consider this to be correct behaviour, and will not be removing it without explicit instruction to from ISO.

All ISO and IEC deliverable drafts have year in their identifier.

@ronaldtse
Copy link
Contributor Author

Basically, the “with year” (dated) and “without year” (undated) identifiers should always be provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🏔 High priority
Development

No branches or pull requests

3 participants