tex2typst 0.3.27-beta.1 → 0.3.28

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.
package/README.md CHANGED
@@ -35,7 +35,7 @@ import { tex2typst, typst2tex } from 'tex2typst';
35
35
  let tex = "e \\overset{\\text{def}}{=} \\lim_{{n \\to \\infty}} \left(1 + \\frac{1}{n}\\right)^n";
36
36
  let typst = tex2typst(tex);
37
37
  console.log(typst);
38
- // e eq.def lim_(n -> infinity)(1 + 1/n)^n
38
+ // e eq.def lim_(n -> infinity) (1 + 1/n)^n
39
39
 
40
40
  let tex_recovered = typst2tex(typst);
41
41
  console.log(tex_recovered);
package/dist/index.d.ts CHANGED
@@ -1,24 +1,22 @@
1
-
2
- /**
3
- * ATTENTION:
4
- * Don't use any options except those explicitly documented in
5
- * https://github.com/qwinsi/tex2typst/blob/main/docs/api-reference.md
6
- * Any undocumented options may be not working at present or break in the future!
7
- */
8
-
9
- export interface Tex2TypstOptions {
10
- nonStrict?: boolean; /** default is true */
11
- preferShorthands?: boolean; /** default is true */
12
- keepSpaces?: boolean; /** default is false */
13
- fracToSlash?: boolean; /** default is true */
14
- inftyToOo?: boolean; /** default is false */
15
- optimize?: boolean; /** default is true */
16
- nonAsciiWrapper?: string; /** default is "" */
17
- customTexMacros?: { [key: string]: string; };
18
- }
19
-
20
- export declare function tex2typst(tex: string, options?: Tex2TypstOptions): string;
21
- export declare function typst2tex(typst: string): string;
22
-
23
- export declare const symbolMap: Map<string, string>;
24
- export declare const shorthandMap: Map<string, string>;
1
+
2
+ /**
3
+ * ATTENTION:
4
+ * Don't use any options except those explicitly documented in
5
+ * https://github.com/qwinsi/tex2typst/blob/main/docs/api-reference.md
6
+ * Any undocumented options may be not working at present or break in the future!
7
+ */
8
+ export interface Tex2TypstOptions {
9
+ nonStrict?: boolean; /** default is true */
10
+ preferShorthands?: boolean; /** default is true */
11
+ keepSpaces?: boolean; /** default is false */
12
+ fracToSlash?: boolean; /** default is true */
13
+ inftyToOo?: boolean; /** default is false */
14
+ optimize?: boolean; /** default is true */
15
+ customTexMacros?: { [key: string]: string; };
16
+ }
17
+
18
+ export declare function tex2typst(tex: string, options?: Tex2TypstOptions): string;
19
+ export declare function typst2tex(typst: string): string;
20
+
21
+ export declare const symbolMap: Map<string, string>;
22
+ export declare const shorthandMap: Map<string, string>;