diff options
Diffstat (limited to 'arabluatex.dtx')
-rw-r--r-- | arabluatex.dtx | 61 |
1 files changed, 50 insertions, 11 deletions
diff --git a/arabluatex.dtx b/arabluatex.dtx index 797af14..54e5024 100644 --- a/arabluatex.dtx +++ b/arabluatex.dtx | |||
@@ -44,18 +44,25 @@ | |||
44 | \usepackage{hypdoc} | 44 | \usepackage{hypdoc} |
45 | \hypersetup{colorlinks, allcolors=blue} | 45 | \hypersetup{colorlinks, allcolors=blue} |
46 | \usepackage{multicol} | 46 | \usepackage{multicol} |
47 | \newcommand{\package}[1]{\textsf{#1}} | ||
48 | \usepackage{paralist} | 47 | \usepackage{paralist} |
49 | \setdefaultitem{\textendash}{\textendash}{\textendash}{\textendash} | 48 | \setdefaultitem{\textendash}{\textendash}{\textendash}{\textendash} |
50 | \usepackage{longtable} | 49 | \usepackage{longtable} |
51 | \usepackage{booktabs} | 50 | \usepackage{booktabs} |
52 | \usepackage{tikz} | 51 | \usepackage{tikz} |
53 | \usepackage[skins,listings]{tcolorbox} | 52 | \usepackage[breakable, skins,listings,xparse]{tcolorbox} |
54 | \newtcblisting{arabluacode}[1]{colback=white, boxrule=.15mm, | 53 | \DeclareTCBListing{arabluacode}{s}{colback=white, boxrule=.15mm, |
55 | colframe=red!50!white, listing options={style=tcblatex, | 54 | colframe=red!50!white, listing options={style=tcblatex, |
56 | numbers=left, numberstyle=\tiny}, #1} | 55 | numbers=left, numberstyle=\tiny}, IfBooleanTF={#1}{listing side |
56 | text}{}} | ||
57 | \DeclareTotalTCBox{\arabluaverb}{v}{verbatim, colback=white, | ||
58 | boxrule=.15mm, colframe=red!50!white}{#1} | ||
59 | \DeclareTotalTCBox{\arabluabox}{m}{left=0mm, right=0mm, top=0mm, | ||
60 | bottom=0mm, colback=white, boxrule=.15mm, | ||
61 | colframe=red!50!white}{#1} | ||
62 | \newcommand{\package}[1]{\textsf{#1}\index{#1=#1 (package)}} | ||
57 | \usepackage{csquotes} | 63 | \usepackage{csquotes} |
58 | \usepackage[style=authoryear, natbib]{biblatex} | 64 | \usepackage[style=authoryear, indexing=cite]{biblatex} |
65 | \DeclareIndexFieldFormat{indextitle}{\index{#1=\emph{#1}}} | ||
59 | \addbibresource{arabluatex.bib} | 66 | \addbibresource{arabluatex.bib} |
60 | \EnableCrossrefs | 67 | \EnableCrossrefs |
61 | \CodelineIndex | 68 | \CodelineIndex |
@@ -253,16 +260,47 @@ | |||
253 | % | 260 | % |
254 | % \section{Usage} | 261 | % \section{Usage} |
255 | % \subsection{Activating \package{arabluatex}} | 262 | % \subsection{Activating \package{arabluatex}} |
256 | % As usual put in your preamble: | 263 | % As usual put in your preamble:\\ |
257 | % |\usepackage{arabluatex}| | 264 | % \arabluaverb{\usepackage{arabluatex}}\\ |
258 | % The only requirement of \package{arabluatex} is \LuaLaTeX; it will | 265 | % The only requirement of \package{arabluatex} is \LuaLaTeX; it will |
259 | % complain if you try to compile your document with another | 266 | % complain if you try to compile your document with another |
260 | % engine. That aside, \package{arabluatex} does not load packages such | 267 | % engine. That aside, \package{arabluatex} does not load packages such |
261 | % as \package{polyglossia} or \package{luabidi}. It can work with | 268 | % as \package{polyglossia} or \package{luabidi}. It can work with |
262 | % \package{polyglossia} but does not require it. | 269 | % \package{polyglossia} though, but does not require it. |
270 | % | ||
271 | % \paragraph{Font setup} | ||
272 | % If you wish to use your own Arabic font, you can define it before | ||
273 | % loading \package{arabluatex}. Assuming that \package{fontspec} is | ||
274 | % loaded, put this in your preamble just above the line that loads | ||
275 | % \package{arabluatex}: | ||
276 | % \arabluabox{\cs{newfontfamily}\cs{arabicfont}[Script=Arabic]\marg{fontname}} | ||
277 | % \noindent where \meta{fontname} is the standard name of the Arabic | ||
278 | % font you wish to use. | ||
279 | % | ||
280 | % By default, if no Arabic font is selected, \package{arabluatex} will | ||
281 | % issue a warning message and attempt to load the Amiri | ||
282 | % font\footnote{\textcite{pkg:amiri}.} like so:\\ | ||
283 | % \arabluaverb{\newfontfamily\arabicfont[Script=Arabic]{Amiri}} | ||
284 | % \begin{quote}\footnotesize | ||
285 | % \textbf{Rem.} By default Amiri places the \arb[trans]{kasra} in | ||
286 | % combination with the \arb[trans]{ta^sdId} below the consonant, | ||
287 | % like so: \arb{BBi}\,. This is correct, as at least in the oldest | ||
288 | % manuscripts {\newfontfamily\arabicfont[Script=Arabic, | ||
289 | % RawFeature={+ss05}]{Amiri}\arb{BBi}} may stand for \arb{BBa} as | ||
290 | % well as \arb{BBi}\,. See \textcite[i.14.C--D]{Wright}. The placement | ||
291 | % of the \arb[trans]{kasra} above the consonant may be obtained by | ||
292 | % selecting the |ss05| feature of the Amiri font, like | ||
293 | % so:\footnote{See the documentation of \package{amiri}, | ||
294 | % \textcite[5]{pkg:amiri}.}\\ | ||
295 | % \arabluaverb{\newfontfamily\arabicfont[Script=Arabic,RawFeature={+ss05}]{Amiri}} | ||
296 | % | ||
297 | % Other Arabic fonts may behave differently. | ||
298 | % \end{quote} | ||
299 | % | ||
300 | % \subsection{Options} | ||
301 | % | ||
263 | % | 302 | % |
264 | % \DescribeOption{voc} | 303 | % \DescribeOption{voc}\hfill\arabluaverb{default}\\ good for me |
265 | % good for me | ||
266 | % \begin{itemize} | 304 | % \begin{itemize} |
267 | % \item voc Vocalized Arabic | 305 | % \item voc Vocalized Arabic |
268 | % \item novoc Full vocalized Arabic | 306 | % \item novoc Full vocalized Arabic |
@@ -332,6 +370,7 @@ | |||
332 | \def\al@mode@novoc{novoc} | 370 | \def\al@mode@novoc{novoc} |
333 | \def\al@mode@trans{trans} | 371 | \def\al@mode@trans{trans} |
334 | % \newif\ifal@mode@defined | 372 | % \newif\ifal@mode@defined |
373 | \RequirePackage{fontspec} | ||
335 | \RequirePackage{amsmath} | 374 | \RequirePackage{amsmath} |
336 | \RequirePackage{etoolbox} | 375 | \RequirePackage{etoolbox} |
337 | \RequirePackage{luacode} | 376 | \RequirePackage{luacode} |