pressbooks / pressbooks-book

McLuhan is the default book theme for Pressbooks.
https://pressbooks.org
GNU General Public License v3.0
20 stars 16 forks source link

PDF export bug: ordered lists in textboxes #1228

Open tw77 opened 5 months ago

tw77 commented 5 months ago

Description

In a book set to McLuhan, list items in an ordered list within a textbox appear correctly in the webbook, but incorrectly in PDF exports.

When we export a PDF with an ordered list within a textbox, list items after the first one have their corresponding number placed on one line, followed by a dot on a second line, followed by their content on that second line.

Screenshot 2024-06-04 at 12 40 05 PM

In an ordered list with nested items, only the top-level list items are affected:

Screenshot 2024-06-04 at 12 45 00 PM

This only occurs in PDF exports and does not occur with ordered lists outside of textboxes.

PDF exports of books set to Malala don't appear to have this issue.

The issue is also not apparent from the XHTML source, only the exported PDF file.

Steps to Reproduce

  1. Set a book to McLuhan.
  2. Create a textbox in a chapter.
  3. In the textbox, add an <ol> with multiple items.
  4. Save the chapter.
  5. View the chapter in the webbook. It should display normally.
  6. Export the chapter in a PDF.

Expected behavior: The list displays correctly in the PDF, as it does in the webbook chapter.

Actual behavior: The numbering of list items is formatted strangely from the second (top-level) list item on.

MichSpieler commented 5 months ago

tried to reproduce it with a book from scratch: https://university.pressbooks.pub/sandboxjune2024/ I was unable to reproduce the issue.

tw77 commented 5 months ago

For reference, my test chapter https://staging.pressbooks.network/textboxtest/wp-admin/post.php?post=30&action=edit