Knowl for xref to mrow

13 views
Skip to first unread message

Jeremy Sylvestre

unread,
Jan 28, 2026, 2:02:49 PM (13 days ago) Jan 28
to PreTeXt development
Not sure if this is intended behaviour, but if you have

md
  mrow
  mrow @number="yes" @xml:id="..."

and then subsequently create an xref to that mrow, in HTML output the knowl for the xref contains the entire md rather than just the single line contained in the referenced mrow.

Minimal example here:

Cheers,
Jeremy S

Rob Beezer

unread,
Jan 28, 2026, 3:58:10 PM (12 days ago) Jan 28
to prete...@googlegroups.com
The clickable should have the right number and it is intended behavior to show the whole display in the knowl.

Rob Beezer

unread,
Jan 28, 2026, 4:09:25 PM (12 days ago) Jan 28
to prete...@googlegroups.com
Would it be better if the knowl content somehow indicated which #mrow/number was being referenced? Maybe in a title placed in the knowl content, or as some visual (accessible) indicator on the #mrow or it's number?

Jeremy Sylvestre

unread,
Jan 28, 2026, 4:18:48 PM (12 days ago) Jan 28
to prete...@googlegroups.com
On Wed, 28 Jan 2026 at 14:09, 'Rob Beezer' via PreTeXt development <prete...@googlegroups.com> wrote:
Would it be better if the knowl content somehow indicated which #mrow/number was being referenced?  Maybe in a title placed in the knowl content, or as some visual (accessible) indicator on the #mrow or it's number?

That would be nice. My first instinct would be to have the visual indicator on the whole mrow, but (depending on how it is done) that is likely not appropriate in all cases, similarly to the reasoning (I'm guessing) behind the choice to display the entire md in the knowl in the first place ... ?

So maybe just on the number/tag ?  Not sure...


Rob Beezer

unread,
Jan 28, 2026, 4:24:01 PM (12 days ago) Jan 28
to prete...@googlegroups.com
Original rationale was that the context might be necessary, or at least valuable.

And, if you split a single (long) logical expression across multiple #mrow, it is likely useless to only see one portion of the split.

Jeremy Sylvestre

unread,
Jan 28, 2026, 4:33:18 PM (12 days ago) Jan 28
to prete...@googlegroups.com
On Wed, 28 Jan 2026 at 14:24, 'Rob Beezer' via PreTeXt development <prete...@googlegroups.com> wrote:
Original rationale was that the context might be necessary, or at least valuable.

Sometimes. And then other times might be visually-distracting clutter relative to what specifically is being referenced. Difficult to strike a balance, I suppose.

Might also be "distracting" for screen readers? Do they jump directly to the referenced mrow?
 

And, if you split a single (long) logical expression across multiple #mrow, it is likely useless to only see one portion of the split.

Right. So, along the same lines, "highlighting" or boxing the entire referenced mrow would be bad, because it would exclude the "continuation".
 

On January 28, 2026 11:18:33 AM HST, Jeremy Sylvestre <jsyl...@ualberta.ca> wrote:
>On Wed, 28 Jan 2026 at 14:09, 'Rob Beezer' via PreTeXt development <
>prete...@googlegroups.com> wrote:
>
>> Would it be better if the knowl content somehow indicated which
>> #mrow/number was being referenced?  Maybe in a title placed in the knowl
>> content, or as some visual (accessible) indicator on the #mrow or it's
>> number?
>>
>
>That would be nice. My first instinct would be to have the visual indicator
>on the whole mrow, but (depending on how it is done) that is likely not
>appropriate in all cases, similarly to the reasoning (I'm guessing) behind
>the choice to display the entire md in the knowl in the first place ... ?
>
>So maybe just on the number/tag ?  Not sure...
>

--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAzMC5iZWV6ZXI.1769635439%40pnsh.

Rob Beezer

unread,
Jan 28, 2026, 10:14:02 PM (12 days ago) Jan 28
to prete...@googlegroups.com
When an #xref points to list item, the knowl content gets a heading of sorts, which I don't think appears similarly anywhere else.

I think it would be a definite improvement to do something similar in this case.

@Jeremy - interested in chasing through a slew of templates to surgically introduce something via a PR?

Accessibility: I wonder if something like our "Skip to main content' device could lead a reader from the start of the knowl to the actual #mrow referenced?

Rob

Jeremy Sylvestre

unread,
Jan 30, 2026, 10:40:51 AM (11 days ago) Jan 30
to prete...@googlegroups.com
On Wed, 28 Jan 2026 at 20:14, 'Rob Beezer' via PreTeXt development <prete...@googlegroups.com> wrote:

@Jeremy - interested in chasing through a slew of templates to surgically introduce something via a PR?


Sure, I can work on that. I'll probably have questions on exactly what kind of heading information you are envisioning, but probably won't actually get to work on this for a little bit.

Rob Beezer

unread,
Jan 30, 2026, 11:29:18 PM (10 days ago) Jan 30
to prete...@googlegroups.com
I'd suggest a heading like "Equation 5.32". But I was leaving that open for your input.

The #xref is to the #mrow so I think we want to identify that. The #md that is the knowl content doesn't have good identification anyway.

You may be able to expand whatever heading template is used for #li to apply to #mrow, and then utilize it in the "obvious" place. Could be a two-line change. But I don't have the XSL in front of me right now.

Rob
Reply all
Reply to author
Forward
0 new messages