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
  • #1802
Closed
Open
Issue created Jul 10, 2017 by Administrator@rootContributor

Emtpy column separator @{} is ignored: arrays always have an extra space

Created by: SuzanneSoy

In the format specification for an array, the @{} separators is ignored, and the column sep is always inserted.

So far, I have not found any way to get two things on top of each other without extra space on the sides, short of patching with \! negative spaces: array and matrix add a bit of space on the left and a lot on the right, aligned and split add a lot of space on the left and a bit on the right, \choose adds some parentheses, \arraycolsep=0pt causes an error, the @{} column separator is ignored, \substack and subarray have extra spacing and change the font size, \frac draws a horizontal line and changes the font size… is there a way to produce a vertical superposition of two elements without adding any horizontal spacing, aside from using \! or a negative \hspace to shift things back into place?

HTML: https://jsfiddle.net/wdbngtxb/

The "a" has an extra space on each side.

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: { inlineMath: [['$','$'],], },
  });
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=default"></script>
<body>
  $x\begin{array}{@{}l@{}}a\end{array}y$
</body>

LaTeX document:

With LaTeX, there is no extra space around the "a".

\documentclass{article}
\begin{document}
$x\begin{array}{@{}l@{}}a\end{array}y$
\end{document}
Assignee
Assign to
Time tracking