ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* definetypeface vs math symbols
@ 2006-07-10  7:10 Ralf Schmitt
  2006-07-10  8:03 ` Thomas A. Schmitz
  0 siblings, 1 reply; 9+ messages in thread
From: Ralf Schmitt @ 2006-07-10  7:10 UTC (permalink / raw)


Hi all,

what is the correct way to use another font in context? We use 
definetypeface and setupbodyfont (without really knowing what's going 
on...just copied from some example we found). When I uncomment the font 
statements in the following example, the Sigma symbol becomes a little 
circle and the the bar is rendered through z not above it?

TIA,
- Ralf


\starttext

%\definetypeface [charter] [rm] [serif] [charter] [default] [encoding=ec]
%\definetypeface [charter] [tt] [mono] [charter] [default] [encoding=ec]
%\setupbodyfont [charter, 9pt]

$ \Sigma $
$ |z|=|\bar{z}| $

\stoptext

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

* Re: definetypeface vs math symbols
  2006-07-10  7:10 definetypeface vs math symbols Ralf Schmitt
@ 2006-07-10  8:03 ` Thomas A. Schmitz
  2006-07-10  9:01   ` Ralf Schmitt
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas A. Schmitz @ 2006-07-10  8:03 UTC (permalink / raw)


Try adding the line

\usetypescript[serif][charter][ec]

at the beginning.

[BTW: your minimal example was almost visible; next time, make a  
bodyfont of 5pt]

HTH

Thomas

On Jul 10, 2006, at 9:10 AM, Ralf Schmitt wrote:

>
> \starttext
>
> %\definetypeface [charter] [rm] [serif] [charter] [default]  
> [encoding=ec]
> %\definetypeface [charter] [tt] [mono] [charter] [default]  
> [encoding=ec]
> %\setupbodyfont [charter, 9pt]
>
> $ \Sigma $
> $ |z|=|\bar{z}| $
>
> \stoptext

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

* Re: definetypeface vs math symbols
  2006-07-10  8:03 ` Thomas A. Schmitz
@ 2006-07-10  9:01   ` Ralf Schmitt
  2006-07-10  9:48     ` Thomas A. Schmitz
  0 siblings, 1 reply; 9+ messages in thread
From: Ralf Schmitt @ 2006-07-10  9:01 UTC (permalink / raw)


Thomas A. Schmitz wrote:
> Try adding the line
> 
> \usetypescript[serif][charter][ec]
> 
> at the beginning.
>

this didn't work for me...

> [BTW: your minimal example was almost visible; next time, make a  
> bodyfont of 5pt]

I thought about making a comment on this remark. I tried 0pt font size, 
didn't work. Then I tried 1pt font size. And the funny thing is:
With 1pt font size the output is good!!!(also with 2pt and 3pt, but not 
with 4pt or up, with or without the \usetypescript command.).

Any insights? Am I going insane?

- Ralf

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

* Re: definetypeface vs math symbols
  2006-07-10  9:01   ` Ralf Schmitt
@ 2006-07-10  9:48     ` Thomas A. Schmitz
  2006-07-10 10:19       ` Ralf Schmitt
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas A. Schmitz @ 2006-07-10  9:48 UTC (permalink / raw)



On Jul 10, 2006, at 11:01 AM, Ralf Schmitt wrote:

>
> I thought about making a comment on this remark. I tried 0pt font  
> size,
> didn't work. Then I tried 1pt font size. And the funny thing is:
> With 1pt font size the output is good!!!(also with 2pt and 3pt, but  
> not
> with 4pt or up, with or without the \usetypescript command.).
>
> Any insights? Am I going insane?

OK, this was just a joke, but it might help us. Looks like ConTeXt  
can't find the math font for defined sizes. Could you try two things  
(in turn, not at the same time):

1. define the math font as well:
\definetypeface [charter] [mm] [math] [modern] [default] [encoding=ec]

and see if this solves your problem.

2. In the file $TEXMF/tex/context/user/cont-sys.rme (or cont-sys.tex,  
if you have that file already), uncomment the line

\resetmapfiles \usetypescript [map] [base] [all]

save the file to cont-sys.tex, run texhash (or sudo texhash,  
depending on your setup) and see if this helps.

Your file compiles fine here, no problem at any size.

Thomas

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

* Re: definetypeface vs math symbols
  2006-07-10  9:48     ` Thomas A. Schmitz
@ 2006-07-10 10:19       ` Ralf Schmitt
  2006-07-10 12:02         ` Ralf Schmitt
  0 siblings, 1 reply; 9+ messages in thread
From: Ralf Schmitt @ 2006-07-10 10:19 UTC (permalink / raw)


Thomas A. Schmitz wrote:
> On Jul 10, 2006, at 11:01 AM, Ralf Schmitt wrote:
> 
>> I thought about making a comment on this remark. I tried 0pt font  
>> size,
>> didn't work. Then I tried 1pt font size. And the funny thing is:
>> With 1pt font size the output is good!!!(also with 2pt and 3pt, but  
>> not
>> with 4pt or up, with or without the \usetypescript command.).
>>
>> Any insights? Am I going insane?
> 
> OK, this was just a joke, but it might help us. Looks like ConTeXt  
> can't find the math font for defined sizes. Could you try two things  
> (in turn, not at the same time):
> 
> 1. define the math font as well:
> \definetypeface [charter] [mm] [math] [modern] [default] [encoding=ec]
> 
> and see if this solves your problem.

This works.

> 
> 2. In the file $TEXMF/tex/context/user/cont-sys.rme (or cont-sys.tex,  
> if you have that file already), uncomment the line
> 
> \resetmapfiles \usetypescript [map] [base] [all]
> 
> save the file to cont-sys.tex, run texhash (or sudo texhash,  
> depending on your setup) and see if this helps.
> 

This doesn't work.

> Your file compiles fine here, no problem at any size.
> 

I've tested it on 3 machines and it didn't work on any of those (ubuntu 
dapper, debian testing, freebsd).

Many thanks,

- Ralf

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

* Re: definetypeface vs math symbols
  2006-07-10 10:19       ` Ralf Schmitt
@ 2006-07-10 12:02         ` Ralf Schmitt
  2006-07-10 21:05           ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Ralf Schmitt @ 2006-07-10 12:02 UTC (permalink / raw)


Ralf Schmitt wrote:
> Thomas A. Schmitz wrote:
>>
>> 1. define the math font as well:
>> \definetypeface [charter] [mm] [math] [modern] [default] [encoding=ec]
>>
>> and see if this solves your problem.
> 
> This works.
> 

Until one tries to use a bold font with \bf. This is the complete list 
of commands I use to circumvent that problem:

\usetypescript[serif][charter][ec]
\definetypeface [charter] [it] [italics] [modern] [default][encoding=ec]
\definetypeface [charter] [bf] [bold] [modern] [default] [encoding=ec]
\definetypeface [charter] [mm] [math] [modern] [default] [encoding=ec]
\definetypeface [charter] [rm] [serif] [charter] [default] [encoding=ec]
\definetypeface [charter] [tt] [mono] [charter] [default] [encoding=ec]
\setupbodyfont [charter, 11pt]


(Just to keep the archives complete...actually I don't understand what 
I'm doing (wrong?) here.)

- Ralf

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

* Re: definetypeface vs math symbols
  2006-07-10 12:02         ` Ralf Schmitt
@ 2006-07-10 21:05           ` Hans Hagen
  2006-07-11  7:10             ` Ralf Schmitt
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2006-07-10 21:05 UTC (permalink / raw)


Ralf Schmitt wrote:
> Ralf Schmitt wrote:
>   
>> Thomas A. Schmitz wrote:
>>     
>>> 1. define the math font as well:
>>> \definetypeface [charter] [mm] [math] [modern] [default] [encoding=ec]
>>>
>>> and see if this solves your problem.
>>>       
>> This works.
>>
>>     
>
> Until one tries to use a bold font with \bf. This is the complete list 
> of commands I use to circumvent that problem:
>
> \usetypescript[serif][charter][ec]
> \definetypeface [charter] [it] [italics] [modern] [default][encoding=ec]
> \definetypeface [charter] [bf] [bold] [modern] [default] [encoding=ec]
> \definetypeface [charter] [mm] [math] [modern] [default] [encoding=ec]
> \definetypeface [charter] [rm] [serif] [charter] [default] [encoding=ec]
> \definetypeface [charter] [tt] [mono] [charter] [default] [encoding=ec]
> \setupbodyfont [charter, 11pt]
>
>
> (Just to keep the archives complete...actually I don't understand what 
> I'm doing (wrong?) here.)
>   
\definetypeface [charter] [it] [italics] [modern] [default][encoding=ec]
\definetypeface [charter] [bf] [bold] [modern] [default] [encoding=ec]

does not make sense, 

\usetypescript[serif][charter][ec]
\definetypeface [charter] [rm] [serif] [charter] [default] [encoding=ec]
\definetypeface [charter] [mm] [math] [modern] [default] [encoding=ec]
\definetypeface [charter] [tt] [mono] [charter] [default] [encoding=ec]

\setupbodyfont [charter, 11pt] % rm si default since defined first 

or 

\setupbodyfont [charter, 11pt, rm] 



\setupbodyfont [charter, 11pt]



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

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

* Re: definetypeface vs math symbols
  2006-07-10 21:05           ` Hans Hagen
@ 2006-07-11  7:10             ` Ralf Schmitt
  2006-07-11  8:02               ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Ralf Schmitt @ 2006-07-11  7:10 UTC (permalink / raw)


Hans Hagen wrote:
> \definetypeface [charter] [it] [italics] [modern] [default][encoding=ec]
> \definetypeface [charter] [bf] [bold] [modern] [default] [encoding=ec]
> 
> does not make sense, 

ack

> 
> \usetypescript[serif][charter][ec]
> \definetypeface [charter] [rm] [serif] [charter] [default] [encoding=ec]
> \definetypeface [charter] [mm] [math] [modern] [default] [encoding=ec]
> \definetypeface [charter] [tt] [mono] [charter] [default] [encoding=ec]
> 
> \setupbodyfont [charter, 11pt] % rm si default since defined first 
> 

and what is surprising to me: order does matter here. If I put the 
definetypeface for math mode command at the front, {\bf bold} does not 
work anymore.

Thanks,
- Ralf

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

* Re: definetypeface vs math symbols
  2006-07-11  7:10             ` Ralf Schmitt
@ 2006-07-11  8:02               ` Hans Hagen
  0 siblings, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2006-07-11  8:02 UTC (permalink / raw)


Ralf Schmitt wrote:
> Hans Hagen wrote:
>   
>> \definetypeface [charter] [it] [italics] [modern] [default][encoding=ec]
>> \definetypeface [charter] [bf] [bold] [modern] [default] [encoding=ec]
>>
>> does not make sense, 
>>     
>
> ack
>
>   
>> \usetypescript[serif][charter][ec]
>> \definetypeface [charter] [rm] [serif] [charter] [default] [encoding=ec]
>> \definetypeface [charter] [mm] [math] [modern] [default] [encoding=ec]
>> \definetypeface [charter] [tt] [mono] [charter] [default] [encoding=ec]
>>
>> \setupbodyfont [charter, 11pt] % rm si default since defined first 
>>
>>     
>
> and what is surprising to me: order does matter here. If I put the 
> definetypeface for math mode command at the front, {\bf bold} does not 
> work anymore.
>   
indeed, this is because the first one defined is the default (think of typefaces that only have ss, like optima) 

so, this may work when rm, tt or ss is defined first 

  \setupbodyfont [charter, 11pt]

but this is more robust 

  \setupbodyfont [charter, rm, 11pt]


Hans 

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

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

end of thread, other threads:[~2006-07-11  8:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-10  7:10 definetypeface vs math symbols Ralf Schmitt
2006-07-10  8:03 ` Thomas A. Schmitz
2006-07-10  9:01   ` Ralf Schmitt
2006-07-10  9:48     ` Thomas A. Schmitz
2006-07-10 10:19       ` Ralf Schmitt
2006-07-10 12:02         ` Ralf Schmitt
2006-07-10 21:05           ` Hans Hagen
2006-07-11  7:10             ` Ralf Schmitt
2006-07-11  8:02               ` 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).