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

Add katex support #75

Closed
wants to merge 12 commits into from
Closed

Add katex support #75

wants to merge 12 commits into from

Conversation

99percentpeople
Copy link

related #71

I added a plugin to markdown-it so that it displays latex formulas, and here are the tests:

image

image

@wong2
Copy link
Owner

wong2 commented Dec 9, 2022

nice work

"web_accessible_resources": [
{
"resources": ["fonts/*"],
"matches": ["https://*/*"]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary?

Copy link
Author

@99percentpeople 99percentpeople Dec 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary?

I added these fonts in the plugin so that I don't have to visit google. If I don't import it directly, it will give me an error:

image

It can also be introduced through a CDN, but that will be slower

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it

src/styles.css Outdated
@@ -59,5 +59,5 @@

.chat-gpt-container #answer code {
white-space: pre-wrap;
word-break: break-all;
word-break: break-word;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

'break-all' breaks words, so it might be nicer to use 'break-word'

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Here's an example

with break-all

image

with break-word

image

@wong2
Copy link
Owner

wong2 commented Dec 10, 2022

I'm still considering whether to accept this change, as it increase the installation package from 95K to 1.2M, but not many users will benefit from this feature.

@99percentpeople
Copy link
Author

I'm still considering whether to accept this change, as it increase the installation package from 95K to 1.2M, but not many users will benefit from this feature.

I optimized the bundle size and now the bundle size is 492KB.

josStorer added a commit to josStorer/chatGPT-search-engine-extension that referenced this pull request Dec 11, 2022
@wong2
Copy link
Owner

wong2 commented Dec 12, 2022

I decided to not merge this as the use case benefits few users, thanks all the same

spyhunter1280 added a commit to spyhunter1280/chatGPT-search that referenced this pull request Aug 25, 2023
special-kate1004 added a commit to special-kate1004/ChatGPT-powered-Chrome-extension---research-assistant that referenced this pull request Jul 15, 2024
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.

2 participants