RunestoneInteractive / thinkcspy

How to Think Like a Computer Scientist, Interactive Edition
https://runestone.academy/ns/books/published/thinkcspy/index.html
Other
108 stars 190 forks source link

Eliminate Warnings on Build #253

Closed jdeisenberg closed 1 year ago

jdeisenberg commented 1 year ago

Unfortunately, the latter change puts an <exercise> inside an <introduction>, which causes the following sort of error:

PTX:INFO    :     * PTX:ERROR:   An object (exercise) lacks a structure number, search output for "[STRUCT]"
PTX:INFO    :     *              located within: "functions_unit-testing" (xml:id), "Unit Testing" (title)

(There is no [STRUCT] in the output file, by the way.)

So, I can either have that error or the warning:

A section containing subsections needs to have other content inside an <introduction> and/or  <conclusion>
cigas commented 1 year ago

Adding the <introduction> divisions caused errors in generating PDFs because of nested <exercise> divisions.

From https://pretextbook.org/doc/guide/html/overview-structure.html

The <introduction> and <conclusion> divisions are meant to be short, and may not contain any other numbered tag. No exercises, theorems, listings, etc. If you want to have an introductory division with any of the numbered elements you are free to omit the <introduction> and use the next finer subdivision with a <title> of “Introduction”.

Not sure if you want to undo these or just make a new PR to fix the ones with problems.