From a849b7a83c1c4af6f597f083c5ec64fd1ed4179e Mon Sep 17 00:00:00 2001 From: Deyan Ginev Date: Wed, 8 Apr 2026 13:58:54 -0400 Subject: [PATCH] side-by-side minipages improve renderings but if-and-only-if their widths are accurately computed and no bad breaks are inserted --- css/ar5iv.css | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/css/ar5iv.css b/css/ar5iv.css index b99f65a..39d4a0c 100644 --- a/css/ar5iv.css +++ b/css/ar5iv.css @@ -1723,7 +1723,7 @@ foreignObject { to accommodate potentially tall line-box */ svg foreignObject > .ltx_foreignobject_container { display: flex; - align-items: end; /* see examples from latexml PR #2541 */ + align-items: center; /* test with examples from latexml PR #2541 */ width: clamp(calc(0.1 * var(--main-width)), var(--ltx-fo-width, var(--fo_width)), 100%); height: 100%; } @@ -1744,7 +1744,7 @@ svg foreignObject > .ltx_foreignobject_container { display: block; & * { width: inherit !important; - line-height: 1; + line-height: 1.2; } & .ltx_description, & .ltx_itemize, @@ -1883,11 +1883,10 @@ svg foreignObject > .ltx_foreignobject_container { .ltx_minipage .ltx_float .ltx_caption { display: block; } -/* often minipages are inline-blocks, for which "vertical-align" is inactive */ -/* so we also default to an auto margin in order to center */ +/* vattach="middle" on inline-block minipages: use vertical-align for alignment. + Do NOT override width — side-by-side minipages need their explicit widths. */ .ltx_minipage.ltx_align_middle { - margin: auto; - width: auto !important; + vertical-align: middle; } .ltx_minipage > .ltx_graphics { max-width: 100%;