You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
MathJax currently lacks support for the \vspace command. This makes it difficult to adjust vertical spacing in equations, particularly for negative spacing. While \hspace is supported, there's no direct equivalent for vertical space.
For example, consider trying to create a diagram, such as:
\begin{align}
\hspace{4cm} Y \\\hspace{4cm} \rule{0.1em}{2cm} \\% \vspace{-1em} X \hspace{0.2em} \rule{3.5cm}{0.1em}\end{align}
$$
\begin{align}
\hspace{4cm} Y \\
\hspace{4cm} \rule{0.1em}{2cm} \\
% \vspace{-1em}
X \hspace{0.2em} \rule{3.7cm}{0.1em}
\end{align}
$$
Without \vspace, it is impossible to introduce the desired negative vertical spacing.
Describe the solution you'd like
Add support for the \vspace command in MathJax, allowing users to add vertical space (both positive and negative) using syntax like \vspace{1em} or \vspace{-1em}.
Describe alternatives you've considered
The workaround \rule{0pt}{#1em} can add positive vertical space but cannot create negative vertical space.
The text was updated successfully, but these errors were encountered:
Because MathJax converts the LaTeX to MathML internally, there are some limitations on what MathJax can support. Alignments are implemented as tables, and MathML does not have a means of vertically backspacing within a table, so MathJax can't support the negative \vspace that you are suggesting without a complete rewrite of how alignments are handled.
On the other hand, you don't need negative spacing to do what you are looking for here. For example,
\begin{align}
Y \\ X \hspace{0.2em}\raise.1em{\small\blacktriangleleft}\!\rule[.25em]{3.5cm}{0.1em} \rule[.25em]{0.1em}{2cm}\>\,\end{align}
produces
which seems to be what you are looking for.
Also, note that the \\ macro can be followed by an optional argument that gives space to use between the lines of an alignment or array. That can be used to add extra space, or to remove a small amount of space, but only the extra space that is being inserted between the rows, so it can't make the rows overlap.
Is your feature request related to a problem? Please describe.
MathJax currently lacks support for the
\vspace
command. This makes it difficult to adjust vertical spacing in equations, particularly for negative spacing. While\hspace
is supported, there's no direct equivalent for vertical space.For example, consider trying to create a diagram, such as:
Without
\vspace
, it is impossible to introduce the desired negative vertical spacing.Describe the solution you'd like
Add support for the
\vspace
command in MathJax, allowing users to add vertical space (both positive and negative) using syntax like\vspace{1em}
or\vspace{-1em}
.Describe alternatives you've considered
The workaround
\rule{0pt}{#1em}
can add positive vertical space but cannot create negative vertical space.The text was updated successfully, but these errors were encountered: