# [XeTeX] Hoefler italics and diacritics oddity

Ross Moore ross at maths.mq.edu.au
Tue Jun 22 14:11:49 CEST 2004

On 22/06/2004, at 9:33 PM, Musa Furber wrote:

> 4) I declared the macro I use with text that needs to be
> transliterated:
>
> \newcommand{\mfarab}[1]{%
> \begingroup\fontfamily{hoeflalt}\selectfont\textit{#1}\endgroup}
>
> This appears to do the trick, for me, at least.

This is fine for short amounts of text, say single words
or phrases embedded in paragraphs set in the default language.

>
> Any suggestions on a better way to do this in LaTeX?

For large amounts of text, involving one or more complete paragraphs,
your source will look cleaner if you use an environment; e.g.

\begin{mfarabpars}
...
... paragraphs of Devnagari script ...
...
\end{mfarabpars}

involving a definition such as:

\newenvironment{mfarabpars}%
{\begingroup\fontfamily{hoeflalt}\selectfont\itshape\ignorespaces}%
{\endgroup}

(The \begingroup  and  \endgroup  are now probably redundant.
You should experiment just to make sure.)

Using an environment has other subtle advantages,
especially when you have things like footnotes, labels
URLs and \verb|....| constructions within those paragraphs.
Also, it simplifies editing a little, since you don't have to
take care of accidentally removing the opening {  or closing } .

>
> Thanks,

Hope this helps,

Ross

> Musa
>
> On 22 Jun 2004, at 12:39, Musa Furber wrote:
>
>> Using \begingroup...\endgroup took care of it. I knew there had to be
>> a really simple way of doing this.
>>
>> Now I just need to test for the correct sizing for the environment so
>> the text is drawn at the proper size. Well, I guess this is one way
>> to learn TeX...though piecemeal.
>>
>> Thanks much to you and Mr. Shulz.
>>
>> Regards,
>> Musa
>
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex
>
------------------------------------------------------------------------
Ross Moore                                         ross at maths.mq.edu.au
Mathematics Department                             office: E7A-419
Macquarie University                               tel: +61 +2 9850 8955
Sydney, Australia                                  fax: +61 +2 9850 8114
------------------------------------------------------------------------