Forum Bugs

MathML stretched full-width beside floating element

arthurattwell
I'm aiming to upgrade from Prince v11 to Prince for Books for our book-production work. Our books have sidebars, and we move elements into those sidebars with float and negative margin.

In Prince for Books (20220701), when I float a sidebar element like this beside displayed MathML, the maths gets stretched, visually, to the full text width. This does not happen with Prince 11.

I'm attaching a file that reproduces the error, and the resulting PDF.

Is this a bug, or am I supposed to do this another way?

  1. test.html0.9 kB
  2. test.pdf44.0 kB
arthurattwell
A further note that I get the same stretched-maths error using Prince 15.1 (Windows).
howcome
I can't help you with the streching, but I'm interested in your use of negative margins for sidenotes. I used that approach since 2005:
https://alistapart.com/article/boom/
It works, but has many limitations. Therefore, sidenotes can be generated with the @sidenote construct in Prince 15:
https://css4.pub/2023/sidenotes/

Edited by mikeday

arthurattwell
@howcome Thank you! I will definitely try that out. Your post has led me to the W3C CSS Print Community Group discussion on notes (https://github.com/w3c/css-print/issues/3), which is very encouraging and seems to align in principle with the Prince 15 implementation.

If I understand correctly, the latest Prince for Books is based on Prince 14. Its text layout is superior to 'normal' Prince 14, and that would save us a lot of time in page refinement. But the sidenotes in Prince 15 might be more important in our case.

Do you happen to know if there will be a Prince 15-based version of Prince for Books any time soon?
arthurattwell
Further to my last note: I see that Prince for Books 20220701 actually does seem to support sidenotes, excellent!
markbrown
[message deleted]

Edited by markbrown

arthurattwell
Thanks, Mark. That's good to understand.

We'll be going ahead with using sidenotes as they're currently implemented, and are happy to take on some risk there, given the enormous benefits that sidenotes give us in book layout. (Using negative margins is very clunky and fragile in comparison.) We'll pin the version of Prince or Prince for Books for each project, so that if the implementation changes in future, we don't break existing projects.

Hopefully we can share some useful bug reports and use cases as we work, for when you get to invest in further sidenotes development in future.

Arthur
markbrown
[message deleted]

Edited by markbrown