ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Arabic with ConTeXt
@ 2012-11-21 20:01 "H. Özoguz"
  2012-11-21 21:27 ` Philipp Gesang
  0 siblings, 1 reply; 6+ messages in thread
From: "H. Özoguz" @ 2012-11-21 20:01 UTC (permalink / raw)
  To: ntg-context

Hello,

many books I layout have arabic words or complete paragraphs in it - 
where the main language is german. For example there is a book, which is 
completely in arabic with german translation.

My present method to write in Arabic is, for sure, not the best, f.e. I 
have problems with arabic numbers (which are printed mirrored), problems 
with brackets and so on.

I have two questions, hopefully there is an expert for questions 
concerning Arabic or similar quests:

First: How to divide the page into a left part and a right part, two 
wright german on the left side and arabic on the right. Is \paragraph 
the best way for it?

Second: Which is your recommended way to type arabic with ConTeXt? I add 
mine in this Mail, please give me advises to improve it.

Thank you.
Huseyin
P.S.: If gridsetting with arabic is possible, then I would prefer that. 
But if not (see my non-gridsetting solution with \placeongrid), it's ok 
for me.

Here an example of Arabic on the right, with german left under it 
(should be side-by-side, did not implemend the paragraph yet)
++++++++++++++++++++++++++\setuplayout[grid=yes]\setuplayout[grid=yes]

\definefont[Sheh][name:Scheherazade*arabic at 17pt] % or 
file:amiri-regular.ttf*... file:alq.ttf


\def\Arab[#1][#2]{

\placeongrid[top]{

\blank[0.2cm]

\setupalign[r2l]\Sheh #1

\blank[0.3cm]

}

{\sl #2}

\blank[big]

}


\starttext

\Arab[فَبِأَيِّ آلَاءِ رَبِّكُمَا تُكَذِّبَانِ][Welche der Wohltaten eures Herrn wollt ihr 
beide verleugnen?]

\stoptext

++++++++++++++++++++++++++++++++++++++++





___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Arabic with ConTeXt
  2012-11-21 20:01 Arabic with ConTeXt "H. Özoguz"
@ 2012-11-21 21:27 ` Philipp Gesang
  0 siblings, 0 replies; 6+ messages in thread
From: Philipp Gesang @ 2012-11-21 21:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1313 bytes --]

···<date: 2012-11-21, Wednesday>···<from: "H. Özoguz">···
> First: How to divide the page into a left part and a right part, two
> wright german on the left side and arabic on the right. Is
> \paragraph the best way for it?

What you are looking for is text streams. They are not yet fully
functional in mkiv. But as long as you need the streams to appear
as columns on the same page, as seems to be the case, there is a
cheap workaround using the *tabulate* environment (see below).

The great thing about \{start,stop}tabulate is that it allows for
page breaks inside paragraphs of arbitrary length.

Regards
Philipp


·································································

\newcount\progresscounter \progresscounter0
\def\placeprogresscounter{%
  %% caution when using dynamic content: check
  %% for first pass to avoid multiple executions
  \iftrialtypesetting42\else
    \advance\progresscounter\plusone
    \the\progresscounter
  \fi
}

\starttext

\starttabulate[|r|p|p|]
  \NC \placeprogresscounter
  \NC \language[deo] Hallo, Welt!
  \NC \language[en]  \input knuth
  \NC\NR
  \HL % ························%
  \NC \placeprogresscounter
  \NC \language[deo] Nächster Abschnitt!
  \NC \language[en]  \input ward
  \NC\NR
\stoptabulate

\stoptext


[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Arabic with ConTeXt
  2012-11-23 14:34 ` "H. Özoguz"
@ 2012-11-23 15:46   ` Philipp Gesang
  0 siblings, 0 replies; 6+ messages in thread
From: Philipp Gesang @ 2012-11-23 15:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1406 bytes --]

···<date: 2012-11-23, Friday>···<from: "H. Özoguz">···

> Am 23.11.2012 15:17, schrieb ntg-context-request@ntg.nl:
> >The table*is*  the workaround ;P As long as you don?t mind being
> >limited to columns on one page, the tabulate syntax and the
> >restrictions on the input order, you?ll definitely be fine.
> >
> >The additional code was supposed to show how to handle an issue
> >that is very likely to manifest itself with what you are doing:
> >translations of this kind are usually accompanied by some special
> >pagination. Using plain counters for that can have undesirable
> >side-effects.
> >
> >Regards
> >Philipp
> Ok, thanks, so I misunderstood :)
> 
> But now a different issue arises, it could be that for my purpose of
> the dual-languaged book, it is better to divide every page NOT into
> left and right, but into up and down. Of course now the tabluate
> does not work, is there a workaround for this?

This is one of the features that were proposed along with the
streams wishlist thread some time ago:

  http://archive.contextgarden.net/message/20100818.141221.4253769f.en.html

I can’t provide a workaround, though, sorry.

Philipp

Btw. can you please fix your mail client so that it won’t break
the thread? Thanks.


-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Arabic with ConTeXt
       [not found] <mailman.340.1353680277.2161.ntg-context@ntg.nl>
@ 2012-11-23 14:34 ` "H. Özoguz"
  2012-11-23 15:46   ` Philipp Gesang
  0 siblings, 1 reply; 6+ messages in thread
From: "H. Özoguz" @ 2012-11-23 14:34 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 849 bytes --]

Am 23.11.2012 15:17, schrieb ntg-context-request@ntg.nl:
> The table*is*  the workaround ;P As long as you don?t mind being
> limited to columns on one page, the tabulate syntax and the
> restrictions on the input order, you?ll definitely be fine.
>
> The additional code was supposed to show how to handle an issue
> that is very likely to manifest itself with what you are doing:
> translations of this kind are usually accompanied by some special
> pagination. Using plain counters for that can have undesirable
> side-effects.
>
> Regards
> Philipp
Ok, thanks, so I misunderstood :)

But now a different issue arises, it could be that for my purpose of the 
dual-languaged book, it is better to divide every page NOT into left and 
right, but into up and down. Of course now the tabluate does not work, 
is there a workaround for this?

Huseyin

[-- Attachment #1.2: Type: text/html, Size: 1416 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Arabic with ConTeXt
  2012-11-22 19:10 ` "H. Özoguz"
@ 2012-11-23 11:16   ` Philipp Gesang
  0 siblings, 0 replies; 6+ messages in thread
From: Philipp Gesang @ 2012-11-23 11:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1307 bytes --]

Hi Huseyin,

···<date: 2012-11-22, Thursday>···<from: "H. Özoguz">···

> Am 21.11.2012 23:41, schrieb ntg-context-request@ntg.nl:
> >What you are looking for is text streams. They are not yet fully
> >functional in mkiv. But as long as you need the streams to appear
> >as columns on the same page, as seems to be the case, there is a
> >cheap workaround using the*tabulate*  environment (see below).
 
> Thank you. Why not simply a table without any workaround?
 
> \starttabulate[|p|p|]
> \NC \language[deo] Hallo, Welt!
> \NC \language[en] \input knuth
> \NC\NR
> \NC \language[deo] Nächster Abschnitt!
> \NC \language[en] \input ward
> \NC\NR
> \stoptabulate

The table *is* the workaround ;P As long as you don’t mind being
limited to columns on one page, the tabulate syntax and the
restrictions on the input order, you’ll definitely be fine.

The additional code was supposed to show how to handle an issue
that is very likely to manifest itself with what you are doing:
translations of this kind are usually accompanied by some special
pagination. Using plain counters for that can have undesirable
side-effects.

Regards
Philipp



-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Arabic with ConTeXt
       [not found] <mailman.315.1353537699.2161.ntg-context@ntg.nl>
@ 2012-11-22 19:10 ` "H. Özoguz"
  2012-11-23 11:16   ` Philipp Gesang
  0 siblings, 1 reply; 6+ messages in thread
From: "H. Özoguz" @ 2012-11-22 19:10 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1508 bytes --]

Am 21.11.2012 23:41, schrieb ntg-context-request@ntg.nl:
> What you are looking for is text streams. They are not yet fully
> functional in mkiv. But as long as you need the streams to appear
> as columns on the same page, as seems to be the case, there is a
> cheap workaround using the*tabulate*  environment (see below).
>
> The great thing about \{start,stop}tabulate is that it allows for
> page breaks inside paragraphs of arbitrary length.
>
> Regards
> Philipp
>
>
> ?????????????????????????????????????????????????????????????????
>
> \newcount\progresscounter \progresscounter0
> \def\placeprogresscounter{%
>    %% caution when using dynamic content: check
>    %% for first pass to avoid multiple executions
>    \iftrialtypesetting42\else
>      \advance\progresscounter\plusone
>      \the\progresscounter
>    \fi
> }
>
> \starttext
>
> \starttabulate[|r|p|p|]
>    \NC \placeprogresscounter
>    \NC \language[deo] Hallo, Welt!
>    \NC \language[en]  \input knuth
>    \NC\NR
>    \HL % ????????????????????????%
>    \NC \placeprogresscounter
>    \NC \language[deo] N?chster Abschnitt!
>    \NC \language[en]  \input ward
>    \NC\NR
> \stoptabulate
>
> \stoptext

Thank you. Why not simply a table without any workaround?

\starttabulate[|p|p|]

\NC \language[deo] Hallo, Welt!

\NC \language[en] \input knuth

\NC\NR

\NC \language[deo] Nächster Abschnitt!

\NC \language[en] \input ward

\NC\NR

\stoptabulate


Huseyin



[-- Attachment #1.2: Type: text/html, Size: 3162 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2012-11-23 15:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-21 20:01 Arabic with ConTeXt "H. Özoguz"
2012-11-21 21:27 ` Philipp Gesang
     [not found] <mailman.315.1353537699.2161.ntg-context@ntg.nl>
2012-11-22 19:10 ` "H. Özoguz"
2012-11-23 11:16   ` Philipp Gesang
     [not found] <mailman.340.1353680277.2161.ntg-context@ntg.nl>
2012-11-23 14:34 ` "H. Özoguz"
2012-11-23 15:46   ` Philipp Gesang

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).