math-exercises 2.0.30 → 2.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"graphicInequation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/functions/basics/graphicInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EASb,MAAM,0BAA0B,CAAC;AASlC,OAAO,EAAE,WAAW,EAAgB,MAAM,oCAAoC,CAAC;AAI/E,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,WAAW,CAAA;KAAE,EAAE,CAAC;CAC7D,CAAC;AAgKF,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,WAAW,CAavD,CAAC"}
1
+ {"version":3,"file":"graphicInequation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/functions/basics/graphicInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EASb,MAAM,0BAA0B,CAAC;AASlC,OAAO,EAAE,WAAW,EAAgB,MAAM,oCAAoC,CAAC;AAI/E,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,WAAW,CAAA;KAAE,EAAE,CAAC;CAC7D,CAAC;AAiKF,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,WAAW,CAavD,CAAC"}
@@ -75,8 +75,8 @@ const getGraphicInequationQuestion = () => {
75
75
  const yMax = Math.max(...splinePoints.map((point) => point[1]));
76
76
  const intervalsNodes = intervals.map((i) => new intervalNode_1.IntervalNode(new numberNode_1.NumberNode(i.a), new numberNode_1.NumberNode(i.b), i.closure));
77
77
  const answer = intervalsNodes.length === 1
78
- ? `S=${intervalsNodes[0].toTex()}`
79
- : `S=${new unionIntervalNode_1.UnionIntervalNode(intervalsNodes).toTex()}`;
78
+ ? `S=\\ ${intervalsNodes[0].toTex()}`
79
+ : `S=\\ ${new unionIntervalNode_1.UnionIntervalNode(intervalsNodes).toTex()}`;
80
80
  const commands = [
81
81
  `S =Spline(${splinePoints
82
82
  .map((point) => `(${point[0]},${point[1]})`)
@@ -99,6 +99,7 @@ const getGraphicInequationQuestion = () => {
99
99
  "cup",
100
100
  "lbrace",
101
101
  "rbrace",
102
+ "varnothing",
102
103
  ],
103
104
  answerFormat: "tex",
104
105
  commands: ggb.commands,
@@ -118,11 +119,11 @@ const getPropositions = (n, { answer, intervals, splinePoints, yValue }) => {
118
119
  const propositions = [];
119
120
  (0, exercise_1.addValidProp)(propositions, answer);
120
121
  (0, exercise_1.tryToAddWrongProp)(propositions, `S=\\varnothing`);
121
- (0, exercise_1.tryToAddWrongProp)(propositions, `S=${new intervalNode_1.IntervalNode(new numberNode_1.NumberNode(splinePoints[0][0]), new numberNode_1.NumberNode(yValue), intervalNode_1.ClosureType.FF).toTex()}`);
122
+ (0, exercise_1.tryToAddWrongProp)(propositions, `S=\\ ${new intervalNode_1.IntervalNode(new numberNode_1.NumberNode(splinePoints[0][0]), new numberNode_1.NumberNode(yValue), intervalNode_1.ClosureType.FF).toTex()}`);
122
123
  while (propositions.length < n) {
123
124
  const a = (0, randint_1.randint)(-9, 3);
124
125
  const b = (0, randint_1.randint)(3, 10, [a]);
125
- (0, exercise_1.tryToAddWrongProp)(propositions, `S=${new intervalNode_1.IntervalNode(new numberNode_1.NumberNode(a), new numberNode_1.NumberNode(b), intervalNode_1.ClosureType.FF).toTex()}`);
126
+ (0, exercise_1.tryToAddWrongProp)(propositions, `S=\\ ${new intervalNode_1.IntervalNode(new numberNode_1.NumberNode(a), new numberNode_1.NumberNode(b), intervalNode_1.ClosureType.FF).toTex()}`);
126
127
  }
127
128
  return (0, exercise_1.shuffleProps)(propositions, n);
128
129
  };
@@ -49,7 +49,7 @@ class InequationSolutionNode {
49
49
  return `S={${this.intervalSolution.toMathjs()}}`;
50
50
  }
51
51
  toTex() {
52
- return `S=${this.intervalSolution.toTex()}`;
52
+ return `S=\\ ${this.intervalSolution.toTex()}`;
53
53
  }
54
54
  }
55
55
  exports.InequationSolutionNode = InequationSolutionNode;
@@ -55,7 +55,7 @@ class UnionIntervalNode {
55
55
  return this.toTex();
56
56
  }
57
57
  toTex() {
58
- return this.sets.map((set) => set.toTex()).join("\\ \\cup\\ ");
58
+ return this.sets.map((set) => set.toTex()).join("\\cup\\ ");
59
59
  }
60
60
  }
61
61
  exports.UnionIntervalNode = UnionIntervalNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "math-exercises",
3
- "version": "2.0.30",
3
+ "version": "2.0.32",
4
4
  "description": "Math exercises generator for middle school and high school",
5
5
  "main": "lib/index.js",
6
6
  "files": [