-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(math): Math font size must follow the document font size #2149
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,9 +42,13 @@ function package.declareSettings (_) | |
}) | ||
SILE.settings:declare({ | ||
parameter = "math.font.size", | ||
type = "integer", | ||
default = 10, | ||
type = "number or integer", | ||
default = SILE.settings:get("font.size"), | ||
}) | ||
SILE.settings:registerHook ("font.size", function (size) | ||
-- Follow document font size changes | ||
SILE.settings:set("math.font.size", size) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we do allow a relative value (e.g. Even if not, we probably want to figure out how to remove this hook if the user resets There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BTW there's a whole lot of issues hiding behind math.font.size eventually. Consider legit MathML My guts feelings (after I hit the problem under a different angle in mpadded) is that math.font.size should always be in a font relative unit, and affect font.size inside the math equation. |
||
end) | ||
-- Whether to show debug boxes around mboxes | ||
SILE.settings:declare({ | ||
parameter = "math.debug.boxes", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should consider whether we ought to allow relative values here such that formulas would track changes to the document font size in a relative way.