Skip to content

Update KaTeX to version 0.16.22 #169

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 3 commits into from
Apr 20, 2025
Merged

Conversation

mizar
Copy link
Collaborator

@mizar mizar commented Apr 11, 2025

@mizar mizar requested a review from Copilot April 11, 2025 12:13
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

doc/katex-header.html:3

  • Switching from a DOMContentLoaded listener to an inline onload callback may not reliably guarantee that document.body is fully parsed across all browsers. Consider retaining the event listener mechanism or ensuring that document.body is available before executing renderMathInElement.
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-hCXGrW6PitJEwbkoStFjeJxv+fSOOQKOPbJxSfM6G5sWZjAyWhXiTIIAmQqnlLlh" crossorigin="anonymous" onload="renderMathInElement(document.body, {delimiters: [{left: '$$', right: '$$', display: true},{left: '\[', right: '\]', display: true},{left: '$', right: '$', display: false},{left: '\(', right: '\)', display: false}]});"></script>

@koba-e964
Copy link
Collaborator

フォーマットを変えた理由などはありますか?

@mizar
Copy link
Collaborator Author

mizar commented Apr 13, 2025

https://www.npmjs.com/package/katex の Starter Template にて

<!DOCTYPE html>
<!-- KaTeX requires the use of the HTML5 doctype. Without it, KaTeX may not render properly -->
<html>
  <head>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-5TcZemv2l/9On385z///+d7MSYlvIEw9FuZTIdZ14vJLqWphw7e7ZPuOiCHJcFCP" crossorigin="anonymous">

    <!-- The loading of KaTeX is deferred to speed up page rendering -->
    <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-cMkvdD8LoxVzGF/RPUKAcvmm49FQ0oxwDF3BGKtDXcEc+T1b2N+teh/OJfpU0jr6" crossorigin="anonymous"></script>

    <!-- To automatically render math in text elements, include the auto-render extension: -->
    <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-hCXGrW6PitJEwbkoStFjeJxv+fSOOQKOPbJxSfM6G5sWZjAyWhXiTIIAmQqnlLlh" crossorigin="anonymous"
        onload="renderMathInElement(document.body);"></script>
  </head>
  ...
</html>

となっているのに合わせましたが、単にバージョンのみ変えるのも手かもしれません。

@qryxip
Copy link
Member

qryxip commented Apr 17, 2025

#69 を書いたのは私ですが、当時私が見てたのはこれだと思います。多分。
Auto-render Extension · KaTeX

あとはまあdelimitersはac-library-rsの全rustdocに影響するので、human-readableな形で残してもよいと思いました。

Copy link
Collaborator

@koba-e964 koba-e964 left a comment

Choose a reason for hiding this comment

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

ありがとうございます

@mizar mizar merged commit 3085eda into rust-lang-ja:master Apr 20, 2025
13 checks passed
@mizar mizar deleted the katex-header branch April 20, 2025 10:10
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.

3 participants