Reading Questions and Table of Contents

25 views
Skip to first unread message

Geoffrey Cox

unread,
Jun 23, 2024, 10:04:12 AMJun 23
to PreTeXt support
Hello,

I have `<reading-questions>` embedded inside a `<section>` and they look and function exactly as intended, however, the `<reading-questions>` display in the table of contents as if they were a `<subsection>`. This would be fine except when you click on them in the table of contents, you get a 404 error. 

Any suggestions on getting around this?

I know I can set the table of contents level to do this, but this also suppresses actual  `<subsection>`s that I want to display.

Thanks, Geoff

Oscar Levin

unread,
Jun 23, 2024, 10:30:04 AMJun 23
to pretext...@googlegroups.com
That should not be happening, so there is either a big in pretext or something is off in the structure of your source.  If you can post a link to your source on GitHub , I'd be happy to look at it.

I have a similar setup and the links work for me.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/f693e986-7e25-4276-bc00-742cf4744162n%40googlegroups.com.

Geoffrey Cox

unread,
Jun 23, 2024, 11:11:36 AMJun 23
to PreTeXt support
Thanks for the quick reply. 

It is likely my source. You should see some <reading-questions> in any of the <section>s.  Here is a link to the code 


Thanks for taking a look.

Oscar Levin

unread,
Jun 23, 2024, 11:22:43 AMJun 23
to pretext...@googlegroups.com
Here is what I suspect is going on.  You have sections that have content, not in subsections, followed by a reading questions subdivision.  This might be okay, except some of your sections also have an introduction.  You should only use an introduction for a small bit of content before subsections.  So the preferred structure is:

Section 
   (Introduction)
   Subsection
   Subsection 
   Reading questions.

Or maybe (but I don't remember if it is allowed)

Section
   content...
   Reading questions.


You could try experimenting with the second, but the first should definitely work.  (The introduction is optional)
   

Geoffrey Cox

unread,
Jun 23, 2024, 11:33:14 AMJun 23
to PreTeXt support
Ok, yes, I was going with the second format:

Section
   content...
   Reading questions.

 I intended to remove all the introductions from the sections anyway, so I'll try that first. If that doesn't fix it, I'll try to make the preferred structuring work.

Sean Fitzpatrick

unread,
Jun 23, 2024, 11:43:01 AMJun 23
to pretext...@googlegroups.com

Since it works if you have:

section
  content
  exercises

I would guess that reading questions are also ok at the same level as exercises.


Geoffrey Cox

unread,
Jun 23, 2024, 11:53:01 AMJun 23
to PreTeXt support
To update the structuring 

section
  content
  reading-questions

gives the 404 error; however, as Sean pointed out, swapping reading-questions with exercises does not give the error. 

Is this a bug, or should I use exercises instead of reading questions in general?

Geoffrey Cox

unread,
Jun 23, 2024, 12:13:11 PMJun 23
to PreTeXt support
Sorry. I think you can disregard my previous post. Now, after removing all the introductions from my sections, I do not see the 404 error. 

Perhaps it was a caching artifact that was displaying the error.

Geoffrey Cox

unread,
Jun 23, 2024, 12:40:17 PMJun 23
to PreTeXt support
Follow up. I now see that the 404 error (when clicking on the reading questions in the table of contents) depends on the chunking level. For example,

Scenario 1: chunking level = 3

section 1
  content
  reading-questions (no 404 error)

section 2
  introduction
  subsection
     reading-questions (no 404 error)

Scenario 2: chunking level = 4

section 1
  content
  reading-questions (404 error!)

section 2
  introduction
  subsection
     reading-questions (no 404 error)

As a side note, swapping reading-questions with exercises results in the same behavior. 

Is this the intended behavior, or does this seem like a bug?

Rob Beezer

unread,
Jun 24, 2024, 11:36:24 AMJun 24
to pretext...@googlegroups.com
> Is this the intended behavior, or does this seem like a bug?

Neither.

In Scenario 2, does your "section 2" subsection have a "subsubsection" or any
content?

If I build the sample article at chunking level 3, then Reading Questions 4.2.4
(at the subsubsection level) comes through as its own file just fine. I'll be
surprised if a book, having an extra level due to "chapter" behaves much
differently.

If you provide actual source illustraing the problem, perhaps somebody
experienced can diagnose where the problem lies.

Rob

On 6/23/24 09:40, Geoffrey Cox wrote:
> Follow up. I now see that the 404 error (when clicking on the reading questions
> in the table of contents) depends on the chunking level. For example,
>
> _Scenario 1: chunking level = 3_
>
> section 1
>   content
>   reading-questions (no 404 error)
>
> section 2
>   introduction
>   subsection
>      reading-questions (no 404 error)
>
> _Scenario 2: chunking level = 4_
> https://groups.google.com/d/msgid/pretext-support/f693e986-7e25-4276-bc00-742cf4744162n%40googlegroups.com <https://groups.google.com/d/msgid/pretext-support/f693e986-7e25-4276-bc00-742cf4744162n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> 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.
>
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/e7b0a6ce-79b6-4e92-beb4-c2ee534da749n%40googlegroups.com <https://groups.google.com/d/msgid/pretext-support/e7b0a6ce-79b6-4e92-beb4-c2ee534da749n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> 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.
>
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/3b42f5fa-c7a8-47e5-b889-341bffde577dn%40googlegroups.com <https://groups.google.com/d/msgid/pretext-support/3b42f5fa-c7a8-47e5-b889-341bffde577dn%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> 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/a0c5313d-3d98-43b9-a089-e3cd027b137en%40googlegroups.com <https://groups.google.com/d/msgid/pretext-support/a0c5313d-3d98-43b9-a089-e3cd027b137en%40googlegroups.com?utm_medium=email&utm_source=footer>.

Rob Beezer

unread,
Jun 24, 2024, 11:49:03 AMJun 24
to pretext...@googlegroups.com
And I should have been more clear. With the Table of Contents level set to 3,
Reading Questions 4.2.4 is available via the Table of Contents.

Geoffrey Cox

unread,
Jun 24, 2024, 12:05:42 PMJun 24
to PreTeXt support
Thanks for looking at this. 

> In Scenario 2, does your "section 2" subsection have a "subsubsection" or any
> content?

The subsection in section 2 is structured like section 1. I don't have any subsubsections.

Here is the clarified scenario 2:

Scenario 2: chunking level = 4

section 1
  content
  reading-questions (404 error!)

section 2
  introduction
  subsection
     content
     reading-questions (no 404 error) 

Below is a link to the source, but to save you time digging through the directory structure, I also provided direct links to section 2 and the subsection inside.



Reply all
Reply to author
Forward
0 new messages