[OS X TeX] Puzzled by an accented i

Josep Maria Font jmfont at ub.edu
Mon Mar 14 10:27:01 CET 2011


Hats off to the master! Many thanks for the explanation!

And yes, you are right, in plain TeX \'i gives a dotted accented i...



JMaF


El 14/03/2011, a las 01:01, Ross Moore escribió:

> Hello Josep,
> 
> On 14/03/2011, at 9:48 AM, Josep Maria Font wrote:
> 
>> But I thought that to obtain the "right" way one had to use \i. When I learned TeX (around 25 years ago), \' was a command that puts an accent on top of the first character at its right, whatever it is, so that for instance \'n and \'s could be used in Polish. In those times, \'i really produced a dotted accented i, and that's why Knuth invented the \i (and \j). Later on, we learned that in LaTeX it was better to consistently write \'{\i}...
> 
> Yes.
> It is probably still that way in Plain TeX.
> Here a macro is essentially a pointer to a coding subroutine.
> 
> But LaTeX is more of a "declarative" language.
> You declare what it is that you want, and the system provides it
> as best it can.
> 
> \' now means "give me the version of the following character,
> having an accent over it, using the current font.
> 
> To achieve this, LaTeX's NFSS (font selection scheme) tests for 
> the existence of several methods, in a specific order. These
> are the coding blocks to be used, taking into account both
> which accent and the letter being modified.
> Thus when you know that it is an 'i' following, then you
> don't have to worry about whether it is dotted or dotless,
> because the method being called can take that into account.
> 
> To see this happening, use:
> 
>>>> {\tracingall \'i }  % braces round the {i} are irrelevant
> 
> Depending upon what other packages are loaded, concerning font
> encodings, you may find a line such as:
> 
>>>>   \\OT1\'-i ->\@tabacckludge '\i 
> 
> which is the point at which the 'i' loses its dot, so to speak.
> After further macro expansion, we get to:
> 
>>>> \@secondoftwo #1#2->#2
>>>> #1<-\\OT1\'-\i 
>>>> #2<-\add at accent {19}{\i }
> 
> which is choosing the  \add at accent  macro with specific accent
> to be placed over \i (not over i ).
> 
> However, a macro package, or author, could have made a definition
> of  \\OT1\'-\i  to do whatever (s)he wants.
> It such a macro existes, then it will be used instead.
> 
> Similarly, doing 
> 
>>>> {\tracingall \'\i }
> 
> gets to the same point:
> 
>>>> \@secondoftwo #1#2->#2
>>>> #1<-\\OT1\'-\i 
>>>> #2<-\add at accent {19}{\i }
> 
> 
>> Thus, probably with time the definition of the \' command has changed.
> 
> Yes. The declarative approach is much more powerful,
> allowing the possibility of testing your macro arguments
> and other stylistic parameters, to help decide exactly what
> should be displayed in response to specific input.
> 
> On the other hand, it means much more processing may
> need to be done, in many situations where a simple decision
> could have more quickly lead to the same piece of coding.
> 
> Computers are much, much faster now, so that extra coding
> doesn't result in any noticeable slow-down.
> 
>> Which makes all the more interesting to know that with the package tipa this is possible (in my case, precisely to write down a typos list showing that this should *not* be done; the original was written more than 20 years ago!).
>> JMaF
> 
> Hope this helps,
> 
> 	Ross




More information about the macostex-archives mailing list