math-core 0.6.2__tar.gz → 0.6.3__tar.gz
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.
- {math_core-0.6.2 → math_core-0.6.3}/Cargo.lock +5 -5
- {math_core-0.6.2 → math_core-0.6.3}/Cargo.toml +1 -1
- {math_core-0.6.2 → math_core-0.6.3}/PKG-INFO +1 -1
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core/Cargo.toml +2 -2
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core/src/environments.rs +12 -2
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core/src/parser.rs +1 -8
- {math_core-0.6.2 → math_core-0.6.3}/LICENSE +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core/README.md +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core/examples/browser_test.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core/examples/equations.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core/examples/minijinja.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core/src/atof.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core/src/character_class.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core/src/color_defs.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core/src/commands.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core/src/error.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core/src/html_utils.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core/src/lexer.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core/src/lib.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core/src/predefined.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core/src/specifications.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core/src/text_parser.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core/src/token.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core/src/token_queue.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core/tests/conversion_test.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core/tests/custom_cmd_test.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core/tests/error_test.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core/tests/wiki_test.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core-python/Cargo.toml +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core-python/README.md +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/math-core-python/src/lib.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/mathml-renderer/Cargo.toml +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/mathml-renderer/README.md +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/mathml-renderer/src/arena.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/mathml-renderer/src/ast.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/mathml-renderer/src/attribute.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/mathml-renderer/src/fmt.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/mathml-renderer/src/itoa.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/mathml-renderer/src/length.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/mathml-renderer/src/lib.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/mathml-renderer/src/super_char.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/mathml-renderer/src/symbol.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/crates/mathml-renderer/src/table.rs +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/pyproject.toml +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/python/math_core/__init__.py +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/python/math_core/_math_core_rust.pyi +0 -0
- {math_core-0.6.2 → math_core-0.6.3}/python/math_core/py.typed +0 -0
|
@@ -358,7 +358,7 @@ dependencies = [
|
|
|
358
358
|
|
|
359
359
|
[[package]]
|
|
360
360
|
name = "math-core"
|
|
361
|
-
version = "0.6.
|
|
361
|
+
version = "0.6.3"
|
|
362
362
|
dependencies = [
|
|
363
363
|
"ariadne",
|
|
364
364
|
"insta",
|
|
@@ -378,7 +378,7 @@ dependencies = [
|
|
|
378
378
|
|
|
379
379
|
[[package]]
|
|
380
380
|
name = "math-core-cli"
|
|
381
|
-
version = "0.6.
|
|
381
|
+
version = "0.6.3"
|
|
382
382
|
dependencies = [
|
|
383
383
|
"ariadne",
|
|
384
384
|
"clap",
|
|
@@ -391,7 +391,7 @@ dependencies = [
|
|
|
391
391
|
|
|
392
392
|
[[package]]
|
|
393
393
|
name = "math-core-python"
|
|
394
|
-
version = "0.6.
|
|
394
|
+
version = "0.6.3"
|
|
395
395
|
dependencies = [
|
|
396
396
|
"ariadne",
|
|
397
397
|
"math-core",
|
|
@@ -401,7 +401,7 @@ dependencies = [
|
|
|
401
401
|
|
|
402
402
|
[[package]]
|
|
403
403
|
name = "math-core-renderer-internal"
|
|
404
|
-
version = "0.6.
|
|
404
|
+
version = "0.6.3"
|
|
405
405
|
dependencies = [
|
|
406
406
|
"bitflags",
|
|
407
407
|
"dtoa",
|
|
@@ -414,7 +414,7 @@ dependencies = [
|
|
|
414
414
|
|
|
415
415
|
[[package]]
|
|
416
416
|
name = "math-core-wasm"
|
|
417
|
-
version = "0.6.
|
|
417
|
+
version = "0.6.3"
|
|
418
418
|
dependencies = [
|
|
419
419
|
"ariadne",
|
|
420
420
|
"js-sys",
|
|
@@ -19,7 +19,7 @@ categories = ["science"]
|
|
|
19
19
|
exclude = ["/src/snapshots", "/tests/snapshots"]
|
|
20
20
|
|
|
21
21
|
[dependencies]
|
|
22
|
-
mathml-renderer = { path = "../mathml-renderer", package = "math-core-renderer-internal", version = "0.6.
|
|
22
|
+
mathml-renderer = { path = "../mathml-renderer", package = "math-core-renderer-internal", version = "0.6.3" }
|
|
23
23
|
serde = { workspace = true, optional = true }
|
|
24
24
|
serde-tuple-vec-map = { version = "1.0.1", optional = true }
|
|
25
25
|
phf = { version = "0.13.1", features = ["macros"] }
|
|
@@ -32,7 +32,7 @@ ariadne = { workspace = true, optional = true }
|
|
|
32
32
|
|
|
33
33
|
[dev-dependencies]
|
|
34
34
|
math-core = { path = ".", features = ["serde", "ariadne"] }
|
|
35
|
-
mathml-renderer = { path = "../mathml-renderer", package = "math-core-renderer-internal", version = "0.6.
|
|
35
|
+
mathml-renderer = { path = "../mathml-renderer", package = "math-core-renderer-internal", version = "0.6.3", features = ["serde"] }
|
|
36
36
|
insta = { version = "1.47.2", features = ["default", "ron"] }
|
|
37
37
|
regex = "1.12.3"
|
|
38
38
|
minijinja = "2.20.0"
|
|
@@ -124,6 +124,16 @@ impl Env {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
+
pub(super) fn style(self) -> Style {
|
|
128
|
+
use Env::*;
|
|
129
|
+
match self {
|
|
130
|
+
DArray | Align | AlignStar | Aligned | Equation | EquationStar | Gather
|
|
131
|
+
| GatherStar | Gathered | MultLine => Style::Display,
|
|
132
|
+
Array | Cases | Matrix | BMatrix | Bmatrix | PMatrix | VMatrix | Vmatrix => Style::Text,
|
|
133
|
+
Subarray => Style::Script,
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
127
137
|
pub(super) fn construct_node<'arena>(
|
|
128
138
|
self,
|
|
129
139
|
content: &'arena [&'arena Node<'arena>],
|
|
@@ -173,7 +183,7 @@ impl Env {
|
|
|
173
183
|
let content = arena.push(Node::Table {
|
|
174
184
|
content,
|
|
175
185
|
align,
|
|
176
|
-
style:
|
|
186
|
+
style: Some(Style::Text),
|
|
177
187
|
});
|
|
178
188
|
const OPEN_BRACE: StretchableOp =
|
|
179
189
|
StretchableOp::from_ord(symbol::LEFT_CURLY_BRACKET).unwrap();
|
|
@@ -186,7 +196,7 @@ impl Env {
|
|
|
186
196
|
debug_assert!(array_spec.is_some());
|
|
187
197
|
let array_spec = unsafe { array_spec.unwrap_unchecked() };
|
|
188
198
|
let style = match array_variant {
|
|
189
|
-
Env::Array =>
|
|
199
|
+
Env::Array => Some(Style::Text),
|
|
190
200
|
Env::DArray => Some(Style::Display),
|
|
191
201
|
Env::Subarray => Some(Style::Script),
|
|
192
202
|
_ => unreachable!(),
|
|
@@ -1263,14 +1263,7 @@ where
|
|
|
1263
1263
|
&mut self.state.meaningful_newlines,
|
|
1264
1264
|
env.meaningful_newlines(),
|
|
1265
1265
|
);
|
|
1266
|
-
let old_style = mem::replace(
|
|
1267
|
-
&mut self.state.style,
|
|
1268
|
-
if matches!(env, Env::Subarray) {
|
|
1269
|
-
Style::Script
|
|
1270
|
-
} else {
|
|
1271
|
-
Style::Text
|
|
1272
|
-
},
|
|
1273
|
-
);
|
|
1266
|
+
let old_style = mem::replace(&mut self.state.style, env.style());
|
|
1274
1267
|
let old_numbered =
|
|
1275
1268
|
mem::replace(&mut self.state.numbered, env.get_numbered_env_state());
|
|
1276
1269
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|