From e23d740f2c94f7e105eabade859149e559038104 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Thu, 10 Mar 2016 20:21:12 +0100 Subject: writing documentation (continued) + added quoting u|a|i --- arabluatex.dtx | 61 +++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 50 insertions(+), 11 deletions(-) (limited to 'arabluatex.dtx') diff --git a/arabluatex.dtx b/arabluatex.dtx index 797af14..54e5024 100644 --- a/arabluatex.dtx +++ b/arabluatex.dtx @@ -44,18 +44,25 @@ \usepackage{hypdoc} \hypersetup{colorlinks, allcolors=blue} \usepackage{multicol} -\newcommand{\package}[1]{\textsf{#1}} \usepackage{paralist} \setdefaultitem{\textendash}{\textendash}{\textendash}{\textendash} \usepackage{longtable} \usepackage{booktabs} \usepackage{tikz} -\usepackage[skins,listings]{tcolorbox} -\newtcblisting{arabluacode}[1]{colback=white, boxrule=.15mm, - colframe=red!50!white, listing options={style=tcblatex, - numbers=left, numberstyle=\tiny}, #1} +\usepackage[breakable, skins,listings,xparse]{tcolorbox} +\DeclareTCBListing{arabluacode}{s}{colback=white, boxrule=.15mm, + colframe=red!50!white, listing options={style=tcblatex, + numbers=left, numberstyle=\tiny}, IfBooleanTF={#1}{listing side + text}{}} +\DeclareTotalTCBox{\arabluaverb}{v}{verbatim, colback=white, + boxrule=.15mm, colframe=red!50!white}{#1} +\DeclareTotalTCBox{\arabluabox}{m}{left=0mm, right=0mm, top=0mm, + bottom=0mm, colback=white, boxrule=.15mm, + colframe=red!50!white}{#1} +\newcommand{\package}[1]{\textsf{#1}\index{#1=#1 (package)}} \usepackage{csquotes} -\usepackage[style=authoryear, natbib]{biblatex} +\usepackage[style=authoryear, indexing=cite]{biblatex} +\DeclareIndexFieldFormat{indextitle}{\index{#1=\emph{#1}}} \addbibresource{arabluatex.bib} \EnableCrossrefs \CodelineIndex @@ -253,16 +260,47 @@ % % \section{Usage} % \subsection{Activating \package{arabluatex}} -% As usual put in your preamble: -% |\usepackage{arabluatex}| +% As usual put in your preamble:\\ +% \arabluaverb{\usepackage{arabluatex}}\\ % The only requirement of \package{arabluatex} is \LuaLaTeX; it will % complain if you try to compile your document with another % engine. That aside, \package{arabluatex} does not load packages such % as \package{polyglossia} or \package{luabidi}. It can work with -% \package{polyglossia} but does not require it. +% \package{polyglossia} though, but does not require it. +% +% \paragraph{Font setup} +% If you wish to use your own Arabic font, you can define it before +% loading \package{arabluatex}. Assuming that \package{fontspec} is +% loaded, put this in your preamble just above the line that loads +% \package{arabluatex}: +% \arabluabox{\cs{newfontfamily}\cs{arabicfont}[Script=Arabic]\marg{fontname}} +% \noindent where \meta{fontname} is the standard name of the Arabic +% font you wish to use. +% +% By default, if no Arabic font is selected, \package{arabluatex} will +% issue a warning message and attempt to load the Amiri +% font\footnote{\textcite{pkg:amiri}.} like so:\\ +% \arabluaverb{\newfontfamily\arabicfont[Script=Arabic]{Amiri}} +% \begin{quote}\footnotesize +% \textbf{Rem.} By default Amiri places the \arb[trans]{kasra} in +% combination with the \arb[trans]{ta^sdId} below the consonant, +% like so: \arb{BBi}\,. This is correct, as at least in the oldest +% manuscripts {\newfontfamily\arabicfont[Script=Arabic, +% RawFeature={+ss05}]{Amiri}\arb{BBi}} may stand for \arb{BBa} as +% well as \arb{BBi}\,. See \textcite[i.14.C--D]{Wright}. The placement +% of the \arb[trans]{kasra} above the consonant may be obtained by +% selecting the |ss05| feature of the Amiri font, like +% so:\footnote{See the documentation of \package{amiri}, +% \textcite[5]{pkg:amiri}.}\\ +% \arabluaverb{\newfontfamily\arabicfont[Script=Arabic,RawFeature={+ss05}]{Amiri}} +% +% Other Arabic fonts may behave differently. +% \end{quote} +% +% \subsection{Options} +% % -% \DescribeOption{voc} -% good for me +% \DescribeOption{voc}\hfill\arabluaverb{default}\\ good for me % \begin{itemize} % \item voc Vocalized Arabic % \item novoc Full vocalized Arabic @@ -332,6 +370,7 @@ \def\al@mode@novoc{novoc} \def\al@mode@trans{trans} % \newif\ifal@mode@defined +\RequirePackage{fontspec} \RequirePackage{amsmath} \RequirePackage{etoolbox} \RequirePackage{luacode} -- cgit v1.2.3