xref targeting a subexercises

18 views
Skip to first unread message

Alex Jordan

unread,
Mar 20, 2023, 11:40:56 PM3/20/23
to prete...@googlegroups.com
I have an xref to subexercises, which is a thing that has no number.
It uses text="title" and it is a pretty local cross-reference. (It is
in the introduction to one "subexercises", telling readers they may
want to just skip ahead to the next "subexercises".)

At run time, I get:

* PTX:DEBUG: xref/@ref "subexercises-skills-practice" points to a
"subexercises" element. (1) we made a mistake, and we need to add
this element to a list of potential targets of a cross-reference, or
(2) you made a mistake and really did not mean this particular
construction, or (3) we need to have a discussion about the
advisability of this element being a target. (4) If you are trying
to cross-reference a "p" element, perhaps using a "paragraphs" element
is a good alternative. If (1) or (3) could you please report me!

Am I in a (1) or (3) situation?

Rob Beezer

unread,
Mar 21, 2023, 3:15:53 PM3/21/23
to prete...@googlegroups.com
> Am I in a (1) or (3) situation?

Both?

Definitely (1) - never considered, because "subexercises" was not meant to get a
lot of attention. So long as a "title" is *required*, and an attempt to use a
number fails gracefully, then supporting it as a target makes sense to me.

(3) But I don't expect to knowl it because (a) we do not generally knowl
divisions, and (b) "subexercises" was not meant to be much of a "thing".

Rob

Alex Jordan

unread,
Mar 21, 2023, 6:18:23 PM3/21/23
to prete...@googlegroups.com
A "subexercises" is required to have a title according to the schema.
In that regard, along with being numberless, it is like "paragraphs".

My use case is like
"These exercises cover prereq material. If you are comfortable with
this prereq material, feel free to move on to XXX."
Where the XXX is the xref to another subexercises in the same set.

In that use case, the reference is local, and I'd actually prefer it
be a link than a knowl.
> --
> 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 on the web visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAzNC5iZWV6ZXI.1679426151%40quikprotect.

Rob Beezer

unread,
Mar 21, 2023, 6:53:16 PM3/21/23
to prete...@googlegroups.com
OK, in -common add "subexercises" to the match on mode="is-xref-target". That
should be all that is needed.

Then I get a good "xref" from an example I added, but I also get from the HTML
conversion (not the LaTeX conversion):

PTX:WARNING: could not translate string with id "subexercises" into language for
code "en-US"

which, of course, can be (tediously) addressed.

BUT - I can't see the place where adding (and enabling) this cross-reference
should be trying to get this string. Which I suspect is some inefficiency (or
worse).

Would you like to go on a wild goose chase? "I give up." ;-)

Rob

Rob Beezer

unread,
Mar 21, 2023, 8:05:16 PM3/21/23
to prete...@googlegroups.com
On 3/21/23 15:53, Rob Beezer wrote:
> Would you like to go on a wild goose chase?  "I give up."  ;-)

Not really. Tool tip text on the link. ;-)

Rob Beezer

unread,
Mar 21, 2023, 9:12:03 PM3/21/23
to prete...@googlegroups.com
Try now. Just pushed.

Adding this in, it is clear that in the agreement that a "subexercises" would be
very minimal never envisioned it as a target of a cross-reference (since it does
not admit a number).

Rob

Alex Jordan

unread,
Apr 2, 2023, 11:46:48 PM4/2/23
to prete...@googlegroups.com
Circling back. I tried it and it's working. No run time
errors/warnings, and the link works.
> --
> 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 on the web visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAyMy5iZWV6ZXI.1679447522%40quikprotect.

Rob Beezer

unread,
Apr 3, 2023, 11:37:00 AM4/3/23
to prete...@googlegroups.com
Thanks for the confirmation.
Reply all
Reply to author
Forward
0 new messages