Repository navigation
Conversation
…argument
In LaTeX these are symbols. They were defined with the mhchem-style arrows
(`\xrightarrow` and friends), whose label is a required argument, so in
`a\longrightarrow b` the `b` became a label drawn over the arrow, and a lone
`\longrightarrow` was written back as `\longrightarrow{}`. Without them in that
list, the symbols already defined in symbols.ts (U+27F6, U+27F5, U+27F7) apply.
mhchem writes these arrows alone, as `\mathrel{\longrightarrow}`, so `\ce`
reactions are unaffected; the mhchem-only arrows (`\longrightleftharpoons`...)
keep their definitions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In LaTeX,
\longrightarrow,\longleftarrowand\longleftrightarroware symbols, ⟶ ⟵ ⟷, that take no argument. MathLive defined them alongside the mhchem-style extensible arrows (\xrightarrowand friends), whose label is a required argument. As a result:a\longrightarrow bdrawsbas a label over the arrow, not after it;\longrightarrowis written back as\longrightarrow{}.Fix. Remove the three from the extensible-arrow list in
src/latex-commands/extensible-symbols.ts. The symbols already defined insymbols.ts(U+27F6, U+27F5, U+27F7) then apply. mhchem writes these arrows alone, as\mathrel{\longrightarrow}, so\cereactions still render. The mhchem-only arrows (\longrightleftharpoons,\longleftrightarrows, …) keep their definitions.Tests. A
LONG ARROWSblock intest/latex.test.tschecks thata\longrightarrow bserializes as written and draws ⟶ followed by b, and that\ce{A -> B}and\ce{A <=> B}still parse without errors.Suggested changelog line:
\longrightarrow,\longleftarrowand\longleftrightarroware symbols, as in LaTeX: ina\longrightarrow bthebfollows the arrow.🤖 Generated with Claude Code