Skip to content

Andrew/mathjax #393

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

Merged
merged 4 commits into from
Aug 22, 2025
Merged

Andrew/mathjax #393

merged 4 commits into from
Aug 22, 2025

Conversation

ayjayt
Copy link
Collaborator

@ayjayt ayjayt commented Aug 19, 2025

This updates mathjax and script ordering to be more in line with expectations

@ayjayt ayjayt requested a review from emilykl August 19, 2025 18:27
@ayjayt
Copy link
Collaborator Author

ayjayt commented Aug 19, 2025

To address these two issues:

#388
#360

Comment on lines 3 to 6
<!--
THIS FILE IS AN EXAMPLE, IT IS GENERATED AUTOMATICALLY AT RUNTIME
TO ENSURE FULLY UPDATED RESOURCES
-->
Copy link
Collaborator

Choose a reason for hiding this comment

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

this doesn't make sense to me, what is the function of this file? Should it be checked into git at all?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Legacy code that I've been using throughout this process and as documentation. It's definitely on its way out, I can axe it.

</script>

<!-- Only your one tweak; preset handles TeX+AMS+SVG -->
Copy link
Collaborator

Choose a reason for hiding this comment

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

?

<script src="\S[^\n]*/kaleido_scopes\.js"></script>
</head>
<body style="{margin: 0; padding: 0;}"><img id="kaleido-image"></img></body>
<body style="{margin: 0; padding: 0;}"><img id="kaleido\-image" /></body>
Copy link
Collaborator

Choose a reason for hiding this comment

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

why the backslash in the id?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not super happy with how convoluted these tests are and I'm thinking about doing them line by line.

In certain instances, '-' is a reserved character in regex. In this particular instance, it doesn't need to be, but can be, escaped.

There's a run on testing today, this whole strategy might change in another PR.

@emilykl
Copy link
Collaborator

emilykl commented Aug 19, 2025

@ayjayt Just to make sure I understand -- the root cause of the two linked issues is the fact that the Mathjax script was being loaded after the Plotly script?

@ayjayt
Copy link
Collaborator Author

ayjayt commented Aug 19, 2025

@ayjayt Just to make sure I understand -- the root cause of the two linked issues is the fact that the Mathjax script was being loaded after the Plotly script?

a) we bring mathjax into line with plotly.py which solves one issues.
b) the other issue needs to be tested by the user, since I can't reproduce

It seems to me mathjax should be loaded if I'm going to tell plotly that it is loaded

Copy link
Collaborator

@emilykl emilykl left a comment

Choose a reason for hiding this comment

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

LGTM

@gvwilson gvwilson added feature something new P1 needs immediate attention labels Aug 22, 2025
@ayjayt ayjayt merged commit d0336f8 into master Aug 22, 2025
4 checks passed
@ayjayt ayjayt deleted the andrew/mathjax branch August 22, 2025 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new P1 needs immediate attention
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kaleido not using latex for text Kaleido v1.0.0 cannot display latex formula normally
3 participants