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
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
jos
84512de60b
Added a few more index.js files. Removed caching mechanism for function transforms (will be improved upon later again)
2015-04-27 14:54:03 +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
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
Max Bruckner
978bc2bc31
FunctionAssignmentNode.toTex: get rid of unnecessary curly braces
2015-04-19 09:49:08 +02:00
Max Bruckner
816b6314a7
AssignmentNode.toTex: get rid of unnecessary curly braces
2015-04-19 02:13:27 +02:00
Max Bruckner
8db07e23ad
OperatorNode.toTex: BUGFIX: make clear where the exponent belongs to
...
Without proper parentheses it's impossible to decide whether an exponent
belongs to the numerator of a fraction or to the entire fraction.
For ConditionalNode, the exponent is hard to see without parentheses.
2015-04-19 02:11:20 +02:00
Max Bruckner
f2bcfed89f
LaTeX: no spaces between operands and operators
2015-04-17 14:18:24 +02:00
Max Bruckner
7c1c9c0cef
Show less unnecessary parentheses in LaTeX output
...
OperatorNodes with exponentiation, fractions and conditions use less
parentheses.
2015-04-16 22:31:02 +02:00
jos
349e9845e8
Merge branch 'develop' into v2_merge
...
Conflicts:
HISTORY.md
bower.json
component.json
dist/math.js
dist/math.map
dist/math.min.js
docs/reference/units.md
lib/version.js
package.json
test/function/construction/chain.test.js
test/function/matrix/det.test.js
test/function/matrix/transpose.test.js
test/function/utils/import.test.js
2015-04-13 21:42:43 +02:00
Jos de Jong
bc6f63b6c9
Merge pull request #318 from FSMaxB/latex-restructure
...
Restructure and complete the LaTeX generator.
2015-04-13 09:39:16 +02:00
jos
3150e21c8e
Fixed #313 : parsed functions did not handle recursive calls correctly
2015-04-09 20:29:51 +02:00
Max Bruckner
dacf9fba46
OperatorNode: bugfix: toTex creates invalid LaTeX
...
toTex has been creating invalid LaTeX for fractions where the operands
are in parenthesis, see '(1+1)/2' for example
2015-04-05 14:29:15 +02:00
Max Bruckner
671734f215
util/latex: Use function names as keys for map of operators
2015-04-05 14:29:14 +02:00
Max Bruckner
0868987cdf
util/latex: use ":=" for assignments and '=' 'equal'
2015-04-05 14:29:14 +02:00
Max Bruckner
e536af8328
OperatorNode: get rid of util/latex's toFunction
2015-04-05 14:29:13 +02:00
Max Bruckner
0772a1fb81
util/latex: Get rid of toUnit ( hasn't been working anyway )
2015-04-05 14:29:12 +02:00
Max Bruckner
6b1d09f2cb
util/latex: new toSymbol
2015-04-05 14:29:12 +02:00
Max Bruckner
e160efbb66
util/latex: get rid of the toOperator function
2015-04-05 14:29:11 +02:00
Max Bruckner
5dcb87aeaa
util/latex: Remove unused functions
...
* toArgs
* addBraces
* dots and curly functions
util/latex.js: Remove Function addBraces
util/latex.js remove dots and curly functions
2015-04-05 14:29:09 +02:00
Max Bruckner
13e35217b7
Latex restructure
2015-04-05 14:25:54 +02:00
jos
8a68bb56e4
Merged math.js v1.5 into v2. Format support of functions eye and diag still needs to be fixed
2015-03-31 22:07:47 +02:00
jos
5cab0641e9
Simplified the factory structure a little bit. Reworked reviver and BigNumber to factories
2015-03-26 21:03:55 +01:00
Rogelio J. Baucells
0d34992080
Merge pull request #23 from josdejong/develop
...
Sync
2015-03-19 00:06:26 -04:00
Max Bruckner
e04dfd26bc
Rename customFuncions to callbacks
2015-03-17 18:30:26 +01:00
Max Bruckner
47f76f35ac
Limit custom toTex with multiple callbacks to FunctionNodes
...
Now only FunctionNode's toTex can be overwritten mit a map of callbacks
2015-03-17 18:14:14 +01:00
Max Bruckner
a973482ef2
Fix bug in fix of breaking change
...
Without this fix, the type passed to ArrayNode.toTex would stay there
forever until you change it back manually instead of being used only
once.
2015-03-14 09:09:07 +01:00
Max Bruckner
af763aa996
Fix breaking change (Node.toTex should return an empty string)
2015-03-13 21:23:14 +01:00
Max Bruckner
c9d20285e9
Fix breaking change ( passing type to ArrayNode.toTex )
2015-03-13 21:23:14 +01:00
Max Bruckner
0fee9173c8
Enable custom toTex functions
2015-03-13 21:23:14 +01:00
Max Bruckner
35ce7f7fb4
Make Node.toTex a wrapper like Node.compile
...
Node.prototype.toTex is now a wrapper that calls the node's _toTex
2015-03-13 21:23:14 +01:00
Max Bruckner
37c1363c2d
Pass callbacks to toTex functions
2015-03-13 21:23:13 +01:00
Rogelio J. Baucells
b4463d9ef3
Initial require() changes
2015-03-04 13:53:32 -05:00
Max Bruckner
6a9c2df38c
Update FunctionAssignmentNode to better handle parenthesis
2015-03-01 17:10:09 +01:00
Max Bruckner
bb2bfc939c
Update AssignmentNode to better handle parenthesis
2015-03-01 17:02:42 +01:00
Max Bruckner
b2d868c2ed
Update OperatorNode's toTex to better handle parens
...
Use the new infrastructure in OperatorNode's toTex
2015-03-01 16:34:09 +01:00
Max Bruckner
b5ce799e9d
New generic toString for AssignmentNode
2015-03-01 10:35:04 +01:00
Max Bruckner
1f2f42012c
New generic toString for FunctionAssignmentNode
2015-03-01 10:35:04 +01:00