executablebooks / sphinx-book-theme

A clean book theme for scientific explanations and documentation with Sphinx
https://sphinx-book-theme.readthedocs.io
BSD 3-Clause "New" or "Revised" License
432 stars 197 forks source link

Inconsistent margin behavior between margin-captions and sidenotes #845

Open calebqcook opened 3 months ago

calebqcook commented 3 months ago

Describe the bug

When I create a figure with a margin-caption, I notice that the margin-caption -- as compared to a sidenote -- is both:

  1. closer to the main text than is the sidenote; and
  2. much narrower than is the sidenote.

I also find the typesetting differences between the margin-caption and sidenotes undesirable, as I want the entire right-margin to look consistent, but this is easy enough to fix with some CSS. I have had a harder time (probably given my inexperience with webdev generally) manually rectifying the spacing issues mentioned above.

image

Reproduce the bug

  1. Create a figure directive with several lines of caption text and the following options:

:align: right :figwidth: 60% :figclass: margin-caption

  1. Create a sidenote nearby.

List your environment

No response