3

I've read LaTeX sources to define the real behavior of accent commands and I've failed. It states with this:

\def\DeclareTextAccent#1#2#3{%  
\DeclareTextCommand#1{#2}{\add@accent{#3}}}

i.e. it constructs from \accent TeX-primitive.

Then I've went to TeX by Topic book and read about \accent primitive. But unfortunately I can't find any useful information that will explains the accent's behavior. I need to know how does x-position and y-position of accent symbols are calculated.

I've found such info:

The width of a character with an accent is the same as that of the unaccented character. TeX assumes that the accent as it appears in the font file is properly positioned for a character that is as high as the x-height of the font; for characters with other heights it correspondingly lowers or raises the accent.

...

The horizontal positioning of an accent is controlled by \fontdimen1, slant per point. Kerns are used for the horizontal movement.

But even knowing that I can't find answer to my question. Maybe you can?

1 Answer 1

2

I think The TeXbook is the place to look here. It says

Appendix B shows that plain TeX handles most of the accents by using TeX's \accent primitive. For example, \'#1 is equivalent to {\accent19 #1}, where #1 is the argument being accented. The general rule is that \accent<number> puts an accent over the next character; the <number> tells where that accent appears in the current font. The accent is assumed to be properly positioned for a character whose height equals the x-height of the current font; taller or shorter characters cause the accent to be raised or lowered, taking due account of the slantedness of the fonts of accenter and accentee. The width of the final construction is the width of the character being accented, regardless of the width of the accent.

Thus the position is not calculated by the \accent primitive: it's determined by the font designer when the font is designed.

2
  • Hmmm, but as you mentioned: The accent is assumed to be properly positioned for a character whose height equals the x-height of the current font; taller or shorter characters cause the accent to be raised or lowered, taking due account of the slantedness of the fonts of accenter and accentee. So it is not font business for position accents, e.g. symbol _ hasn't diacritic analog for it, so accent will be positioned lower than for other symbols and the question is how lower ?
    – Michael Z
    Commented Apr 9, 2011 at 6:38
  • doing for notification
    – Michael Z
    Commented Apr 11, 2011 at 6:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .