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

LaTeX height fix #3258

Merged
merged 6 commits into from Feb 21, 2023
Merged

LaTeX height fix #3258

merged 6 commits into from Feb 21, 2023

Conversation

abidlabs
Copy link
Member

Fixes LaTeX heights so that they are set based on the height of surrounding text instead of being hardcoded by the rendering engine. Fixes: #3243

Before:

image

After:

image

@gradio-pr-bot
Copy link
Contributor

All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-3258-all-demos

@abidlabs
Copy link
Member Author

Here's another example:

image

Copy link
Collaborator

@aliabid94 aliabid94 left a comment

Choose a reason for hiding this comment

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

just the margin comment, lgtm otherchange

@@ -34,6 +34,8 @@

div :global(.math.inline svg) {
display: inline;
margin-bottom: 0.15em;
Copy link
Collaborator

Choose a reason for hiding this comment

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

margin-bottom: 0.25em looks better to me, seems like it hangs under the baseline at 0.15em

@abidlabs
Copy link
Member Author

abidlabs commented Feb 21, 2023

Yeah I agree, thanks for the review and suggestion @aliabid94! Here's how it looks with 0.25em;

image

Splitting hairs at this point, but here's how it looks with 0.22em, which looks better to me:

image

@abidlabs abidlabs merged commit e513f06 into main Feb 21, 2023
@abidlabs abidlabs deleted the latex-height branch February 21, 2023 20:12
@pngwn
Copy link
Member

pngwn commented Feb 21, 2023

Isn't the paragraph level text basically unreadable now?

I think that will be one of the more common contexts for this syntax too.

@abidlabs
Copy link
Member Author

@aliabid94 actually just said the same thing. When the LaTeX is multi-level (fractions, integral), it becomes unreadable. Let me fix this

dawoodkhan82 pushed a commit that referenced this pull request Feb 22, 2023
* latex height fix

* changelog

* formatting

* em

* em
dawoodkhan82 added a commit that referenced this pull request Feb 23, 2023
* dropdown

* more dropdown updates

* dropdown styling + option visibility

* changelog

* notebook

* fix test

* Allow more image formats (#3225)

* add wildcard to image input

* simplify mime types

* changelog

* regen noteboks

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: pngwn <hello@pngwn.io>

* fix webcam mirroring (#3245)

* fix webcam

* changelog

* fix changelog

* fix changelog

* fix changelog

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* Add `interactive=False` mode to `gr.Button` (#3266)

* add interactive=False to button

* add interactive=True by default

* changelog

* fix frontend

* fix backend test

* formatting

* review changes

* LaTeX height fix (#3258)

* latex height fix

* changelog

* formatting

* em

* em

* accidentally added script (#3273)

* Adding a script to benchmark the queue (#3272)

* added benchmark queue script

* changelg

* fix instructions

* Fix matplotlib image size (#3274)

* Fix matplotlib css

* CHANGELOG

* Undo lockfile

* Add timeouts to queue messages (#3196)

* Fix + test

* Remove print statements + fix import for 3.7

* CHANGELOG

* Remove more print statements

* Add 60 second timeout for uploading data

* Fix test

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* icons

* separate options into component

* formatting

* changelog

* changelog

* fix ui tests

* formatting again...

* backend test fix

* format

* doc fixes

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: fienestar <fienestar@gmail.com>
Co-authored-by: pngwn <hello@pngwn.io>
Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
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.

Adjust rendered LaTeX size according to font size
5 participants