Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Line thickness for current font

174 views
Skip to first unread message

koksi

unread,
Sep 17, 2012, 10:48:34โ€ฏAM9/17/12
to
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.

How can I determine linethickness for 12pt, or generally, for current font I use?

Thank you in advance!

Heiko Oberdiek

unread,
Sep 17, 2012, 1:40:25โ€ฏPM9/17/12
to
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},

You get always 0.4pt, because of the defaults for TeX rules.
From "The TeXbook":

| If you leave a dimension unspecified, you get the following by default:
|
| \hrule \vrule
| width * 0.4pt
| height 0.4pt *
| depth 0.0pt *
|
| Here `*' means that the actual dimension depends on the context;
| the rule will extend to the boundary of the smallest box or alignment
| that encloses it.

> 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.

\overline is independent from \hrule or \vrule, it uses a different
line width. This is a property of the math font and \fontdimen8 is
used:

\showboxdepth=\maxdimen
\showboxbreadth=\maxdimen
\tracingonline=1

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\begin{document}

\newcommand*{\printlw}{%
\begingroup
\ensuremath{%
\mathchoice{\the\fontdimen8\textfont3}
{\the\fontdimen8\textfont3}
{\the\fontdimen8\scriptfont3}
{\the\fontdimen8\scriptscriptfont3}
}%
\endgroup
}

\sbox0{$\overline{H}$}
\usebox0
\showbox0

$ \displaystyle\printlw
\textstyle\printlw
\scriptstyle\printlw
\scriptscriptstyle\printlw
$

\end{document}

Result:

| > \box0=
| \hbox(10.19989+0.0)x10.66245
| .\mathon
| .\vbox(10.19989+0.0)x10.66245
| ..\kern0.39998
| ..\rule(0.39998+0.0)x*
| ..\kern1.19994
| ..\hbox(8.2+0.0)x10.66245
| ...\OML/lmm/m/it/12 H
| .\mathoff
|
| ! OK.
| l.23 \showbox0

And \printlw prints 0.39998pt in all math styles.
I don't know, why this is smaller than 0.4pt by 1sp.

> How can I determine linethickness for 12pt, or generally, for current font I use?

For \underline and \overline it is the \fontdimen8 of
math font family 3, see above.

--
Heiko Oberdiek

Dan Luecking

unread,
Sep 17, 2012, 1:38:50โ€ฏPM9/17/12
to
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

Dan Luecking

unread,
Sep 17, 2012, 5:01:20โ€ฏPM9/17/12
to
On Mon, 17 Sep 2012 19:40:25 +0200, Heiko Oberdiek
<heiko.o...@googlemail.com> wrote:


>
>And \printlw prints 0.39998pt in all math styles.
>I don't know, why this is smaller than 0.4pt by 1sp.

There are at least 3 conversions to different formats:

In cmex10.mf it says
rule_thickness# = .4pt#;
...
fontdimen 8: rule_thickness#;
So however MF writes fontdimens, it actually works with the
variable rule_thickness#, which contains MF's internal
version of 0.4 (the integer 26214) not 0.4 itself.

This has to be stored in the TFM file as a fraction of
design size. It is stored as a binary integer interpreted
as multiple of 2^{-20}). This requires division
by 10 (the design size) and multiplication by 2^4.
With rounding this gives 41942. (tftopl reports .039999
which is very, very close to 41942*2^{-20}).

Then TeX has to multiply that by 10 and divide by 16 (to
convert to a multiple of 2^{-16}. If the division is an
integer division (truncation) one loses 1 scaled point.

So it could be because MF rounds while TeX truncates.

Heiko Oberdiek

unread,
Sep 17, 2012, 8:42:38โ€ฏPM9/17/12
to
Thanks for the thorough analysis.

--
Heiko Oberdiek

koksi

unread,
Sep 18, 2012, 6:59:01โ€ฏAM9/18/12
to
Hi Dan and Heiko! Thank you both for your explanations. I had some time playing with your code last evening.

But I'd like to point out my real problem. I'm trying to make "math accent" that will put arc over argument in math mode (something like rule in \overline). We use that notation for circular arc in Croatia.

Since there's no appropriate character in font table to do that (with \DeclareMathAccent) and I don't want to play with Metafont, my idea was to avoid WYSIWYM paradigm in this case (unfortunately) and implement that "accent" with scaled parenthesis rotated by 90 degrees and shifted to the exact height where rule in \overline is.

(There's a package in MiKTeX distribution called yhmath that provides this accent in the WYSIWYM paradigm, but unfortunately .fd file isn't included in package and compiler can't produce that accent. If you have access to the source of this package it would be nice to fix it.)

Anyway, with or without yhmath package, I would like to show you my demo:

*************************************************************************************

\documentclass[12pt]{article}

\usepackage{fixltx2e}

%\usepackage{amsmath}
%\usepackage{amssymb}

\usepackage{graphicx}
\usepackage{calc}
\usepackage{xcolor}


\makeatletter
\newcommand{\arc}[1]{
\ifmmode$%
\setbox0\hbox{${#1}$}%
\newdimen\@NeededTotalHeight%
\@NeededTotalHeight=\wd0
\the\@NeededTotalHeight

\setbox1\hbox{$($}%
\newdimen\@OriginalTotalHeight%
\@OriginalTotalHeight=\dp1
\advance\@OriginalTotalHeight\ht1
\the\@OriginalTotalHeight

\setbox2\vbox{\hrule width 10mm}%
\newdimen\@RuleThickness%
\@RuleThickness=\dp2
\advance\@RuleThickness\ht2
\the\@RuleThickness
%
\ifdim\@NeededTotalHeight>\@OriginalTotalHeight%
\setbox3\hbox{\resizebox*{\width}{\@NeededTotalHeight}{$($}}%
\raisebox{\dp3+\ht0+\@RuleThickness}{\rotatebox[origin=rb]{-90}{\resizebox*{\width}{\@NeededTotalHeight}{$($}}}%
\else%
\setbox3\hbox{\resizebox*{!}{\@NeededTotalHeight}{$($}}%
\raisebox{\dp3+\ht0+\@RuleThickness}{\rotatebox[origin=rb]{-90}{\resizebox*{!}{\@NeededTotalHeight}{$($}}}%
\fi%
\kern-\wd0%
${#1}
\raisebox{\ht0+\@RuleThickness+\@RuleThickness+\@RuleThickness}{\color{red}\vbox{\hrule width 10mm}}
\overline{#1}
\else
NOTHING
\fi
}
\makeatother


\begin{document}

$\arc{.}$

$\arc{\imath}$

$\arc{x}$

$\arc{AB}$

$\arc{ABC}$

\end{document}


************************************************************************


My goal is to shift parenthesis (box around parenthesis) and red rule to the exact height of black rule (in \overline).

With the code above, red rule is always at the same level as black rule, as I want (no matter of 10pt or 12pt in \documentclass).


BUT! When I use amsmath package (and I must use it for other purposes), red rule isn't leveled with black rule when 12pt is set.


Can you help me to make this work with amsmath package as well?


Thank you in advance!

Lee Rudolph

unread,
Sep 18, 2012, 7:18:34โ€ฏAM9/18/12
to
koksi <ivan....@gmail.com> writes:

>Hi Dan and Heiko! Thank you both for your explanations. I had some time
>playing with your code last evening.
>
>But I'd like to point out my real problem. I'm trying to make "math accent"
>that will put arc over argument in math mode (something like rule in
>\overline). We use that notation for circular arc in Croatia.

If I understand your requirements (which I may not), it seems
to me that there are several solutions available already,
documented in (e.g.) Scott Pakin's "Comprehensive LaTeX
Symbols List"; for instance, the fourier package includes
\widearc as an extensible (math mode) accent, and the
arcs package provides extensible text mode arc accents
(but I'm sure that forcing them to work in math mode
is not beyond human ingenuity).

Lee Rudolph

Ivan Kokan

unread,
Sep 18, 2012, 12:31:53โ€ฏPM9/18/12
to
Hi! Thank you for your answer. I looked at the fourier package and tested it. I don't like that it changes font (though font itself looks really nice). Also, \widearc and \wideparen commands don't produce the result I want - "accent" an the same height as \overline and auto-width. But thank you once again!

Robin Fairbairns

unread,
Sep 19, 2012, 6:48:17โ€ฏAM9/19/12
to
koksi <ivan....@gmail.com> writes:

> (There's a package in MiKTeX distribution called yhmath that provides
> this accent in the WYSIWYM paradigm, but unfortunately .fd file isn't
> included in package and compiler can't produce that accent.

the accent seems to work using yhmath.sty -- the .fd is not needed if
someone has coded use into a package.

however, it will only work in maths mode, afaict. my guess from your
remark about the accent being used in text in croation is that you want
it in text as well.

i note that the accent is visible in the unicode tables for latin
extended-b (in my aged copy of iso 10646-1; only for aeiou and r -- is r
a vowel in croatian? -- fwiw, iso calls the accent "inverted breve").
do those characters not appear in unicode fonts you have access to? --
if it does you could possibly switch to using xelatex or the like, and
use a unicode text font.

> If you
> have access to the source of this package it would be nice to fix it.)

everyone has access to source of pretty much every tex/latex/context ...
object you find in miktex or any other free distribution.

"fixing" a maths package so it works in text seems extreme to me -- i
really think you need a text font with the character.

Ivan Kokan

unread,
Sep 19, 2012, 6:53:36โ€ฏAM9/19/12
to
Hi!

Here is my mini example:

\documentclass[12pt]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{amsmath}
\usepackage{amssymb}

\usepackage{yhmath}


\begin{document}
$\wideparen{AB}$
\end{document}



And here is the log:

This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9) (preloaded format=pdflatex 2012.7.31) 19 SEP 2012 12:52
entering extended mode
**test.tex
(C:\Users\ekokiva\Desktop\LaTeX\test.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2012-05-30, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,
lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n
german-x-2012-05-30, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman
ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm
an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl
ishmax, welsh, loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size12.clo"
File: size12.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
("C:\Program Files\MiKTeX 2.9\tex\latex\base\inputenc.sty"
Package: inputenc 2008/03/30 v1.1d Input encoding file
\inpenc@prehook=\toks14
\inpenc@posthook=\toks15

("C:\Program Files\MiKTeX 2.9\tex\latex\base\utf8.def"
File: utf8.def 2008/04/05 v1.1m UTF-8 support for inputenc
Now handling font encoding OML ...
... no UTF-8 mapping file for font encoding OML
Now handling font encoding T1 ...
... processing UTF-8 mapping file for font encoding T1

("C:\Program Files\MiKTeX 2.9\tex\latex\base\t1enc.dfu"
File: t1enc.dfu 2008/04/05 v1.1m UTF-8 support for inputenc
defining Unicode char U+00A1 (decimal 161)
defining Unicode char U+00A3 (decimal 163)
defining Unicode char U+00AB (decimal 171)
defining Unicode char U+00BB (decimal 187)
defining Unicode char U+00BF (decimal 191)
defining Unicode char U+00C0 (decimal 192)
defining Unicode char U+00C1 (decimal 193)
defining Unicode char U+00C2 (decimal 194)
defining Unicode char U+00C3 (decimal 195)
defining Unicode char U+00C4 (decimal 196)
defining Unicode char U+00C5 (decimal 197)
defining Unicode char U+00C6 (decimal 198)
defining Unicode char U+00C7 (decimal 199)
defining Unicode char U+00C8 (decimal 200)
defining Unicode char U+00C9 (decimal 201)
defining Unicode char U+00CA (decimal 202)
defining Unicode char U+00CB (decimal 203)
defining Unicode char U+00CC (decimal 204)
defining Unicode char U+00CD (decimal 205)
defining Unicode char U+00CE (decimal 206)
defining Unicode char U+00CF (decimal 207)
defining Unicode char U+00D0 (decimal 208)
defining Unicode char U+00D1 (decimal 209)
defining Unicode char U+00D2 (decimal 210)
defining Unicode char U+00D3 (decimal 211)
defining Unicode char U+00D4 (decimal 212)
defining Unicode char U+00D5 (decimal 213)
defining Unicode char U+00D6 (decimal 214)
defining Unicode char U+00D8 (decimal 216)
defining Unicode char U+00D9 (decimal 217)
defining Unicode char U+00DA (decimal 218)
defining Unicode char U+00DB (decimal 219)
defining Unicode char U+00DC (decimal 220)
defining Unicode char U+00DD (decimal 221)
defining Unicode char U+00DE (decimal 222)
defining Unicode char U+00DF (decimal 223)
defining Unicode char U+00E0 (decimal 224)
defining Unicode char U+00E1 (decimal 225)
defining Unicode char U+00E2 (decimal 226)
defining Unicode char U+00E3 (decimal 227)
defining Unicode char U+00E4 (decimal 228)
defining Unicode char U+00E5 (decimal 229)
defining Unicode char U+00E6 (decimal 230)
defining Unicode char U+00E7 (decimal 231)
defining Unicode char U+00E8 (decimal 232)
defining Unicode char U+00E9 (decimal 233)
defining Unicode char U+00EA (decimal 234)
defining Unicode char U+00EB (decimal 235)
defining Unicode char U+00EC (decimal 236)
defining Unicode char U+00ED (decimal 237)
defining Unicode char U+00EE (decimal 238)
defining Unicode char U+00EF (decimal 239)
defining Unicode char U+00F0 (decimal 240)
defining Unicode char U+00F1 (decimal 241)
defining Unicode char U+00F2 (decimal 242)
defining Unicode char U+00F3 (decimal 243)
defining Unicode char U+00F4 (decimal 244)
defining Unicode char U+00F5 (decimal 245)
defining Unicode char U+00F6 (decimal 246)
defining Unicode char U+00F8 (decimal 248)
defining Unicode char U+00F9 (decimal 249)
defining Unicode char U+00FA (decimal 250)
defining Unicode char U+00FB (decimal 251)
defining Unicode char U+00FC (decimal 252)
defining Unicode char U+00FD (decimal 253)
defining Unicode char U+00FE (decimal 254)
defining Unicode char U+00FF (decimal 255)
defining Unicode char U+0102 (decimal 258)
defining Unicode char U+0103 (decimal 259)
defining Unicode char U+0104 (decimal 260)
defining Unicode char U+0105 (decimal 261)
defining Unicode char U+0106 (decimal 262)
defining Unicode char U+0107 (decimal 263)
defining Unicode char U+010C (decimal 268)
defining Unicode char U+010D (decimal 269)
defining Unicode char U+010E (decimal 270)
defining Unicode char U+010F (decimal 271)
defining Unicode char U+0110 (decimal 272)
defining Unicode char U+0111 (decimal 273)
defining Unicode char U+0118 (decimal 280)
defining Unicode char U+0119 (decimal 281)
defining Unicode char U+011A (decimal 282)
defining Unicode char U+011B (decimal 283)
defining Unicode char U+011E (decimal 286)
defining Unicode char U+011F (decimal 287)
defining Unicode char U+0130 (decimal 304)
defining Unicode char U+0131 (decimal 305)
defining Unicode char U+0132 (decimal 306)
defining Unicode char U+0133 (decimal 307)
defining Unicode char U+0139 (decimal 313)
defining Unicode char U+013A (decimal 314)
defining Unicode char U+013D (decimal 317)
defining Unicode char U+013E (decimal 318)
defining Unicode char U+0141 (decimal 321)
defining Unicode char U+0142 (decimal 322)
defining Unicode char U+0143 (decimal 323)
defining Unicode char U+0144 (decimal 324)
defining Unicode char U+0147 (decimal 327)
defining Unicode char U+0148 (decimal 328)
defining Unicode char U+014A (decimal 330)
defining Unicode char U+014B (decimal 331)
defining Unicode char U+0150 (decimal 336)
defining Unicode char U+0151 (decimal 337)
defining Unicode char U+0152 (decimal 338)
defining Unicode char U+0153 (decimal 339)
defining Unicode char U+0154 (decimal 340)
defining Unicode char U+0155 (decimal 341)
defining Unicode char U+0158 (decimal 344)
defining Unicode char U+0159 (decimal 345)
defining Unicode char U+015A (decimal 346)
defining Unicode char U+015B (decimal 347)
defining Unicode char U+015E (decimal 350)
defining Unicode char U+015F (decimal 351)
defining Unicode char U+0160 (decimal 352)
defining Unicode char U+0161 (decimal 353)
defining Unicode char U+0162 (decimal 354)
defining Unicode char U+0163 (decimal 355)
defining Unicode char U+0164 (decimal 356)
defining Unicode char U+0165 (decimal 357)
defining Unicode char U+016E (decimal 366)
defining Unicode char U+016F (decimal 367)
defining Unicode char U+0170 (decimal 368)
defining Unicode char U+0171 (decimal 369)
defining Unicode char U+0178 (decimal 376)
defining Unicode char U+0179 (decimal 377)
defining Unicode char U+017A (decimal 378)
defining Unicode char U+017B (decimal 379)
defining Unicode char U+017C (decimal 380)
defining Unicode char U+017D (decimal 381)
defining Unicode char U+017E (decimal 382)
defining Unicode char U+200C (decimal 8204)
defining Unicode char U+2013 (decimal 8211)
defining Unicode char U+2014 (decimal 8212)
defining Unicode char U+2018 (decimal 8216)
defining Unicode char U+2019 (decimal 8217)
defining Unicode char U+201A (decimal 8218)
defining Unicode char U+201C (decimal 8220)
defining Unicode char U+201D (decimal 8221)
defining Unicode char U+201E (decimal 8222)
defining Unicode char U+2030 (decimal 8240)
defining Unicode char U+2031 (decimal 8241)
defining Unicode char U+2039 (decimal 8249)
defining Unicode char U+203A (decimal 8250)
defining Unicode char U+2423 (decimal 9251)
)
Now handling font encoding OT1 ...
... processing UTF-8 mapping file for font encoding OT1

("C:\Program Files\MiKTeX 2.9\tex\latex\base\ot1enc.dfu"
File: ot1enc.dfu 2008/04/05 v1.1m UTF-8 support for inputenc
defining Unicode char U+00A1 (decimal 161)
defining Unicode char U+00A3 (decimal 163)
defining Unicode char U+00B8 (decimal 184)
defining Unicode char U+00BF (decimal 191)
defining Unicode char U+00C5 (decimal 197)
defining Unicode char U+00C6 (decimal 198)
defining Unicode char U+00D8 (decimal 216)
defining Unicode char U+00DF (decimal 223)
defining Unicode char U+00E6 (decimal 230)
defining Unicode char U+00EC (decimal 236)
defining Unicode char U+00ED (decimal 237)
defining Unicode char U+00EE (decimal 238)
defining Unicode char U+00EF (decimal 239)
defining Unicode char U+00F8 (decimal 248)
defining Unicode char U+0131 (decimal 305)
defining Unicode char U+0141 (decimal 321)
defining Unicode char U+0142 (decimal 322)
defining Unicode char U+0152 (decimal 338)
defining Unicode char U+0153 (decimal 339)
defining Unicode char U+2013 (decimal 8211)
defining Unicode char U+2014 (decimal 8212)
defining Unicode char U+2018 (decimal 8216)
defining Unicode char U+2019 (decimal 8217)
defining Unicode char U+201C (decimal 8220)
defining Unicode char U+201D (decimal 8221)
)
Now handling font encoding OMS ...
... processing UTF-8 mapping file for font encoding OMS

("C:\Program Files\MiKTeX 2.9\tex\latex\base\omsenc.dfu"
File: omsenc.dfu 2008/04/05 v1.1m UTF-8 support for inputenc
defining Unicode char U+00A7 (decimal 167)
defining Unicode char U+00B6 (decimal 182)
defining Unicode char U+00B7 (decimal 183)
defining Unicode char U+2020 (decimal 8224)
defining Unicode char U+2021 (decimal 8225)
defining Unicode char U+2022 (decimal 8226)
)
Now handling font encoding OMX ...
... no UTF-8 mapping file for font encoding OMX
Now handling font encoding U ...
... no UTF-8 mapping file for font encoding U
defining Unicode char U+00A9 (decimal 169)
defining Unicode char U+00AA (decimal 170)
defining Unicode char U+00AE (decimal 174)
defining Unicode char U+00BA (decimal 186)
defining Unicode char U+02C6 (decimal 710)
defining Unicode char U+02DC (decimal 732)
defining Unicode char U+200C (decimal 8204)
defining Unicode char U+2026 (decimal 8230)
defining Unicode char U+2122 (decimal 8482)
defining Unicode char U+2423 (decimal 9251)
))
("C:\Program Files\MiKTeX 2.9\tex\latex\base\fontenc.sty"
Package: fontenc 2005/09/27 v1.99g Standard LaTeX package

("C:\Program Files\MiKTeX 2.9\tex\latex\base\t1enc.def"
File: t1enc.def 2005/09/27 v1.99g Standard LaTeX file
LaTeX Font Info: Redeclaring font encoding T1 on input line 43.
))
("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amsmath.sty"
Package: amsmath 2000/07/18 v2.13 AMS math features
\@mathmargin=\skip43

For additional information on amsmath, use the `?' option.
("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amstext.sty"
Package: amstext 2000/06/29 v2.01

("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amsgen.sty"
File: amsgen.sty 1999/11/30 v2.0
\@emptytoks=\toks16
\ex@=\dimen103
))
("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amsbsy.sty"
Package: amsbsy 1999/11/29 v1.2d
\pmbraise@=\dimen104
)
("C:\Program Files\MiKTeX 2.9\tex\latex\ams\math\amsopn.sty"
Package: amsopn 1999/12/14 v2.01 operator names
)
\inf@bad=\count87
LaTeX Info: Redefining \frac on input line 211.
\uproot@=\count88
\leftroot@=\count89
LaTeX Info: Redefining \overline on input line 307.
\classnum@=\count90
\DOTSCASE@=\count91
LaTeX Info: Redefining \ldots on input line 379.
LaTeX Info: Redefining \dots on input line 382.
LaTeX Info: Redefining \cdots on input line 467.
\Mathstrutbox@=\box26
\strutbox@=\box27
\big@size=\dimen105
LaTeX Font Info: Redeclaring font encoding OML on input line 567.
LaTeX Font Info: Redeclaring font encoding OMS on input line 568.
\macc@depth=\count92
\c@MaxMatrixCols=\count93
\dotsspace@=\muskip10
\c@parentequation=\count94
\dspbrk@lvl=\count95
\tag@help=\toks17
\row@=\count96
\column@=\count97
\maxfields@=\count98
\andhelp@=\toks18
\eqnshift@=\dimen106
\alignsep@=\dimen107
\tagshift@=\dimen108
\tagwidth@=\dimen109
\totwidth@=\dimen110
\lineht@=\dimen111
\@envbody=\toks19
\multlinegap=\skip44
\multlinetaggap=\skip45
\mathdisplay@stack=\toks20
LaTeX Info: Redefining \[ on input line 2666.
LaTeX Info: Redefining \] on input line 2667.
)
("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amssymb.sty"
Package: amssymb 2009/06/22 v3.00

("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amsfonts.sty"
Package: amsfonts 2009/06/22 v3.00 Basic AMSFonts support
\symAMSa=\mathgroup4
\symAMSb=\mathgroup5
LaTeX Font Info: Overwriting math alphabet `\mathfrak' in version `bold'
(Font) U/euf/m/n --> U/euf/b/n on input line 96.
))
("C:\Program Files\MiKTeX 2.9\tex\latex\yhmath\yhmath.sty"
Package: yhmath
LaTeX Font Info: Redeclaring symbol font `largesymbols' on input line 12.
LaTeX Font Info: Overwriting symbol font `largesymbols' in version `normal'
(Font) OMX/cmex/m/n --> OMX/yhex/m/n on input line 12.
LaTeX Font Info: Overwriting symbol font `largesymbols' in version `bold'
(Font) OMX/cmex/m/n --> OMX/yhex/m/n on input line 12.
LaTeX Font Info: Redeclaring math accent \widetilde on input line 13.
LaTeX Font Info: Redeclaring math accent \widehat on input line 14.
)
(C:\Users\ekokiva\Desktop\LaTeX\test.aux)
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Try loading font information for OMX+yhex on input line 13.

LaTeX Font Info: No file OMXyhex.fd. on input line 13.


LaTeX Font Warning: Font shape `OMX/yhex/m/n' undefined
(Font) using `OMX/cmex/m/n' instead on input line 13.

LaTeX Font Info: Try loading font information for U+msa on input line 13.
("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\umsa.fd"
File: umsa.fd 2009/06/22 v3.00 AMS symbols A
)
LaTeX Font Info: Try loading font information for U+msb on input line 13.

("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\umsb.fd"
File: umsb.fd 2009/06/22 v3.00 AMS symbols B
)
Missing character: There is no รณ in font cmex10!
[1

{C:/ProgramData/MiKTeX/2.9/pdftex/config/pdftex.map}] (C:\Users\ekokiva\Desktop
\LaTeX\test.aux)

LaTeX Font Warning: Some font shapes were not available, defaults substituted.

)
Here is how much of TeX's memory you used:
1541 strings out of 493921
16013 string characters out of 3147276
62239 words of memory out of 3000000
4849 multiletter control sequences out of 15000+200000
9049 words of font info for 33 fonts, out of 3000000 for 9000
841 hyphenation exceptions out of 8191
27i,4n,24p,220b,117s stack positions out of 5000i,500n,10000p,200000b,50000s
{C:/Program Files/MiKTeX 2.9/fonts/enc/dvips/cm-super/cm-super-t1.enc}<C:/Pro
gram Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmmi12.pfb><C:/Program Fil
es/MiKTeX 2.9/fonts/type1/public/cm-super/sfrm1200.pfb>
Output written on test.pdf (1 page, 11674 bytes).
PDF statistics:
15 PDF objects out of 1000 (max. 8388607)
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)




I get correct pdf with only $AB$, without arc.

Ivan Kokan

unread,
Sep 19, 2012, 10:14:23โ€ฏAM9/19/12
to
I've searched a little bit this group and found many complains about yhmath.

It seems that it uses old Metafont definitions that aren't even included in the package. I've seen some pdfs that use cm-super and yhmath, and \wideparen looks rasterized. (See here on page 16/27 http://memo2011.math.hr/documents/MEMO2011solutions.pdf.)

So, while there's problem with yhmath, I would like to finish my implementation with parenthesis. Can you help me to level red and black rule (from question above) no matter which font size is set?

Dan Luecking

unread,
Sep 19, 2012, 1:01:35โ€ฏPM9/19/12
to
On Wed, 19 Sep 2012 03:53:36 -0700 (PDT), Ivan Kokan
<ivan....@gmail.com> wrote:

>Hi!
>
>Here is my mini example:

This works for me.

>
>\documentclass[12pt]{article}
>
>\usepackage[utf8]{inputenc}
>\usepackage[T1]{fontenc}
>
>\usepackage{amsmath}
>\usepackage{amssymb}
>
>\usepackage{yhmath}
>
>
>\begin{document}
> $\wideparen{AB}$
>\end{document}
>

From the log:
>
>LaTeX Font Info: No file OMXyhex.fd. on input line 13.

This file is part of the yhmath package. It should be
installed is you install the whole package.

If you use MiKTeX, and you installed yhmath through its
package installation system, then you should complain.

If you installed it yourself, you need to get the whole
directory
macros/latex/contrib/yhmath/
as well as all of
fonts/yhmath/
And, of course, generate all necessary files, move them
where required, and update the filename database.

Note (in answer to your other post) that yhmath is
available as a type 1 postscript font.

The real problems with yhmath is not that it is a raster
font, but rather that its font metrics are broken. Since
it was originally written using metafont (and only later
converted to pfb), its metrics suffer from metafont's
limitation on the TFM file format: there are allowed to
be at most 16 different character heights.

Yhmath's metafont code defines far more than that. So
when metafont writes the TFM file, it changes some of the
heights as little as possible so that there are only 16
different ones. Unfortunately, "as little as possible"
still means some are changed by more than one point and
one can get rather bad vertical positioning for some
combinations.

Ivan Kokan

unread,
Sep 19, 2012, 2:39:36โ€ฏPM9/19/12
to
Ok, I see now. How can I install yhmath package manually? (On Windows family operating systems.) And, is there any possibility that yhmath's font will be PostScript font one day instead of limited Metafont font?

Dan Luecking

unread,
Sep 20, 2012, 11:38:04โ€ฏAM9/20/12
to
Last question first: I have already said that it IS a postscript
type 1 font. MiKTeX has it in the yhmath package.

But it appears that MiKTeX is missing two files needed by
yhmath and a few that might be useful. Most of them you can
get from CTAN as follows.

Get the two files
yhmath.dtx and yhmath.ins
from
http://mirror.ctan.org/macros/latex/contrib/yhmath/

Put them together in the same directory, navigate to that
directory in a command window and type

latex yhmath.ins

on the command line. This will create several files:

OMXyhex.fd
yhbigacc.mf
yhbigdel.mf
yhcmex10.mf
yhmath.drv
yhmathex.mf
yhmath.sty

The important one is OMXyhex.fd. (I don't know why MiKTeX
doesn't have it, you should file a bug report.) The others
may be useful. The file yhmath.sty is a slight update of the
version MiKTeX already has. The .mf files permit raster fonts
to be created in the unlikely event they are needed.

The files created can be handled as follows:
Find your "local texmf tree" or create one if there isn't
one (see your MiKTeX documentation). I will call it
LOCALTEXMF, but you should replace that with whatever
directory it actually is. (In the following instructions, if
a folder does not exist, you will have to create it.)

- Move the two files OMXyhex.fd and yhmath.sty to

LOCALTEXMF\tex\latex\yhmath\

- Either delete the four .mf files or move them to

LOCALTEXMF\fonts\source\public\yhmath\

- Delete yhmath.drv.

- Open a plain text editor (notepad should be OK) and create
a file named yhmath.map containing the single line:

yrcmex10 Yhcmex <yhcmex.pfb

(If you use notepad, make sure it does not add ".txt" to
the file name yhmath.map)

- Copy yhmath.map to the folder

LOCALTEXMF\fonts\map\dvips\yhmath\

- Now run whatever MiKTeX requires to "update the filename
database" and then whatever MiKTeX requires to register
the font map file.

I think that's all.

Ivan Kokan

unread,
Sep 21, 2012, 4:00:41โ€ฏAM9/21/12
to
Hi Dan! Thank you for the instructions how to install yhmath, it's everything ok now and I'll report the problem to MiKTeX as well. Kind regards, Ivan

Ivan Kokan

unread,
Sep 21, 2012, 4:08:10โ€ฏAM9/21/12
to
Hi Dan! Can you help me with remaining question in this post:
https://groups.google.com/d/msg/comp.text.tex/WdsmVRsytSI/cM41nJBVc8wJ

I've tested that example a little bit more. If I use 11pt instead of 10pt, rule in \overline is at 3.3\@RuleThickness height, and if I use 12pt instead of 10pt, rule in \overline is at 3.6\@RuleThickness height.

How does amsmath affect the position of rule in \overline? I think it would be better if I implement \arc "accent" raising parenthesis at 3\@RuleThickness height, and capture correct length in \@RuleThickness.
0 new messages