PreTeXtBook / pretext

PreTeXt: an authoring and publishing system for scholarly documents
https://pretextbook.org
Other
266 stars 208 forks source link

numbering of list items that cross-reference a list item #557

Closed Alex-Jordan closed 7 years ago

Alex-Jordan commented 7 years ago

At: http://spot.pcc.edu/math/APEXCalculus/sec_related_rates.html there is a list where item 4 has an xref to item 3. If you click to open the knowl, the numbering on all subsequent list items is affected.

I wonder more and more if MBX HTML output should just hard-code list item numbers for ordered lists. They could each have the value attribute.

rbeezer commented 7 years ago

Nice catch! Thanks.

It took me a while to even figure out what you were talking about (without peeking).

Yes, the "li" made visible in the knowl causes the list to renumber itself with the newly-included "li" considered. Had not thought about that at all.

Three thoughts:

  1. Copying information and reproducing it in new contexts is not as simple as it might first appear.

  2. A less-radical solution would be to hard-code the number in the copy (the "xref-knowl"), which I do in the heading of the knowl right now.

  3. When fixing this, investigate a list item of an unordered list revealed inside an xref-knowl contained in an ordered list with different symbols.

On 04/23/2017 11:41 AM, Alex Jordan wrote:

At: http://spot.pcc.edu/math/APEXCalculus/sec_related_rates.html there is a list where item 4 has an xref to item 3. If you click to open the knowl, the numbering on all subsequent list items is affected.

I wonder more and more if MBX HTML output should just hard-code list item numbers for ordered lists. They could each have the |value| attribute.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rbeezer/mathbook/issues/557, or mute the thread https://github.com/notifications/unsubscribe-auth/ABy2cg5kc2yUwvTgI3RLXApVNSsB6qs2ks5ry5tZgaJpZM4NFfuL.

rbeezer commented 7 years ago

I rewrote the knowl content of a list item to not include the wrapping li element. For a cross-reference knowl, a heading will report which item it is (if numbered). I think that makes this behavior go away. As usual, reporting a check on your work would be welcome.

I added an example to the sample article at 06fd9040. Towards the bottom of

http://mathbook.pugetsound.edu/examples/sample-article/html/section-12.html#subsection-25