From 7429fe6075af086ea8a0366a1d8cb64fcdcf5a87 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Wed, 9 Mar 2016 14:59:30 +0100 Subject: writing documentation (continued) --- arabluatex.bib | 2 ++ arabluatex.dtx | 103 ++++++++++++++++++++++++++++++++++----------------------- makefile | 2 +- 3 files changed, 64 insertions(+), 43 deletions(-) diff --git a/arabluatex.bib b/arabluatex.bib index 909d634..3d8dc67 100644 --- a/arabluatex.bib +++ b/arabluatex.bib @@ -1,3 +1,5 @@ +% This file is part of the `arabluatex' package +% % copyright (C) 2016 Robert Alessi % % Please send error reports and suggestions for improvements to diff --git a/arabluatex.dtx b/arabluatex.dtx index 8d42b1b..6c89aa4 100644 --- a/arabluatex.dtx +++ b/arabluatex.dtx @@ -31,8 +31,10 @@ % % %<*driver> -\documentclass{ltxdoc} +\documentclass{cnltx-doc} \usepackage[english]{babel} +\usepackage[letterpaper, includemp, reversemp, hmargin=.8in, + marginpar=.8in]{geometry} \usepackage{fontspec,luatextra,realscripts} \defaultfontfeatures{RawFeature={+liga}} \setmainfont{Libertinus Serif} @@ -40,7 +42,7 @@ \setmonofont[Scale=.9]{Libertinus Mono} \usepackage{arabluatex}[2016/01/26] \usepackage{hypdoc} -\hypersetup{colorlinks, allcolors=blue} +%\hypersetup{colorlinks, allcolors=blue} \usepackage{multicol} \newcommand{\package}[1]{\textsf{#1}} \usepackage{paralist} @@ -215,8 +217,6 @@ % lexicons that can be searched, analyzed and correlated in various % ways. % -% -% %\subsection{\package{arabluatex} is for \LuaLaTeX} % It goes without saying that \package{arabluatex} requires % \LuaLaTeX. \TeX\ and \LaTeX\ have \package{arabtex}, and \XeLaTeX\ @@ -246,6 +246,14 @@ % processing. % % \section{Usage} +% \sinceversion{1.0} +% \begin{options} +% \opt{voc}\Default{voc} Vocalized Arabic +% \opt{novoc} Full vocalized Arabic +% \end{options} +% \begin{sidebyside} +% \arb{daxala} +% \end{sidebyside} % \newcommand{\dmg}[1]{% % \SetTranslitConvention{dmg}% % \arb[trans]{#1}} @@ -271,8 +279,9 @@ % \bottomrule % \caption{Standard notation for Arabic} % \end{longtable} -% Usage goes here. \cs{hop}\oarg{ah}\marg{ouh} -% +% Usage goes here. \cs{hop}\oarg{ah}\marg{ouh}\meta{pop} +% +% % \StopEventually{} % % \section{Implementation} @@ -348,46 +357,56 @@ TRT\arabicfont#1\egroup} \DeclareDocumentCommand{\txtrans}{+m}{\bgroup\textdir TLT\rmfamily#1\egroup} +% \end{macrocode} +% \begin{macro}{\arb} +% Here begins the description of \cs{arb} +% \begin{macrocode} \DeclareDocumentCommand{\arb}{O{\al@mode} +m}% {\edef\@tempa{#1}% - \ifx\@tempa\al@mode@voc% - \bgroup\textdir TRT\arabicfont% - \luadirect{tex.sprint(processvoc(\luastringN{#2}))}\egroup% - \else% - \ifx\@tempa\al@mode@fullvoc% - \bgroup\textdir TRT\arabicfont% - \luadirect{tex.sprint(processfullvoc(\luastringN{#2}))}\egroup% - \else% - \ifx\@tempa\al@mode@novoc% - \bgroup\textdir TRT\arabicfont% - \luadirect{tex.sprint(processnovoc(\luastringN{#2}))}\egroup% - \else% - \ifx\@tempa\al@mode@trans% - \bgroup\textdir TLT\al@trans@style% - \luadirect{tex.sprint(processtrans(\luastringN{#2}, - \luastringO{\al@trans@convention}))}\egroup% - \else% - \fi\fi\fi\fi} + \ifx\@tempa\al@mode@voc% + \bgroup\textdir TRT\arabicfont% + \luadirect{tex.sprint(processvoc(\luastringN{#2}))}\egroup% + \else% + \ifx\@tempa\al@mode@fullvoc% + \bgroup\textdir TRT\arabicfont% + \luadirect{tex.sprint(processfullvoc(\luastringN{#2}))}\egroup% + \else% + \ifx\@tempa\al@mode@novoc% + \bgroup\textdir TRT\arabicfont% + \luadirect{tex.sprint(processnovoc(\luastringN{#2}))}\egroup% + \else% + \ifx\@tempa\al@mode@trans% + \bgroup\textdir TLT\al@trans@style% + \luadirect{tex.sprint(processtrans(\luastringN{#2}, + \luastringO{\al@trans@convention}))}\egroup% + \else% + \fi\fi\fi\fi} +% \end{macrocode} +% \end{macro} +% \begin{environment}{arab} +% Here comes the description of the environment \env*{arab} +% \begin{macrocode} \NewEnviron{arab}[1][\al@mode]% {\par\edef\@tempa{#1}% - \ifx\@tempa\al@mode@voc% - \bgroup\pardir TRT\textdir TRT\arabicfont% - \luadirect{tex.sprint(processvoc(\luastringO{\BODY}))}\egroup% - \else% - \ifx\@tempa\al@mode@fullvoc% - \bgroup\pardir TRT\textdir TRT\arabicfont% - \luadirect{tex.sprint(processfullvoc(\luastringO{\BODY}))}\egroup% - \else% - \ifx\@tempa\al@mode@novoc% - \bgroup\pardir TRT\textdir TRT\arabicfont% - \luadirect{tex.sprint(processnovoc(\luastringO{\BODY}))}\egroup% - \else - \ifx\@tempa\al@mode@trans% - \bgroup\pardir TLT\textdir TLT\al@trans@style% - \luadirect{tex.sprint(processtrans(\luastringO{\BODY}, - \luastringO{\al@trans@convention}))}\egroup% - \else - \fi\fi\fi\fi}[\par] + \ifx\@tempa\al@mode@voc% + \bgroup\pardir TRT\textdir TRT\arabicfont% + \luadirect{tex.sprint(processvoc(\luastringO{\BODY}))}\egroup% + \else% + \ifx\@tempa\al@mode@fullvoc% + \bgroup\pardir TRT\textdir TRT\arabicfont% + \luadirect{tex.sprint(processfullvoc(\luastringO{\BODY}))}\egroup% + \else% + \ifx\@tempa\al@mode@novoc% + \bgroup\pardir TRT\textdir TRT\arabicfont% + \luadirect{tex.sprint(processnovoc(\luastringO{\BODY}))}\egroup% + \else \ifx\@tempa\al@mode@trans% + \bgroup\pardir TLT\textdir TLT\al@trans@style% + \luadirect{tex.sprint(processtrans(\luastringO{\BODY}, + \luastringO{\al@trans@convention}))}\egroup% + \else \fi\fi\fi\fi}[\par] +% \end{macrocode} +% \end{environment} +% \begin{macrocode} \DeclareDocumentCommand{\Marginpar}{m}{\marginpar{\textdir TLT #1}} \RenewDocumentCommand{\thefootnote}{}{\bgroup\textdir TLT\arabic{footnote}\egroup} diff --git a/makefile b/makefile index 31a21ee..b523cdc 100644 --- a/makefile +++ b/makefile @@ -24,7 +24,7 @@ package: clean all mkdir -p doc/lualatex/arabluatex/ cp *.pdf doc/lualatex/arabluatex/ mkdir -p source/lualatex/arabluatex/ - cp *.lua *.ins *.dtx source/lualatex/arabluatex/ + cp *.lua *.ins *.dtx *.bib source/lualatex/arabluatex/ zip -r arabluatex.tds.zip tex doc source mv arabluatex.tds.zip arabluatex tar czf arabluatex.tar.gz arabluatex -- cgit v1.2.3