GitbookIO / plugin-katex

Math typesetting using KaTex
Apache License 2.0
60 stars 37 forks source link

Font size is wrong because katex style is overriden by theme #9

Closed lwchkg closed 8 years ago

lwchkg commented 8 years ago

Here are the test URL:

Wrong rendering: https://lwchkg.gitbooks.io/testing/content/chapter1.html

Corrected: https://tanghin.gitbooks.io/maths/content/problem_corner/001_to_005.html (Note: I've added the katex stylesheet to the document by sass.)

Here's the SCSS code I've used.

.book .book-body .page-wrapper .page-inner section.normal {
    @import "katex.min";
}
lwchkg commented 8 years ago

Anyway, it is bad to add the instructions in the plugin itself. You should pass the katex.min.css to the theming engine as "requires sass/less processing", and have the theme decide how to process it (or have the theme provide a selector for processing).

P.S. Anyway, why is the CSS selector so long? I bet that you have made a mistake using css/less. I don't think there's a reason why .book-body or .page-inner is not enough.

lwchkg commented 8 years ago

Appears to be fixed in GitBook 3. You may now close the issue.