PreTeXtBook / pretext

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

centering figures #161

Closed Alex-Jordan closed 6 years ago

Alex-Jordan commented 9 years ago

In my customization layer for CLM, I've shrunk figures from latex-images down to 48%. This revealed that centering is not actually working for these things. In the HTML <object> element that contains the svg images, there is style=margin:auto;, written as inline CSS. This is how many things would be centered with CSS, but apparently does nothing to an <object>.

In the ambient <figure>, we have class="figure-like". I added text-align:center to this class in my local CSS layer, and it successfully centers the object.

Alex-Jordan commented 6 years ago

This seems to be a nonissue now. See images at http://mathbook.pugetsound.edu/examples/sample-article/html/graphics.html. (And images are in img, not object now, so there is outdated information here.)