Changes

Jump to navigation Jump to search
1,980 bytes added ,  16:57, 16 December 2017
Hebrew addition
[[Arabic fonts]] >
 
{{todo|overview page for the use of middle-eastern scripts}}
== Examples Arabic ==
== This is an example environment for typesetting Arabic ==documents in Mark IV (ConTeXt with LuaTeX). It won't work at all in Mark II (with either pdfTeX or XeTeX).
This is an example style file for typesetting Arabic documents. Save it as "ara-sty.tex" and use "\input environment ara-sty" in your document.
<texcode>
\definefontsynonym [Arabic-Italic] [name:arabtype] [features=arabic]
\definefontsynonym [Arabic-Bold-Italic] [name:arabtype] [features=arabic]
\stoptypescript
\starttypescript [serif] [arabic] [name]
[commands=\Arabic\ArabicParDir]
\define[1]\ARRT
{{\Arabic\ArabicTextDir#1}}
\stopenvironment
</texcode>
 
=== Description ===
Here is some description:
[commands=\Arabic\ArabicParDir]
\define[1]\ARRT
{{\Arabic\ArabicTextDir#1}}
</texcode>
Here we define "arabicpar" environment for Arabic paragraphs in Latin context, and "\ARRT" for short Arabic sentences and "\setarabic" command to set the main document direction and font to Arabic.
<texcode>
</texcode>
To enable mirroring of BiDi mirrored characters, like () and [].This also enables "implicit bidi", so that you don't need to explicitly specify the direction of individual Arabic sentences inside Latin context in vise versa. === Using it ===
Now, lets try a "Hello World" example:
\stoptext
</texcode>
 
== Hebrew ==
 
(Example by Rik Kabel on the mailing list, 2017-12-15)
 
Depending on the font, correct niqqud placement requires some combination (sometimes all) of the following font features: lang, ccmp, and script.
 
<texcode>
\definefontfeature [hebrew] [oldstyle] [
lang=heb,
ccmp=yes,
script=hebr,
]
\starttext
\definedfont[name:EzraSIL*hebrew at 72pt]
\setupalign[r2l]
טְרוֹפוֹתִי
\stoptext
</texcode>
 
The same settings work well for Narkisim. For David_CLM you only need the script setting.
 
Correction by Hans, 2017-12-16:
 
There is a font feature hebrew already predefined
 
<texcode>
\definefontfeature [hebrewoldstyle] [oldstyle] [...]
</texcode>
 
if you have to set a language depends on the font (often dflt is ok).
 
This is the predefined set:
 
<texcode>
\definefontfeature
[semitic-complete]
[mode=node,analyze=yes,language=dflt,ccmp=yes,
autoscript=position,autolanguage=position,
init=yes,medi=yes,fina=yes,isol=yes,
mark=yes,mkmk=yes,kern=yes,curs=yes,
liga=yes,dlig=yes,rlig=yes,clig=yes,calt=yes]
 
\definefontfeature
[semitic-simple]
[mode=node,analyze=yes,language=dflt,ccmp=yes,
autoscript=position,autolanguage=position,
init=yes,medi=yes,fina=yes,isol=yes,
mark=yes,mkmk=yes,kern=yes,curs=yes,
rlig=yes,calt=yes]
 
\definefontfeature
[arabic]
[semitic-complete]
[script=arab]
 
\definefontfeature
[syriac]
[arabic]
[fin2=yes,fin3=yes,med2=yes]
 
\definefontfeature
[hebrew]
[semitic-complete]
[script=hebr]
 
\definefontfeature
[simplearabic]
[semitic-simple]
[script=arab]
 
\definefontfeature
[simplehebrew]
[semitic-simple]
[script=hebr]
</texcode>
 
[[Category:International]]
[[Category:Fonts]]

Navigation menu