From: Jon Crump <jjcrump@uw.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: marginal material in Arabic, tei/xml context mkiv
Date: Fri, 3 Jun 2011 16:41:23 -0700 [thread overview]
Message-ID: <BANLkTi=_2NQbkD372MUc5bFTCOYrXqiuQQ@mail.gmail.com> (raw)
All,
Pardon for trying to boost the topic, but I still can't seem to gain
control over marginal material in an Arabic section using the new
typo-mar.mkiv. I confess, it's quite likely that I'm just not getting
something obvious.
I've rotated the page to landscape to show where the marginal material
winds up when margin is [right]. When it's [left], it overwrites the
beginning of the Arabic line
If anyone has thoughts on this, I'd be grateful.
context environment file:
~~~~~~~~~~~~~~~~~
\startxmlsetups xml:teisetups
\xmlsetsetup{#1}{*}{-}
\xmlsetsetup{#1}{body}{xml:*}
\xmlsetsetup{#1}{div[@xml:id='arab']}{xml:div:arab}
\xmlsetsetup{#1}{div[@xml:id='engl']}{xml:div:engl}
\xmlsetsetup{#1}{lb}{xml:lb}
\stopxmlsetups
\setuppapersize[][A3,landscape]
\setuplayout[width=middle,textwidth=5in]
\xmlregistersetup{xml:teisetups}
\environment ara-sty
\startxmlsetups xml:body
\xmlflush{#1}
\stopxmlsetups
\startxmlsetups xml:lb
\MarText{\tfxx{xml linebreak numbers}}
\xmlflush{#1}
\stopxmlsetups
\definemargindata [MarText][right][color=red]
\startxmlsetups xml:div:arab
\setarabic{\switchtobodyfont[Arabic] \xmlflush{#1}}
\endgraf
\stopxmlsetups
\startxmlsetups xml:div:engl
\setlatin{\xmlflush{#1}}
\stopxmlsetups
~~~~~~~~~~~~~~~~~~~
XML source:
~~~~~~~~~~
<?xml version="1.0" encoding="utf-8"?>
<body>
<div type="month" xml:id="arab">
<lb n="01" />فقد صممنا على السفر الى اورباو ممشانا من هنا سيكون
</div>
<div type="month" xml:id="engl">
<lb n="01" />And so, we decided to travel to Europe. Our departure
from here will be
</div>
</body>
~~~~~~~~~~
ara-sty.tex setting up ScheherazadeRegOT:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\startenvironment ara-sty
\mainlanguage[arabic]
% Font setup
\definefontfeature
[arabic]
[mode=node,language=dflt,script=arab,
init=yes,medi=yes,fina=yes,isol=yes,
liga=yes,dlig=yes,rlig=yes,clig=yes,
mark=yes,mkmk=yes,kern=yes,curs=yes]
\starttypescript [serif] [arabic]
\definefontsynonym [Arabic-Light] [name:ScheherazadeRegOT]
[features=arabic]
\definefontsynonym [Arabic-Bold] [name:ScheherazadeRegOT]
[features=arabic]
\definefontsynonym [Arabic-Italic] [name:ScheherazadeRegOT]
[features=arabic]
\definefontsynonym [Arabic-Bold-Italic] [name:ScheherazadeRegOT]
[features=arabic]
\stoptypescript
\starttypescript [serif] [arabic] [name]
\usetypescript[serif][fallback]
\definefontsynonym [Serif] [Arabic-Light] [features=arabic]
\definefontsynonym [SerifItalic] [Arabic-Italic] [features=arabic]
\definefontsynonym [SerifBold] [Arabic-Bold] [features=arabic]
\definefontsynonym [SerifBoldItalic] [Arabic-Bold-Italic] [features=arabic]
\stoptypescript
\starttypescript [Arabic]
\definetypeface [Arabic] [rm] [serif] [arabic] [default]
\stoptypescript
\def\ArabicGlobalDir {\pagedir TRT\bodydir TRT\pardir TRT\textdir TRT}
\def\ArabicParDir {\textdir TRT\pardir TRT}
\def\ArabicTextDir {\textdir TRT}
\def\LatinParDir {\textdir TLT\pardir TLT}
\def\LatinTextDir {\textdir TLT}
\def\LatinGlobalDir {\pagedir TLT\bodydir TLT\pardir TLT\textdir TLT}
\define\setarabic
{\ArabicGlobalDir%
\usetypescript[Arabic]%
\setupbodyfont[Arabic,20pt]}
\definestartstop
[arabicpar]
[commands=\Arabic\ArabicParDir]
\define[1]\RT
{{\Arabic\ArabicTextDir#1}}
\define\setlatin
{\LatinGlobalDir%
\usetypescript[lm]%
\setupbodyfont[lm,20pt]}
\definestartstop
[latinpar]
[commands=\Arabic\LatinParDir]
\define[1]\LT
{{\LatinTextDir#1}}
\setupdirections[bidi=local]
\stopenvironment
___________________________________________________________________________________
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
___________________________________________________________________________________
next reply other threads:[~2011-06-03 23:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-03 23:41 Jon Crump [this message]
2011-06-04 10:08 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='BANLkTi=_2NQbkD372MUc5bFTCOYrXqiuQQ@mail.gmail.com' \
--to=jjcrump@uw.edu \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).