Hi Ross, <br><br><div><span class="gmail_quote">2007/3/11, Ross Moore <<a href="mailto:ross@ics.mq.edu.au">ross@ics.mq.edu.au</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Will, Manuel and others,<br><br>On 11/03/2007, at 7:18 AM, Will Robertson wrote:<br><br>> Hi Manuel,<br>><br>> No trouble asking here if you get stuck, that's why we're here!<br>><br>> On 11/03/2007, at 11:09 , Manuel Souto Pico wrote:
<br>><br>>> \newcommand{\ar}[1]{\font\ar="Scheherazade-AAT" at 12 pt {\ar#1}<br>>> \normalfont}<br><br>Please do *not* use such short macro names.<br>There is too likely a chance that it clashes with a macro
<br>defined in standard LaTeX packages, or within TeX itself.<br>(In this case, \ar is used by Xy-pic for arrows in diagrams.)<br><br>Even if you don't use those other packages, some of your work<br>may end up within a volume alongside other people's work
<br>where dthey are used.<br>This can creates a significant head-ache for editors of such<br>volumes of conglomerate material.</blockquote><div><br>I see. <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
It is good practice to use descriptive macro-names, rather<br>than cryptic abbreviations, so that it is clear just what<br>kind of material is being presented...</blockquote><div><br>Well, I wrote my command after getting inspiration from an example I found for Hebrew:
<br><br>\font\H="Lucida Grande" at 10pt<br>{\H לחני}<br><br>That's why I used \A first and \ar later. Also I think either ArabTex or Arabi used something of the like. And it's shorter to type than, say, \arabic.
<br><br>But I understood the lesson, I won't do it again :) <br><br>Thanks for your help. <br><br>Cheers, Manuel<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
><br>> As Herb said, this won't work (more than once) because the \font\ar=<br>> redefines the command \ar you've set up. Since you're using LaTeX,<br>> it's also probably better to be using the fontspec interface rather
<br>> than the plain TeX one. Note that \normalfont isn't required above<br>> (nor \selectfont).<br>><br>> Following your example, this would be better:<br>><br>> \font\arabicfont="Scheherazade-AAT" at 12pt
<br>> \newcommand\arabic[1]{{\arabicfont#1}}<br><br> ... this is a much better use of descriptive macro-names.<br><br>><br>> Better still would be:<br>><br>> \newfontfamily\arabicfont{Scheherazade-AAT}<br>
> \newcommand\arabic[1]{{\arabicfont#1}}<br>><br>> The reason this is better is that the font size isn't hard coded in<br>> the \arabic macro. (See the fontspec manual for explanation of<br>> \newfontfamily, etc.) You don't want to have to use a different macro
<br>> if you want Arabic text in a section heading, for example!<br>><br>> Hope this helps,<br>> Will<br><br><br>Cheers,<br><br> Ross<br><br>------------------------------------------------------------------------
<br>Ross Moore <a href="mailto:ross@maths.mq.edu.au">ross@maths.mq.edu.au</a><br>Mathematics Department office: E7A-419<br>Macquarie University tel: +61 +2 9850 8955
<br>Sydney, Australia 2109 fax: +61 +2 9850 8114<br>------------------------------------------------------------------------<br><br><br>_______________________________________________<br>XeTeX mailing list
<br><a href="mailto:postmaster@tug.org">postmaster@tug.org</a><br><a href="http://tug.org/mailman/listinfo/xetex">http://tug.org/mailman/listinfo/xetex</a><br></blockquote></div><br>