Skip to content
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 katex font #177

Merged
merged 1 commit into from
May 8, 2022
Merged

Conversation

st3iny
Copy link
Contributor

@st3iny st3iny commented Sep 21, 2021

Fix #112
Fix #168

The font of katex spans gets overwritten by a rule in preview.css. I fixed it by applying said rule to the preview container only. Font settings will be inherited to all children anyways.

Before

Screenshot 2021-09-21 at 12-23-00 test md - Dateien - Nextcloud

After

Screenshot 2021-09-21 at 12-21-58 test md - Dateien - Nextcloud

Signed-off-by: Richard Steinmetz <[email protected]>
@ffranchina
Copy link

Thanks for this fix! Is there any news about its merge?

@ffranchina
Copy link

This fix solves a problem that, by default, appears using mermaid, too.
The code

```mermaid
  graph TD;
    a-->0123456789;
```

produces
Schermata da 2022-03-30 21-14-33

Basically mermaid expects to use its own font for computing the dimensions of the boxes. Without the fix, the CSS override every font usage from third-party plugins.

@icewind1991 icewind1991 merged commit 53653cf into icewind1991:master May 8, 2022
@icewind1991
Copy link
Owner

Thanks!

@LeducH
Copy link

LeducH commented Aug 27, 2022

How can I use this workaround. I am on version 2.3.6 from the store. Is there a way I can integrate that change?

@LeducH
Copy link

LeducH commented Aug 29, 2022

I tried to change the file in the folder nextcloud_data/custom_apps/files_markdown/css/preview.css with the changes without any change is there a way around it?

That will work as a workaround I just had problem with the cache in my browser

@st3iny st3iny deleted the fix/noid/katex-font branch August 30, 2022 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Latex font rendering How to show latex formula pretty?
4 participants