## Archive for October, 2007

## Asana-Math beta has been released!

Since yesterday a beta release of the Asana-Math OpenType font is available from the Open Font Library Web site. The font can be used with XeTeX v. 0.997 or Microsoft Word 2007, since it contains an OpenType MATH table that currently only these software tools understand. The font has been created with George William’s FontForge. If one wants to use the font with XeLaTeX, then it is a good idea to use the unicode-math package (warning: this package has bugs!). For plain TeX users, the following code can be used to typeset some simple formulas.

% set up Asana Math as math roman, symbol and extension families

\font\1=”[Asana-Math]:script=math” at 10pt

\font\2=”[Asana-Math]:script=math;+ssty=0″ at 7pt

\font\3=”[Asana-Math]:script=math;+ssty=1″ at 5pt

\textfont0=\1 \scriptfont0=\2 \scriptscriptfont0=\3

\textfont2=\1 \scriptfont2=\2 \scriptscriptfont2=\3

\textfont3=\1 \scriptfont3=\2 \scriptscriptfont3=\3

\let\tenrm=\1 \tenrm

% use Asana Math with italic mapping for family 1

\font\4=”[Asana-Math]:script=math;mapping=math-italic” at 10pt

\font\5=”[Asana-Math]:script=math;mapping=math-italic;+ssty=0″ at 7pt

\font\6=”[Asana-Math]:script=math;mapping=math-italic;+ssty=1″ at 5pt

\textfont1=\4 \scriptfont1=\5 \scriptscriptfont1=\6

%% need additional font/family declarations with other mappings

%% for blackboard, calligraphic, fraktur, typewriter, etc

\XeTeXmathcode`\-=”2 “2 “2212 % minus sign

\XeTeXmathcode`\/=”0 “1 “2215 % division slash

\XeTeXmathcode`\.=”0 “1 `. % period

\XeTeXmathcode`\,=”0 “1 `, % comma

\XeTeXmathcode`\∑=”1 “2 `∑

\XeTeXmathchardef\ldotp=”6 “2 `.

\XeTeXmathchardef\cdotp=”6 “2 `∙

\XeTeXmathchardef\sum=”1 “2 `∑

\XeTeXmathchardef\prod=”1 “2 `∏

\XeTeXmathchardef\intop=”1 “2 `∫

\XeTeXmathchardef\iintop=”1 “2 “222C

\XeTeXmathchardef\iiintop=”1 “2 “222D

\def\iint{\iintop\nolimits}

\def\iiint{\iiintop\nolimits}

\XeTeXmathchardef\ointop=”1 “2 `∮

\XeTeXmathchardef\infty=”1 “2 `∞

\XeTeXmathchardef\pi=”7 “1 `π

\XeTeXmathchardef\phi=”7 “1 `ϕ

\XeTeXmathchardef\nu=”7 “1 `ν

\XeTeXmathchardef\geq=”3 “2 `≥ \let\ge=\geq

\XeTeXmathchardef\leq=”3 “2 `≤ \let\le=\leq

\XeTeXmathchardef\to=”3 “2 `→

\XeTeXmathchardef\alpha=”0 “1 `α

\XeTeXmathchardef\beta=”0 “1 `β

\XeTeXmathchardef\gamma=”0 “1 `γ

\XeTeXdelcode”2F=”3 “2044

\XeTeXdelcode”28=”3 “28

\XeTeXdelcode”29=”3 “29

\XeTeXdelcode”5B=”3 “5B

\XeTeXdelcode”5D=”3 “5D

\def\lceil{\XeTeXdelimiter”4 “3 “2308 }

\def\rceil{\XeTeXdelimiter”5 “3 “2309 }

\def\lfloor{\XeTeXdelimiter”4 “3 “230A }

\def\rfloor{\XeTeXdelimiter”5 “3 “230B }

\def\{{\XeTeXdelimiter”4 “3 “7B }

\def\}{\XeTeXdelimiter”4 “3 “7D }

\def\langle{\XeTeXdelimiter”5 “3 “27E8 }

\def\rangle{\XeTeXdelimiter”5 “3 “27E9 }

\def\sqrt{\XeTeXradical”3 “221A }

\def\vec{\XeTeXmathaccent “7 “0 “20D7 }

\def\hat{\XeTeXmathaccent “7 “0 “0302 }

The code was originally written by Jonathan Kew and I have added a few commands. If you try the font and you think something is wrong or you do not like a feature or the shape of a glyph or you have a general comment to make, just leave your comments here.

Apostolos Syropoulos

## Setting up XeLaTeX to typeset Greek documents

Many people have asked me how to setup XeLaTex in order to be able to use the xgreek package. Here I will briefly exlain how this can be done:

* Create a folder and get copies of all files contained in http://www.ctan.org/tex-archive/macros/xetex/hyphenation/greek/

* In this folder create the file hyphen.cfg which must contain at least the following:

\message{Hyphenation patterns for American-English}

\newlanguage\american

\begingroup

\language\american

\input ushyphmax.tex

\endgroup

\input xgrmhyph.tex

\input xgrahyph.tex %only if you want anceint Greek hyphenation patterns

\endinput

* Enter the following command to create the new format file:

$ xetex -ini -etex -jobname=xelatex latex.ltx

* Copy the generated file (i.e., xelatex.fmt) there where your installation keeps format files (e.g., /prefix/texmf/web2c).

That’s all. Happy XeTeXing!

Apostolos Syropoulos

PS When using MiKTeX one can either backup the file hyphen.cfg of his system, replace the file with the one above and create the format file or he can manually create the format file in some folder. In addition, the manual format generation command should now have the following form:

q:\ xetex –initialize –enable-etex –job-name==xelatex latex.ltx

In case one has used this comman dto generate the format, the resulting file has to be moved in either

C:\Documents and Settings\username\Local Settings\Application Data\MiKTeX\2.Χ

or

C:\Documents and Settings\All Users\Application Data\MiKTeX\2.Χ

depending on the kind of installation one has (system-wide or per user).