Skip to content

Commit 3928dc1

Browse files
committed
fix #223
1 parent 5d6959b commit 3928dc1

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@
5555
unaffected. Also added support for `\lcm` as a LaTeX command (in addition to
5656
the existing `\operatorname{lcm}`).
5757

58+
- **([#223](https://github.com/cortex-js/compute-engine/issues/223))
59+
Serialization**: Fixed scientific/engineering LaTeX serialization dropping
60+
the leading coefficient for exact powers of ten. For example, `1000` now
61+
serializes to `1\cdot10^{3}` (or `1\times10^{3}` depending on
62+
`exponentProduct`) instead of `10^{3}`.
63+
5864
- **LaTeX Parsing**: Fixed `\cosh` incorrectly mapping to `Csch` instead of `Cosh`.
5965

6066
- **([#242](https://github.com/cortex-js/compute-engine/issues/242))

src/compute-engine/latex-syntax/serialize-number.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,10 +328,6 @@ function serializeScientificNotationNumber(
328328
wholePart = insertWholeGroupSeparator(wholePart, options);
329329

330330
if (!expString) return wholePart + fractionalPart;
331-
if (!fractionalPart) {
332-
if (wholePart === '1') return expString;
333-
if (wholePart === '-1') return '-' + expString;
334-
}
335331
return wholePart + fractionalPart + options.exponentProduct + expString;
336332
}
337333

0 commit comments

Comments
 (0)