ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: [OS X TeX] Default rule thickness
       [not found] ` <BE3EF24C-3A0D-4F83-BCEA-AA988AC3942B@me.com>
@ 2008-08-06 10:59   ` Wolfgang Schuster
  2008-08-08  8:12     ` Oliver Buerschaper
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2008-08-06 10:59 UTC (permalink / raw)
  To: TeX on Mac OS X Mailing List; +Cc: mailing list for ConTeXt users

On Wed, Aug 6, 2008 at 12:21 PM, Bruno Voisin <bvoisin@me.com> wrote:
> Le 6 août 08 à 09:34, Oliver Buerschaper a écrit :
>
>> does someone know how to find out the current value of
>> default_rule_thickness in a (La)TeX document? TeX uses it to determine the
>> line width of fraction bars and roots in math mode …
>
> The short story: 0.4 pt.
>
> The long story: LaTeX defines \frac in terms of the TeX primitive \over, and
> \sqrt in terms of the TeX primitive \radical (a primitive being a command
> defined in the source code of TeX itself). Hence the only way to get an
> answer for sure would be to inspect the source code of TeX.
>
> The TeXbook has an appendix G "Generating boxes from formulas" mentioning in
> several places (for \overline, \underline, \radical, ...) a
> default_rule_thickness called either $\theta$ or $\xi_8$, but not giving its
> value. Being a mere mortal, I must admit I can't make much sense of this
> appendix.
>
> My feeling is that TeX uses the same default rule thickness for all rules
> (in \overline, \underline, \over, \sqrt, \footnote, ...) and that it is the
> thickness given at the beginning of chapter 21 "Making Boxes":
>
> \hrule width=<depends on contest>, height=0.4pt, depth=0.0pt
> \vrule width=0.4pt, height=<depends on contest>, depth=<depends on contest>

The rule is between 0.4pt and 0.5pt

\starttext
\dontleavehmode
\scale[factor=200]{$1 \over 2$}
\scale[factor=200]{$1 \above .47pt 2$}
\stoptext

> Now, if you want to specify the rule thickness yourself for a fraction, say
> to 1pt, I see two solutions:
>
> - In plain TeX, replace \over by \above. For example, replace {a\over b} by
> {a\above1pt b}.
>
> - In LaTeX, use the amsmath package and replace \frac by \genfrac. For
> example, replace \frac{a}{b} by \genfrac{}{}{1pt}{}{a}{b}.
>
> I don't know what can be done for square roots.
>
> Bruno Voisin
>
> PS Normally, such a question which has nothing Mac-specific would be better
> posted to a general LaTeX forum such as comp.tex.text. However,
> comp.tex.text may be quite intimidating to the novice (chances are you'll
> either get your question ignored or be flamed for asking a stupid question),
> and as a result I have myself asked general questions here more than once
> and avoid comp.tex.text whenever possible.

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OS X TeX] Default rule thickness
  2008-08-06 10:59   ` [OS X TeX] Default rule thickness Wolfgang Schuster
@ 2008-08-08  8:12     ` Oliver Buerschaper
  2008-08-09  8:12       ` Taco Hoekwater
  0 siblings, 1 reply; 9+ messages in thread
From: Oliver Buerschaper @ 2008-08-08  8:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

> The rule is between 0.4pt and 0.5pt
>
> \starttext
> \dontleavehmode
> \scale[factor=200]{$1 \over 2$}
> \scale[factor=200]{$1 \above .47pt 2$}
> \stoptext

Lovely! This applies to ConTeXt's default font size of 12pt, doesn't  
it? Hence we would have the following linear relation if the thickness  
is 0.4pt at 10pt font size:

thickness = 0.4pt * fontsize/10pt.

Judging from the following:

---
\startuseMPgraphic{rule}
      linecap := butt;
      defaultrulethickness := 0.4pt*BodyFontSize/10pt;

      path p;
      p := origin--(EmWidth,0);
      draw p withpen pencircle scaled defaultrulethickness;
\stopuseMPgraphic


\starttext

Lorem ipsum dolor sit amet

\startformula
     \sum_{n=0}^\infty \frac{x^n}{n!}\!\vcenter{\useMPgraphic{rule}}
\stopformula

\setupbodyfont[32pt]

Lorem ipsum dolor sit amet

\startformula
     \sum_{n=0}^\infty \frac{x^n}{n!}\!\vcenter{\useMPgraphic{rule}}
\stopformula

\setupbodyfont[72pt]

Lorem ipsum dolor sit amet

\startformula
     \sum_{n=0}^\infty \frac{x^n}{n!}\!\vcenter{\useMPgraphic{rule}}
\stopformula

\stoptext
---

this seems to be true in general. (Hans, Taco, can you confirm this  
officially?)

Could one perhaps pass "DefaultRuleThickness" on to MetaFun just as  
the variables "BodyFontSize", "ExHeight" etc. are made available?

Best,
Oliver
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OS X TeX] Default rule thickness
  2008-08-08  8:12     ` Oliver Buerschaper
@ 2008-08-09  8:12       ` Taco Hoekwater
  2008-08-13 16:35         ` Oliver Buerschaper
  0 siblings, 1 reply; 9+ messages in thread
From: Taco Hoekwater @ 2008-08-09  8:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Oliver Buerschaper wrote:
> 
> this seems to be true in general. (Hans, Taco, can you confirm this  
> officially?)

Sorry I missed this thread earlier. The default rule thickness in
is the eight font parameter of the fonts in math family 3. A bare
context file with the standard 12pt fonts gives the value 0.47998pt.
You can get the value via :

   \edef\defautlrulethickness{\the\fontdimen8\textfont3}

Afaik, in all math setups three fonts in math family 3 are the same
actual font so just the one value will do. But the actual value
will definately vary a bit depending on the font setup. For example,
palatino 12pt has 0.708pt.

Best wishes,
Taco




___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OS X TeX] Default rule thickness
  2008-08-09  8:12       ` Taco Hoekwater
@ 2008-08-13 16:35         ` Oliver Buerschaper
  2008-08-13 17:06           ` Taco Hoekwater
  0 siblings, 1 reply; 9+ messages in thread
From: Oliver Buerschaper @ 2008-08-13 16:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users

> Sorry I missed this thread earlier. The default rule thickness in
> is the eight font parameter of the fonts in math family 3. A bare
> context file with the standard 12pt fonts gives the value 0.47998pt.
> You can get the value via :
>
>   \edef\defautlrulethickness{\the\fontdimen8\textfont3}
>
> Afaik, in all math setups three fonts in math family 3 are the same
> actual font so just the one value will do. But the actual value
> will definately vary a bit depending on the font setup. For example,
> palatino 12pt has 0.708pt.


OK. However, this doesn't seem to scale properly within the same font  
… try the following:

---
\edef\defaultrulethickness{\the\fontdimen8\textfont3}


\starttext

Lorem ipsum dolor sit amet \defaultrulethickness

\startformula
     \sum_{n=0}^\infty \frac{x^n}{n!}
\stopformula

\setupbodyfont[32pt]

Lorem ipsum dolor sit amet \defaultrulethickness

\startformula
     \sum_{n=0}^\infty \frac{x^n}{n!}
\stopformula

\stoptext
---

So, your font parameter always returns the same value but clearly the  
fraction bar is scaled correctly … something else must be happening  
behind the curtain. If only I knew what it were ;-)

Oliver
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OS X TeX] Default rule thickness
  2008-08-13 16:35         ` Oliver Buerschaper
@ 2008-08-13 17:06           ` Taco Hoekwater
  2008-08-13 18:57             ` Oliver Buerschaper
  0 siblings, 1 reply; 9+ messages in thread
From: Taco Hoekwater @ 2008-08-13 17:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Oliver Buerschaper wrote:
>> Sorry I missed this thread earlier. The default rule thickness in
>> is the eight font parameter of the fonts in math family 3. A bare
>> context file with the standard 12pt fonts gives the value 0.47998pt.
>> You can get the value via :
>>
>>   \edef\defautlrulethickness{\the\fontdimen8\textfont3}
>>
>> Afaik, in all math setups three fonts in math family 3 are the same
>> actual font so just the one value will do. But the actual value
>> will definately vary a bit depending on the font setup. For example,
>> palatino 12pt has 0.708pt.
> 
> 
> OK. However, this doesn't seem to scale properly within the same font  
> … try the following:
> 
> ---
> \edef\defaultrulethickness{\the\fontdimen8\textfont3}

That is because of the \edef. Changing to a plain \def should help:

   \def\defaultrulethickness{\the\fontdimen8\textfont3\relax}

(the \relax is now needed because there could be a digit following).

Best wishes,
Taco
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OS X TeX] Default rule thickness
  2008-08-13 17:06           ` Taco Hoekwater
@ 2008-08-13 18:57             ` Oliver Buerschaper
  2008-08-13 21:24               ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Oliver Buerschaper @ 2008-08-13 18:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

>> OK. However, this doesn't seem to scale properly within the same font
>> … try the following:
>>
>> ---
>> \edef\defaultrulethickness{\the\fontdimen8\textfont3}
>
> That is because of the \edef. Changing to a plain \def should help:
>
>   \def\defaultrulethickness{\the\fontdimen8\textfont3\relax}

Yep, works!

What's the correct way of piping this to MetaFun? Putting

DefaultRuleThickness := \defaultrulethickness;

into each "\startuseMPgraphic{}" block works, but how can I define  
this globally? Moving it into "\startMPinclusions" creates a scope  
problem … see also the other thread about BodyFontSize etc.

Thanks for your help,
Oliver
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OS X TeX] Default rule thickness
  2008-08-13 18:57             ` Oliver Buerschaper
@ 2008-08-13 21:24               ` Hans Hagen
  2008-08-14  8:51                 ` Oliver Buerschaper
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2008-08-13 21:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Oliver Buerschaper wrote:
>>> OK. However, this doesn't seem to scale properly within the same font
>>> … try the following:
>>>
>>> ---
>>> \edef\defaultrulethickness{\the\fontdimen8\textfont3}
>> That is because of the \edef. Changing to a plain \def should help:
>>
>>   \def\defaultrulethickness{\the\fontdimen8\textfont3\relax}
> 
> Yep, works!
> 
> What's the correct way of piping this to MetaFun? Putting
> 
> DefaultRuleThickness := \defaultrulethickness;
> 
> into each "\startuseMPgraphic{}" block works, but how can I define  
> this globally? Moving it into "\startMPinclusions" creates a scope  
> problem … see also the other thread about BodyFontSize etc.

\def\defaultrulethickness{\the\fontdimen8\textfont\plusthree}

\startMPinitializations
   DefaultRuleThickness := \defaultrulethickness;
\stopMPinitializations

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OS X TeX] Default rule thickness
  2008-08-13 21:24               ` Hans Hagen
@ 2008-08-14  8:51                 ` Oliver Buerschaper
  2008-08-14 10:50                   ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Oliver Buerschaper @ 2008-08-14  8:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

>> What's the correct way of piping this to MetaFun? Putting
>>
>> DefaultRuleThickness := \defaultrulethickness;
>>
>> into each "\startuseMPgraphic{}" block works, but how can I define
>> this globally? Moving it into "\startMPinclusions" creates a scope
>> problem … see also the other thread about BodyFontSize etc.
>
> \def\defaultrulethickness{\the\fontdimen8\textfont\plusthree}
>
> \startMPinitializations
>   DefaultRuleThickness := \defaultrulethickness;
> \stopMPinitializations

This works like a charm!

Now I'm a bit confused though as to which definitions need this  
"MPinitializations" block and which ones can/should go to  
"MPinclusions". For example, a subsequent

---
\startMPinclusions
     medium               := DefaultRuleThickness;
     thick                := 1.5medium;
\stopMPinclusions
---

doesn't work. However, color definitions for instance seem to be OK  
there.

Could you give me a hint?

Thanks,
Oliver
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OS X TeX] Default rule thickness
  2008-08-14  8:51                 ` Oliver Buerschaper
@ 2008-08-14 10:50                   ` Hans Hagen
  0 siblings, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2008-08-14 10:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Oliver Buerschaper wrote:
>>> What's the correct way of piping this to MetaFun? Putting
>>>
>>> DefaultRuleThickness := \defaultrulethickness;
>>>
>>> into each "\startuseMPgraphic{}" block works, but how can I define
>>> this globally? Moving it into "\startMPinclusions" creates a scope
>>> problem … see also the other thread about BodyFontSize etc.
>> \def\defaultrulethickness{\the\fontdimen8\textfont\plusthree}
>>
>> \startMPinitializations
>>   DefaultRuleThickness := \defaultrulethickness;
>> \stopMPinitializations
> 
> This works like a charm!
> 
> Now I'm a bit confused though as to which definitions need this  
> "MPinitializations" block and which ones can/should go to  
> "MPinclusions". For example, a subsequent

inclusions happen once, initializations for each graphic

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-08-14 10:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <689AE27A-F050-46B4-95E0-5A8CAF3E66A8@mpq.mpg.de>
     [not found] ` <BE3EF24C-3A0D-4F83-BCEA-AA988AC3942B@me.com>
2008-08-06 10:59   ` [OS X TeX] Default rule thickness Wolfgang Schuster
2008-08-08  8:12     ` Oliver Buerschaper
2008-08-09  8:12       ` Taco Hoekwater
2008-08-13 16:35         ` Oliver Buerschaper
2008-08-13 17:06           ` Taco Hoekwater
2008-08-13 18:57             ` Oliver Buerschaper
2008-08-13 21:24               ` Hans Hagen
2008-08-14  8:51                 ` Oliver Buerschaper
2008-08-14 10:50                   ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).