I have a font that I have installed with fontinst in psnfss and which I use for math italic. But it is clear from the PDF files generated with that font that the bar accent in math mode is not generated from the overbar character in the font (they clearly don't have the same shape), and I don't want to use \overline to achieve the same effect.

I do the usual

  • latex fontinst.sty
  • \latinfamily{eaq}{}\bye
  • for i in *.pl ; do pltotf $i ; done
  • for i in *.vp; do vptovf $i ; done
  • copy the file to the right directories (including the .fd) in the the TeX live kpathsea tree
  • add the right entries to pdftex.map (yes, I know I should be using the updmap machinery do to this)

It's clear that the PDF files generated with this routine that the overbar accent is not the one included in the font.

up vote 7 down vote accepted

The definition of \bar in LaTeX kernel is in fontmath.ltx:

% ...
\DeclareSymbolFont{operators}{OT1}{cmr}{m}{n}
% ...
\DeclareMathAccent{\bar}{\mathalpha}{operators}{"16}
% ...

That is to say, \bar is a math accent from a symbol in font (in NFSS) of OT1 encoding, cmr family, m series and n shape. The symbol is the 0x16th (22th) glyph in the font.

To understand this definition clearly, you may need to read fntguide and encguide documents carefully, and of course source2e.

Then you can define a proper \bar for your own font (you know the details).

You may also be interested in package fonttable and accents.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.