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

Support unit statements for figures and tables #688

Closed
Intelligent2013 opened this issue Oct 10, 2022 · 16 comments
Closed

Support unit statements for figures and tables #688

Intelligent2013 opened this issue Oct 10, 2022 · 16 comments
Assignees
Labels
enhancement New feature or request

Comments

@Intelligent2013
Copy link
Contributor

Source issues: metanorma/mnconvert#224, metanorma/mnconvert#228.

ISO and IEC documents may contain the text describing the units used in the tables and figures (unit statements).

From Guidelines for coding IEC and ISO standards in NISOSTS.pdf

  • for figures (from 8.4 Unit statements in figures):

When a figure contains a unit statement such as “Dimensions in millimetres”, this is coded as as <p> with @content-type=”dimension”.
image

  • for tables (from 6.6.5 General unit statements in tables)

When a table contains text describing the units used in the table it is captured as <p> with @content-type=”dimension” in <table-wrap-foot>.
For example:
image
is coded as (NISO STS XML):

</table>
<table-wrap-foot>
<p content-type="Dimension" specific-use="100">Mass fractions in per cent</p>
</table-wrap-foot>
</table-wrap>

Also, this feature is using in BSI documents. For instance, https://github.com/metanorma/mn-samples-bsi/blob/main/reference-docs/standards/bs-9999/BS%209999.pdf, page 90:
image

This needs to be supported by metanorma-standoc.

@Intelligent2013 Intelligent2013 added the enhancement New feature or request label Oct 10, 2022
@Intelligent2013 Intelligent2013 moved this to 🆕 New in Metanorma Oct 10, 2022
@ronaldtse
Copy link
Contributor

This issue is also mentioned here: metanorma/metanorma-iso#754

@opoudjis
Copy link
Contributor

We allow a type attribute on paragraphs:

[type="dimension"]
Blah blah

I'm not going to put in numerical values into attributes on an adhoc basis. We need a global solution for RDF microformatting of Metanorma documents, in line with Smart documents, and that is the only context I will insert numeric values with.

Does @type address your need?

@ronaldtse
Copy link
Contributor

@opoudjis look at metanorma/metanorma-iso#754 please.

@opoudjis
Copy link
Contributor

This is not a key, and in the first figure, it occurs alongside the key.

Instead, this is some sort of bizarre extraneous note to a table or figure, which is idiosyncratically rendered.

So, the solution to this is:

[NOTE,type=units]
Dimension in millimeters

I'll implement that.

@opoudjis opoudjis self-assigned this Oct 11, 2022
@opoudjis opoudjis moved this from 🆕 New to 🏔 High priority in Metanorma Oct 11, 2022
@ronaldtse
Copy link
Contributor

@opoudjis as @Intelligent2013 alluded to -- should we consider this not as a note but as a secondary caption?

@opoudjis
Copy link
Contributor

opoudjis commented Feb 8, 2023

... We haven't defined secondary captions, and that seems an unnecessary complication to the model.

@ronaldtse
Copy link
Contributor

OK I'm happy with NOTE=units.

@opoudjis opoudjis moved this from 🏔 High priority to 🏗 In progress in Metanorma Feb 9, 2023
@opoudjis
Copy link
Contributor

Stop requirement that notes at the end of a clause must not fold into a preceding block; it is bogus, and "keep-separate" attribute takes care of such notes if needed.

@opoudjis
Copy link
Contributor

Units notes need to not be numbered.

opoudjis added a commit to metanorma/isodoc that referenced this issue Feb 16, 2023
opoudjis added a commit to metanorma/isodoc that referenced this issue Feb 16, 2023
opoudjis added a commit to metanorma/isodoc that referenced this issue Feb 16, 2023
opoudjis added a commit to metanorma/metanorma-iso that referenced this issue Feb 16, 2023
opoudjis added a commit to metanorma/metanorma-iso that referenced this issue Feb 16, 2023
@opoudjis
Copy link
Contributor

Requires isodoc refactoring in main branch.

opoudjis added a commit to metanorma/metanorma-iso that referenced this issue Feb 16, 2023
@opoudjis
Copy link
Contributor

@Intelligent2013 Please confirm this is working for you. You should also pull metanorma-standoc, to ensure that notes at the end of a clause are processed correctly.

@Intelligent2013
Copy link
Contributor Author

@opoudjis confirmed. But there is the issue with note numbering (see NOTE 2 at bottom):

image

Units notes need to not be numbered.

but non units notes should be numbered without units notes counter.

@ronaldtse
Copy link
Contributor

This is back to @opoudjis : the first figure NOTE is now called "NOTE 2" due to presence of unit note.

@opoudjis opoudjis moved this from 👀 In review to 🏗 In progress in Metanorma Feb 25, 2023
@opoudjis
Copy link
Contributor

Needing to fix the counting of notes when units and other skippable notes are present.

@opoudjis
Copy link
Contributor

Should be fixed, please review.

@Intelligent2013
Copy link
Contributor Author

Confirmed:
image

@opoudjis thank you!

@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Metanorma Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

3 participants