diff options
author | Robert Alessi <alessi@robertalessi.net> | 2020-11-16 09:56:46 +0100 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2020-11-16 09:56:46 +0100 |
commit | 4576aa220e2ea1934c068c1031666fb4bf887de3 (patch) | |
tree | fc3c97fc7ca8f451330064d95ff2e910ce66caa5 | |
parent | 3a507ecec035a656d16be9f7d0bb413eb0f9e8f2 (diff) | |
download | arabluatex-4576aa220e2ea1934c068c1031666fb4bf887de3.tar.gz |
appended {} to \altrfont and neutralized it in arabluatex.uc()
-rw-r--r-- | arabluatex.dtx | 23 | ||||
-rw-r--r-- | arabluatex.lua | 9 |
2 files changed, 18 insertions, 14 deletions
diff --git a/arabluatex.dtx b/arabluatex.dtx index 2972c0d..08f9be2 100644 --- a/arabluatex.dtx +++ b/arabluatex.dtx | |||
@@ -240,7 +240,6 @@ | |||
240 | \usepackage{bookmark} | 240 | \usepackage{bookmark} |
241 | \usepackage{authblk} | 241 | \usepackage{authblk} |
242 | \usepackage[scale=1.5]{ccicons} | 242 | \usepackage[scale=1.5]{ccicons} |
243 | \usepackage[lot]{multitoc} | ||
244 | \usepackage{enumitem} | 243 | \usepackage{enumitem} |
245 | \setlist{nosep} | 244 | \setlist{nosep} |
246 | \setlist[itemize]{label=\textendash} | 245 | \setlist[itemize]{label=\textendash} |
@@ -287,6 +286,11 @@ | |||
287 | {\marginpar{\hfill\emph{New feature} #1}}% | 286 | {\marginpar{\hfill\emph{New feature} #1}}% |
288 | \ignorespaces | 287 | \ignorespaces |
289 | } | 288 | } |
289 | \usepackage{multicol} | ||
290 | \usepackage{tocloft} | ||
291 | \renewcommand\cftlotprehook{\begin{multicols}{2}} | ||
292 | \renewcommand\cftlotposthook{\end{multicols}} | ||
293 | \renewcommand\cftlottitlefont{\Large\bfseries} | ||
290 | \usepackage{etoc} | 294 | \usepackage{etoc} |
291 | \etocsettocdepth{paragraph} | 295 | \etocsettocdepth{paragraph} |
292 | \newcommand{\altableofcontents}{% | 296 | \newcommand{\altableofcontents}{% |
@@ -307,18 +311,17 @@ | |||
307 | \pdfbookmark[1]{Contents}{toc} | 311 | \pdfbookmark[1]{Contents}{toc} |
308 | \tableofcontents | 312 | \tableofcontents |
309 | \endgroup} | 313 | \endgroup} |
314 | \setlength\IndexMin{100pt} | ||
310 | \EnableCrossrefs | 315 | \EnableCrossrefs |
311 | \RecordChanges | 316 | \RecordChanges |
312 | \CodelineIndex | 317 | \CodelineIndex |
313 | \begin{document} | 318 | \begin{document} |
314 | \DocInput{arabluatex.dtx} | 319 | \DocInput{arabluatex.dtx} |
315 | \printbibliography[heading=bibintoc] | 320 | \printbibliography[heading=bibnumbered] |
316 | \phantomsection | 321 | \phantomsection |
317 | \addcontentsline{toc}{section}{Change History} | ||
318 | \PrintChanges | 322 | \PrintChanges |
319 | \phantomsection | 323 | \phantomsection |
320 | \addcontentsline{toc}{section}{Index} | 324 | \PrintIndex |
321 | \PrintIndex | ||
322 | \end{document} | 325 | \end{document} |
323 | %</driver> | 326 | %</driver> |
324 | % \fi | 327 | % \fi |
@@ -5095,16 +5098,16 @@ | |||
5095 | % it to suit our purpose: | 5098 | % it to suit our purpose: |
5096 | % \begin{macrocode} | 5099 | % \begin{macrocode} |
5097 | \AtBeginDocument{\ifdef{\LR}% | 5100 | \AtBeginDocument{\ifdef{\LR}% |
5098 | {\RenewDocumentCommand{\LR}{m}{\bgroup\textdir TLT\normalfont#1\egroup}} | 5101 | {\RenewDocumentCommand{\LR}{m}{\bgroup\textdir TLT\rmfamily#1\egroup}} |
5099 | {\NewDocumentCommand{\LR}{m}{\bgroup\textdir TLT\normalfont#1\egroup}}} | 5102 | {\NewDocumentCommand{\LR}{m}{\bgroup\textdir TLT\rmfamily#1\egroup}}} |
5100 | % \end{macrocode} | 5103 | % \end{macrocode} |
5101 | % \end{macro} | 5104 | % \end{macro} |
5102 | % \begin{macro}{\RL} This one typesets its argument from right to | 5105 | % \begin{macro}{\RL} This one typesets its argument from right to |
5103 | % left. Same remark as above regarding the need of redefinition. | 5106 | % left. Same remark as above regarding the need of redefinition. |
5104 | % \begin{macrocode} | 5107 | % \begin{macrocode} |
5105 | \AtBeginDocument{\ifdef{\RL}% | 5108 | \AtBeginDocument{\ifdef{\RL}% |
5106 | {\RenewDocumentCommand{\RL}{m}{\bgroup\textdir TRT\normalfont#1\egroup}} | 5109 | {\RenewDocumentCommand{\RL}{m}{\bgroup\textdir TRT\rmfamily#1\egroup}} |
5107 | {\NewDocumentCommand{\RL}{m}{\bgroup\textdir TRT#1\normalfont\egroup}}} | 5110 | {\NewDocumentCommand{\RL}{m}{\bgroup\textdir TRT#1\rmfamily\egroup}}} |
5108 | % \end{macrocode} | 5111 | % \end{macrocode} |
5109 | % \end{macro} | 5112 | % \end{macro} |
5110 | % \begin{macro}{\MkArbBreak} | 5113 | % \begin{macro}{\MkArbBreak} |
@@ -5242,7 +5245,7 @@ | |||
5242 | % font may also be selected with the font-selecting commands of the | 5245 | % font may also be selected with the font-selecting commands of the |
5243 | % \package{fontspec} package. | 5246 | % \package{fontspec} package. |
5244 | % \begin{macrocode} | 5247 | % \begin{macrocode} |
5245 | \def\al@trans@font{\normalfont}% | 5248 | \def\al@trans@font{\rmfamily}% |
5246 | \NewDocumentCommand{\SetTranslitFont}{m}{\def\al@trans@font{#1}} | 5249 | \NewDocumentCommand{\SetTranslitFont}{m}{\def\al@trans@font{#1}} |
5247 | % \end{macrocode} | 5250 | % \end{macrocode} |
5248 | % \end{macro} | 5251 | % \end{macro} |
diff --git a/arabluatex.lua b/arabluatex.lua index 8e97fa1..dec3649 100644 --- a/arabluatex.lua +++ b/arabluatex.lua | |||
@@ -625,7 +625,7 @@ local function transdmg(str, rules) | |||
625 | for i = 1,#nulltr do | 625 | for i = 1,#nulltr do |
626 | inside = string.gsub(inside, nulltr[i].a, nulltr[i].b) | 626 | inside = string.gsub(inside, nulltr[i].a, nulltr[i].b) |
627 | end | 627 | end |
628 | return string.format("\\altrfont %s", inside) | 628 | return string.format("\\altrfont{}%s", inside) |
629 | end) | 629 | end) |
630 | return str | 630 | return str |
631 | end | 631 | end |
@@ -663,7 +663,7 @@ local function transloc(str) | |||
663 | for i = 1,#nulltr do | 663 | for i = 1,#nulltr do |
664 | inside = string.gsub(inside, nulltr[i].a, nulltr[i].b) | 664 | inside = string.gsub(inside, nulltr[i].a, nulltr[i].b) |
665 | end | 665 | end |
666 | return string.format("\\altrfont %s", inside) | 666 | return string.format("\\altrfont{}%s", inside) |
667 | end) | 667 | end) |
668 | return str | 668 | return str |
669 | end | 669 | end |
@@ -698,7 +698,7 @@ local function transarabica(str) | |||
698 | for i = 1,#nulltr do | 698 | for i = 1,#nulltr do |
699 | inside = string.gsub(inside, nulltr[i].a, nulltr[i].b) | 699 | inside = string.gsub(inside, nulltr[i].a, nulltr[i].b) |
700 | end | 700 | end |
701 | return string.format("\\altrfont %s", inside) | 701 | return string.format("\\altrfont{}%s", inside) |
702 | end) | 702 | end) |
703 | return str | 703 | return str |
704 | end | 704 | end |
@@ -899,7 +899,7 @@ function arabluatex.closestream() | |||
899 | local o = io.open(tex.jobname..utffilesuffix..".tex", "w") | 899 | local o = io.open(tex.jobname..utffilesuffix..".tex", "w") |
900 | local t = f:read("*a") | 900 | local t = f:read("*a") |
901 | t = string.gsub(t, "\\arabicfont{}", "") | 901 | t = string.gsub(t, "\\arabicfont{}", "") |
902 | t = string.gsub(t, "\\altrfont%s+", "") | 902 | t = string.gsub(t, "\\altrfont{}", "") |
903 | t = string.gsub(t, "\\par ", "\n\n") | 903 | t = string.gsub(t, "\\par ", "\n\n") |
904 | t = string.gsub(t, "(\\@al@ob)", "{") | 904 | t = string.gsub(t, "(\\@al@ob)", "{") |
905 | t = string.gsub(t, "(\\@al@cb@sp)", "} ") | 905 | t = string.gsub(t, "(\\@al@cb@sp)", "} ") |
@@ -1139,6 +1139,7 @@ function arabluatex.uc(str) | |||
1139 | body = string.sub(body, 2, -2) | 1139 | body = string.sub(body, 2, -2) |
1140 | return string.format("%s", body) | 1140 | return string.format("%s", body) |
1141 | end) | 1141 | end) |
1142 | str = string.gsub(str, "\\altrfont%s?{}", "") | ||
1142 | str = string.gsub(str, "{", "\\@al@ob") | 1143 | str = string.gsub(str, "{", "\\@al@ob") |
1143 | str = string.gsub(str, "} ", "\\@al@cb@sp ") | 1144 | str = string.gsub(str, "} ", "\\@al@cb@sp ") |
1144 | str = string.gsub(str, "}", "\\@al@cb") | 1145 | str = string.gsub(str, "}", "\\@al@cb") |