[Aleph] otp's revisited
Idris Samawi Hamid
ishamid at colostate.edu
Fri Jul 23 20:02:27 CEST 2004
Hi friends,
Did anyone have a chance to look at the four experiments I sent a while
back? Any comments?
Best to all
Idris
=========================Sat, 03 Jul 2004==========================
Subject: Four experiments [was Re: [Aleph] feature request :-))]
===================================================================
Hi to all in the cartel,
On Fri, 2 Jul 2004 02:07:52 +0200, Giuseppe Bilotta <gip.bilotta at iol.it>
wrote:
> \expandafter\ocplist\expandafter\MyGreekOCP\expandafter=\MyGrOcps
> *will* work (correctly).
Below (in a single tex file) are four experiments
in laying the foundation for an
abstraction layer from ocplists and ocp primitives. The first
three use greek and the fourth uses arabic; all ocp's and fonts
are from the default (e-)Omega/Aleph distribution and do not
require LaTeX or ConTeXt; only (e-)Omega/Aleph.
In the following:
We use the expression `ocp-segment' to denote a set of one or more
\addbeforeocplist 1 lines; an ocp-segment is used in the creation
of an abtract ocplist that covers a certain set of parameters
needed to output a given script in a specific way;
We use `ocplist-segment' to denote a complete ocplist made from a
set of one or more \addbeforeocplist 1 lines; an ocplist-segment
is used to form an abstract string of ocplists, a string that
covers a certain set of parameters needed to output a given script
in a specific way.
First we do a static default greek setup: it works (of course);
Experiment one uses two ocp-segment abstractions from the greek ocps
with \expandafter s: it fails and also expands the `1' in
\addbeforeocplist 1 (it appears as a spurious `1' in the output);
Experiment two uses a single ocp-segment abstraction from the greek ocps
with \expandafter s: it fails
I played around with \expandafter in the above two case but could not
find a scenario that works:-(
Experiment three uses, not ocp-segments, but complete
ocplist-segments; it appears to work, but note that this case uses
only two \addbeforeocplist 1 lines; when more are added things
fall apart. See experiment 4;
Next we do a static default arabic setup: it works (of course;->);
Experiment four uses three ocplist-segments; it fails, except that
the Arabic-script numeral `4' is output.
But simple numerals do not depend on
the ocp transformations if they are mapped correctly in the font.
Question 1: why does experiment 3 _appear_ to work and experiment
4 fail? Clearly there must be something special about the third
case that does not get generalized to the fourth;
Question 2: what modifications are necessary to make experiments
1, 2, and 4 work?
I eagerly await your thoughts and suggestions
Best Idris
==============ocplist.tex==========================
% greek ocps
\ocp\GrTexUni=grpo2uni \ocp\GrUniToFont=uni2greek
%arabic ocps
\ocp\ArabUni=7arb2uni
\ocp\UniCUni=uni2cuni
\ocp\CUniArab=cuni2oar
% abstractions for greek
\def\GreekTranscription{\addbeforeocplist 1 \GrTexUni}
\def\GreekFont{\addbeforeocplist 1 \GrUniToFont}
\def\GreekFull{%
\addbeforeocplist 1 \GrTexUni
\addbeforeocplist 1 \GrUniToFont
}
% default
\ocplist\GreekOcp=
\addbeforeocplist 1 \GrTexUni
\addbeforeocplist 1 \GrUniToFont
\nullocplist
% abstraction xperiment 1 % expands the `1'
\expandafter\ocplist\expandafter\MyGreekOcpOne\expandafter=
\GreekTranscription
\GreekFont
\nullocplist
% abstraction xperiment 2
\expandafter\ocplist\expandafter\MyGreekOcpTwo\expandafter=
\GreekFull
\nullocplist
% abstraction xperiment 3
\ocplist\GreekOcpSegmentOne=
\addbeforeocplist 1 \GrTexUni
\nullocplist
\ocplist\GreekOcpSegmentTwo=
\addbeforeocplist 1 \GrTexUni
\nullocplist
\font\greek=omlgc at 12pt
\greek
%default
\pushocplist\GreekOcp
a b c d
% xperiment 1
\clearocplists
\pushocplist\MyGreekOcpOne
1 a b c d
% xperiment 2
\clearocplists
\pushocplist\MyGreekOcpTwo
2 a b c d
% xperiment 3
\clearocplists
\pushocplist\GreekOcpSegmentOne
\pushocplist\GreekOcpSegmentTwo
3 a b c d
% abstraction xperiment for arabic
% default
\ocplist\ArabicOCP=
\addbeforeocplist 1 \ArabUni
\addbeforeocplist 1 \UniCUni
\addbeforeocplist 1 \CUniArab
\nullocplist
% abstraction xperiment 4
\ocplist\ArabicOcpSegmentOne=
\addbeforeocplist 1 \ArabUni
\nullocplist
\ocplist\ArabicOcpSegmentTwo=
\addbeforeocplist 1 \UniCUni
\nullocplist
\ocplist\ArabicOcpSegmentThree=
\addbeforeocplist 1 \CUniArab
\nullocplist
\font\arabic=omarab at 12pt
\arabic
\textdir TRT\pardir TRT
% default
\clearocplists
\pushocplist\ArabicOCP
Aal-Hamdu Aal-Hamdu Aal-Hamdu
\blank[big]
% xperiment 4
\clearocplists
\pushocplist\ArabicOcpSegmentOne
\pushocplist\ArabicOcpSegmentTwo
\pushocplist\ArabicOcpSegmentThree
4 Aal-Hamdu Aal-Hamdu Aal-Hamdu
\bye
--
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
More information about the Aleph
mailing list