metanorma / metanorma-iso

Metanorma processor for ISO standards
BSD 2-Clause "Simplified" License
13 stars 5 forks source link

'Terms and definitions' predefined text position #1161

Closed Intelligent2013 closed 3 months ago

Intelligent2013 commented 3 months ago

Source issue: https://github.com/metanorma/stepmod2mn/issues/145#issuecomment-2069322655

Is there a way to display text For the purposes of this document, the terms and definitions given in ... under the sub-clause title Terms and definitions, but not under the top-level clause Terms, definitions and abbreviated terms? For instance, so: image

For adoc:


[[defns]]
[source=ISO_10303_2]
== Terms, definitions and abbreviated terms

[[termsdefns]]
=== Terms and definitions

[[abbrv]]
=== Abbreviated terms

For the purposes of this document, the following abbreviated terms apply:

URL:: uniform resource locator
DAG:: Directed Acyclic Graph
pos:: person organization schema
SI:: International System of Units

the presentation XML contains the sentences For the purposes of this document, the terms and definitions given in, but under the top clause:

<terms displayorder="7" id="defns" obligation="normative">
    <title depth="1">3
            <tab/>Terms, definitions and abbreviated terms</title>
    <p id="_">For the purposes of this document, the terms and definitions given in 
            <xref target="ISO_10303_2">ISO&#160;10303-2</xref>apply.</p>
    <p id="_">ISO and IEC maintain terminology databases for use in standardization at the following addresses:</p>
    <ul id="_">
        <li>
            <p id="_">ISO Online browsing platform: available at 
                    <link target="https://www.iso.org/obp"/>
            </p>
        </li>
        <li>
            <p id="_">IEC Electropedia: available at 
                    <link target="https://www.electropedia.org"/>
            </p>
        </li>
    </ul>
    <clause id="termsdefns" inline-header="false" obligation="normative">
        <title depth="2">3.1
                <tab/>Terms and definitions</title>
    </clause>
    <definitions id="abbrv" obligation="normative" type="abbreviated_terms">
        <title depth="2">3.2
                <tab/>Abbreviated terms</title>
        <p id="_">For the purposes of this document, the following abbreviated terms apply:</p>
        <dl id="_">
            <dt id="symbol-DAG">DAG</dt>
            <dd>
                <p id="_">Directed Acyclic Graph</p>
            </dd>
...

In the ISO/IEC DIRECTIVES, PART 2 (https://www.iso.org/sites/directives/current/part2/index.xhtml#_idTextAnchor218) there is a note: NOTE The introductory text is not a hanging paragraph (see [22.3.3](https://www.iso.org/sites/directives/current/part2/index.xhtml#_idTextAnchor319)), as the Terms and definitions clause consists of a list of terminological entries and not subclauses.

But I don't understand clearly what does mean is not a hanging paragraph - it's requirement or statement for concrete example...

Thanks.

Intelligent2013 commented 3 months ago

Update. As soon I've put the empty term ==== {blank} under === Terms and definitions:

[[defns]]
[source=ISO_10303_2]
== Terms, definitions and abbreviated terms

[[termsdefns]]
=== Terms and definitions

==== {blank}

[[abbrv]]
=== Abbreviated terms

For the purposes of this document, the following abbreviated terms apply:

URL:: uniform resource locator
DAG:: Directed Acyclic Graph
pos:: person organization schema
SI:: International System of Units

the phrase moved down under the sub-clause (as expected), but with the additional and the following apply. (due the fake empty term):

        <clause id="defns" obligation="normative" displayorder="7">
            <title depth="1">3<tab/>Terms, definitions and abbreviated terms</title>
            <terms id="termsdefns" obligation="normative">
                <title depth="2">3.1<tab/>Terms and definitions</title>
                <p id="_7f1da98a-aa15-b4b9-7db9-176a7b1d0838">For the purposes of this document, the terms and definitions 
  given in <xref target="ISO_10303_2">ISO 10303-2</xref> and the following apply.</p>
                <p id="_ee05ad85-2825-0de5-9af6-9c572745d6ed">ISO and IEC maintain terminology databases for use in
standardization at the following addresses:</p>
                <ul id="_adc299fe-e3c6-349d-5c7c-5b99b4880d68">
                    <li>
                        <p id="_cf4d0e14-36bd-33e2-1550-06ca6a7e471b">ISO Online browsing platform: available at
  <link target="https://www.iso.org/obp"/>
                        </p>
                    </li>
                    <li>
                        <p id="_50a1fff2-2f9c-c37f-faf3-f7a923f6ad0e">IEC Electropedia: available at
<link target="https://www.electropedia.org"/>
                        </p>
                    </li>
                </ul>
                <term id="term-">
                    <name>3.1.1</name>
                    <preferred>
                        <strong/>
                    </preferred>
                </term>
            </terms>
            <definitions id="abbrv" type="abbreviated_terms" obligation="normative">
opoudjis commented 3 months ago

But I don't understand clearly what does mean is not a hanging paragraph - it's requirement or statement for concrete example...

A hanging paragraph is a paragraph that is not assigned to a subclause; e.g.

== Clause

Hanging Paragraph

=== Subclause

This is normally considered an error: all paragraphs need to be contained within a leaf node clause, for the purposes of referencing. ISO is saying that terms collections are not subject to that condition, because they are not considered by ISO to be clauses.

I see why this is happening: because there are no terms there under the terms clause, Metanorma refuses to believe that this really is a terms clause, to put the boilerplate under. You've mitigated that by inserting a blank term, but that misleads Metanorma about how many terms are there.

The other way to force the issue is to use the heading= attribute, to tell Metanorma explicitly not to second guess what the clause type is:

[[defns]]
[source=ISO_10303_2]
== Terms, definitions and abbreviated terms

[[termsdefns]]
[heading=terms and definitions]
=== Terms and definitions

[[abbrv]]
=== Abbreviated terms

For the purposes of this document, the following abbreviated terms apply:

URL:: uniform resource locator
DAG:: Directed Acyclic Graph
pos:: person organization schema
SI:: International System of Units

The [heading=terms and definitions] tells Metanorma that, despite not containing any terms, this really is a terms clause.

Intelligent2013 commented 3 months ago

@opoudjis thank you!