@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.js
CHANGED
|
@@ -83,17 +83,20 @@ var BUTEX_CLOSING_HAMDALA = "\u0627\u0644\u0652\u062D\u064E\u0645\u0652\u062F\u0
|
|
|
83
83
|
function escapeButexTextArg(text) {
|
|
84
84
|
return text.replace(/\\/g, "\\textbackslash{}").replace(/[{}]/g, "\\$&");
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
return
|
|
86
|
+
function butexFontDisplayTex(macro, text) {
|
|
87
|
+
return `${macro}{${escapeButexTextArg(text)}}`;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function butexMaghribiDisplayTex(text) {
|
|
90
|
+
return butexFontDisplayTex("\\butexmaghribi", text);
|
|
91
|
+
}
|
|
92
|
+
function butexMaghribiDisplayLatex(text) {
|
|
90
93
|
return `\\[
|
|
91
|
-
${
|
|
94
|
+
${butexMaghribiDisplayTex(text)}
|
|
92
95
|
\\]`;
|
|
93
96
|
}
|
|
94
97
|
var BASMALA_LINES = [BUTEX_BASMALA_LINE1, BUTEX_BASMALA_LINE2, BUTEX_BASMALA_SALAWAT];
|
|
95
98
|
function butexBasmalaDisplayTex() {
|
|
96
|
-
return BASMALA_LINES.map((line) =>
|
|
99
|
+
return BASMALA_LINES.map((line) => butexMaghribiDisplayTex(line)).join(" \\\\ ");
|
|
97
100
|
}
|
|
98
101
|
function butexBasmalaDisplayLatex() {
|
|
99
102
|
return `\\[
|
|
@@ -134,7 +137,7 @@ function butexBasmalaTitlingPreamble(options = {}) {
|
|
|
134
137
|
" \\begin{center}",
|
|
135
138
|
...BASMALA_LINES.map((line, index) => {
|
|
136
139
|
const suffix = index < BASMALA_LINES.length - 1 ? "\\\\" : "";
|
|
137
|
-
return ` ${
|
|
140
|
+
return ` ${butexMaghribiDisplayTex(line)}${suffix}`;
|
|
138
141
|
}),
|
|
139
142
|
" \\par\\vspace{1.5em}",
|
|
140
143
|
" \\LARGE",
|
|
@@ -9396,7 +9399,7 @@ function document2Latex(document2, options = {}) {
|
|
|
9396
9399
|
const twocolumn = options.twocolumn === true;
|
|
9397
9400
|
const front = articleFrontMatterLatex(meta);
|
|
9398
9401
|
const bodyBlocks = document2.blocks.map((block) => blockLatex(block, document2.references));
|
|
9399
|
-
const closing =
|
|
9402
|
+
const closing = butexMaghribiDisplayLatex(BUTEX_CLOSING_HAMDALA);
|
|
9400
9403
|
const body = [...front, ...bodyBlocks, closing].filter((part) => part.length > 0).join("\n\n");
|
|
9401
9404
|
const wrapDocument = options.wrapDocument !== false;
|
|
9402
9405
|
if (!wrapDocument) {
|
|
@@ -9830,7 +9833,7 @@ function document2Preview(document2, output = "svg", equationSide = "arabic", pr
|
|
|
9830
9833
|
blocks: [
|
|
9831
9834
|
...articleChromePreview(document2, options.uiLocale ?? "ar", options),
|
|
9832
9835
|
...body,
|
|
9833
|
-
{ kind: "closing", id: "article-closing", text: BUTEX_CLOSING_HAMDALA, tex:
|
|
9836
|
+
{ kind: "closing", id: "article-closing", text: BUTEX_CLOSING_HAMDALA, tex: butexMaghribiDisplayTex(BUTEX_CLOSING_HAMDALA) }
|
|
9834
9837
|
],
|
|
9835
9838
|
mathIslands
|
|
9836
9839
|
};
|