199 Commits

Author SHA1 Message Date
Max Bruckner
49e3fb7fad ConditionalNode: simplify LaTeX by using the 'cases' environment 2016-01-05 10:53:11 +01:00
jos
9ffab397b6 Fixed #485: Scoping issue with variables both used globally as well as in a function definition 2015-11-28 21:20:25 +01:00
jos
fa86d87e44 Fixed function number not supporting Fraction input 2015-11-27 21:44:07 +01:00
jos
ee52d4907a Removed some unused references 2015-07-31 09:23:09 +02:00
jos
188f43a26a Lazy loading works ... hurray!!! 2015-07-22 21:13:15 +02:00
jos
2353c4a61e Renamed folders util to utils 2015-07-18 13:22:38 +02:00
jos
f19cfb4394 Reintroduced node.eval(scope). Updated some docs and examples 2015-07-18 10:21:48 +02:00
jos
6c592fa67c Added an example custom_loading.js 2015-07-14 21:13:00 +02:00
jos
658990a49b Moved Range and Index under lib/type/matrix. Renamed the file Index.js to MatrixIndex.js to prevent name conflicts on Windows. Added an index.js file in lib/function 2015-07-12 20:21:27 +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
jos
1fdd5b0e7a Changed random naming of parameters to using a counter 2015-07-03 17:16:10 +02:00
Max Bruckner
24cd767fa0 Get rid of exports.functions in 'lib/util/latex.js' 2015-06-14 20:11:18 +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
665df50fc8 FunctionNode: Move latexToFunction to _toTex 2015-06-07 18:47:21 +02:00
Max Bruckner
0402d003dd Move logic for attached toTex to _toTex
This is necessary because otherwise it would overwrite the behavior of a
global callback (passed in `options`).
2015-06-07 18:46:51 +02:00
Max Bruckner
0078cbcb76 Move LaTeX template expansion to FunctionNode 2015-06-07 18:46:20 +02:00
Max Bruckner
40fb34924f Move function to LaTeX logic from util/latex to FunctionNode 2015-06-07 18:46:14 +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
jos
6c7bf4acf0 Removed boolean, string, and null from the list with argument types, only leaving the directly supported types (which types can be converted to supported types is determined externally). Consistently renamed primitive types lower case (boolean, string, number, null) and non-primitive types uppercase (Complex, BigNumber, Function, Array, ...). 2015-05-20 21:08:26 +02: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
a347405a98 toString: implement callbacks and local configuration 2015-05-16 13:28:51 +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
Max Bruckner
4159064a33 Node.toTex: remove dependency on FunctionNode
This is achieved by overriding parts of Node.toTex in FunctionNode.toTex
2015-05-16 13:21:38 +02:00
jos
0c1e9deeeb Implemented configuration value {number: 'fraction'}. Added docs and example for fractions. 2015-05-12 14:40:47 +02:00
Max Bruckner
474a2330c5 ParenthesisNode: Bugfix: call the toString wrapper function 2015-05-09 21:22:29 +02:00
Max Bruckner
aa7ca9178f Implement 'all' parenthesis option 2015-05-08 09:07:15 +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
ea04373028 New ParenthesisNode to represent parentheses in the node tree 2015-05-07 10:12:40 +02:00
Max Bruckner
bc2c29be8c Make _toString functions call the wrapper 2015-05-07 10:12:32 +02:00
jos
06b9664b87 Removed more instanceof checks 2015-05-05 15:21:57 +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
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
e348cb70a2 Refactored Range and Index. Reorganized index.js 2015-04-30 20:36:45 +02:00
Max Bruckner
6235fd6ce1 Make toString a wrapper around _toString
This enables preparating the node tree in `toString` before generating
the actual string output with `_toString` methods
2015-04-30 00:12:54 +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
15eb602a8f Remove workarounds from Node and ArrayNode 2015-04-29 12:12:46 +02:00
jos
1204259209 Refactored Complex and Unit into factory functions 2015-04-28 22:04:42 +02:00
jos
e5e2625838 Enclosed ResultSet in a factory function 2015-04-28 21:40:35 +02:00
Max Bruckner
8282f424c2 Use the prototype for is<Node> instead of the constructor 2015-04-28 20:13:53 +02:00
Max Bruckner
1c76430dda Get rid of 'instanceof' for Nodes (except for constructors) 2015-04-28 10:09:19 +02:00