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

Vector arrow not shown in astro starlight project #102

Closed
4 tasks done
obiscr opened this issue Oct 31, 2024 · 2 comments
Closed
4 tasks done

Vector arrow not shown in astro starlight project #102

obiscr opened this issue Oct 31, 2024 · 2 comments
Labels
🙋 no/question This does not need any changes 👎 phase/no Post cannot or will not be acted on

Comments

@obiscr
Copy link

obiscr commented Oct 31, 2024

Initial checklist

Affected packages and versions

rehype-katex(7.0.1) / remark-math(6.0.0)

Link to runnable example

https://codesandbox.io/p/devbox/2k43df

Steps to reproduce

Just open ths sandbox, and you will see it.

Expected behavior

The vector arrow can be displayed normally, like this

image

Actual behavior

The arrow not shown

image

Affected runtime and version

v18.20.0

Affected package manager and version

[email protected]

Affected OS and version

macOS 13.6.7

Build and bundle tools

No response

Additional

I found the latex is showing in this tag

<span class="accent-body" style="left:-0.1522em;">
</span>

I found this classes, which has the default style

element.style {
    left: -0.1522em;
}

.katex .accent .accent-body:not(.accent-full) {
    width: 0;
}

.katex .accent .accent-body {
    position: relative;
}

.katex .vlist>span>span {
    display: inline-block;
}

.katex * {
    -ms-high-contrast-adjust: none !important;
    border-color: currentColor;
}

I found that once I used the following custom style to rewrote the default style, the arrows were displayed correctly

.katex .accent .accent-body:not(.accent-full) {
    width: 9px !important;
}

.katex .accent .accent-body {
    left: 0 !important;
}

I hope this information is useful

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Oct 31, 2024
@wooorm
Copy link
Member

wooorm commented Oct 31, 2024

Hi!

Knowing that CSS solves it, can lead to a solution: do not use old CSS. Use the current, modern CSS. You are at 16.9, KaTeX is at 16.11 right now: https://katex.org/docs/browser.

You also do not need to include the client side JavaScript.

@wooorm wooorm closed this as not planned Won't fix, can't repro, duplicate, stale Oct 31, 2024
@wooorm wooorm added the 🙋 no/question This does not need any changes label Oct 31, 2024

This comment has been minimized.

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙋 no/question This does not need any changes 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants