@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.
@@ -45,17 +45,28 @@ var BUTEX_CLOSING_HAMDALA = "\u0627\u0644\u0652\u062D\u064E\u0645\u0652\u062F\u0
45
45
  function escapeButexTextArg(text) {
46
46
  return text.replace(/\\/g, "\\textbackslash{}").replace(/[{}]/g, "\\$&");
47
47
  }
48
+ function butexFontDisplayTex(macro, text) {
49
+ return `${macro}{${escapeButexTextArg(text)}}`;
50
+ }
48
51
  function butexDiwaniDisplayTex(text) {
49
- return `\\butexdiwani{${escapeButexTextArg(text)}}`;
52
+ return butexFontDisplayTex("\\butexdiwani", text);
50
53
  }
51
54
  function butexDiwaniDisplayLatex(text) {
52
55
  return `\\[
53
56
  ${butexDiwaniDisplayTex(text)}
54
57
  \\]`;
55
58
  }
59
+ function butexMaghribiDisplayTex(text) {
60
+ return butexFontDisplayTex("\\butexmaghribi", text);
61
+ }
62
+ function butexMaghribiDisplayLatex(text) {
63
+ return `\\[
64
+ ${butexMaghribiDisplayTex(text)}
65
+ \\]`;
66
+ }
56
67
  var BASMALA_LINES = [BUTEX_BASMALA_LINE1, BUTEX_BASMALA_LINE2, BUTEX_BASMALA_SALAWAT];
57
68
  function butexBasmalaDisplayTex() {
58
- return BASMALA_LINES.map((line) => butexDiwaniDisplayTex(line)).join(" \\\\ ");
69
+ return BASMALA_LINES.map((line) => butexMaghribiDisplayTex(line)).join(" \\\\ ");
59
70
  }
60
71
  function butexBasmalaDisplayLatex() {
61
72
  return `\\[
@@ -96,7 +107,7 @@ function butexBasmalaTitlingPreamble(options = {}) {
96
107
  " \\begin{center}",
97
108
  ...BASMALA_LINES.map((line, index) => {
98
109
  const suffix = index < BASMALA_LINES.length - 1 ? "\\\\" : "";
99
- return ` ${butexDiwaniDisplayTex(line)}${suffix}`;
110
+ return ` ${butexMaghribiDisplayTex(line)}${suffix}`;
100
111
  }),
101
112
  " \\par\\vspace{1.5em}",
102
113
  " \\LARGE",
@@ -5510,7 +5521,7 @@ function document2Latex(document2, options = {}) {
5510
5521
  const twocolumn = options.twocolumn === true;
5511
5522
  const front = articleFrontMatterLatex(meta);
5512
5523
  const bodyBlocks = document2.blocks.map((block) => blockLatex(block, document2.references));
5513
- const closing = butexDiwaniDisplayLatex(BUTEX_CLOSING_HAMDALA);
5524
+ const closing = butexMaghribiDisplayLatex(BUTEX_CLOSING_HAMDALA);
5514
5525
  const body = [...front, ...bodyBlocks, closing].filter((part) => part.length > 0).join("\n\n");
5515
5526
  const wrapDocument = options.wrapDocument !== false;
5516
5527
  if (!wrapDocument) {
@@ -5944,7 +5955,7 @@ function document2Preview(document2, output = "svg", equationSide = "arabic", pr
5944
5955
  blocks: [
5945
5956
  ...articleChromePreview(document2, options.uiLocale ?? "ar", options),
5946
5957
  ...body,
5947
- { kind: "closing", id: "article-closing", text: BUTEX_CLOSING_HAMDALA, tex: butexDiwaniDisplayTex(BUTEX_CLOSING_HAMDALA) }
5958
+ { kind: "closing", id: "article-closing", text: BUTEX_CLOSING_HAMDALA, tex: butexMaghribiDisplayTex(BUTEX_CLOSING_HAMDALA) }
5948
5959
  ],
5949
5960
  mathIslands
5950
5961
  };
@@ -5980,6 +5991,8 @@ export {
5980
5991
  butexDiwaniDisplayLatex,
5981
5992
  butexDiwaniDisplayTex,
5982
5993
  butexInColumnMaketitleHook,
5994
+ butexMaghribiDisplayLatex,
5995
+ butexMaghribiDisplayTex,
5983
5996
  citeTokenLatex,
5984
5997
  cloneDocument2Meta,
5985
5998
  cloneDocument2Node,