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

Mark up Presentation content in Presentation XML #611

Closed
opoudjis opened this issue Oct 30, 2024 · 2 comments
Closed

Mark up Presentation content in Presentation XML #611

opoudjis opened this issue Oct 30, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@opoudjis
Copy link
Contributor

Presentation XML introduces presentation-specific content—such as autonumbers and delimiters—which we may (may) in future want to identify and render differentially in different renderers. To that end, we will tag the content we introduce; renderers will just pass through the contents of those tags.

This resolves the (phantom) issue introduced in metanorma/metanorma-ogc#472

So whereas right now we convert Semantic XML

<clause id="A"><title>Scope</title>....

to

<clause id="A"><title>1.<tab/>Scope</title>....

We will in future mark this up as

<clause id="A"><title><autonumber>1</autonumber><autonumber-delimiter>.<tab/></autonumber-delimiter>Scope</title>....

Where renderers will almost always (currently: always) render autonumber and autonumber-delimiter as the contents thereof.

@opoudjis
Copy link
Contributor Author

opoudjis commented Nov 4, 2024

From Ronald:

<termnote id="_" keep-with-next="true" keep-lines-together="true">
                <name>Note 1 to entry:</name>
                 <p id="_">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
               </termnote>

I find it a bit strange that "name" is mixed with "p" and assumed to flow as spans. The element name "name" probably works better with something like "content" or "description".

Also, by moving the colon inside "name", it is now conflating the "name of the note" with a delimiter. Cross references or an index that link to this note will not use the delimiter.

The name is an inherited semantic tag, for the caption of the block. There will be no refactoring of Semantic XML in addition to the refactoring of the Presentation XML

The way to address the concern about separating captions, numbers, and delimiters, is going to be by introducing a separate fmt-name caption element, giving the presentation form of the caption, with its contents semantically annotated:

Semantic XML:

<note id="_" keep-with-next="true" keep-lines-together="true">
     <name>Concerning waxy rice</name>
     <p id="_">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
 </note>

Presentation XML:

<note id="_" keep-with-next="true" keep-lines-together="true">
     <autonum>3.1</autonum>
     <name>Concerning waxy rice</name>
     <fmt-name><span class="autonum">3.1</span><span class="autonum-delim">:</span> 
         <span class="name">Concerning waxy rice</span></fmt-name>
     <p id="_">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
 </note>

@github-project-automation github-project-automation bot moved this to 🆕 New in Metanorma Nov 8, 2024
@opoudjis
Copy link
Contributor Author

opoudjis commented Nov 8, 2024

Merging into #610

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
Status: Done
Development

No branches or pull requests

1 participant