Digital Typography News

A blog exclusively devoted to digital typography

Archive for December, 2007

More on Math with XeLaTeX

without comments

Try the following simple code:

\documentclass[a4paper]{article}
\usepackage[math-style=iso]{unicode-math} %%
\begin{document}
\setmathfont{Asana Math}
$\cos^{2}x+\sin^{2}x=1
\end{document}

You will discover that XeLaTeX produces a PDF file that does not show the sinus and cosinus symbols! Will Robertson, the author of the unicode-math package, explained to me that if one appends the following line

\def\operator@font{\um@mathup}

to file unicode-math.sty, this fixes this problem. So go on and modify your local copy of unicode-math.sty.

Apostolos Syropoulos

Written by euadmin

December 24th, 2007 at 6:02 pm

Posted in Uncategorized

Math with XeLaTeX

without comments

The unicode-math package by Will Robertson is a piece of software that was designed to facilitate the typesetting of mathematical text (e.g., equations, formulae, etc.) with XeLaTeX. The following shows a sample file:

\documentclass[a4paper]{article}
\usepackage[math-style=iso]{unicode-math} %%
\begin{document}
\setmathfont{Asana Math} %% set font for mathematical content
\begin{displaymath}
\underbrace{α,\ldots,ω}\quad
\mathfrak{A}+\mathcal{B}
\end{displaymath}
\end{document}

All LaTeX commands produce the expected results. In addition, \mathup produces up-right math letters, \mathit produces italic letters (the default is to use italic letters), \mathbb produces black-board letters (think of the R that denotes the set of real numbers), \mathscr and \mathfrak should be used to get script-style or gothic letters, respectively, \mathsf and \mathtt should be used to get sans serif and mono-spaced letters. Also, the commands \mathsfit, \mathbfit, \mathbffrak, \mathbfscr, \mathbfsf, and \mathbfsfit should be used to get the boldface versions of the previous commands.

Apostolos Syropoulos

Written by euadmin

December 15th, 2007 at 5:57 pm

Posted in Uncategorized

Correct hyphenation of Greek documents

without comments

When TeX, and for that matter XeTeX, encounters a word that consists of n letters, then unless n is not greater or equal to

max(1,\lefthyphenmin)+max(1,\righthyphenmin),

where \lefthyphenmin and \righthyphenmin correspond to the smallest fragment at beginning/end of a word, the word will not be hyphenated. Note if one does not set these parameters, TeX assumes they have been set to zero. When typesetting Greek documents, I recommend to set both these variables to 2, that is,

\lefthyphenmin=2 \righthyphenmin=2

In other words, I recommend the hyphenation of words that have at least four letters. It is also recommended to make this setting permanent (e.g., by including these assignments in file hyphen.cfg).

Apostolos Syropoulos

Written by euadmin

December 5th, 2007 at 5:56 pm

Posted in Uncategorized