[XeTeX] xetex and accents

Radhakrishna Valiveti rvaliveti at yahoo.com
Mon Jan 7 19:50:32 CET 2008


Hi,

   I am currently using xetex + fontspec (which are part of MikTeX v.7 for Windows). I am able to get xetex to use the fonts on my windows system. I want to control the placement of the accents generated with Tex commands such as \.{}, \={}, \d{}. Previously I was able to do this using the macros provided in exaccent.sty. I am wondering how I would accomplish the same result when xetex is directly using a native TTF font. 

  I have pasted a small test file at the end of this email. Any help/pointers are appreciated.

thanks,
radha


\documentclass[11pt,letterpaper]{article}
\usepackage{fontspec}
\usepackage{exaccent}
\newfontfamily\trebuchetfont[BoldFont = {* Bold}, ItalicFont = {* Italic}, BoldItalicFont = {* Bold Italic}]{Trebuchet MS}
\setmainfont{Arial}
%======================================
% Adjustment to the location of accents
% code 6 (small circle); 9(bar); 10(dot)
%=======================================
\DeclareTextCommand{\=}{T1}[1]{\upperaccent[1ex]{9}{#1}}   % upperaccent is defined in exaccent.sty
\DeclareTextCommand{\.}{T1}[1]{\upperaccent[1ex]{10}{#1}}  % The "1ex" is the relative position of the accent.
\DeclareTextCommand{\d}{T1}[1]{\loweraccent[1ex]{10}{#1}}

\begin{document}
{\trebuchetfont The quick brown fox jumped over a lazy dog. \={T}he \d{q}uick \={b}rown \.fox jumped over a lazy dog.}\par
{\bf\trebuchetfont The quick brown fox jumped over a lazy dog. \={T}he \d{q}uick \={b}rown
 \.fox jumped over a lazy dog.}\par
{\it\trebuchetfont The quick brown fox jumped over a lazy dog. \={T}he \d{q}uick \={b}rown \.fox jumped over a lazy dog.}\par

\fontsize{18}{21}{\trebuchetfont
The quick brown fox jumped over a lazy dog. \={T}he \d{q}uick \={b}rown
\.fox jumped over a lazy dog.}\par
\fontsize{18}{21}{\bf\trebuchetfont
The quick brown fox jumped over a lazy dog. \={T}he \d{q}uick \={b}rown
\.fox jumped over a lazy dog.}\par

\end{document}


Radhakrishna Valiveti 
rvaliveti at yahoo.com 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/xetex/attachments/20080107/4a5554d2/attachment.html 


More information about the XeTeX mailing list