- The following floor and ceil operators are now considered fences.
|__
⇒ ⌊__|
⇒ ⌋|~
⇒ ⌈~|
⇒ ⌉
- Added the following fences:
<<
⇒ ⟨>>
⇒ ⟩
- Meaningful identifiers and operators cannot immedietly follow—or be
followed by—an alphabetic character. E.g.
asinb
will not combine thesin
into a single identifier. Surround the identifier with spaces to get the desired result. E.g.a sin b
, or—better yet—use invisible (zero width) operators (U+2061–U+2064;a&*sin&$b
; see below). - Infixes (e.g.
/
,^
, or_
) now follow a consistent grammar. It will operate on the previous/next literal if it immediately presides/follows (e.g. no space between), otherwise it will operate on the previous/next expression (i.e. terms grouped together by surrounding space/parens/other infixes). - Font commands now work on the following expression, as opposed to
just following token elements. E.g. now its possible to do
bf [a; b]
to make all the terms of the matrix bold-face. - Bevelled fractions (
a./b
) have been removed. They are deprecated in MathML and might be removed from browsers soon. Usea//b
instead for a fraction slash operator. - Removed nested bracket matrix notation:
[(a, b), (c, d)]
. Use column seperators or newlines for writing matrices:[a, b; c, d]
. - pipe fences and matrices (
|a,b;c,d|
and||a,b;c,d||
) now require inner parenthesis (|(a,b;c,d)|
and||(a,b;c,d)||
respectively). - Unicode numbers are now strictly (with one expection) in the Nd,
Nl, and No unicode categories. The only exceptions are the dozenal
U+218A ↊ TURNED DIGIT TWO
andU+218B ↋ TURNED DIGIT THREE
. This omits CJK numerals (like 二, 四, or 万) that were previously mapped to number literals. Prepend then with octothorpe (#四十二
) if you want the old behavior. - Backslash operators in brackets
\(foo)
,\[bar]
have been removed. Instead they follow the same syntax as octothorpe numbers. Write\int
for alphanumeric operators, or\`foo bar`
if they contain symbols. If you need to use a backtick as an operator then the fencing follows the same syntax as markdown.\`` ` ``
. The same goes for octothorpe numbers#`forty two`
, identifiers`foo bar`
, and text"" "in quotes" ""
. - Roots are now notated as taking two args (just like
binom
). writeroot(a, b)
orroot a b
. Unlike previous versionsroot(a)(b)
will now include the brackets arounda
andb
.
- Fenced groups will no long render in the deprecated
<mfenced>
element. Instead it renders in the visually equivalent<mrow>
s with<mo>
s as fences and seperators. lim
andmod
now map to opperators and render in an<mo>
element.
- Added
.toString()
and.toDOM()
methods to the returned object. - Added
obrace
andubrace
to accents. - Added invisible operators
&+
,&*
,&,
, and&$
for implied addition, multiplication, seperation and function application respectively.
- Removed the following opitons from the main function—they might be
reimplented if demand is there:
annotate
bare
standalone
- Calling main function with a single option parameter no longer
returns another main function with those options applied. If you
want to curry the main function, use an arrow function or a library:
const curried = input => mathup(input, { display: "block" })
- Main function no longer returns string by default. Use the
.toString()
method of the returned object instead.
binom
function can now handle empty terms #32
- runarberg [email protected]
- Added
binom(a, b)
for the binomial coefficient.
- A two row column vector, denoted with
(a; b)
will no longer turn into a binomial coefficient. It will stay as a column vector. Usebinom(a, b)
if you want the old behavior.
- Semicolon- and newline seperated matrices
[a, b; c, d]
now take precedence over parenthesis delimited matrices[(a, b), (c, d)]
in case of ambiguity.
- runarberg [email protected]
- Fixed binary not working on native node. (#25)
- runarberg [email protected]
- Updated dependencies passing
npm audit
. (#24)
- Comma/semicolon matrices to take precedence over bracket delimited matrices. (#19)
- runarberg [email protected]
- shellyln [email protected]
- Dropped support for io.js and node versions 0.10.x through 7.x. Now support is only from node version 8.x.
- Stopped transpiling down to ES5. This includes the distributed scripts and the npm published package. This means that if you want to support old browsers or runtimes you must transpile the scripts your self, using e.g. Babel.
- Dropped Babel as a runtime dependency. This means that if you are going to support old browsers or node environments you must provide your own polyfills for ES-2015+ methods.
- Added new operators:
|><
⇒ ‘⋉’><|
⇒ ‘⋊’|><|
⇒ ‘⋈’-<=
⇒ ‘⪯’>-=
⇒ ‘⪰’~=
⇒ ‘≅’>->
⇒ ‘↣’->>
⇒ ‘↠’>->>
⇒ ‘⤖’
- Added complex groupings:
abs(a + b)
⇒|a + b|
floor(a + b)
⇒⌊a + b⌋
ceil(a + b)
⇒⌈a + b⌉
norm(a + b)
⇒∥a + b∥
- Added
tilde
(~) as a new accent. - Added
cancel
as a new accent that diagonally strikes through the following expression.
- Whitespace between font modifiers and expressions is now allowed.
e.g.
it"foo"
andit "foo"
are now equivalent. - Expressions ending in Fraction, root, sqrt, sub, sup, under or
overscript opperations without opperands, will opperate on the empty
<mrow>
instead of throwing an irrelevant expression. For examplesqrt
yields an empty squared root. - Unclosed fences
(a, b,
will now longer throw exeptions, Instead the fence will be implicitly closed with the empty string.
- Lukas Bestle [email protected]
- runarberg [email protected]
- Passing in the
dir: "rtl"
option will add the attribute to the root math element, for right-to-left directionality.
- The
==
operator now maps to ≡.
- Allowing arbitrary numerals using the
#`...`
syntax. - Ascii2MathML will now recognize most UNICODE numerals. The numeral codeblocks were borrowed from xregexps (unicode-plugin)[http://xregexp.com/plugins/#unicode], but extended to include the duodecimals and Chinese/Japanese numerals.
- Supplying a minified version through the distributied code.
- A trailing rowbrake in matrices are allowed. A trailing rowbrake in a fence will force a row-matrix.
- Newlines functions as rowbrakes for matrices.
- Compiling the code to ECMA-5 with Babeljs pre-publish. That means it will run on node 0.10.x environments.
- Added parsing options for decimal mark, column separators and row separators.
- Calling
ascii2mathml
with only an object will return anotherascii2mathml
function with the objects values as the new defaults.
- Using Babelify transformation for browserify. That means greater browser support.