On Mon, 17 Sep 2012 07:48:34 -0700 (PDT), koksi <
ivan....@gmail.com>
wrote:
>Hi everybody.
>
>I read that rule in \overline command is placed 3 * linethickness above top of the argument.
>
>In my custom class I use this part of code to determine line thickness:
> \setbox2\vbox{\hrule width 10mm}
> \newdimen\@RuleThickness
> \@RuleThickness=\dp2
> \the\@RuleThickness
> \advance\@RuleThickness\ht2
> \the\@RuleThickness
> \the\dp2
> \the\ht2
>
>I get \@RuleThickness 0.4pt with \documentclass[12pt]{article}, but it seems that rule in \overline for 12pt is little bit more than 3 * 0.4pt = 1.2pt. So, I think I got rule thickness for 10pt, not 12pt.
[Math fonts in TeX are a cruel joke played on us by Knuth.]
\hrule is not the same as \overline. \hrule *always* uses
.4pt when a height is not specified (and 0pt for the depth).
Therefore, the effect of your complicated code is to always
set \@RuleThickness to .4pt.
The line used in \overline is determined by a parameter called
the default_rule_thickness. It is a \fontdimen parameter
determined by the current size in math family 3. That is,
the main math extension family is used (default cmex) and the
current math size (text, script or scriptscript). It is \fontdimen8
of this font. To obtain it in the text size, use
\@RuleThickness=\fontdimen8\textfont3
in script size us \scriptfont instead of \textfont and use
\scriptscriptfont for the scriptscript size.
Even in a 12pt document, latex uses cmex10 by default, because
this font consists mostly of extensible delimiters that grow
to any size. In fact, cmex10 is also the default for script
and scriptscript sizes. Thus, you will always get a rule that
is 0.39998pt thick.
Also, in LaTeX, the math families are only loaded at the first
use of math. So to even get a value instead of an error, you
need to use math first: something like
\setbox0\hbox{$$}
\@RuleThickness=\fontdimen8\textfont3
If you want an \overrule that varies with the document font size,
you need
\usepackage{exscale}
Personally, I think this makes the rules too thick and too far
above the material being overlined.
Finally, I cannot say what happens when a package is loaded
that uses a math extension font other than the cmex family.
Because exscale seems only to change the behavior of cmex.
Dan
To reply by email, change LookInSig to luecking