28 Agustus 2012

Fixing dagger alif in alqalam

Following the inverted damma, I found that the dagger alif is rendered incorrectly on particular letters, i.e. ا د ذ ر ز و ء. Instead of being rendered above the letter, the dagger alif is rendered after that letter. Strangely it is not recognized as diacritic/harakah, instead it is recognized as character skeleton. Thus the fix is really hacks, I haven't found what is the impact on the whole system. The hack is done on qaparse.sty and qaboxes.sty. On qaparse.sty we do the following hacks:

--- qaparse.sty 
+++ origin/qaparse.sty 
@@ -880,12 +880,10 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%% special vowels %%%%%%%%%%%%%%%%%%%%%%%%%% 
 
 \def \sv@a@a #1{% Qur'an alif
- %% \if\xpa\is@in@list \the\last@con dFraQzw>%
- %%  \if\is@in@list #1TA>\add@fathaspec%
- %%  \else\put@syl\tashiltrue\put@con\a@alif@kh\fi%
- %% \else\add@fathaspec\fi%
-        \add@fathaspec%
+ \if\xpa\is@in@list \the\last@con dFraQzw>%
+  \if\is@in@list #1TA>\add@fathaspec%
+  \else\put@syl\tashiltrue\put@con\a@alif@kh\fi%
+ \else\add@fathaspec\fi%
  \stepcounter{qm@rk}%                          % to allow multiple floors for quran marks 
 \case #1\of%
 {   \a@H {\put@con \a@H\put@syl\syl@con}%

On qaboxes.sty we do the following hacks:
--- qaboxes.sty 
+++ origin/qaboxes.sty 
@@ -518,10 +518,7 @@
 \put@hi {\char\a@hamz@s}\or                           % 27
 \put@lo {\char\a@hamz@s}\or                           % 28
 \put@aya\or                                           % 29
-% we shall hack this because it triggers alif dagger harakat error in the following char
-%    ا د ذ ر ز و ء 
-%\put@alif{\char\a@quran@alif}\or                      % 30                                   % 30
-\put@fathaspec\or
+\put@alif{\char\a@quran@alif}\or                      % 30                                   % 30
 \put@hi {\a@syeh}\or                                  % 31
 \put@hi {\char 2 }\or                           % illegal
 \else \put@hi {\char 2 }\or                           % illegal

26 Agustus 2012

Fixing inverted damma in alqalam

I found problem when typeset inverted damma in alqalam. To fix this I have to traverse across the module, because I could not find adequate  documentation about the structure, much worse I have never programmed any latex stuff.
In brief the flow is the following:
1. UTF code is processed in qutfcode.sty. Inverted damma UTF code is d997 (don't get confused with reversed damma). It was not encoded on alqalam version 427/08/17 0.2. Thus I add the encoding "\n@xp\a@u.
Note: some important arabic UTF code can be observed on utf8-chartable.de
2. The "\n@xp\a@u code then will be translated into integer in qaparse.sty. It is encoded as \c@ammad, with integer code 12.
3. Then in qaboxes.sty on function \put@voc case 12, the inverted damma character is translated as \a@ammad to be written.
4. Finally the code is mapped into the font glyph at qxarbsymb.sty.
\chardef \a@ammad = '146.
This is a simple code to view the glyph:

\documentclass{article}
\usepackage{fonttable}
\pagestyle{empty}
\begin{document}
\fonttable{qnskh14} %this is default font in alqalam
\end{document}

03 Juni 2012

Motorola ringtone composer

I have an old motorola hand phone with fascinating ringtone composer function. However there is no information, even on internet about how to compose a music there. Here I try to share my experiment on how to compose a notation in it. I'm sorry for my music knowledge.
The grammar is the following
ABDE
A= *Number, eg *1, 1st octave. This is optional
B= # sign, 1/2 ascending
C= Note Letter, abcdefg = ordinary note, r = stop note
D= Number, length of note, 0 is the longest, default is 2
example: *4#c0
We can also use up/down button to get all the notes, but only in standar length (there should be correct term for this). To change the length we must change it manually.

Happy composing!

Here is an example from star wars opening theme
b1b1b1g2r4*5d2b1
g2r4*5f2b0*5#f1*
5#f1*5#f1*5#g2r4
*5d2b1g2r4*5d2b0

29 Mei 2012

eating together

Eating together in a javanese family is not common. Once I blame javanese feodalism for it, but recently I found a more touching reason of what is(was) happening. My grandma told me a bitter story of how generally ordinary javanese people lived in the old time, poor, and lack of food. Therefore usually parents eat less delicious food (e.g. cassava) while the children eat better food (e.g. rice) in a hope of better development their body and health. It is pretty reasonable not to have a meal together, because generally javanese parents do not want their little children to know their parents suffering. Sounds like this lyrics "And we were raised, to see world is fun and take it if we can" of "ode to my family".

Unfortunately this practice is still very common today even though food difference is rarely happened. This situation might be strange for "civilized" people, but we should not judge for we might not know what really happens behind the scene.