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

plateau: ordered list in PDF being rendered differently in viewer #41

Open
ReesePlews opened this issue Feb 1, 2025 · 8 comments
Open
Labels
bug Something isn't working feedback plateau MLIT Plateau Project

Comments

@ReesePlews
Copy link

in Plateau doc02 (sources/002-v5) an ordered list in the PDF is rendering as a) b) c) is being rendered in the viewer as 1) 2) 3)

correctly ordered list from the PDF

Image

the same ordered list in the viewer

Image

@ReesePlews ReesePlews added the bug Something isn't working label Feb 1, 2025
@ronaldtse
Copy link
Contributor

Plateau follows JIS list item labeling. The PDF is correct here.

@ReesePlews
Copy link
Author

ReesePlews commented Feb 1, 2025

thanks @ronaldtse;

additionally this main issue also occurs in the viewer version of Plateau doc01 (sources/001-v5)

@ronaldtse
Copy link
Contributor

ronaldtse commented Feb 1, 2025

The issue is programmatic so both documents will exhibit the same behavior.

I believe the best way to handle is have the list label progression definition embedded in the XML source as presentational elements. Ping @opoudjis

@ronaldtse
Copy link
Contributor

Ping @opoudjis to ensure that list labels are included inside MN XML.

@opoudjis
Copy link

Ping @opoudjis to ensure that list labels are included inside MN XML.

They already are.

== Scope

. A
. B
.. C

generates in Presentation XML:

<ol id="_c13d3d7e-6fc6-5aa6-f368-0d81b8c7d1ee" type="alphabet"><li id="_901e8405-d465-420b-bdfb-8727f0997d12" label="a"><p id="_b09dbe9c-3b42-c169-a87c-f4aec97a79ec">A</p>
</li>
<li id="_64dfe52a-081c-4906-b2d2-a35ed939f36b" label="b"><p id="_3998aee2-a32d-aca5-5fd3-4f39c4eb22ab">B</p>
<ol id="_ca89636b-d2f4-a3de-0021-c32d7dc82844" type="arabic"><li id="_40a2f481-930b-4dc4-85f9-13c2850706fa" label="1"><p id="_16a81ca9-25c3-0794-9c32-c056592d6c63">C</p>
</li>
</ol>
</li>
</ol>

Note the li/@label attribute.

@ronaldtse
Copy link
Contributor

@opoudjis there is type="alphabet" and label="b" but is the result b) or b.? This is unclear.

@opoudjis
Copy link

As metanorma/metanorma-iso#319 https://github.com/metanorma/metanorma-iso/blob/main/lib/isodoc/iso/html/style-iso.scss will show, changing the rendering in HTML of a ordered list label is convoluted.

The only way this is going to be realisable at all is by providing a separate value for the rendering template: the label needs to be kept alone as a value, which would be the input into any CSS counter, and then styled by the template:

ol[class="roman"] > li::before {
  counter-increment: roman;
  content: counter(roman, lower-roman)") "
}

The CSS would need to be content: %), with % replaced by the counter value derived from label: b.

I will add a label-template attribute to ol/li, which by default will be "%." and in this instance will be "%)".

@ronaldtse
Copy link
Contributor

Thanks @opoudjis. An additional question: would it be better if we can declare the list styling definitions governing the entire document, and referring to them with names?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feedback plateau MLIT Plateau Project
Projects
None yet
Development

No branches or pull requests

3 participants