%
% Copyright (C) 2008-2001 Azzeddine LAZREK. All rights reserved.
%
% This program may be distributed and/or modified under the conditions
% of the LaTeX Project Public License, either version 1.2 of this license
% or any later version.
%
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt and version 1.2 or later is
% part of all distributions of LaTeX version 1999/12/01 or later.
%
% This program consists of all files listed in the file readmece.tex.
%
% readmece.tex
% This file belongs to the CurExt package.
%


\documentclass[a4paper,12pt]{article}

\usepackage{arabtex}
\setarab
\novocalize

%\usepackage{transtec}
%\setcode{transtec}

%\usepackage{nasx}

\usepackage{rydarab}
\funwithdots

\usepackage[parenthesis,kashidasymbol]{curext}

\input{amlogo.tex}


\title{\CurExt{}\\
Typesetting variable-sized curved symbols}

\author{Azzeddine L\textsc{azrek} \\
University Cadi Ayyad,
Faculty of Sciences, \\
Department of Computer Science, PO Box 2390\\
 Marrakech, Morocco \\
Phone: +212 24 43 46 49 \hspace{1cm} Fax: +212 24 43 74 07 \\
\texttt{lazrek@ucam.ac.ma}\\
\texttt{http://www.ucam.ac.ma/fssm/rydarab}}

%\day{}


\begin{document}

\maketitle


\section{Introduction}

The program \CurExt{} allows the composition of variable-sized
curved symbols such as those occurring in mathematics. This
application extends the capabilities of the well-known system
\TeX{} designed by D.~E.~Knuth for typesetting. Big delimiters,
such as brackets, or special curved symbols, such as the Arabic
mathematical symbol of sum, can be built automatically according
to the size and the shape of the concerned mathematical
expression. \CurExt{} will make it possible to stretch Arabic
letters according to calligraphic rules in order to draw the
kashida. The kashida is a small curve used to stretch some
characters in order to cover the concerned mathematical expression
or to break the line when the left margin is reached. It follows a
useful tool for justifying texts written with Arabic alphabet.
Unlike in Latin alphabet based writing, where the justification is
done through inserting small blanks among characters, cursive
writing fills in the space between characters with the kashida.

The \CurExt{} system is an extension of the system of treatment of
document \TeX{}. It must be integrated in a \TeX{} system. The
\CurExt{} extension can be used independently of the \RyDArab{}
extension to compose some expandable curvilinear symbols such as
parentheses. It's used by the package \RyDArab{} to compose some
Arabic mathematical expressions with the expandable curvilinear
symbols and the \NasX{} font for the stationary parts of Arabic
mathematical expandable symbols. It uses the font \NasX{} in
\texttt{METAFONT}.

The main qualities of the \CurExt{} system are:
\begin{itemize}
\item compatibility:
\begin{itemize}
\item the Arabic and Romance expression cohabit at the same time
in a document; \item the different versions of \CurExt{} are
compatible between them; \item the \CurExt{} system is compatible
with the other extensions of \TeX{}; \item the syntax of commands
of \CurExt{} is structurally analogous to the one of commands of
\TeX{}.
\end{itemize}\medskip
\item the universality:
\begin{itemize}
\item it can be used with any distribution of \TeX{} system;
%\item it can be used under the formats \texttt{plain} \TeX{} or \LaTeX{}. The
%extension for \LaTeX{} requires the standard \LaTeXe{};
\item it can be used under the Windows or Linux platform;
\item it can be adapted easily to the other expandable curvilinear symbols;
%\item it can be adapted easily to needs according to regions, levels,
%\ldots{};
\end{itemize}\medskip
\item the simplicity: it is easily usable.
\end{itemize}\medskip

The main hiatuses of the \CurExt{} application are:
\begin{itemize}
\item the no total transparency of the dynamic font generation;
\item the limitation to 16 different expandable curvilinear symbols in a document;
\item the limitation to 256 different sizes of every expandable curvilinear
symbol in a document;
\item it can be used under the \LaTeX{} format only. The
extension for \LaTeX{} requires the standard \LaTeXe{};
\item the font development in \texttt{METAFONT} and not in \texttt{PostScript}.
\end{itemize}\medskip


The \CurExt{} system is not:
\begin{itemize}
\item an autonomous system, it requires to be scratched in a \TeX{} system;
\item again a system of justification of the Arabic text,
it permits to compose the expandable curvilinear mathematical symbols;
\item a system 16 bits, it is 8 bits;
\item a system owner.
\end{itemize}\medskip

\TeX{} is a system of document treatment developed initially by
D.~E.~Knuth of the Stanford university. It is conceived for the
exchange and the transmission of text, a real, language of
communication, and the formatting, an excellent capacity of
composition, of document. It contains families of fonts
\texttt{Computer Modern} developed in \texttt{METAFONT}. \TeX{} is
a set down mark of American Mathematical Society.
\texttt{METAFONT} is a set down mark of Addison-Wesley Inc. The
format \texttt{plain} \TeX{} has been developed by D.~E.~Knuth.

Arab\TeX{} is an extension of \TeX{} conceived by K.~Lagally of
the Stuttgart university. It permits to generate the Arabic
writing, from an ASCII transliteration, of text of different,
languages using the Arabic alphabet. It permits to encrust a text
in Arabic in a Romance text, and vice versa. It also permits to
introduce a Romance mathematical expression in an Arabic text.
Arab\TeX{} contains the \texttt{xnsh} font developed in
\texttt{METAFONT}. Arab\TeX{} is protected by copyright and set
down under the LPPL (\emph{\LaTeX{} Project Public License}) of
\LaTeX3{} Project.

$\Omega$ is an extension of \TeX{} developed by J.~Plaice and
Y.~Haralambous. It allows generating multilingual texts using the
Unicode coding system.

The \LaTeX{} format has been developed initially by L.~Lamport.
\LaTeX{} is protected by a free license that is LPPL
(\emph{\LaTeX{} Project Public License}) of \LaTeX3{} Project.


\section{Package}

\subsection{Files}

The package \CurExt{} is distributed as:
\begin{description}
\item \texttt{curext.zip}: file compressed in \texttt{ZIP} format
for Windows or Linux platform.
%\\ \item \texttt{rydarab.tar.Z} file compressed tar format for Unix platform.
\end{description}

The decompression package gives the following directory tree:
\begin{description}
\item \texttt{doc}: the subdirectory of files for documentation
composed of:
\begin{description}
\item \texttt{readmece.tex}: this file in \TeX{} format for a
preliminary description. \item \texttt{readmece.pdf}: this file in
\texttt{PDF} format for a preliminary description. \item
\texttt{lppl.txt}: license information of the \LaTeX{} Project
Public License. \item \texttt{clear.bat}: the file batch under
DOS/Windows of destruction of font files generated. \item
\texttt{clear.exe}: the file script under Unix/Linux of
destruction of font files generated.
\item \texttt{examla.tex}: a
whole of expandable curvilinear symbol examples in \LaTeX{}. \item
\texttt{examla.pdf}: the file result of the file
\texttt{examla.tex}.
\end{description}\medskip
\item \texttt{fonts/source} subdirectory:
%\begin{description}
%\item \texttt{mf}: the subdirectory of files in \texttt{METAFONT} composed of:
\begin{description}
\item \texttt{font.mf}: the file of font generalized.
\item \texttt{param.mf}: the file of parameters.
\item \texttt{base.mf}: the file of basis.
\item \texttt{buffer.txt}: a generated intermediate file.
\item \texttt{parent.txt}: the file generated of the different sizes of
the bracket, opening or closing, in the document in composition.
\item \texttt{kashida.txt}: the file generated of the different sizes of the
kashida in the document in composition.
\item \texttt{parent.mf}: the file generated of the picture of the different
sizes of the bracket, opening or closing, in the document in
composition.
\item \texttt{kashida.mf}: the file generated of the picture of the different
sizes of the kashida in the document in composition.
\item \texttt{opprt10.mf}: the file of the dynamic font of the opening
parentheses.
\item \texttt{clprt10.mf}: the file of the dynamic font of the closing parentheses.
\item \texttt{ksd10.mf}: the file of the dynamic font of kashida.
\item \texttt{caropprt.mf}: the file of the shape of glyphs of the opening
parentheses of the different sizes.
\item \texttt{carclprt.mf}: the file of the shape of glyphs of the closing
parentheses of different size.
\item \texttt{carksd.mf}: the file of the shape of glyphs of the
kashida of different size.
\end{description}\medskip
%\end{description}\medskip
%\item \texttt{tex} subdirectory:
%\begin{description}
\item \texttt{tex/latex}: the subdirectory of files for \LaTeX{}
composed of:
\begin{description}
\item \texttt{curext.sty}: the \CurExt{} extension. \item
\texttt{varsize.tex}: the file of declarations of variables and
calls of procedures. \item \texttt{prtprc.tex}: the file of
commands of utilization of the bracket. \item
\texttt{opprtfnt.tex}: the file of declarations of the font of the
opening bracket. \item \texttt{clprtfnt.tex}: the file of
declarations of the font of closing bracket. \item
\texttt{arabprt.tex}: the file of commands of utilization of the
bracket in Arabic mathematics. \item \texttt{ksdprc.tex}: the file
of commands of utilization of the kashida. \item
\texttt{ksdfnt.tex}: the file of declarations of the font of the
kashida. \item \texttt{omxopprt.fd}: the file of definition of the
font of the opening bracket. \item \texttt{omxclprt.fd}: the file
of definition of the font closing bracket. \item
\texttt{omxksd.fd}: the file of definition of the font of the
kashida.
\end{description}
\end{description}


\subsection{Installation}

To install this package, one can put it into a folder intended to
be the usual one.


\section{Versions}

\subsection{Historic}

\begin{itemize}
\item 2002/03/01 v1.1: the version used to compose the manuscript of the thesis \cite{these}.
\item 2003/03/03 v1.2: includes:
\begin{itemize}
\item the optimization of variables interns;
\item the possibility to use the same names of commands that for the
Romance mathematics with the command \verb|\arabmath|.
\end{itemize}\medskip
\item 2003/04/08 v1.3: the improvement of glyphs; \item 2003/05/08
v1.4:the confection of the expandable symbol fonts in
\texttt{PostScript}.
 \item 2008/01/08 v1.5: the call of \NasX{} is not implicit.
 \item the future
 \item 2008/03/08 v1.6: the call of \RamzArab{} is not implicit.
version will include:
\begin{itemize}
\item the adaptation of this system to the format \texttt{plain}
\TeX{}; \item the extension of this system to the other expandable
curvilinear symbols such as the horizontal or vertical accolades
and the symbol integral; \item the adaptation of this system to
the different features of writing (the greasiness, the italic,
\ldots) for the different expandable symbols; \item the adaptation
of this system to the Unicode norm on the system $\Omega$; \item
the improvement of glyphs; \item etc.
\end{itemize}
\end{itemize}


\subsection{Compatibility}

There is a compatibility between the first versions.

The \CurExt{} extension is compatible with all extensions that we
had the opportunity to use jointly. It can happen that
incompatibilities are generated at the time of the utilization of
\CurExt{} together with other extensions.


\section{Preamble}

To generate some variable-sized curved symbols, the user must
insert, in the
preamble document, the following command: \\
%\verb|\input curext| when \texttt{plain} \TeX{} is used or \\
\begin{center}
\verb|\usepackage[|\textit{options}\verb|]{curext}|
\end{center}

when \LaTeX{} that is in utilization. The list of the options
\textit{options}, separated by gamma \verb| , | are described in
the following section.


\section{Options}

The following options are offered:
\begin{description}
\item[parenthesis] to generate some expandable curvilinear parentheses for the
mathematical expressions;
\item[kashidasymbol] to generate the expandable curvilinear kashida
for the mathematical conventional symbols in Arabic.
\end{description}


\section{Commands}

The command \verb|\arabmath| permits to use the same names of
commands in Arabic mathematics that for the Romance mathematics.

Hereafter, some commands offer by \textbf{CurExt} package.

The syntax for parentheses command is:

\begin{minipage}{50mm}
\begin{verbatim}
$\parentheses
 {\matrix{1 & 2 & 3\cr
          4 & 5 & 6\cr
          7 & 8 & 9\cr
 }}$
\end{verbatim}
\end{minipage}
\hfill\fbox{$\parentheses
 {\matrix{1 & 2 & 3\cr
          4 & 5 & 6\cr
          7 & 8 & 9\cr
 }}$}

The syntax for open (or left) parenthesis command is:

\begin{minipage}{50mm}
\begin{verbatim}
$\openparentheses
 {\matrix{1 & 2 & 3\cr
          4 & 5 & 6\cr
          7 & 8 & 9\cr
 }}$
\end{verbatim}
\end{minipage}
\hfill\fbox{$\openparentheses
 {\matrix{1 & 2 & 3\cr
          4 & 5 & 6\cr
          7 & 8 & 9\cr
 }}$}

The syntax for close (or right) parenthesis command is:

\begin{minipage}{50mm}
\begin{verbatim}
$\closeparentheses
 {\matrix{1 & 2 & 3\cr
          4 & 5 & 6\cr
          7 & 8 & 9\cr
 }}$
\end{verbatim}
\end{minipage}
\hfill\fbox{$\closeparentheses
 {\matrix{1 & 2 & 3\cr
          4 & 5 & 6\cr
          7 & 8 & 9\cr
 }}$}

The syntax for parentheses, in an Arabic mathematical
presentation, command is:

\begin{minipage}{50mm}
\begin{verbatim}
\arabmath$ {\parentheses
 {{\matrix{1 & 2 & 3\cr
           4 & 5 & 6\cr
           7 & 8 & 9\cr
 }}}}$
\end{verbatim}
\end{minipage}
\hfill\fbox{\arabmath$ {\parentheses
 {{\matrix{1 & 2 & 3\cr
           4 & 5 & 6\cr
           7 & 8 & 9\cr
 }}}}$ }

The syntax for open (or right) parenthesis, in an Arabic
mathematical presentation, command is:

\begin{minipage}{50mm}
\begin{verbatim}
\arabmath$ {\openparentheses
 {{\matrix{1 & 2 & 3\cr
           4 & 5 & 6\cr
           7 & 8 & 9\cr
 }}}}$
\end{verbatim}
\end{minipage}
\hfill\fbox{\arabmath$ {\openparentheses
 {{\matrix{1 & 2 & 3\cr
           4 & 5 & 6\cr
           7 & 8 & 9\cr
 }}}}$ }

The syntax for close (or left) parenthesis, in an Arabic
mathematical presentation, command is:

\begin{minipage}{50mm}
\begin{verbatim}
\arabmath$ {\closeparentheses
 {{\matrix{1 & 2 & 3\cr
           4 & 5 & 6\cr
           7 & 8 & 9\cr
 }}}}$
\end{verbatim}
\end{minipage}
\hfill\fbox{\arabmath$ {\closeparentheses
 {{\matrix{1 & 2 & 3\cr
           4 & 5 & 6\cr
           7 & 8 & 9\cr
 }}}}$ }

The syntax for Arabic sum command is:

\begin{minipage}{43mm}
\begin{verbatim}
\arabmath${\csum_{b=T-1}^{s}} c{{}^b}$
\end{verbatim}
\end{minipage}
\hfill\fbox{\arabmath${\csum_{b=T-1}^{s}} c{{}^b}$ }

The syntax for Arabic product command is:

\begin{minipage}{43mm}
\begin{verbatim}
\arabmath${\cprod_{b=T-1}^{s}} c{{}^b}$
\end{verbatim}
\end{minipage}
\hfill\fbox{\arabmath${\cprod_{b=T-1}^{s}} c{{}^b}$ }

The syntax for Arabic limit command is:

\begin{minipage}{43mm}
\begin{verbatim}
\arabmath${\clim_{c \to 0} c{{}^2}}$
\end{verbatim}
\end{minipage}
\hfill\fbox{\arabmath${\clim_{c \to 0}} c{{}^2}$ }

The syntax for Arabic kashida command is:

\begin{minipage}{43mm}
\begin{verbatim}
\arabmath$ {\kashida{9mm}}$
\end{verbatim}
\end{minipage}
\hfill\fbox{\arabmath$ {\kashida{9mm}}$}

or

\begin{minipage}{43mm}
\begin{verbatim}
\arabmath$ {\kashida_{\quad}^{}}$
\end{verbatim}
\end{minipage}
\hfill\fbox{\arabmath$ {\kashida_{\quad}^{}}$}


\section{Execution}

The size of an extensible symbol of an expression can be given if
the expression itself does not comprise another extensible symbol.
A problem arises when several extensible symbols are overlapping
in the same expression. \TeX{} and \texttt{METAFONT} should be
called as many as variable-sized symbols overlap. The
\texttt{TFM}'s and \texttt{*PK}'s files must be cleared in other
to compute them every time with the news sizes as font's
parameters, as might look like at following:

\begin{picture}(150,100)
\put(20,55){\framebox(50,15){\texttt{TEX}}} \put(80,70){tex}
\put(110,45){\framebox(50,35){\shortstack[l]{\texttt{DVI}\\ \texttt{PS} \\
\texttt{PDF}}}} \put(70,63){\vector(1,0){40}}
\put(55,10){\dashbox{0.5}(70,15){\texttt{TFM *PK}}}
\put(80,30){clear} \put(135,45){\line(0,-1){20}}
\put(125,25){\oval(20,20)[br]} \put(55,25){\oval(20,20)[bl]}
\put(45,25){\vector(0,1){30}}
\end{picture}



\section{Documentation}

In \cite{these}, we have give a large presentation for this system
and a manual of utilization. In \cite{curext}, we have present the
application \CurExt{}. In \cite{article}, we'll give a short
presentation for this system.


\section{Copyright}

\CurExt{} is copyrighted. The system and its source program's are
in the public domain. That will encourage its use in one hand, and
in the other hand, it allow its extension and improvement. The
system is copyright only in order to forbid unauthorized copies.

However, you may use it freely for any scientific, experimental
and strictly personal, non-commercial purposes if you give proper
credit to the author. All other uses require a separate written
license from the author.

This program may be distributed and/or modified under the
conditions of the \LaTeX{} Project Public License, either version
1.2 of this license or any later version.

The latest version of this license is in: \\
\centerline{\texttt{http://www.latex-project.org/lppl.txt}} and
version 1.2 or later is part of all distributions of \LaTeX{}
version 1999/12/01 or later.

This program consists of all files listed in this file
\texttt{readmece.tex}.

The \CurExt{} project is far from finished. It supposed to change
without prior notice.

Do not, however, mistake \CurExt{} itself for a \TeX{} system!
This document is only a brief introduction to the new
possibilities and is intended for package writers who are familiar
with \TeX{} fonts and \TeX{} or \LaTeX{} packages. It is neither a
user-guide nor a reference manual for \TeX{} or \LaTeX{}.


\section{Acknowledgements}

I want to thank Khalid Sami and Mostafa Banouni for there
contribution in redaction. I also want to thank Mohamed Jamel
Eddine Benatia for his assistance at the time of the font
development. Thanks for Mustapha Eddahibi and Mohamed Elyaakoubi
for their aid. Finally, thank you very much for all users who have
transmit me their remarks, suggestions, and mistakes.

The possibilities are almost unlimited, take your time and explore
them! If you encounter any problem or inquiries please contact me.
Please send error reports and suggestions for improvement to the
author.


\section{Author}

Copyright \copyright{} 2008-2001 Azzeddine LAZREK. All rights
reserved.

Address: Azzeddine L\textsc{azrek} \\
University Cadi Ayyad,
Faculty of Sciences, \\
Department of Computer Science, PO Box 2390\\
Marrakech, Morocco \\
Phone: +212 24 43 46 49 \\
Fax: +212 24 43 74 07 \\
\texttt{lazrek@ucam.ac.ma}\\
\texttt{http://www.ucam.ac.ma/fssm/rydarab}

CV author: Ph.D. in Computer Science 1988, Work on Processing
multilingual scientific documents, Professor of Computer Science
since 1989 in University Cadi Ayyad, Marrakech, Morocco.


\bibliographystyle{amsplain}
\bibliography{../doc/biblio/bibg,../doc/biblio/bibp,../doc/biblio/bibw}


\end{document}
