Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • M MathJax
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 304
    • Issues 304
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MathJax
  • MathJax
  • Issues
  • #1491
Closed
Open
Issue created May 27, 2016 by Administrator@rootContributor

Aligning mhchem arrows

Created by: mhchem

I'd like to align the mhchem arrows in length. But I do not know enough about the inner workings of MathJax to touch the arrow definitions.

First of all, is there a reason for using both, long arrows (e.g. \longrightarrow) and x-arrows (\xrightarrow)? We could use x-arrows only, with a phantom argument. This would make the whole task much easier.

Further issues: The harpoons do not stretch correctly.

The single-headed arrows are a little bit shorter for the same input as the double headed.

To complete the set, I would also need an arrow similar to the harpoons, but with full arrow heads.

The following test document works with current and new mhchem, as the arrow code stayed untouched.

<!doctype html>
</html>
<head>
  <meta charset="utf-8">
  <script type="text/x-mathjax-config">
    MathJax.Hub.Config({ TeX: {extensions: ['mhchem.js']} });
  </script>
  <script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
</head>
<body>
\(\def\rel#1{\mkern3mu\mathrel{#1}\mkern3mu}
\def\a#1#2{| \rel{#2{a}} | \rel{#2[a]{}} | \rel{#2[a]{a}} | \rel{#2{aaaaa}} | \rel{#2[aaaaa]{}} | \rel{#2[aaaaa]{aaaaa}} | \rel{#1} |}\)
<br>
\(\a{\longrightarrow}{\xrightarrow}\)<br>
\(\a{\longleftarrow}{\xleftarrow}\)<br>
\(\a{\longleftrightarrow}{\xleftrightarrow}\)<br>
\(\a{\longrightleftharpoons}{\xrightleftharpoons}\)<br>
\(\a{\longRightleftharpoons}{\xRightleftharpoons}\)<br>
\(\a{\longLeftrightharpoons}{\xLeftrightharpoons}\)<br>
\(\a{\longleftrightarrows}{\xleftrightarrows}\)<br>
</body>
</html>

image

Assignee
Assign to
Time tracking