-
-
Notifications
You must be signed in to change notification settings - Fork 889
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
Support external stylesheet for html rendered latex. #207
Comments
Great use case! I'll keep this in mind as I decide what CSS attributes are most important to support. |
Technically #577 will add support for this (if the feature is approved) - you don't have to parse your latex to HTML and instead just do |
PR created above. This will only support the currently supported inline CSS elements so it doesn't have all of the ones listed in OP. |
CSS via |
When external CSS is expected to support? |
Katex does server side rendering of latex files and outputs a html snippet.
A sample output is:
And its corresponding html is
This html code has some classes which can be rendered with an external css from this CDN:
https://cdn.jsdelivr.net/npm/katex@0.10.2/dist/katex.css
I analysed this css file using word-frequency counter and luckily it uses very few (48) css style attributes:
These are the ones which occur more than once:
font-size, font-family, font-style, display, font-weight, src, position, width, text-align, overflow, right, left, padding, margin-right, border-bottom-style, min-width, margin-left, height, border, whitespace, vertical-align, stroke, min-height, margin, content, border-right
These are the ones which occur only once:
text-rendering, text-indent, table-layout, stroke-width, stroke-opacity, stroke-miter-limit, stroke-line-join, stroke-line-cap, stroke-dash-offset, stroke-dash-array, ms-high-contrast-adjust, max-width, max-height, line-height, font, fill-rule, fill-opacity, fill, clip, box-sizing, border-style, border-bottom-width.
It would be great if support for above css attributes can be added as it would mean, this library can be the first library to support latex on flutter without any serious performance lag.
The text was updated successfully, but these errors were encountered: