jos
f19cfb4394
Reintroduced node.eval(scope). Updated some docs and examples
2015-07-18 10:21:48 +02:00
jos
936386c96c
Fixed #405 : Parser throws error when defining a function in a multiline expression
2015-07-11 20:21:49 +02:00
Max Bruckner
1983516c2f
Tests for new templates
2015-06-07 19:26:31 +02:00
Max Bruckner
a598204fa7
Change template Syntax to ES6 like style
...
Access properties via ${property} and ${property[index]}
2015-06-07 18:49:58 +02:00
Max Bruckner
b3e8aae10c
LaTeX templates for attached toTex properties
2015-06-07 18:47:50 +02:00
Max Bruckner
2b11b14632
Enable attaching toTex callbacks to functions
2015-06-07 18:41:25 +02:00
jos
a92b978036
Merged develop into v2
2015-06-07 15:57:41 +02:00
jos
c810981238
Method Node.compile() no longer needs math to be passed as argument.
2015-05-27 13:30:35 +02:00
Rogelio J. Baucells
9b6a9c2298
Range.forEach() and map() API changes
...
Range.forEach() and map() API change to match Matrix
2015-05-21 13:17:17 -04:00
Rogelio J. Baucells
f2a179aa31
Merge branch 'josdejong/v2' into v2-Index
...
Conflicts:
lib/core/typed.js
lib/type/index/prototype/Index.js
2015-05-21 00:38:58 -04:00
Rogelio J. Baucells
7579412f7d
Index dimension with immutable matrix
2015-05-20 17:41:03 -04:00
Max Bruckner
5b160767c1
operators.js: Pass parenthesis option directly
2015-05-16 13:31:57 +02:00
Max Bruckner
3f217cefdd
toTex: no global configuration. Only pass around one local object
2015-05-16 13:30:25 +02:00
Max Bruckner
c0e1b2d268
toString: no global configuration. Only pass around one local object
2015-05-16 13:29:55 +02:00
Max Bruckner
8d3b3bbe35
Tests for custom toString
2015-05-16 13:29:20 +02:00
Max Bruckner
291d620972
Pass local configuration to toTex functions
2015-05-16 13:27:48 +02:00
Max Bruckner
e383c1c2ce
Throw errors when trying to toTex/toString a Node interface
2015-05-16 13:21:39 +02:00
rjbaucells
799ccc9463
set from parser
2015-05-13 22:45:28 -04:00
rjbaucells
6f8fca77cb
tests - final
2015-05-13 20:29:43 -04:00
jos
0c1e9deeeb
Implemented configuration value {number: 'fraction'}. Added docs and example for fractions.
2015-05-12 14:40:47 +02:00
Max Bruckner
aa7ca9178f
Implement 'all' parenthesis option
2015-05-08 09:07:15 +02:00
Max Bruckner
c6f22e3663
unskip tests that were broken by parsing parenthesis nodes
2015-05-07 12:06:37 +02:00
Max Bruckner
5767f1f912
OperatorNode: Fix bug from wrong use of getIdentifier
...
1+(1+1) with parenthesis set to 'auto' triggered a bug because
getPrecedence gets the precedence of the content of a node, but
getIdentifier still returns the 'ParenthesisNode' identifier in case of
a ParenthesisNode.
2015-05-07 12:04:53 +02:00
Max Bruckner
2959858b99
operators: Use config when calculating precedence etc.
...
Use the parenthesis configuration to decide wether ParenthesisNodes
should be skipped or not.
2015-05-07 10:13:43 +02:00
Max Bruckner
60e2b5700a
ParenthesisNode: Make use of the parenthesis config option
2015-05-07 10:13:41 +02:00
Max Bruckner
6c2cd7f7b7
Node: add method 'getContent()'
...
The 'getContent' method returns the next node down the node tree that
isn't a ParenthesisNode.
2015-05-07 10:12:41 +02:00
Max Bruckner
dd0a5e3a68
Parse parentheses into ParenthesisNodes
2015-05-07 10:12:41 +02:00
Max Bruckner
ea04373028
New ParenthesisNode to represent parentheses in the node tree
2015-05-07 10:12:40 +02:00
jos
8c032f2593
Replaced all instanceof checks with x && xisMyType === true checks
2015-05-05 15:09:21 +02:00
jos
b32b89f94c
Moved help/docs related stuff to ./lib/expression
2015-05-05 14:01:38 +02:00
jos
7e3eda8603
Moved all data types and their construction functions into a folder of their own under ./lib/type
2015-05-05 13:51:24 +02:00
jos
8b06d04d48
Moved expression related functions under ./lib/expression/function
2015-05-05 11:52:18 +02:00
Max Bruckner
472aba4e35
BlockNode: add whitespaces to the LaTeX output
2015-05-03 22:17:21 +02:00
jos
f7c5381a13
Fixed Node.transform not recursing over replaced parts of the node tree (see #349 ).
2015-05-02 17:27:14 +02:00
jos
99e3fd40c4
Introduced event emitter, and events config and import. Renamed loader.js to core.js
2015-05-01 14:03:29 +02:00
jos
e348cb70a2
Refactored Range and Index. Reorganized index.js
2015-04-30 20:36:45 +02:00
Max Bruckner
dca94e67b7
Node.toTex: improve 'not implemented' error message to contain the type.
2015-04-29 23:59:31 +02:00
Max Bruckner
250707b668
Convert the isNode function into a boolean property.
2015-04-28 09:56:01 +02:00
Max Bruckner
390a0060b4
Add is<NameOfNode> property to enable type checking across constructors
2015-04-28 09:14:53 +02:00
Max Bruckner
e62ab0dae4
Proper toTex for units and symbols.
...
Symbols now don't use `\mathrm` anymore by default, but units do.
2015-04-27 11:08:31 +02:00
Max Bruckner
ca4a0bfda4
Change LaTeX output of string function
...
toTex shouldn't do operations like toString on the node tree
2015-04-27 10:09:42 +02:00
jos
d3d3212633
Refactored all nodes into factory functions (see #342 )
2015-04-26 21:25:31 +02:00
jos
6e96d5a808
Merge branch 'develop' into v2
...
Conflicts:
HISTORY.md
bower.json
component.json
dist/math.js
dist/math.map
dist/math.min.js
lib/function/arithmetic/abs.js
lib/function/probability/gamma.js
lib/version.js
package.json
2015-04-22 21:43:56 +02:00
Max Bruckner
8ad525b66e
util/latex: get rid of many unnecessary curly braces
2015-04-19 11:08:00 +02:00
Max Bruckner
9c606c044f
latex.toSymbol: get rid of unnecessary curly braces and wire up units
2015-04-19 09:56:40 +02:00
Max Bruckner
ee4486c3df
SymbolNode.toTex: Prevent symbols from breaking operators
...
If a symbol comes after an operator like '\cdot', there needs to be a
space in between, otherwise the cdot won't get recognized by the LaTeX
parser.
2015-04-19 09:49:10 +02:00
Max Bruckner
1c73dc1262
ConstantNode.toTex: simplify exponential notatian and add test
2015-04-19 09:49:09 +02:00
Max Bruckner
2cd3da416e
UpdateNode.toTex: Fix syntax of assignment and fix test
2015-04-19 09:49:09 +02:00
Max Bruckner
55a66aeaaf
OperatorNode.toTex: get rid of unnecessary curly braces
2015-04-19 09:49:09 +02:00
Max Bruckner
753a0e7893
IndexNode.toTex: Bugfix: execute toTex on Range Arguments
...
Also changes the Layout of the LaTeX output of IndexNode.
2015-04-19 09:49:08 +02:00