1
0

add initial marp implementation with sample content and build configuration

This commit is contained in:
2025-09-13 18:13:22 +02:00
parent dcacc9b409
commit e5f219507f
10319 changed files with 1402023 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
import { Configuration } from '../Configuration.js';
import ParseOptions from '../ParseOptions.js';
export declare function filterCenterOver({ data }: {
data: ParseOptions;
}): void;
export declare const CenternotConfiguration: Configuration;

View File

@@ -0,0 +1,68 @@
"use strict";
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CenternotConfiguration = exports.filterCenterOver = void 0;
var Configuration_js_1 = require("../Configuration.js");
var TexParser_js_1 = __importDefault(require("../TexParser.js"));
var NodeUtil_js_1 = __importDefault(require("../NodeUtil.js"));
var SymbolMap_js_1 = require("../SymbolMap.js");
var BaseMethods_js_1 = __importDefault(require("../base/BaseMethods.js"));
new SymbolMap_js_1.CommandMap('centernot', {
centerOver: 'CenterOver',
centernot: ['Macro', '\\centerOver{#1}{{\u29F8}}', 1]
}, {
CenterOver: function (parser, name) {
var arg = '{' + parser.GetArgument(name) + '}';
var over = parser.ParseArg(name);
var base = new TexParser_js_1.default(arg, parser.stack.env, parser.configuration).mml();
var mml = parser.create('node', 'TeXAtom', [
new TexParser_js_1.default(arg, parser.stack.env, parser.configuration).mml(),
parser.create('node', 'mpadded', [
parser.create('node', 'mpadded', [over], { width: 0, lspace: '-.5width' }),
parser.create('node', 'mphantom', [base])
], { width: 0, lspace: '-.5width' })
]);
parser.configuration.addNode('centerOver', base);
parser.Push(mml);
},
Macro: BaseMethods_js_1.default.Macro
});
function filterCenterOver(_a) {
var e_1, _b;
var data = _a.data;
try {
for (var _c = __values(data.getList('centerOver')), _d = _c.next(); !_d.done; _d = _c.next()) {
var base = _d.value;
var texClass = NodeUtil_js_1.default.getTexClass(base.childNodes[0].childNodes[0]);
if (texClass !== null) {
NodeUtil_js_1.default.setProperties(base.parent.parent.parent.parent.parent.parent, { texClass: texClass });
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
}
finally { if (e_1) throw e_1.error; }
}
}
exports.filterCenterOver = filterCenterOver;
exports.CenternotConfiguration = Configuration_js_1.Configuration.create('centernot', {
handler: { macro: ['centernot'] },
postprocessors: [filterCenterOver]
});
//# sourceMappingURL=CenternotConfiguration.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"CenternotConfiguration.js","sourceRoot":"","sources":["../../../../ts/input/tex/centernot/CenternotConfiguration.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAwBA,wDAAkD;AAElD,iEAAwC;AACxC,+DAAsC;AACtC,gDAA2C;AAE3C,0EAAiD;AAEjD,IAAI,yBAAU,CAAC,WAAW,EAAE;IAC1B,UAAU,EAAE,YAAY;IACxB,SAAS,EAAE,CAAC,OAAO,EAAE,4BAA4B,EAAE,CAAC,CAAC;CACtD,EAAE;IAOD,UAAU,EAAV,UAAW,MAAiB,EAAE,IAAY;QACxC,IAAM,GAAG,GAAG,GAAG,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC;QACjD,IAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACnC,IAAM,IAAI,GAAG,IAAI,sBAAS,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,EAAE,CAAC;QAC9E,IAAI,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE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