<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">Hi John:<br> Thanks for your pointers to solving the problem I had mentioned. The approach followed by exaccent (the style file I am using) is exactly aligned with the approach you had suggested. The current approach requires knowing the encoding used for the font. I don't see how it could be avoided.<br><br>regards,<br>radha<br><div> </div><strong>Radhakrishna Valiveti <br></strong><font color="royalblue">rvaliveti@yahoo.com <br></font><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: John Was <john.was@ntlworld.com><br>To: Unicode-based TeX for Mac OS X and other platforms <xetex@tug.org><br>Sent: Friday, January 18, 2008 12:27:31
AM<br>Subject: Re: [XeTeX] XeTex and Accents<br><br>
<style type="text/css">DIV {
MARGIN:0px;}
</style>
<div><font face="Arial Unicode MS">Hello Radhakrishna</font></div>
<div><font face="Arial Unicode MS"></font> </div>
<div><font face="Arial Unicode MS">Even now I quite often find it useful to
employ an \overstrike macro which must have been one of the first things I wrote
when I started to read the TeXBook. It superimposes two characters on top
of each other, the narrow centred on the longer. It could be tidied up a
bit but here it is in its rought state:</font></div>
<div><font face="Arial Unicode MS"></font> </div>
<div><font face="Arial Unicode MS">\def\overstrike#1#2{\leavevmode</font></div>
<div><font face="Arial Unicode MS">
\setbox0=\hbox{#1}\setbox1=\hbox{#2}\copy0<br> \kern -0.5\wd0 \kern
-0.5\wd1 \copy1 \kern -0.5\wd1 \kern 0.5\wd0}<br></font></div>
<div><font face="Arial Unicode MS">(You would have to adapt that for LaTeX's
\DeclareTextCommand - I don't (yet) use LaTeX.)</font></div>
<div><font face="Arial Unicode MS"></font> </div>
<div><font face="Arial Unicode MS">The contents of each box can be varied up and
down (use \smash to give it zero height if you think this is going to interfere
with \baselineskip), and you can invoke characters from different fonts - so if
you have a font with a delicate horizontal bar, for example, that could be used
in #2 of the macro rather than the main font's hyphen character (which will
usually look ugly if you force it to serve as an accent, which it wasn't
designed to be).</font></div>
<div><font face="Arial Unicode MS"></font> </div>
<div><font face="Arial Unicode MS">You can nest \overstrike commands, which in
the days before the Unicode combining accents was a useful way of getting
something like a macron with an acute above. Measurements should always be
in terms of em (or ex) so that the right height is chosen regardless of
which point-size you are using.</font></div>
<div><font face="Arial Unicode MS"></font> </div>
<div><font face="Arial Unicode MS">Now if you find this works nicely with
one font but gives an ugly effect in another, you could use</font></div>
<div><font face="Arial Unicode MS"></font> </div>
<div><font face="Arial Unicode MS">\if \else \fi</font></div>
<div><font face="Arial Unicode MS"></font> </div>
<div><font face="Arial Unicode MS">to give a series of alternative
definitions. In your font definitions you would then have to include a
\....true command. So to switch between definitions for Times and
Garamond, for example, give at the start of your file</font></div>
<div><font face="Arial Unicode MS"></font> </div>
<div><font face="Arial Unicode MS">\newif \iftimes</font></div>
<div><font face="Arial Unicode MS">\newif \ifgaramond</font></div>
<div><font face="Arial Unicode MS"></font> </div>
<div><font face="Arial Unicode MS">and whenever one of these fonts is used set
\timestrue or \garamondtrue.</font></div>
<div><font face="Arial Unicode MS"></font> </div>
<div><font face="Arial Unicode MS">The accent definitions would then
be:</font></div>
<div><font face="Arial Unicode MS"></font> </div>
<div><font face="Arial Unicode MS">\iftimes [DEFINITION ONE]
\else</font></div>
<div><font face="Arial Unicode MS"> \ifgaramond [DEFINITION
TWO]\fi\fi</font></div>
<div><font face="Arial Unicode MS"></font> </div>
<div><font face="Arial Unicode MS">All this, of course, is very ugly in view of
what you can do neatly with Unicode fonts that have the proper accent support,
but if you are forced into using old fonts, and old .TEX files, this might at
least give you a pointer about how you could control the appearance of
diacritics.</font></div>
<div><font face="Arial Unicode MS"></font> </div>
<div><font face="Arial Unicode MS">Best</font></div>
<div><font face="Arial Unicode MS"></font> </div>
<div><font face="Arial Unicode MS"></font> </div>
<div><font face="Arial Unicode MS">John</font></div>
<div> </div>
<div>---------Original Message ----- </div>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div style="background: rgb(228, 228, 228) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>From:</b>
<a rel="nofollow" title="rvaliveti@yahoo.com" ymailto="mailto:rvaliveti@yahoo.com" target="_blank" href="mailto:rvaliveti@yahoo.com">Radhakrishna
Valiveti</a> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a rel="nofollow" title="xetex@tug.org" ymailto="mailto:xetex@tug.org" target="_blank" href="mailto:xetex@tug.org">xetex</a> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Friday, January 18, 2008 2:59
AM</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> [XeTeX] XeTex and Accents</div>
<div><font face="Arial Unicode MS"></font><font face="Arial Unicode MS"></font><br></div>
<div style="font-size: 10pt; font-family: arial,helvetica,sans-serif;">Hi,<br><br>
I have recently started using xelatex (with MikTex 2.7) instead of pdflatex. I
have a question about getting accents with xetex. Here are couple of
constraints/requirements for what I am looking for:<br>
<ul>
<li>For the book that I am working we need to use three TTF fonts (for
different portions of the text): MS Trebuchet, Futura, and Arial. I don't
have much freedom in choosing different fonts (since we have to preserve the
formatting used in earlier editions of the book).<br>
</li><li>The text in each of these fonts may have the accents: \=, \d, and \.
applied to some of the letters. Sometimes, the text with these accents is
underlined as well. In order to make sure that underline doesn't hide the
dot below the letter, I need to control the placement of the dot accurately.
<br>
</li><li>I would like a general solution that would produce controllable
accents/diacritics, regardless of the fonts. If there has to be some
dependence on the fonts, I would like such dependencies to be localized to
very few macros. It appears to me that using the "preformed" character from
the font (if it exists) may not give me all the flexibility I need. What do
you think?<br>
</li><li> I am currently using the style files: fontspec, exaccent and the
following macros to control the placement of diacritics that I
need:<br>%======================================<br>% Adjustment to the
location of
accents<br>%=======================================<br>\DeclareTextCommand{\=}{EU1}[1]{\upperaccent[-0.2ex]{"00AF}{#1}}
%macron<br>\DeclareTextCommand{\.}{EU1}[1]{\upperaccent[-0.2ex]{"00B7}{#1}}
%dot<br>\DeclareTextCommand{\d}{EU1}[1]{\loweraccent[0.1ex]{"00B7}{#1}}
%dot<br><br>But I find that the macron over the letter is just too large and
doesn't look nice (the hyphen looks too small as an overbar). Do we have any
other choice for this? <br>
</li><li>I would like the same macro(s) to work with (a) older, non-unicode TTF
fonts that have been somehow adapted by fontspec to be usable by xetex, or
(b) newer unicode fonts on my machine. When I tried the unicode font called
"Gentium" (which I found on the <a rel="nofollow" target="_blank" href="http://scripts.sil.org/">scripts.sil.org</a> website), the diacritics over
the letters in this font don't look appealing at all (i.e. the above
TextCommands don't seem to have any affect --- it is perhaps picking a
preformed glyph from the font). Is there anything I can
do?<br></li></ul> I look forward to hearing from people who have faced
similar issues, and may have a solution to this issue.<br><br>thanks,<br>radha
<div> </div><strong>Radhakrishna Valiveti <br></strong><font color="royalblue">rvaliveti@yahoo.com <br></font>
<div><br></div></div>
<p>
</p><SPAN style="width:100%;height:2px;border-bottom:1px solid rgb(212,208,200); border-top:1px solid rgb(128,128,128);background-color:black;overflow:hidden; margin:8px 0px;"></SPAN>
<p></p>_______________________________________________<br>XeTeX mailing
list<br>postmaster@tug.org<br><a target="_blank" href="http://tug.org/mailman/listinfo/xetex">http://tug.org/mailman/listinfo/xetex</a><br></blockquote></div><br></div></div></body></html>