metanorma / metanorma-iso

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

Add boldfaced "Key" title in the table footer when `%key` is used #1162

Closed anermina closed 3 months ago

anermina commented 3 months ago

According to ISO's guidelines given in https://github.com/metanorma/mn-samples-iso/issues/96#issuecomment-2067627510 regarding the key element in the table footer, the key section should be preceded by a “Key” title in bold, as shown in the example below.

IMG_4572

Currently, Metanorma generates the key section as below image when the following markup is used.

NOTE: Ce tableau est basé sur l'<<ISO7301,table=1>>.

NOTE: Certains contrats commerciaux peuvent exiger des complémentaires à celles fournies dans le présent tableau.

NOTE: Seul le riz (cargo) rouge entièrement décortiqué est pris en considération dans le présent tableau.

[%key]
N/A:: N'est pas applicable.
opoudjis commented 3 months ago

To move table key around properly in Word postprocessing, which is not currently happening, need to wrap it in div[@class = 'figdl'], treating it the same as figure keys are already being treated.

opoudjis commented 3 months ago

I'm marking up this key title as the title of a definition list, which is ListTitle; but ListTitle is centered, and this Key title is not. Ugh. Will override in postprocessing for definition list titles which are table keys.

opoudjis commented 3 months ago

Need to keep definition list, preceding title paragraph and following notes together in a div in rendering in HTML and DOC output, since they are going to be treated as a unit.

opoudjis commented 3 months ago

Will finish tomorrow

opoudjis commented 2 months ago

Extend the wrapping in div to ol and ul. Disruptive change, but future-proofs list rendering.