mystmd 1.3.15__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.
- {mystmd-1.3.15.dist-info → mystmd-1.3.17.dist-info}/METADATA +1 -1
- mystmd-1.3.17.dist-info/RECORD +9 -0
- mystmd_py/myst.cjs +225 -49
- mystmd-1.3.15.dist-info/RECORD +0 -9
- {mystmd-1.3.15.dist-info → mystmd-1.3.17.dist-info}/WHEEL +0 -0
- {mystmd-1.3.15.dist-info → mystmd-1.3.17.dist-info}/entry_points.txt +0 -0
- {mystmd-1.3.15.dist-info → mystmd-1.3.17.dist-info}/licenses/LICENSE +0 -0
@@ -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
@@ -77868,7 +77868,7 @@ var require_blockquote = __commonJS({
|
|
77868
77868
|
"../myst-parser/node_modules/markdown-it/lib/rules_block/blockquote.js"(exports2, module2) {
|
77869
77869
|
"use strict";
|
77870
77870
|
var isSpace = require_utils5().isSpace;
|
77871
|
-
module2.exports = function
|
77871
|
+
module2.exports = function blockquote5(state, startLine, endLine, silent) {
|
77872
77872
|
var adjustTab, ch, i2, initial, l, lastLineEmpty, lines, nextLine, offset, oldBMarks, oldBSCount, oldIndent, oldParentType, oldSCount, oldTShift, spaceAfterMarker, terminate, terminatorRules, token, isOutdented, oldLineMax = state.lineMax, pos = state.bMarks[startLine] + state.tShift[startLine], max = state.eMarks[startLine];
|
77873
77873
|
if (state.sCount[startLine] - state.blkIndent >= 4) {
|
77874
77874
|
return false;
|
@@ -193891,7 +193891,7 @@ var {
|
|
193891
193891
|
} = import_index.default;
|
193892
193892
|
|
193893
193893
|
// src/version.ts
|
193894
|
-
var version = "1.3.
|
193894
|
+
var version = "1.3.17";
|
193895
193895
|
var version_default = version;
|
193896
193896
|
|
193897
193897
|
// ../myst-cli/dist/build/build.js
|
@@ -205348,8 +205348,8 @@ function transformGitHubBracketedAdmonition(node3) {
|
|
205348
205348
|
return true;
|
205349
205349
|
}
|
205350
205350
|
function admonitionBlockquoteTransform(tree) {
|
205351
|
-
const
|
205352
|
-
|
205351
|
+
const blockquote5 = selectAll("blockquote", tree);
|
205352
|
+
blockquote5.forEach((node3) => {
|
205353
205353
|
[transformGitHubBracketedAdmonition, transformGitHubBoldTitle].reduce((complete, fn) => complete || fn(node3), false);
|
205354
205354
|
});
|
205355
205355
|
}
|
@@ -278455,24 +278455,24 @@ var ALGORITHM_HANDLERS = {
|
|
278455
278455
|
state.openNode("proof", { kind: "algorithm" });
|
278456
278456
|
state.renderChildren(node3);
|
278457
278457
|
state.closeParagraph();
|
278458
|
-
const
|
278459
|
-
const caption3 = select("caption",
|
278458
|
+
const proof2 = state.top();
|
278459
|
+
const caption3 = select("caption", proof2);
|
278460
278460
|
if (caption3) {
|
278461
278461
|
caption3.type = "admonitionTitle";
|
278462
278462
|
caption3.children = (_a6 = caption3.children) === null || _a6 === void 0 ? void 0 : _a6[0].children;
|
278463
278463
|
}
|
278464
278464
|
if (caption3 === null || caption3 === void 0 ? void 0 : caption3.label) {
|
278465
|
-
|
278465
|
+
proof2.label = caption3.label;
|
278466
278466
|
delete caption3.label;
|
278467
278467
|
delete caption3.identifier;
|
278468
278468
|
}
|
278469
|
-
if (
|
278470
|
-
const { label, identifier } = (_b = normalizeLabel(
|
278471
|
-
|
278472
|
-
|
278473
|
-
|
278469
|
+
if (proof2.label) {
|
278470
|
+
const { label, identifier } = (_b = normalizeLabel(proof2.label)) !== null && _b !== void 0 ? _b : {};
|
278471
|
+
proof2.label = label;
|
278472
|
+
proof2.identifier = identifier;
|
278473
|
+
proof2.enumerated = true;
|
278474
278474
|
}
|
278475
|
-
numberParagraphsAsLines(
|
278475
|
+
numberParagraphsAsLines(proof2);
|
278476
278476
|
state.closeNode();
|
278477
278477
|
},
|
278478
278478
|
env_algorithmic(node3, state) {
|
@@ -278884,9 +278884,16 @@ var FIGURE_HANDLERS = {
|
|
278884
278884
|
},
|
278885
278885
|
macro_centering: centering,
|
278886
278886
|
macro_includegraphics(node3, state) {
|
278887
|
+
var _a6, _b, _c;
|
278887
278888
|
state.closeParagraph();
|
278888
278889
|
const url = texToText(getArguments(node3, "group"));
|
278889
|
-
|
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
|
+
if (args.length === 4 && args[0].content === "width" && args[1].content === "=" && Number.isFinite(Number.parseFloat(args[2].content))) {
|
278892
|
+
const width = `${Math.round(Number.parseFloat(args[2].content) * 100)}%`;
|
278893
|
+
state.pushNode(u2("image", { url, width }));
|
278894
|
+
} else {
|
278895
|
+
state.pushNode(u2("image", { url }));
|
278896
|
+
}
|
278890
278897
|
},
|
278891
278898
|
macro_caption: renderCaption,
|
278892
278899
|
macro_captionof: renderCaption,
|
@@ -282087,26 +282094,43 @@ var iframeDirective = {
|
|
282087
282094
|
align: {
|
282088
282095
|
type: String,
|
282089
282096
|
doc: "The alignment of the iframe in the page. Choose one of `left`, `center` or `right`"
|
282097
|
+
},
|
282098
|
+
placeholder: {
|
282099
|
+
type: String,
|
282100
|
+
doc: "A placeholder image for the iframe in static exports."
|
282090
282101
|
}
|
282091
282102
|
},
|
282092
282103
|
body: { type: "myst", doc: "If provided, this will be the iframe caption." },
|
282093
282104
|
run(data) {
|
282094
|
-
var _a6, _b, _c, _d2;
|
282105
|
+
var _a6, _b, _c, _d2, _e, _f, _g, _h, _j;
|
282095
282106
|
const iframe3 = {
|
282096
282107
|
type: "iframe",
|
282097
282108
|
src: data.arg,
|
282098
282109
|
width: (_a6 = data.options) === null || _a6 === void 0 ? void 0 : _a6.width,
|
282099
282110
|
align: (_b = data.options) === null || _b === void 0 ? void 0 : _b.align
|
282100
282111
|
};
|
282112
|
+
if ((_c = data.options) === null || _c === void 0 ? void 0 : _c.placeholder) {
|
282113
|
+
iframe3.children = [
|
282114
|
+
{
|
282115
|
+
type: "image",
|
282116
|
+
placeholder: true,
|
282117
|
+
url: data.options.placeholder,
|
282118
|
+
alt: (_d2 = data.options) === null || _d2 === void 0 ? void 0 : _d2.alt,
|
282119
|
+
width: (_e = data.options) === null || _e === void 0 ? void 0 : _e.width,
|
282120
|
+
height: (_f = data.options) === null || _f === void 0 ? void 0 : _f.height,
|
282121
|
+
align: (_g = data.options) === null || _g === void 0 ? void 0 : _g.align
|
282122
|
+
}
|
282123
|
+
];
|
282124
|
+
}
|
282101
282125
|
if (!data.body) {
|
282102
|
-
iframe3.class = (
|
282126
|
+
iframe3.class = (_h = data.options) === null || _h === void 0 ? void 0 : _h.class;
|
282103
282127
|
addCommonDirectiveOptions(data, iframe3);
|
282104
282128
|
return [iframe3];
|
282105
282129
|
}
|
282106
282130
|
const container4 = {
|
282107
282131
|
type: "container",
|
282108
282132
|
kind: "figure",
|
282109
|
-
class: (
|
282133
|
+
class: (_j = data.options) === null || _j === void 0 ? void 0 : _j.class,
|
282110
282134
|
children: [iframe3, { type: "caption", children: data.body }]
|
282111
282135
|
};
|
282112
282136
|
addCommonDirectiveOptions(data, container4);
|
@@ -289095,7 +289119,7 @@ var proofDirective = {
|
|
289095
289119
|
const nonumber = (_b = (_a6 = data.options) === null || _a6 === void 0 ? void 0 : _a6.nonumber) !== null && _b !== void 0 ? _b : false;
|
289096
289120
|
const rawLabel = (_c = data.options) === null || _c === void 0 ? void 0 : _c.label;
|
289097
289121
|
const { label, identifier } = normalizeLabel(rawLabel) || {};
|
289098
|
-
const
|
289122
|
+
const proof2 = {
|
289099
289123
|
type: "proof",
|
289100
289124
|
kind: data.name !== "proof" ? data.name.replace("prf:", "") : void 0,
|
289101
289125
|
label,
|
@@ -289104,7 +289128,7 @@ var proofDirective = {
|
|
289104
289128
|
enumerated: !nonumber,
|
289105
289129
|
children
|
289106
289130
|
};
|
289107
|
-
return [
|
289131
|
+
return [proof2];
|
289108
289132
|
}
|
289109
289133
|
};
|
289110
289134
|
|
@@ -289380,7 +289404,7 @@ var import_node_path15 = __toESM(require("path"), 1);
|
|
289380
289404
|
var import_nbtx = __toESM(require_cjs2(), 1);
|
289381
289405
|
|
289382
289406
|
// ../myst-cli/dist/version.js
|
289383
|
-
var version2 = "1.3.
|
289407
|
+
var version2 = "1.3.17";
|
289384
289408
|
var version_default2 = version2;
|
289385
289409
|
|
289386
289410
|
// ../myst-cli/dist/utils/headers.js
|
@@ -306771,18 +306795,35 @@ var containerHandler2 = (node3, state) => {
|
|
306771
306795
|
source: "myst-to-typst"
|
306772
306796
|
});
|
306773
306797
|
}
|
306798
|
+
const flatCaptions = captions.map((cap2) => cap2.children).filter(Boolean).flat();
|
306799
|
+
if (node3.kind === "quote") {
|
306800
|
+
const prevIsInBlockquote = state.data.isInBlockquote;
|
306801
|
+
state.data.isInBlockquote = true;
|
306802
|
+
state.write("#quote(block: true");
|
306803
|
+
if (flatCaptions.length > 0) {
|
306804
|
+
state.write(", attribution: [");
|
306805
|
+
state.renderChildren(flatCaptions);
|
306806
|
+
state.write("])[");
|
306807
|
+
} else {
|
306808
|
+
state.write(")[");
|
306809
|
+
}
|
306810
|
+
state.renderChildren(nonCaptions);
|
306811
|
+
state.write("]");
|
306812
|
+
state.data.isInBlockquote = prevIsInBlockquote;
|
306813
|
+
return;
|
306814
|
+
}
|
306774
306815
|
if (nonCaptions && nonCaptions.length > 1) {
|
306775
306816
|
const allSubFigs = nonCaptions.filter((item) => item.type === "container").length === nonCaptions.length;
|
306776
306817
|
state.useMacro('#import "@preview/subpar:0.1.1"');
|
306777
306818
|
state.write(`#show figure: set block(breakable: ${allSubFigs ? "false" : "true"})
|
306778
306819
|
`);
|
306779
306820
|
state.write("#subpar.grid(");
|
306780
|
-
let columns = 2;
|
306821
|
+
let columns = nonCaptions.length <= 3 ? nonCaptions.length : 2;
|
306781
306822
|
nonCaptions.forEach((item) => {
|
306782
306823
|
if (item.type === "container") {
|
306783
306824
|
state.write("figure(\n");
|
306784
306825
|
state.renderChildren(item);
|
306785
|
-
state.write("\n),");
|
306826
|
+
state.write("\n, caption: []),");
|
306786
306827
|
if (item.identifier) {
|
306787
306828
|
state.write(` <${item.identifier}>,`);
|
306788
306829
|
}
|
@@ -306793,7 +306834,7 @@ var containerHandler2 = (node3, state) => {
|
|
306793
306834
|
columns = 1;
|
306794
306835
|
}
|
306795
306836
|
});
|
306796
|
-
state.write(`columns:
|
306837
|
+
state.write(`columns: ${columns},
|
306797
306838
|
`);
|
306798
306839
|
if (label) {
|
306799
306840
|
state.write(`label: <${label}>,`);
|
@@ -306812,9 +306853,7 @@ var containerHandler2 = (node3, state) => {
|
|
306812
306853
|
}
|
306813
306854
|
if (captions === null || captions === void 0 ? void 0 : captions.length) {
|
306814
306855
|
state.write("\n caption: [\n");
|
306815
|
-
state.renderChildren(
|
306816
|
-
children: captions.map((cap2) => cap2.children).filter(Boolean).flat()
|
306817
|
-
});
|
306856
|
+
state.renderChildren(flatCaptions);
|
306818
306857
|
state.write("\n],");
|
306819
306858
|
}
|
306820
306859
|
if (kind) {
|
@@ -307082,7 +307121,8 @@ var typstStrings = {
|
|
307082
307121
|
",": (state) => state.data.inFunction ? "comma" : ",",
|
307083
307122
|
"&": (state) => state.data.inArray ? "," : "&",
|
307084
307123
|
"/": "\\/",
|
307085
|
-
";": "\\;"
|
307124
|
+
";": "\\;",
|
307125
|
+
"~": "med"
|
307086
307126
|
};
|
307087
307127
|
function splitStrings(node3) {
|
307088
307128
|
var _a6, _b, _c;
|
@@ -307173,6 +307213,9 @@ var typstMacros = {
|
|
307173
307213
|
return "\\\n";
|
307174
307214
|
},
|
307175
307215
|
sim: "tilde",
|
307216
|
+
cong: "tilde.equiv",
|
307217
|
+
simeq: "tilde.eq",
|
307218
|
+
ne: "!=",
|
307176
307219
|
phi: "phi.alt",
|
307177
307220
|
varepsilon: "epsilon",
|
307178
307221
|
propto: "prop",
|
@@ -307182,7 +307225,6 @@ var typstMacros = {
|
|
307182
307225
|
le: "lt.eq",
|
307183
307226
|
leq: "lt.eq",
|
307184
307227
|
neq: "eq.not",
|
307185
|
-
simeq: "tilde.eq",
|
307186
307228
|
otimes: "times.circle",
|
307187
307229
|
dot: "dot",
|
307188
307230
|
ddot: "dot.double",
|
@@ -307203,6 +307245,8 @@ var typstMacros = {
|
|
307203
307245
|
quad: "quad",
|
307204
307246
|
qquad: "wide",
|
307205
307247
|
prod: "product",
|
307248
|
+
biggl: "",
|
307249
|
+
biggr: "",
|
307206
307250
|
mathbb: (state, node3) => {
|
307207
307251
|
var _a6, _b, _c, _d2, _e;
|
307208
307252
|
const text7 = (_e = (_d2 = (_c = (_b = (_a6 = node3.args) === null || _a6 === void 0 ? void 0 : _a6.slice(-1)[0]) === null || _b === void 0 ? void 0 : _b.content) === null || _c === void 0 ? void 0 : _c[0]) === null || _d2 === void 0 ? void 0 : _d2.content) !== null && _e !== void 0 ? _e : "";
|
@@ -307210,6 +307254,10 @@ var typstMacros = {
|
|
307210
307254
|
node3.args = [];
|
307211
307255
|
return letters2;
|
307212
307256
|
},
|
307257
|
+
mathscr: (state) => {
|
307258
|
+
state.useMacro(`#let scr(it) = text(features: ("ss01",), box($cal(it)$))`);
|
307259
|
+
return "scr";
|
307260
|
+
},
|
307213
307261
|
overset: (state, node3) => {
|
307214
307262
|
var _a6;
|
307215
307263
|
state.useMacro('#import "@preview/ouset:0.2.0": *');
|
@@ -307245,9 +307293,16 @@ function parseLatex2(value) {
|
|
307245
307293
|
dot: { signature: "m" },
|
307246
307294
|
ddot: { signature: "m" },
|
307247
307295
|
hat: { signature: "m" },
|
307296
|
+
tilde: { signature: "m" },
|
307248
307297
|
widehat: { signature: "m" },
|
307249
307298
|
overset: { signature: "m m" },
|
307250
|
-
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" }
|
307251
307306
|
}
|
307252
307307
|
}).processSync({ value });
|
307253
307308
|
const content3 = file.result.content;
|
@@ -307425,7 +307480,7 @@ function writeTypst(node3, state = new State4()) {
|
|
307425
307480
|
return state;
|
307426
307481
|
}
|
307427
307482
|
function postProcess(typst) {
|
307428
|
-
return typst.replace(/^(_|\^)/, '""$1').replace(/"([^"]*)"=/g, '"$1" =');
|
307483
|
+
return typst.replace(/^(_|\^)/, '""$1').replace(/"([^"]*)"=/g, '"$1" =').replace(/(\d+)(?:\s+)(?=\d)/g, "$1");
|
307429
307484
|
}
|
307430
307485
|
function texToTypst(value) {
|
307431
307486
|
const tree = parseLatex2(value);
|
@@ -307537,7 +307592,7 @@ var tableHandler = (node3, state) => {
|
|
307537
307592
|
});
|
307538
307593
|
return;
|
307539
307594
|
}
|
307540
|
-
state.useMacro('#import "@preview/tablex:0.0.
|
307595
|
+
state.useMacro('#import "@preview/tablex:0.0.9": tablex, cellx, hlinex, vlinex');
|
307541
307596
|
state.useMacro("#let tableStyle = (:)");
|
307542
307597
|
state.write(`${command}(columns: ${columns}, header-rows: ${countHeaderRows(node3)}, repeat-header: true, ..tableStyle,
|
307543
307598
|
`);
|
@@ -307549,7 +307604,7 @@ var tableRowHandler = (node3, state) => {
|
|
307549
307604
|
state.renderChildren(node3, 1);
|
307550
307605
|
};
|
307551
307606
|
var tableCellHandler = (node3, state) => {
|
307552
|
-
if (node3.rowspan || node3.colspan) {
|
307607
|
+
if (node3.rowspan || node3.colspan || node3.align) {
|
307553
307608
|
state.write("cellx(");
|
307554
307609
|
if (node3.rowspan) {
|
307555
307610
|
state.write(`rowspan: ${node3.rowspan}, `);
|
@@ -307557,6 +307612,9 @@ var tableCellHandler = (node3, state) => {
|
|
307557
307612
|
if (node3.colspan) {
|
307558
307613
|
state.write(`colspan: ${node3.colspan}, `);
|
307559
307614
|
}
|
307615
|
+
if (node3.align) {
|
307616
|
+
state.write(`align: ${node3.align}, `);
|
307617
|
+
}
|
307560
307618
|
state.write(")");
|
307561
307619
|
}
|
307562
307620
|
state.write("[\n");
|
@@ -307589,10 +307647,39 @@ var admonitionMacros = {
|
|
307589
307647
|
tip: "#let tipBlock(body, heading: [Tip]) = admonition(body, heading: heading, color: green)",
|
307590
307648
|
warning: "#let warningBlock(body, heading: [Warning]) = admonition(body, heading: heading, color: yellow)"
|
307591
307649
|
};
|
307592
|
-
var
|
307593
|
-
|
307594
|
-
|
307595
|
-
|
307650
|
+
var tabSet = `
|
307651
|
+
#let tabSet(body) = {
|
307652
|
+
block(width: 100%, stroke: luma(240), [#body])
|
307653
|
+
}`;
|
307654
|
+
var tabItem = `
|
307655
|
+
#let tabItem(body, heading: none) = {
|
307656
|
+
let title
|
307657
|
+
if heading != none {
|
307658
|
+
title = block(width: 100%, inset: (x: 8pt, y: 4pt), fill: luma(250))[#text(9pt, weight: "bold")[#heading]]
|
307659
|
+
}
|
307660
|
+
block(width: 100%, [
|
307661
|
+
#title
|
307662
|
+
#block(width: 100%, inset: (x: 8pt, bottom: 8pt))[#body]
|
307663
|
+
])
|
307664
|
+
}`;
|
307665
|
+
var proof = `
|
307666
|
+
#let proof(body, heading: [], kind: "proof", supplement: "Proof", labelName: none, color: blue, float: true) = {
|
307667
|
+
let stroke = 1pt + color.lighten(90%)
|
307668
|
+
let fill = color.lighten(90%)
|
307669
|
+
let title
|
307670
|
+
set figure.caption(position: top)
|
307671
|
+
set figure(placement: none)
|
307672
|
+
show figure.caption.where(body: heading): (it) => {
|
307673
|
+
block(width: 100%, stroke: stroke, fill: fill, inset: 8pt, it)
|
307674
|
+
}
|
307675
|
+
place(auto, float: float, block(width: 100%, [
|
307676
|
+
#figure(kind: kind, supplement: supplement, gap: 0pt, [
|
307677
|
+
#set align(left);
|
307678
|
+
#set figure.caption(position: bottom)
|
307679
|
+
#block(width: 100%, fill: luma(253), stroke: stroke, inset: 8pt)[#body]
|
307680
|
+
], caption: heading)
|
307681
|
+
#if(labelName != none){label(labelName)}
|
307682
|
+
]))
|
307596
307683
|
}`;
|
307597
307684
|
var INDENT = " ";
|
307598
307685
|
var linkHandler = (node3, state) => {
|
@@ -307646,8 +307733,13 @@ var handlers4 = {
|
|
307646
307733
|
state.renderChildren(node3, 2);
|
307647
307734
|
},
|
307648
307735
|
blockquote(node3, state) {
|
307649
|
-
state.
|
307650
|
-
|
307736
|
+
if (state.data.isInBlockquote) {
|
307737
|
+
state.renderChildren(node3);
|
307738
|
+
return;
|
307739
|
+
}
|
307740
|
+
state.write("#quote(block: true)[");
|
307741
|
+
state.renderChildren(node3);
|
307742
|
+
state.write("]");
|
307651
307743
|
},
|
307652
307744
|
definitionList(node3, state) {
|
307653
307745
|
let dedent = false;
|
@@ -307811,7 +307903,7 @@ ${node3.value}
|
|
307811
307903
|
}
|
307812
307904
|
state.useMacro(admonitionMacros[node3.kind]);
|
307813
307905
|
state.write(`#${node3.kind}Block`);
|
307814
|
-
if (title && toText(title).toLowerCase().
|
307906
|
+
if (title && toText(title).toLowerCase().replaceAll(" ", "") !== node3.kind) {
|
307815
307907
|
state.write("(heading: [");
|
307816
307908
|
state.renderChildren(title);
|
307817
307909
|
state.write("])");
|
@@ -307837,6 +307929,20 @@ ${node3.value}
|
|
307837
307929
|
}
|
307838
307930
|
state.write(")\n\n");
|
307839
307931
|
},
|
307932
|
+
iframe(node3, state) {
|
307933
|
+
var _a6;
|
307934
|
+
const image6 = (_a6 = node3.children) === null || _a6 === void 0 ? void 0 : _a6[0];
|
307935
|
+
if (!image6 || image6.placeholder !== true)
|
307936
|
+
return;
|
307937
|
+
const { width: nodeWidth, url: nodeSrc, align } = image6;
|
307938
|
+
const src = nodeSrc;
|
307939
|
+
const width = getLatexImageWidth2(nodeWidth);
|
307940
|
+
state.write(`#image("${src}"`);
|
307941
|
+
if (!state.data.isInTable) {
|
307942
|
+
state.write(`, width: ${width}`);
|
307943
|
+
}
|
307944
|
+
state.write(")\n\n");
|
307945
|
+
},
|
307840
307946
|
container: containerHandler2,
|
307841
307947
|
caption: captionHandler2,
|
307842
307948
|
legend: captionHandler2,
|
@@ -307911,6 +308017,60 @@ ${node3.value}
|
|
307911
308017
|
} else if ((_a6 = node3.children) === null || _a6 === void 0 ? void 0 : _a6.length) {
|
307912
308018
|
state.renderChildren(node3, void 0, { trimEnd: false });
|
307913
308019
|
}
|
308020
|
+
},
|
308021
|
+
tabSet(node3, state) {
|
308022
|
+
state.useMacro(tabSet);
|
308023
|
+
state.write("#tabSet[\n");
|
308024
|
+
state.renderChildren(node3);
|
308025
|
+
state.write("\n]\n\n");
|
308026
|
+
},
|
308027
|
+
tabItem(node3, state) {
|
308028
|
+
state.useMacro(tabItem);
|
308029
|
+
state.ensureNewLine();
|
308030
|
+
const title = node3.title;
|
308031
|
+
state.write(`#tabItem(heading: [${title}])[
|
308032
|
+
`);
|
308033
|
+
state.renderChildren(node3);
|
308034
|
+
state.write("\n]\n\n");
|
308035
|
+
},
|
308036
|
+
proof(node3, state) {
|
308037
|
+
state.useMacro(proof);
|
308038
|
+
const title = select("admonitionTitle", node3);
|
308039
|
+
const kind = node3.kind || "proof";
|
308040
|
+
const supplement = getDefaultCaptionSupplement(kind);
|
308041
|
+
state.write(`#proof(kind: "${kind}", supplement: "${supplement}", labelName: ${node3.identifier ? `"${node3.identifier}"` : "none"}`);
|
308042
|
+
if (title) {
|
308043
|
+
state.write(", heading: [");
|
308044
|
+
state.renderChildren(title);
|
308045
|
+
state.write("])[");
|
308046
|
+
} else {
|
308047
|
+
state.write(")[");
|
308048
|
+
}
|
308049
|
+
state.renderChildren(node3);
|
308050
|
+
state.write("]");
|
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;
|
307914
308074
|
}
|
307915
308075
|
};
|
307916
308076
|
var TypstSerializer = class {
|
@@ -307956,8 +308116,13 @@ var TypstSerializer = class {
|
|
307956
308116
|
return;
|
307957
308117
|
this.addNewLine();
|
307958
308118
|
}
|
307959
|
-
renderChildren(node3, trailingNewLines = 0,
|
308119
|
+
renderChildren(node3, trailingNewLines = 0, opts = {}) {
|
307960
308120
|
var _a6, _b, _c;
|
308121
|
+
if (Array.isArray(node3)) {
|
308122
|
+
this.renderChildren({ children: node3 }, trailingNewLines, opts);
|
308123
|
+
return;
|
308124
|
+
}
|
308125
|
+
const { delim = "", trimEnd: trimEnd2 = true } = opts;
|
307961
308126
|
const numChildren = (_b = (_a6 = node3.children) === null || _a6 === void 0 ? void 0 : _a6.length) !== null && _b !== void 0 ? _b : 0;
|
307962
308127
|
(_c = node3.children) === null || _c === void 0 ? void 0 : _c.forEach((child, index4) => {
|
307963
308128
|
if (!child)
|
@@ -308109,8 +308274,12 @@ async function localArticleToTypstRaw(session, templateOptions, opts) {
|
|
308109
308274
|
const { dir, name: name3, ext: ext2 } = import_node_path45.default.parse(output2);
|
308110
308275
|
let includeContent = "";
|
308111
308276
|
let fileInd = 0;
|
308277
|
+
let addPageBreak = false;
|
308112
308278
|
articles.forEach((article) => {
|
308113
308279
|
var _a6, _b, _c, _d2;
|
308280
|
+
if (addPageBreak)
|
308281
|
+
includeContent += "#pagebreak()\n\n";
|
308282
|
+
addPageBreak = false;
|
308114
308283
|
if (article.file) {
|
308115
308284
|
const base5 = `${name3}-${(_b = (_a6 = content3[fileInd]) === null || _a6 === void 0 ? void 0 : _a6.slug) !== null && _b !== void 0 ? _b : fileInd}${ext2}`;
|
308116
308285
|
const includeFile = import_node_path45.default.format({ dir, ext: ext2, base: base5 });
|
@@ -308126,6 +308295,7 @@ async function localArticleToTypstRaw(session, templateOptions, opts) {
|
|
308126
308295
|
|
308127
308296
|
`;
|
308128
308297
|
fileInd++;
|
308298
|
+
addPageBreak = true;
|
308129
308299
|
} else if (article.title) {
|
308130
308300
|
includeContent += `${titleToTypstHeading(session, article.title, article.level)}
|
308131
308301
|
|
@@ -308134,6 +308304,7 @@ async function localArticleToTypstRaw(session, templateOptions, opts) {
|
|
308134
308304
|
});
|
308135
308305
|
writeFileToFolder(output2, includeContent);
|
308136
308306
|
}
|
308307
|
+
await runTypstExecutable(session, output2);
|
308137
308308
|
return { tempFolders: [] };
|
308138
308309
|
}
|
308139
308310
|
async function localArticleToTypstTemplated(session, file, templateOptions, opts) {
|
@@ -308217,8 +308388,12 @@ async function localArticleToTypstTemplated(session, file, templateOptions, opts
|
|
308217
308388
|
const { dir, name: name3, ext: ext2 } = import_node_path45.default.parse(output2);
|
308218
308389
|
typstContent = "";
|
308219
308390
|
let fileInd = 0;
|
308391
|
+
let addPageBreak = false;
|
308220
308392
|
articles.forEach((article) => {
|
308221
308393
|
var _a7, _b, _c, _d2;
|
308394
|
+
if (addPageBreak)
|
308395
|
+
typstContent += "#pagebreak()\n\n";
|
308396
|
+
addPageBreak = false;
|
308222
308397
|
if (article.file) {
|
308223
308398
|
const base5 = `${name3}-${(_b = (_a7 = content3[fileInd]) === null || _a7 === void 0 ? void 0 : _a7.slug) !== null && _b !== void 0 ? _b : fileInd}${ext2}`;
|
308224
308399
|
const includeFile = import_node_path45.default.format({ dir, ext: ext2, base: base5 });
|
@@ -308237,6 +308412,7 @@ ${part}${results[fileInd].value}`);
|
|
308237
308412
|
|
308238
308413
|
`;
|
308239
308414
|
fileInd++;
|
308415
|
+
addPageBreak = true;
|
308240
308416
|
} else if (article.title) {
|
308241
308417
|
typstContent += `${titleToTypstHeading(session, article.title, article.level)}
|
308242
308418
|
|
@@ -308553,7 +308729,7 @@ var smallcaps = (state, node3) => {
|
|
308553
308729
|
state.addRunOptions({ smallCaps: true });
|
308554
308730
|
state.renderChildren(node3);
|
308555
308731
|
};
|
308556
|
-
var
|
308732
|
+
var blockquote3 = (state, node3) => {
|
308557
308733
|
state.renderChildren(node3, { style: "IntenseQuote" });
|
308558
308734
|
};
|
308559
308735
|
var code4 = (state, node3) => {
|
@@ -308850,7 +309026,7 @@ var defaultHandlers = {
|
|
308850
309026
|
delete: _delete,
|
308851
309027
|
underline,
|
308852
309028
|
smallcaps,
|
308853
|
-
blockquote:
|
309029
|
+
blockquote: blockquote3,
|
308854
309030
|
code: code4,
|
308855
309031
|
image: image3,
|
308856
309032
|
block: block3,
|
@@ -310322,11 +310498,11 @@ function containerTransform(mdast2) {
|
|
310322
310498
|
liftCaptionNumber(container4);
|
310323
310499
|
if (container4.kind === "quote") {
|
310324
310500
|
const caption4 = select("caption > paragraph", container4);
|
310325
|
-
const
|
310326
|
-
if (
|
310501
|
+
const blockquote5 = select("blockquote", container4);
|
310502
|
+
if (blockquote5 && caption4) {
|
310327
310503
|
const newContainer = container4;
|
310328
310504
|
newContainer.type = "blockquote";
|
310329
|
-
newContainer.children =
|
310505
|
+
newContainer.children = blockquote5.children;
|
310330
310506
|
caption4.type = "attrib";
|
310331
310507
|
newContainer.children.push(caption4);
|
310332
310508
|
}
|
@@ -314941,7 +315117,7 @@ function configure(base5, extension) {
|
|
314941
315117
|
}
|
314942
315118
|
|
314943
315119
|
// ../../node_modules/mdast-util-to-markdown/lib/handle/blockquote.js
|
314944
|
-
function
|
315120
|
+
function blockquote4(node3, _3, state, info) {
|
314945
315121
|
const exit = state.enter("blockquote");
|
314946
315122
|
const tracker = state.createTracker(info);
|
314947
315123
|
tracker.move("> ");
|
@@ -315695,7 +315871,7 @@ function thematicBreak3(_3, _1, state) {
|
|
315695
315871
|
|
315696
315872
|
// ../../node_modules/mdast-util-to-markdown/lib/handle/index.js
|
315697
315873
|
var handle5 = {
|
315698
|
-
blockquote:
|
315874
|
+
blockquote: blockquote4,
|
315699
315875
|
break: hardBreak2,
|
315700
315876
|
code: code5,
|
315701
315877
|
definition,
|
@@ -316291,7 +316467,7 @@ function tabSetValidator(node3, file) {
|
|
316291
316467
|
}
|
316292
316468
|
});
|
316293
316469
|
}
|
316294
|
-
function
|
316470
|
+
function tabItem2(node3, _3, state, info) {
|
316295
316471
|
const handler = writeFlowDirective("tab-item", node3.title, { keys: ["sync", "selected"] });
|
316296
316472
|
return handler(node3, _3, state, info);
|
316297
316473
|
}
|
@@ -316307,7 +316483,7 @@ var directiveHandlers2 = {
|
|
316307
316483
|
transforms: { columns: (val) => val.join(" ") }
|
316308
316484
|
}),
|
316309
316485
|
tabSet: writeFlowDirective("tab-set"),
|
316310
|
-
tabItem,
|
316486
|
+
tabItem: tabItem2,
|
316311
316487
|
math: writeStaticDirective("math", { keys: ["label"] }),
|
316312
316488
|
embed: writeStaticDirective("embed", { argsKey: "label" }),
|
316313
316489
|
include: writeStaticDirective("include", { argsKey: "file" }),
|
mystmd-1.3.15.dist-info/RECORD
DELETED
@@ -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=psg34JWf29pNV9hZ-chBv-eZ2NLXNomMhcQcJqwL02E,13154572
|
4
|
-
mystmd_py/nodeenv.py,sha256=8KER0P-WIXM2MsRJF4vcedBKscGoc26lJKojbkDxjbg,2447
|
5
|
-
mystmd-1.3.15.dist-info/METADATA,sha256=oRpiXjXsC_EQTccUcVb5gDW5zz9ybRm_OiJaeGmEJus,3020
|
6
|
-
mystmd-1.3.15.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
7
|
-
mystmd-1.3.15.dist-info/entry_points.txt,sha256=eC2ol2gqS2q5E-ktkMrBSvV0tckGUcNGS-c4hEQ-_V4,45
|
8
|
-
mystmd-1.3.15.dist-info/licenses/LICENSE,sha256=4BcikqvulW5nh_MxaocO-lC7ydIX23dMbcqtNTUSxr4,1082
|
9
|
-
mystmd-1.3.15.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|