mystmd 1.3.16__py3-none-any.whl → 1.3.17__py3-none-any.whl

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,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: mystmd
3
- Version: 1.3.16
3
+ Version: 1.3.17
4
4
  Summary: Command line tools for MyST Markdown
5
5
  Project-URL: Homepage, https://github.com/jupyter-book/mystmd
6
6
  Project-URL: Bug Tracker, https://github.com/jupyter-book/mystmd/issues
@@ -0,0 +1,9 @@
1
+ mystmd_py/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ mystmd_py/main.py,sha256=qFAnpbiqjx7jXMMmPSVUBA7SSxuRjmr6SiRDBH0rhKQ,2767
3
+ mystmd_py/myst.cjs,sha256=sZ2DxPoUE6kB5ba9VflpZCEG3we3kE1-CNTE_l7Knw8,13160449
4
+ mystmd_py/nodeenv.py,sha256=8KER0P-WIXM2MsRJF4vcedBKscGoc26lJKojbkDxjbg,2447
5
+ mystmd-1.3.17.dist-info/METADATA,sha256=FQKZ2yUBv3lvIWx0Tn4iSgOSLSYP4uCdddUbnHrgb-c,3020
6
+ mystmd-1.3.17.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
7
+ mystmd-1.3.17.dist-info/entry_points.txt,sha256=eC2ol2gqS2q5E-ktkMrBSvV0tckGUcNGS-c4hEQ-_V4,45
8
+ mystmd-1.3.17.dist-info/licenses/LICENSE,sha256=4BcikqvulW5nh_MxaocO-lC7ydIX23dMbcqtNTUSxr4,1082
9
+ mystmd-1.3.17.dist-info/RECORD,,
mystmd_py/myst.cjs CHANGED
@@ -193891,7 +193891,7 @@ var {
193891
193891
  } = import_index.default;
193892
193892
 
193893
193893
  // src/version.ts
193894
- var version = "1.3.16";
193894
+ var version = "1.3.17";
193895
193895
  var version_default = version;
193896
193896
 
193897
193897
  // ../myst-cli/dist/build/build.js
@@ -278884,10 +278884,10 @@ var FIGURE_HANDLERS = {
278884
278884
  },
278885
278885
  macro_centering: centering,
278886
278886
  macro_includegraphics(node3, state) {
278887
- var _a6;
278887
+ var _a6, _b, _c;
278888
278888
  state.closeParagraph();
278889
278889
  const url = texToText(getArguments(node3, "group"));
278890
- const args = (_a6 = getArguments(node3, "argument")) === null || _a6 === void 0 ? void 0 : _a6[0].content;
278890
+ const args = (_c = (_b = (_a6 = getArguments(node3, "argument")) === null || _a6 === void 0 ? void 0 : _a6[0]) === null || _b === void 0 ? void 0 : _b.content) !== null && _c !== void 0 ? _c : [];
278891
278891
  if (args.length === 4 && args[0].content === "width" && args[1].content === "=" && Number.isFinite(Number.parseFloat(args[2].content))) {
278892
278892
  const width = `${Math.round(Number.parseFloat(args[2].content) * 100)}%`;
278893
278893
  state.pushNode(u2("image", { url, width }));
@@ -289404,7 +289404,7 @@ var import_node_path15 = __toESM(require("path"), 1);
289404
289404
  var import_nbtx = __toESM(require_cjs2(), 1);
289405
289405
 
289406
289406
  // ../myst-cli/dist/version.js
289407
- var version2 = "1.3.16";
289407
+ var version2 = "1.3.17";
289408
289408
  var version_default2 = version2;
289409
289409
 
289410
289410
  // ../myst-cli/dist/utils/headers.js
@@ -307296,7 +307296,13 @@ function parseLatex2(value) {
307296
307296
  tilde: { signature: "m" },
307297
307297
  widehat: { signature: "m" },
307298
307298
  overset: { signature: "m m" },
307299
- underset: { signature: "m m" }
307299
+ underset: { signature: "m m" },
307300
+ overbrace: { signature: "m" },
307301
+ overline: { signature: "m" },
307302
+ overparen: { signature: "m" },
307303
+ underbrace: { signature: "m" },
307304
+ underline: { signature: "m" },
307305
+ underparen: { signature: "m" }
307300
307306
  }
307301
307307
  }).processSync({ value });
307302
307308
  const content3 = file.result.content;
@@ -307586,7 +307592,7 @@ var tableHandler = (node3, state) => {
307586
307592
  });
307587
307593
  return;
307588
307594
  }
307589
- state.useMacro('#import "@preview/tablex:0.0.8": tablex, cellx, hlinex, vlinex');
307595
+ state.useMacro('#import "@preview/tablex:0.0.9": tablex, cellx, hlinex, vlinex');
307590
307596
  state.useMacro("#let tableStyle = (:)");
307591
307597
  state.write(`${command}(columns: ${columns}, header-rows: ${countHeaderRows(node3)}, repeat-header: true, ..tableStyle,
307592
307598
  `);
@@ -307598,7 +307604,7 @@ var tableRowHandler = (node3, state) => {
307598
307604
  state.renderChildren(node3, 1);
307599
307605
  };
307600
307606
  var tableCellHandler = (node3, state) => {
307601
- if (node3.rowspan || node3.colspan) {
307607
+ if (node3.rowspan || node3.colspan || node3.align) {
307602
307608
  state.write("cellx(");
307603
307609
  if (node3.rowspan) {
307604
307610
  state.write(`rowspan: ${node3.rowspan}, `);
@@ -307606,6 +307612,9 @@ var tableCellHandler = (node3, state) => {
307606
307612
  if (node3.colspan) {
307607
307613
  state.write(`colspan: ${node3.colspan}, `);
307608
307614
  }
307615
+ if (node3.align) {
307616
+ state.write(`align: ${node3.align}, `);
307617
+ }
307609
307618
  state.write(")");
307610
307619
  }
307611
307620
  state.write("[\n");
@@ -308040,6 +308049,28 @@ ${node3.value}
308040
308049
  state.renderChildren(node3);
308041
308050
  state.write("]");
308042
308051
  state.ensureNewLine();
308052
+ },
308053
+ card(node3, state) {
308054
+ var _a6;
308055
+ if (node3.url) {
308056
+ (_a6 = node3.children) === null || _a6 === void 0 ? void 0 : _a6.push({ type: "paragraph", children: [{ type: "text", value: node3.url }] });
308057
+ }
308058
+ state.renderChildren(node3);
308059
+ state.ensureNewLine();
308060
+ state.write("\n");
308061
+ },
308062
+ cardTitle(node3, state) {
308063
+ state.write("*");
308064
+ state.renderChildren(node3);
308065
+ state.write("*");
308066
+ state.ensureNewLine();
308067
+ state.write("\n");
308068
+ },
308069
+ root(node3, state) {
308070
+ state.renderChildren(node3);
308071
+ },
308072
+ footer() {
308073
+ return;
308043
308074
  }
308044
308075
  };
308045
308076
  var TypstSerializer = class {
@@ -308243,8 +308274,12 @@ async function localArticleToTypstRaw(session, templateOptions, opts) {
308243
308274
  const { dir, name: name3, ext: ext2 } = import_node_path45.default.parse(output2);
308244
308275
  let includeContent = "";
308245
308276
  let fileInd = 0;
308277
+ let addPageBreak = false;
308246
308278
  articles.forEach((article) => {
308247
308279
  var _a6, _b, _c, _d2;
308280
+ if (addPageBreak)
308281
+ includeContent += "#pagebreak()\n\n";
308282
+ addPageBreak = false;
308248
308283
  if (article.file) {
308249
308284
  const base5 = `${name3}-${(_b = (_a6 = content3[fileInd]) === null || _a6 === void 0 ? void 0 : _a6.slug) !== null && _b !== void 0 ? _b : fileInd}${ext2}`;
308250
308285
  const includeFile = import_node_path45.default.format({ dir, ext: ext2, base: base5 });
@@ -308260,6 +308295,7 @@ async function localArticleToTypstRaw(session, templateOptions, opts) {
308260
308295
 
308261
308296
  `;
308262
308297
  fileInd++;
308298
+ addPageBreak = true;
308263
308299
  } else if (article.title) {
308264
308300
  includeContent += `${titleToTypstHeading(session, article.title, article.level)}
308265
308301
 
@@ -308268,6 +308304,7 @@ async function localArticleToTypstRaw(session, templateOptions, opts) {
308268
308304
  });
308269
308305
  writeFileToFolder(output2, includeContent);
308270
308306
  }
308307
+ await runTypstExecutable(session, output2);
308271
308308
  return { tempFolders: [] };
308272
308309
  }
308273
308310
  async function localArticleToTypstTemplated(session, file, templateOptions, opts) {
@@ -308351,8 +308388,12 @@ async function localArticleToTypstTemplated(session, file, templateOptions, opts
308351
308388
  const { dir, name: name3, ext: ext2 } = import_node_path45.default.parse(output2);
308352
308389
  typstContent = "";
308353
308390
  let fileInd = 0;
308391
+ let addPageBreak = false;
308354
308392
  articles.forEach((article) => {
308355
308393
  var _a7, _b, _c, _d2;
308394
+ if (addPageBreak)
308395
+ typstContent += "#pagebreak()\n\n";
308396
+ addPageBreak = false;
308356
308397
  if (article.file) {
308357
308398
  const base5 = `${name3}-${(_b = (_a7 = content3[fileInd]) === null || _a7 === void 0 ? void 0 : _a7.slug) !== null && _b !== void 0 ? _b : fileInd}${ext2}`;
308358
308399
  const includeFile = import_node_path45.default.format({ dir, ext: ext2, base: base5 });
@@ -308371,6 +308412,7 @@ ${part}${results[fileInd].value}`);
308371
308412
 
308372
308413
  `;
308373
308414
  fileInd++;
308415
+ addPageBreak = true;
308374
308416
  } else if (article.title) {
308375
308417
  typstContent += `${titleToTypstHeading(session, article.title, article.level)}
308376
308418
 
@@ -1,9 +0,0 @@
1
- mystmd_py/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- mystmd_py/main.py,sha256=qFAnpbiqjx7jXMMmPSVUBA7SSxuRjmr6SiRDBH0rhKQ,2767
3
- mystmd_py/myst.cjs,sha256=IQOqY_fcYOdNSRruV-BZBl--dd0uDcXF6vyzBY4GEEw,13159130
4
- mystmd_py/nodeenv.py,sha256=8KER0P-WIXM2MsRJF4vcedBKscGoc26lJKojbkDxjbg,2447
5
- mystmd-1.3.16.dist-info/METADATA,sha256=QoYn52IMHLinEFHlvwWYigSqVXicPaTeJFxldrdZ7lY,3020
6
- mystmd-1.3.16.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
7
- mystmd-1.3.16.dist-info/entry_points.txt,sha256=eC2ol2gqS2q5E-ktkMrBSvV0tckGUcNGS-c4hEQ-_V4,45
8
- mystmd-1.3.16.dist-info/licenses/LICENSE,sha256=4BcikqvulW5nh_MxaocO-lC7ydIX23dMbcqtNTUSxr4,1082
9
- mystmd-1.3.16.dist-info/RECORD,,