xref to an introduction?

15 views
Skip to first unread message

Andrew Scholer

unread,
Dec 10, 2025, 2:27:48 PM (5 days ago) Dec 10
to prete...@googlegroups.com
I was just advised:

PTX:DEBUG   : * PTX:DEBUG: xref/@ref "program-design_exercises_introduction" points to a "introduction" element.
... (3) we need to have a discussion about the advisability of this element being a target...

What I have is an <exercises> with an <introduction> which has some common instructions for what is expected in responses to a series of short answer questions followed by an example:

<exercises>
  <introduction>
     instructions as a paragraph and list
     <example>
  <exercise>
     <xref to introduction>
  <exercise>
     <xref to introduction>
...

In the individual exercises I am trying to xref to that introduction. Mostly so that on the RS assignment page it is easy to find the relevant instructions.

I want to link to something that contains both the instructions and the example. So the introduction is the logical spot - even if there was a container around the instructions.

I would prefer not to link to the entire exercises page, so that if you are on a RS assignment page, you can just read the instructions in a knowl without switching pages.

Is linking to an introduction something that should be considered reasonable? Is there another solution?

Andrew Scholer
Computer Science Instructor / Program Chair
Chemeketa Community College
Office hour info: https://computerscience.chemeketa.edu/people/andrew-scholer/

Rob Beezer

unread,
Dec 10, 2025, 3:09:29 PM (5 days ago) Dec 10
to prete...@googlegroups.com
Some uses of #introduction are unreasonable. My fault for not communicating early and not getting the schema right and not hardening the XSL.

In your case, an #examole should not be descendant of #exercises.

I don't think you said - what do you expect the clickable text to say?

One solution for the assignment page is to copy the #introduction to each individual problem as given in the manifest. We do exactly that with #exercisegroup. Which makes me wonder: should your #exercises simply contain one big #exercisegrouo?

Rob

Andrew Scholer

unread,
Dec 10, 2025, 3:55:10 PM (5 days ago) Dec 10
to prete...@googlegroups.com
I am not wedded to <exercises> as my top level container there. It could be a section that just happens to have nothing but exercises. 

The schema allows for introduction/example. Are you saying that shouldn't be the case anywhere?  I am wedded to having an example at the top of the page that has all the exercises. The introduction seems like a logical place.

I am using @text="title" on the xref currently, which produces reasonable text.

I don't want every presentation of a question on the assignment page to contain the (quite long) instructions/example in an expanded form. Which is why an xref for them is ideal. It can be expanded if desired but otherwise doesn't clutter up the page.

For sake of argument, let's assume my exercises page has 8 exercises but the RS assignment only asks 4 of those questions. Once the reader has seen the instructions, they don't need another 3 copies of them cluttering up the assignment.


--
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/MTAwMDAwNS5iZWV6ZXI.1765397365%40pnsh.

Chrissy Safranski

unread,
Dec 11, 2025, 8:43:53 AM (4 days ago) Dec 11
to PreTeXt development
It's been a while since I've tried now, but I think I recall that nothing numbered can go in an introduction (or conclusion).  It might throw errors, or it might just not output anything, depending on the thing I was trying to put in there.  Moving it outside of the introduction or conclusion worked fine.

Once I encountered that, I figured that that's why Active Calculus uses subsections titled Introduction and Summary instead of introduction and conclusion elements themselves.

Chrissy

Andrew Scholer

unread,
Dec 11, 2025, 1:51:27 PM (4 days ago) Dec 11
to prete...@googlegroups.com
I know that Chrissy wasn't suggesting that a subsection with the title introduction was ideal, but  turning:
<chapter>
    <exercises>
        <introduction>
             instructions
             <example>
         <exercise>
             <xref to intro>

Into:
<chapter>
    <section> (title exercises)
        <subsection> (title introduction) 
             instructions
             <example>
         <exercise>
             <xref to subsection>

Feels like a pretty big loss of semantic meaning.

Making an exercise group around the introduction/exercises still leaves an example in the introduction. Which to my mind makes sense - an example is a perfectly logical thing to include while introducing a group of problems. That is allowed in the schema (currently). But if introductions in general are changed to not allow example children, that use would become forbidden as well.

Even on the book page (not assignment), I would love to have each question have an xref to instructions/example. I don't trust every student to carefully read the instructions at the top of the page before scrolling down to find the question they are supposed to do.


Reply all
Reply to author
Forward
0 new messages