pdf-association / pdf-issues

Industry-based resolutions for issues and errata reported against any PDF-related specification
https://pdf-issues.pdfa.org/
66 stars 2 forks source link

/Link allows /Formula as a child, but /Reference does not. #488

Open faceless2 opened 3 weeks ago

faceless2 commented 3 weeks ago

A recent MathML examples from David had this sample

<math>
  <mfrac>
    <mrow id="numerator">
      <mi>x</mi><mo>+</mo>
      <mtext style="display:inline">
        <b>bold </b> <a href="#denominator">link to <math><mi>x</mi></math></a>
      </mtext>
    </mrow>
    <mrow id="denominator">
      <mi>y</mi><mo>+</mo>
      <mtext style="display:inline">
        <i>italic </i> <a href="#numerator">link to <math><mi>y</mi></math></a>
      </mtext>
    </mrow>
  </mfrac>
</math>

When converting to PDF/UA-2 the <a href='#denominator'> is tagged using a /Reference, because in PDF/UA-2 9.2.5.20:

the Reference structure type should be used for intra-document targets

However this leads to invalid content because /Formula is not a valid child of /Reference according to ISO32005.

It is a valid child in /Link, which means - according to the above suggestion - if the href had not been an intra-document target, it would have been valid. /Reference can also contain /Figure.

I'm pretty sure this isn't intentional. Suggestion: Add /Formula as an allowed child of /Reference

u-fischer commented 3 weeks ago

shouldn't the title say Formula instead of Figure?

faceless2 commented 3 weeks ago

@u-fischer Thank you, fixed.

mrbhardy commented 3 weeks ago

Proposed Solution: Resolve the Reference child relationships to match Link (Matthew to check if there's anything that would not make sense). Reuse TWG agrees.

32005