@drghaliasri/butex 5.5.4 → 5.5.5
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 +1 -1
- package/dist/document2.d.mts +6 -2
- package/dist/document2.d.ts +6 -2
- package/dist/document2.js +20 -5
- package/dist/document2.js.map +1 -1
- package/dist/document2.mjs +18 -5
- package/dist/document2.mjs.map +1 -1
- package/dist/react-document2.js +11 -8
- package/dist/react-document2.js.map +1 -1
- package/dist/react-document2.mjs +11 -8
- package/dist/react-document2.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react-document2.mjs
CHANGED
|
@@ -48,17 +48,20 @@ var BUTEX_CLOSING_HAMDALA = "\u0627\u0644\u0652\u062D\u064E\u0645\u0652\u062F\u0
|
|
|
48
48
|
function escapeButexTextArg(text) {
|
|
49
49
|
return text.replace(/\\/g, "\\textbackslash{}").replace(/[{}]/g, "\\$&");
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
return
|
|
51
|
+
function butexFontDisplayTex(macro, text) {
|
|
52
|
+
return `${macro}{${escapeButexTextArg(text)}}`;
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function butexMaghribiDisplayTex(text) {
|
|
55
|
+
return butexFontDisplayTex("\\butexmaghribi", text);
|
|
56
|
+
}
|
|
57
|
+
function butexMaghribiDisplayLatex(text) {
|
|
55
58
|
return `\\[
|
|
56
|
-
${
|
|
59
|
+
${butexMaghribiDisplayTex(text)}
|
|
57
60
|
\\]`;
|
|
58
61
|
}
|
|
59
62
|
var BASMALA_LINES = [BUTEX_BASMALA_LINE1, BUTEX_BASMALA_LINE2, BUTEX_BASMALA_SALAWAT];
|
|
60
63
|
function butexBasmalaDisplayTex() {
|
|
61
|
-
return BASMALA_LINES.map((line) =>
|
|
64
|
+
return BASMALA_LINES.map((line) => butexMaghribiDisplayTex(line)).join(" \\\\ ");
|
|
62
65
|
}
|
|
63
66
|
function butexBasmalaDisplayLatex() {
|
|
64
67
|
return `\\[
|
|
@@ -99,7 +102,7 @@ function butexBasmalaTitlingPreamble(options = {}) {
|
|
|
99
102
|
" \\begin{center}",
|
|
100
103
|
...BASMALA_LINES.map((line, index) => {
|
|
101
104
|
const suffix = index < BASMALA_LINES.length - 1 ? "\\\\" : "";
|
|
102
|
-
return ` ${
|
|
105
|
+
return ` ${butexMaghribiDisplayTex(line)}${suffix}`;
|
|
103
106
|
}),
|
|
104
107
|
" \\par\\vspace{1.5em}",
|
|
105
108
|
" \\LARGE",
|
|
@@ -9361,7 +9364,7 @@ function document2Latex(document2, options = {}) {
|
|
|
9361
9364
|
const twocolumn = options.twocolumn === true;
|
|
9362
9365
|
const front = articleFrontMatterLatex(meta);
|
|
9363
9366
|
const bodyBlocks = document2.blocks.map((block) => blockLatex(block, document2.references));
|
|
9364
|
-
const closing =
|
|
9367
|
+
const closing = butexMaghribiDisplayLatex(BUTEX_CLOSING_HAMDALA);
|
|
9365
9368
|
const body = [...front, ...bodyBlocks, closing].filter((part) => part.length > 0).join("\n\n");
|
|
9366
9369
|
const wrapDocument = options.wrapDocument !== false;
|
|
9367
9370
|
if (!wrapDocument) {
|
|
@@ -9795,7 +9798,7 @@ function document2Preview(document2, output = "svg", equationSide = "arabic", pr
|
|
|
9795
9798
|
blocks: [
|
|
9796
9799
|
...articleChromePreview(document2, options.uiLocale ?? "ar", options),
|
|
9797
9800
|
...body,
|
|
9798
|
-
{ kind: "closing", id: "article-closing", text: BUTEX_CLOSING_HAMDALA, tex:
|
|
9801
|
+
{ kind: "closing", id: "article-closing", text: BUTEX_CLOSING_HAMDALA, tex: butexMaghribiDisplayTex(BUTEX_CLOSING_HAMDALA) }
|
|
9799
9802
|
],
|
|
9800
9803
|
mathIslands
|
|
9801
9804
|
};
|