aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2018-08-24 12:31:10 +0200
committerRobert Alessi <alessi@robertalessi.net>2018-08-24 12:31:10 +0200
commit9c348b0f9021afebbbdf67351f68d3d1d60697ab (patch)
tree658e56b7c1638397b8ad047190216c3caad0b287
parent0e618d97132539f0263d3c7183eabeb4f5824658 (diff)
downloadarabluatex-9c348b0f9021afebbbdf67351f68d3d1d60697ab.tar.gz
arabtex2utf: documenting the new features
-rw-r--r--arabluatex.dtx90
1 files changed, 81 insertions, 9 deletions
diff --git a/arabluatex.dtx b/arabluatex.dtx
index aa46115..27f26ae 100644
--- a/arabluatex.dtx
+++ b/arabluatex.dtx
@@ -156,7 +156,7 @@
156\setmainfont{Old Standard}[SmallCapsFont={Latin Modern Roman Caps}, 156\setmainfont{Old Standard}[SmallCapsFont={Latin Modern Roman Caps},
157 RawFeature={+mark;+ccmp;+ss05;+ss06}] 157 RawFeature={+mark;+ccmp;+ss05;+ss06}]
158\usepackage{newunicodechar} 158\usepackage{newunicodechar}
159\newunicodechar{ǧ}{ǧ} % Old Standard does include ǧ/Ǧ 159\newunicodechar{ǧ}{ǧ} % Old Standard does not include ǧ/Ǧ
160\newunicodechar{Ǧ}{Ǧ} % 160\newunicodechar{Ǧ}{Ǧ} %
161\usepackage{arabluatex}[2018/06/24] 161\usepackage{arabluatex}[2018/06/24]
162\usepackage[nopar]{quran} 162\usepackage[nopar]{quran}
@@ -542,9 +542,9 @@
542% 542%
543% \subsection{Options} 543% \subsection{Options}
544% \label{sec:options} 544% \label{sec:options}
545% \package{arabluatex} may be loaded with four mutually exclusive 545% \package{arabluatex} may be loaded with five global options, the
546% global options, each of which may be overriden at any point of the 546% first four of which are mutually exclusive and may be overriden at
547% document (see below \vref{sec:local-options}): 547% any point of the document (see below \vref{sec:local-options}):
548% 548%
549% \DescribeOption{voc}\hfill\arabluaverb{default}\\ In this mode, 549% \DescribeOption{voc}\hfill\arabluaverb{default}\\ In this mode,
550% which is the one selected by default, every short vowel written 550% which is the one selected by default, every short vowel written
@@ -579,6 +579,15 @@
579% \end{description} 579% \end{description}
580% More standards will be included in future releases of 580% More standards will be included in future releases of
581% \package{arabluatex}. 581% \package{arabluatex}.
582%
583% \DescribeOption{export} |export|$=$|true|\verb+|+|false|
584% \hfill\arabluaverb{default: false}\\ \label{export-mode}
585% \NEWfeature{v.1.13} This option acts as a named argument and does
586% not need a value as it defaults to |true| if it is used. It enables
587% \package{arabluatex} to produce a duplicate of the original |.tex|
588% source file in which all \textsc{ascii} strings are replaced with
589% Unicode equivalents. See below \vref{sec:arabtex2utf} for more
590% information.
582% 591%
583% \subsubsection{Classic contrasted with modern typesetting of Arabic} 592% \subsubsection{Classic contrasted with modern typesetting of Arabic}
584% \label{sec:classic-modern-typesetting} 593% \label{sec:classic-modern-typesetting}
@@ -2212,6 +2221,14 @@ word that \cs{arbnull} is applied to.
2212% environment instead of \textsc{ascii} Arab\TeX\ or Buckwalter input 2221% environment instead of \textsc{ascii} Arab\TeX\ or Buckwalter input
2213% schemes. See \vref{sec:unicode-input} for more details. 2222% schemes. See \vref{sec:unicode-input} for more details.
2214% 2223%
2224% \DescribeOption{export} |export|$=$|true|\verb+|+|false|
2225% \hfill\arabluaverb{default: false}\\
2226% \NEWfeature{v.1.13} This named argument does not need a value as it
2227% defaults to |true| if it is used. If |export| is set as a global
2228% option as well (see above \vpageref{export-mode}), all the lines
2229% will be converted to Unicode and exported to the external selected
2230% file. See below \vref{sec:arabtex2utf} for more details.
2231%
2215% \DescribeMacro{\bayt} Inside the |arabverse| environment, each line 2232% \DescribeMacro{\bayt} Inside the |arabverse| environment, each line
2216% is typeset by the \cs{bayt} command which takes two mandatory 2233% is typeset by the \cs{bayt} command which takes two mandatory
2217% arguments and may accept one optional argument. Additionally, every 2234% arguments and may accept one optional argument. Additionally, every
@@ -3997,6 +4014,59 @@ wa-ya.sIru ta.hta 'l-jild-i
3997% \iffalse 4014% \iffalse
3998%</example> 4015%</example>
3999% \fi 4016% \fi
4017%
4018% \section{Exporting Unicode Arabic to an external file}
4019% \label{sec:arabtex2utf}
4020% \NEWfeature{v.1.13}\package{arabluatex} is able to produce a
4021% duplicate of the original |.tex| source file in which all |arabtex|
4022% or |buckwalter| strings will have been replaced with Unicode
4023% equivalents, either in Arabic script or in any accepted standard of
4024% transliteration. Exporting \textsc{ascii} strings to Unicode while
4025% preserving the exact selected global or local options is a fairly
4026% complex operation which may require \hologo{LuaLaTeX} to be run
4027% several times as will be explained below.
4028%
4029% \paragraph{\texttt{export} global option}
4030% \DescribeOption{export}
4031% First, \package{arabluatex} must be loaded with the |export| global
4032% option enabled, like so:--- %
4033% \iffalse
4034%<*example>
4035% \fi
4036\begin{arabluaverbatim}
4037 % preamble
4038 \usepackage[export]{arabluatex}
4039 % or:
4040 \usepackage[export=true]{arabluatex}
4041\end{arabluaverbatim}
4042% \iffalse
4043%</example>
4044% \fi
4045% Once that is done, compiling the current file will produce an empty
4046% external |.tex| file with the same preamble as the original file.
4047%
4048% \DescribeMacro{\SetArbOutSuffix} By default, |_out| is appended as a
4049% suffix to the external file name. Any other suffix may be set with
4050% the command \cs{SetArbOutSuffix}\marg{suffix}.
4051%
4052% \paragraph{Exporting running paragraphs}
4053% \DescribeEnv{arabexport} Then, the |arabexport| environment is
4054% provided to actually exporting running paragraphs with or without
4055% Arabic environments to the external selected file, like so:--- %
4056% \iffalse
4057%<*example>
4058% \fi
4059\begin{arabluaverbatim}
4060 \begin{arabexport}
4061 <Running paragraphs of either Arabic or non-Arabic text>
4062 \end{arabexport}
4063\end{arabluaverbatim}
4064% \iffalse
4065%</example>
4066% \fi
4067% \package{arabluatex} will leave untouched non-Arabic text, but
4068% will write in Unicode every Arabic environment to the external
4069% file.
4000% 4070%
4001% \section{Future work} 4071% \section{Future work}
4002% \label{sec:future-work} 4072% \label{sec:future-work}
@@ -4393,11 +4463,13 @@ wa-ya.sIru ta.hta 'l-jild-i
4393% \end{macro} 4463% \end{macro}
4394% \begin{macro}{\arbmark} 4464% \begin{macro}{\arbmark}
4395% \changes{v1.11}{2018/03/31}{New command for inserting additional 4465% \changes{v1.11}{2018/03/31}{New command for inserting additional
4396% marks in Arabic environments} \cs{arbmark} takes one argument from 4466% marks in Arabic environments}
4397% a list of defined elements. \changes{v1.13}{2018/08/23}{New 4467% \cs{arbmark}\oarg{rl\textbar{}lr}\marg{shorthand} takes one
4398% optional argument: either \texttt{rl} or \texttt{lr}} The mark to 4468% argument from a list of defined elements.
4399% be inserted is determined by contextual analysis or by an 4469% \changes{v1.13}{2018/08/23}{New optional argument: either
4400% optional argument, either |rl| or |lr|. This command is coded in Lua. 4470% \texttt{rl} or \texttt{lr}} The mark to be inserted is determined
4471% by contextual analysis or by an optional argument, either |rl| or
4472% |lr|. This command is coded in Lua.
4401% \begin{macrocode} 4473% \begin{macrocode}
4402\NewDocumentCommand{\arbmark}{O{} m}{% 4474\NewDocumentCommand{\arbmark}{O{} m}{%
4403 \bgroup% 4475 \bgroup%