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

Nested assets error #159

Closed
opoudjis opened this issue Dec 30, 2022 · 2 comments
Closed

Nested assets error #159

opoudjis opened this issue Dec 30, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@opoudjis
Copy link
Contributor

opoudjis commented Dec 30, 2022

And this triggers a cross-reference error:

There is a crossreference to an instance of formula nested within note:  target="eq6-8"
@ronaldtse
Copy link
Contributor

Today:

Syntax: (XML Line 000682): There is an instance of table nested within example
Syntax: (XML Line 000722): There is an instance of table nested within example
Syntax: (XML Line 000762): There is an instance of table nested within example

@opoudjis
Copy link
Contributor Author

The original warning:

There is a crossreference to an instance of formula nested within note: target="eq6-8"

is no longer raised: we allow notes to contain anything, including formulas. Formula referencing is either by clause or consecutive in the document; formulas being embedded within notes, or indeed anything else, are no longer considered a problem.

The warning is now only issued for any instances of example | figure | note | termnote | termexample | table, containing example | figure | table (except for figure/figure). I consider that warning warranted: examples containing examples, and tables containing tables, are unusual enough that they should be warned about, and their numbering may be surprising. (We have not modelled subexamples or subtables like we have subfigures). It is not at all clear that tables contained within examples should be numbered at all.

As the warning log also indicates, right now Metanorma does not know how to crossreference example/table. That's current implementation: if a table is embedded within a numbered asset (example/table, figure/table, note/table), it is not assigned a label or a cross-reference by design. I used to do that with embedded figures as well.

I'm going to relax that last constraint, because I think it is overly presumptuous, as found in metanorma/metanorma-standoc#719 . If people want to embed tables and examples, they should be allowed to cross-reference them. They have already been warned about them. If they are surprised that an embedded table ends up labelled, they can use %unnumbered on the table.

opoudjis added a commit to metanorma/isodoc that referenced this issue Sep 25, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Metanorma Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants