Open jhannwong opened 1 year ago
Here's what I get using the latest version (main branch):
I get the same problematic result when using main
branch (downloaded as a zip from GitHub).
Let's say we remove the :stem: latexmath
attribute entry in test.adoc
. If you do asciidoctor-web-pdf --preview test.adoc
, and then use Dev Tools to examine the HTML Elements, you'll see inside <head>
3 <style data-pagedjs-inserted-styles="true">
elements. The 1st one seems to be the base style, containing defaults, such as --pagedjs-margin-top: 1in
inside :root
pseudo-class. The 2nd one might be from default.css
(?), and has --pagedjs-margin-top: 1.25cm
. The 3rd one is the one that contains the customized page margin:
.pagedjs_page {
--pagedjs-margin-top: 5cm;
--pagedjs-margin-right: 30mm;
--pagedjs-margin-left: 25mm;
--pagedjs-margin-bottom: 25mm;
--pagedjs-pagebox-width: 148mm;
--pagedjs-pagebox-height: 210mm
}
Now, let's say we add the :stem: latexmath
attribute entry in test.adoc
. The first 3 <style data-pagedjs-inserted-styles="true">
elements are the same as for the previous test. But there are 4 more (total of 7). The 4 styles seem to be related to:
CtxtMenu_Info
(some tool tip for some menu?)CtxtMenu_MenuClose
(some close buttons for some menu?)CtxtMenu_Menu
(styling to some menu?)mjx-container[jax="CHTML"]
(MathJax?)All those 4 extra styles contain the same override of page margins:
.pagedjs_page {
--pagedjs-margin-top: 1.25cm;
--pagedjs-margin-right: .75cm;
--pagedjs-margin-left: .75cm;
--pagedjs-margin-bottom: 1.25cm;
--pagedjs-pagebox-width: 148mm;
--pagedjs-pagebox-height: 210mm
}
@jhannwong Can you please share a screenshot and/or the PDF file produced? I cannot reproduce this issue.
@jhannwong Can you please share a screenshot and/or the PDF file produced? I cannot reproduce this issue.
@Mogztter What do you see in the --preview
mode? The failing test should show 7 styles, and the passing test only 4.
Are u able to try a minimal Docker container to test this? Lemme know if u need me to do that container.
The
test.adoc
:The
styles/style.css
:Removing
:stem:
lets margins work again, but STEM is of course disabled.