ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* A Semetic Aporia
@ 2002-11-18  5:17 Idris S Hamid
  2002-11-18  9:59 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Idris S Hamid @ 2002-11-18  5:17 UTC (permalink / raw)
  Cc: ahoenig

Dear Hans,
I have a serious problem: 

In Classical Arabic numerals are pronounced from single digits to tens to 
hundreds, etc., e.g. 

1234== four, thirty, two hundred, and a thousand. This makes transcribing 
Arabic numerals easy: they run the same as in roman languages. So in my otp's 
(Omega-Gamma) there is a command to transcribe any left-to-right L-R string 
numeral into an L-R string in Arabic (so I don't have to type the numeral 
backwards in the L-R transcription; i.e., typing 1234 in L-R comes out the 
same in R-L).

But there is a complicated scenario: For purposes of sectioning, we get (as in 
a TOC) for e.g. Section 3.12

in roman it should be (L-R):
3.12-------------------------------------------<page no.>

in Arabic it should be (R-L):
<page no.>-------------------------------------------12.3

Now my Gamma configuration is such that everything is flipped R-L except for 
numerals, so I _actually_ get
<page no.>-------------------------------------------3.12

in my Arabic sections and TOC. Is there any way to reverse the order of 
subsections so that subsection 3.12 comes out as 12.3? I assume there is some 
code that commands ConTeXt to print the section number, followed by the 
subsection number. Can that be hacked to reverse the sequence for Semetic 
documents (Arabic and Hebrew)? So we could have an option say,  
[style=semetic]. I did something similar in EDMAC once for Arabic critical 
editions.

I am finishing up a treatise in Arabic to be submitted later this week so I'm 
desparate. I guess I could replace all the numerals using the manual 
mechanism but there must be a better way!

Best wishes
Idris
-- 
Dr. Idris S Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: A Semetic Aporia
  2002-11-18  5:17 A Semetic Aporia Idris S Hamid
@ 2002-11-18  9:59 ` Hans Hagen
  2002-11-18 20:22   ` Idris S Hamid
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2002-11-18  9:59 UTC (permalink / raw)
  Cc: ntg-context, ahoenig

At 09:17 PM 11/17/2002 -0800, Idris S Hamid wrote:
>Dear Hans,
>I have a serious problem:
>
>In Classical Arabic numerals are pronounced from single digits to tens to
>hundreds, etc., e.g.
>
>1234== four, thirty, two hundred, and a thousand. This makes transcribing
>Arabic numerals easy: they run the same as in roman languages. So in my otp's
>(Omega-Gamma) there is a command to transcribe any left-to-right L-R string
>numeral into an L-R string in Arabic (so I don't have to type the numeral
>backwards in the L-R transcription; i.e., typing 1234 in L-R comes out the
>same in R-L).
>
>But there is a complicated scenario: For purposes of sectioning, we get 
>(as in
>a TOC) for e.g. Section 3.12
>
>in roman it should be (L-R):
>3.12-------------------------------------------<page no.>
>
>in Arabic it should be (R-L):
><page no.>-------------------------------------------12.3
>
>Now my Gamma configuration is such that everything is flipped R-L except for
>numerals, so I _actually_ get
><page no.>-------------------------------------------3.12
>
>in my Arabic sections and TOC. Is there any way to reverse the order of
>subsections so that subsection 3.12 comes out as 12.3? I assume there is some
>code that commands ConTeXt to print the section number, followed by the
>subsection number. Can that be hacked to reverse the sequence for Semetic
>documents (Arabic and Hebrew)? So we could have an option say,
>[style=semetic]. I did something similar in EDMAC once for Arabic critical
>editions.

\newif\ifreversesectionnumbers

\unprotected \def\@@longsectionnumber#1%
   {\ifreversesectionnumbers
      \@@shortsectionnumber{#1}%
      \ifnum\countervalue{\??se\previoussection{#1}}>\zerocount
        .\csname\previoussection{#1}\c!nummer\endcsname
      \fi
    \else
      \ifnum\countervalue{\??se\previoussection{#1}}>\zerocount
        \csname\previoussection{#1}\c!nummer\endcsname.%
      \fi
      \@@shortsectionnumber{#1}%
    \fi}

\reversesectionnumberstrue

\chapter{Well, let's see}
\section{If}
\section{This}
\section{Works}

but i assume you want a more sophisticated mechanism; should this be a key 
in \setuphead?

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: A Semetic Aporia
  2002-11-18  9:59 ` Hans Hagen
@ 2002-11-18 20:22   ` Idris S Hamid
  2002-11-18 20:42     ` Idris S Hamid
  0 siblings, 1 reply; 4+ messages in thread
From: Idris S Hamid @ 2002-11-18 20:22 UTC (permalink / raw)
  Cc: ntg-context, ahoenig

On Monday 18 November 2002 01:59, Hans Hagen wrote:
> \newif\ifreversesectionnumbers
>
> \unprotected \def\@@longsectionnumber#1%
>    {\ifreversesectionnumbers
>       \@@shortsectionnumber{#1}%
>       \ifnum\countervalue{\??se\previoussection{#1}}>\zerocount
>         .\csname\previoussection{#1}\c!nummer\endcsname
>       \fi
>     \else
>       \ifnum\countervalue{\??se\previoussection{#1}}>\zerocount
>         \csname\previoussection{#1}\c!nummer\endcsname.%
>       \fi
>       \@@shortsectionnumber{#1}%
>     \fi}
>
> \reversesectionnumberstrue
>
> \chapter{Well, let's see}
> \section{If}
> \section{This}
> \section{Works}
>

WOW!!!  So far this works perfectly! Please accept my deepest gratitude for 
such a short turnaround!

> but i assume you want a more sophisticated mechanism; should this be a key
> in \setuphead?

It would be nice to say something _global_ like

\setupheads[alternative=semetic]  or 
\setupheads[alternative=RL] 

I suppose for some _really_ funky multilingual scenarios the _local_ mecahnism

\setuphead[alternative=RL] 

might come in handy as well.

Thnx again!

Best wishes
Idris
-- 
Dr. Idris S Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Re: A Semetic Aporia
  2002-11-18 20:22   ` Idris S Hamid
@ 2002-11-18 20:42     ` Idris S Hamid
  0 siblings, 0 replies; 4+ messages in thread
From: Idris S Hamid @ 2002-11-18 20:42 UTC (permalink / raw)
  Cc: ahoenig

On Monday 18 November 2002 12:22, Idris S Hamid wrote:

> I suppose for some _really_ funky multilingual scenarios the _local_
> mecahnism
>
> \setuphead[alternative=RL]
>
> might come in handy as well.

That is, e.g.,

 \setuphead[section][alternative=RL]

Idris
-- 
Dr. Idris S Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-11-18 20:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-18  5:17 A Semetic Aporia Idris S Hamid
2002-11-18  9:59 ` Hans Hagen
2002-11-18 20:22   ` Idris S Hamid
2002-11-18 20:42     ` Idris S Hamid

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).