metanorma / metanorma-iso

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

(URGENT) ISO 10303-52: Figure within EXAMPLE is missing "Figure nn" caption #603

Closed ronaldtse closed 2 years ago

ronaldtse commented 2 years ago

This is from ISO 10303-52:

[example]
====
<<fig21>> illustrates a 1-to-1 abutting interface, also referred to as matching or C0 continuous. The interface is a plane of vertices that are physically coincident (i.e., they have identical coordinate values) between the adjacent meshes; mesh-coordinate lines perpendicular to the interface are continuous from one mesh to the next. In 3-D, a 1-to-1 abutting interface is always a logically rectangular region.

[[fig21]]
.A 1-to-1 abutting interface
image::fig21.png[]
====

This is counted as "Figure 21" internally -- Figure 20 is present, and the next numbered figure is Figure 22.

Screenshot 2022-04-02 at 11 57 00 AM

However, it is not rendered as such.

This is the original:

Screenshot 2022-04-02 at 11 57 59 AM

Compare:

image
opoudjis commented 2 years ago

I have a good reason for not captioning figures embedded inside of other things—if you're referencing this from outside, you're actually referencing the example and not the figure. We did originally allow captioning of figures within tables, and it was a horror film (and did not correspond to desired markup).

I could make a rule that figures can be captioned numbered within tables and not figures, but frankly I'd rather use a %numbered vs %unnumbered option, and a rule: figures embedded within other assets are by default unnumbered, unembedded figures by default are numbered, and you override that with %unnumbered (already implemented) or %numbered.

And no, we're not going to get coherent guidance from SDOs on this, and I'm reasonably sure they'll be inconsistent anyway.

@ronaldtse?

ronaldtse commented 2 years ago

The real problem here is logical inconsistency with the missing number of "Figure 21". This is the same issue we encountered at OGC. If the system "numbers" every figure but hides it in the caption titles, a reader has no way of referring to the Figure.

Logically, if we take the typical behavior of NOTEs in a clause, the NOTE is numbered according to the clause itself, not taking into the location hierarchy of the NOTE itself (e.g. NOTE in the clause or a NOTE within a list item in the clause).

Similarly, a Figure is numbered in an ISO document with a scope of the document itself, i.e. the location of the Figure in the content hierarchy (e.g. in a Table or in an Example) is not relevant to its title captioning.

If we wanted to hide the Figure caption, %unnumbered should then be used, but by default the Figure reference in the caption should be shown.

opoudjis commented 2 years ago

If we wanted to hide the Figure caption, %unnumbered should then be used, but by default the Figure reference in the caption should be shown.

I think this is going to be disastrous, but I'll be very happy to point the finger when it does. OK then, numbering embedded figures unless they are explicitly unnumbered, and including the numbering in captions.

ronaldtse commented 2 years ago

Generated using 11fe74b

HTML: Screenshot 2022-04-14 at 12 58 16 AM

PDF:

Screenshot 2022-04-14 at 12 58 30 AM

The caption "Figure 21" is still missing from the figure...

For reference, the unnumbered attribute is not used.

[example]
====
<<fig21>> illustrates a 1-to-1 abutting interface, also referred to as matching or C0 continuous. 
The interface is a plane of vertices that are physically coincident (i.e., they have identical coordinate values) 
between the adjacent meshes; mesh-coordinate lines perpendicular to the interface are continuous from 
one mesh to the next. In 3-D, a 1-to-1 abutting interface is always a logically rectangular region.

[[fig21]]
.A 1-to-1 abutting interface
image::fig21.png[]
====
opoudjis commented 2 years ago

Needed to remove inherited instances in metanorma-iso

ronaldtse commented 2 years ago

Confirm fixed. Thanks!

image