404 on xref to an individual exercise

20 views
Skip to first unread message

bra...@dickinson.edu

unread,
Jun 13, 2024, 11:03:09 AMJun 13
to PreTeXt support
I had originally posted this issue here (https://github.com/PreTeXtBook/pretext-cli/issues/738) and was directed to move it here.  I hope I got it right this time.

I am using a CodeSpace and the CodeChat preview tool for authoring and I am attempting to create an `xref` to an individual exercise.  When doing so my page looks as follows:

image

Notice the link to "Worksheet Exercise 1.11.1.3" which seems to combine the section number 1.1 with the exercise number 1.1.3.  Then when clicking the link the pop-up box reports a 404 error as shown here:
Screen Shot 2024-06-13 at 11.00.06 AM.png
The source for the relevant part of the page is:

<exercises xml:id="ch-cc_ws-fcp_exs-foss-community-roles">

    <title>FOSS Community Roles</title>
    <introduction>
      <p>
        In class we also discussed some of the roles that tend to exist in FOSS communities.  These included <term>Users</term>, <term>Requestors</term>, <term>Contributors</term>, <term>Maintainers</term> and <term>Leaders</term>.  Consider each of the actions described below. For each action, select the role of the individual (or individuals if multiple apply equally) that is most likely to be responsible for the action.
      </p>
    </introduction>

    <exercise
      xml:id="ch-cc_ws-fcp_ex-foss-community-roles-1"
      label="ch-cc_ws-fcp_ex-foss-community-roles-1">
      <statement>
        <p>
          Choosing the license under which the project will be released.
        </p>
        <p />
        </statement>
      <areas>
        <tabular top="minor" bottom="minor" left="minor" right="minor">
          <row>
            <cell><area correct="no">Users</area></cell>
            <cell><area correct="no">Requestors</area></cell>
            <cell><area correct="no">Contributors</area></cell>
            <cell><area correct="no">Maintainers</area></cell>
            <cell><area correct="yes">Leaders</area></cell>
          </row>
        </tabular>
        <p />
      </areas>
    </exercise>

    <p>
      More here eventually...
    </p>

    <p>
      This reference to the exercises block works:
      <xref ref="ch-cc_ws-fcp_exs-foss-community-roles" />
    </p>

    <p>
      This reference to a specific exercise does not work:
      <xref ref="ch-cc_ws-fcp_ex-foss-community-roles-1" />
    </p>  
  </exercises>

Rob Beezer

unread,
Jun 13, 2024, 11:12:45 AMJun 13
to pretext...@googlegroups.com
Dear Grant,

"Worksheet Exercise 1.11.1.3"

Suggests you are inside a "worksheet" division. (That was not included in your
snippet.)

"exercises" in another "specialized" division. They do not nest. The schema
will tell you that. Specialized divisions are always terminal.

Said differently, an "exercise" can go in a "worksheet" or in an "exercises" but
not both. (And it can go other places.)

Have I read the tea leaves correctly? (And if so, that clickable text is not
too bad!)

(And yes, I think this was the right place for this, thanks for coming over here.)

Rob

On 6/13/24 08:03, bra...@dickinson.edu wrote:
> I had originally posted this issue here
> (https://github.com/PreTeXtBook/pretext-cli/issues/738) and was directed to move
> it here.  I hope I got it right this time.
>
> I am using a CodeSpace and the CodeChat preview tool for authoring and I am
> attempting to create an `xref` to an individual exercise.  When doing so my page
> looks as follows:
>
> image
>
> Notice the link to "Worksheet Exercise 1.11.1.3" which seems to combine the
> section number 1.1 with the exercise number 1.1.3.  Then when clicking the link
> the pop-up box reports a 404 error as shown here:
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-suppo...@googlegroups.com
> <mailto:pretext-suppo...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/81bf95d0-e116-4207-bea9-b00cd8f293aen%40googlegroups.com <https://groups.google.com/d/msgid/pretext-support/81bf95d0-e116-4207-bea9-b00cd8f293aen%40googlegroups.com?utm_medium=email&utm_source=footer>.

bra...@dickinson.edu

unread,
Jun 13, 2024, 11:25:23 AMJun 13
to PreTeXt support
Thanks Rob.  Just one follow up...

On Thursday, June 13, 2024 at 11:12:45 AM UTC-4 Rob Beezer wrote:

"Worksheet Exercise 1.11.1.3"

Suggests you are inside a "worksheet" division. (That was not included in your
snippet.)

Yes, the exercise and the xref in question are in a "worksheet" division, which is the top level division in the file.
 

"exercises" in another "specialized" division. They do not nest. The schema
will tell you that. Specialized divisions are always terminal.

Said differently, an "exercise" can go in a "worksheet" or in an "exercises" but
not both. (And it can go other places.)

Do I understand correctly that this implies that a "worksheet" cannot contain an "exercises" ?


Rob Beezer

unread,
Jun 13, 2024, 5:50:40 PMJun 13
to pretext...@googlegroups.com
On 6/13/24 08:25, bra...@dickinson.edu wrote:
> Do I understand correctly that this implies that a "worksheet" cannot contain an
> "exercises" ?

> > They do not nest.

Reply all
Reply to author
Forward
0 new messages