Hello Davide,
001: environment
Mathjax 3.2.2
I use the svg output processor.
Firefox, Google Chrome
002: code snippet/Tex
begin{align}
&=first\\[10ex]
&=second\\[0ex]
end{align}
003: code snippet/Typescript from 3.2.2
/**
* Handle newline outside array.
* @param {TexParser} parser The calling parser.
* @param {string} name The macro name.
* @param {boolean} nobrackets Flag indicating if newline is followed by
* brackets.
*/
BaseMethods.CrLaTeX = function(parser: TexParser, name: string, nobrackets: boolean = false) {
let n: string;
if (!nobrackets) {
// TODO: spaces before * and [ are not allowed in AMS environments like align, but
// should be allowed in array and eqnarray. This distinction should be honored here.
if (parser.string.charAt(parser.i) === '*') { // The * controls page breaking, so ignore it
parser.i++;
}
if (parser.string.charAt(parser.i) === '[') {
let dim = parser.GetBrackets(name, '');
let [value, unit, ] = ParseUtil.matchDimen(dim);
// @test Custom Linebreak
if (dim && !value) {
// @test Dimension Error
throw new TexError('BracketMustBeDimension',
'Bracket argument to %1 must be a dimension', parser.currentCS);
}
n = value + unit;
let message: string = n;
alert(message);
}
}
parser.Push(
parser.itemFactory.create('cell').setProperties({isCR: true, name: name, linebreak: true})
);
const top = parser.stack.Top();
let node: MmlNode;
if (top instanceof sitem.ArrayItem)
{
// @test Array
if (n)
{
top.addRowSpacing(n);
}
}
else
{
if (n)
{
// @test Custom Linebreak
node = parser.create('node', 'mspace', [], {depth: n});
parser.Push(node);
}
// @test Linebreak
node = parser.create('node', 'mspace', [], {linebreak: TexConstant.LineBreak.NEWLINE});
parser.Push(node);
}
};
004: my question
from 002: \\[10ex] <- the distance between two lines
from 003: n = value + unit; <- n contains the number and the unit
The number can be negative or positive, but the subsequent
modules limit its absolute value.
In which part of the source code can I change
this behaviour?
I want to move the lines to anywhere on the page,
left, right, up and down.
005: recompiling Mathjax 3.2.2
I modified the Typescript source
and I could recompile and test the full
application successfully.
006: question
When are you going to publish
the "final" version of Mathjax 4?
Thank you.
joe