ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* cal & calligraphic
@ 2005-12-03 13:41 Hans van der Meer
  2005-12-04 10:53 ` Taco Hoekwater
  2005-12-05 11:31 ` Hans Hagen
  0 siblings, 2 replies; 4+ messages in thread
From: Hans van der Meer @ 2005-12-03 13:41 UTC (permalink / raw)


I am confused about the behaviour of \cal and calligraphic.
In a font where the calligraphic letters are in MathItalic all goes  
well.
But, in a font where the calligraphic letters come from another font  
I get:

   \definefontsynonym [Calligraphic] [FONT_OTHER_THAN_MathSymbol]

in text: \calligraphic{ABC} is ok
in text: {\cal ABC} is ok
in math: $\calligraphic{ABC}$ is ok
in text: ${\cal ABC}$ IS NOT OK, SYMBOLS KEEP COMING FROM MATHSYMBOL

I would the font redefinition also being obeyed in math {\cal} ?
Why is this the only exception?

yours sincerely,
dr. H. van der Meer

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

* Re: cal & calligraphic
  2005-12-03 13:41 cal & calligraphic Hans van der Meer
@ 2005-12-04 10:53 ` Taco Hoekwater
  2005-12-05 20:12   ` Hans van der Meer
  2005-12-05 11:31 ` Hans Hagen
  1 sibling, 1 reply; 4+ messages in thread
From: Taco Hoekwater @ 2005-12-04 10:53 UTC (permalink / raw)


Hans van der Meer wrote:
> I am confused about the behaviour of \cal and calligraphic.
> In a font where the calligraphic letters are in MathItalic all goes  well.
> But, in a font where the calligraphic letters come from another font  I 
> get:
> 
>   \definefontsynonym [Calligraphic] [FONT_OTHER_THAN_MathSymbol]

The font "Calligraphic" is not the same as the math alphabet for \cal,
except when the only calligraphic alphabet available is the one in
the math font. The confusion arises because in text mode, \cal is
remapped to the \calligraphic command. (switching to math mode would
be too hard to do reliably at this point).

Two options are possible to sanitize this behaviour.

A.: My guess is you would be less confused if:

   in text: \calligraphic{ABC} is ok
   in text: {\cal ABC} is ERROR: "missing _ inserted"
   in math: $\calligraphic{ABC}$ is ok
   in text: ${\cal ABC}$ is math cal alphabet

But suddenly switching the current behaviour to an error message
raises compatibility problems, so that is a no-no.

After some messing about, I came up with a definition of \cal
that implements this (but it is rather ugly):

     \def\cal%
        {\mathortext
          {\fam\purefamily{calligraphic}}
          {$\fam\purefamily{calligraphic}%
             \xdef\calfam{\fontname\textfont\fam}$%
           \font\dummy=\calfam \dummy}}


B.: Or there could be:

   in text: \calligraphic{ABC} is ok
   in text: {\cal ABC} is ok
   in math: $\calligraphic{ABC}$ is ok
   in text: ${\cal ABC}$ is ok

This needs an even weirder definition of \cal, but it can be
done (note: this trashes a math family completely!):

     \def\cal%
        {\mathortext
          {\hbox{%
            \symbolicscaledfont{1}{Calligraphic}%
            \global\textfont\nnfam=\thedefinedfont
            \symbolicscaledfont{0.7}{Calligraphic}%
            \global\scriptfont\nnfam=\thedefinedfont
            \symbolicscaledfont{0.5}{Calligraphic}%
            \global\scriptscriptfont\nnfam=\thedefinedfont}%
           \fam\nnfam }
         {\symbolicfont{Calligraphic}}}



Hans, what do you think?

Cheers,
Taco

PS I assume there is a similar problem with the other families:
os (OldStyle), frak (Fraktur), goth (Gothic), bbd (BlackBoard).

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

* Re: cal & calligraphic
  2005-12-03 13:41 cal & calligraphic Hans van der Meer
  2005-12-04 10:53 ` Taco Hoekwater
@ 2005-12-05 11:31 ` Hans Hagen
  1 sibling, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2005-12-05 11:31 UTC (permalink / raw)


Hans van der Meer wrote:

> I am confused about the behaviour of \cal and calligraphic.
> In a font where the calligraphic letters are in MathItalic all goes  
> well.
> But, in a font where the calligraphic letters come from another font  
> I get:
>
>   \definefontsynonym [Calligraphic] [FONT_OTHER_THAN_MathSymbol]
>
> in text: \calligraphic{ABC} is ok
> in text: {\cal ABC} is ok
> in math: $\calligraphic{ABC}$ is ok
> in text: ${\cal ABC}$ IS NOT OK, SYMBOLS KEEP COMING FROM MATHSYMBOL
>
> I would the font redefinition also being obeyed in math {\cal} ?
> Why is this the only exception?

see math-tex cum suis, in math the calligraphic needs to be mapped onto 
a math font that has them; has to do with families

Hans

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

* Re: cal & calligraphic
  2005-12-04 10:53 ` Taco Hoekwater
@ 2005-12-05 20:12   ` Hans van der Meer
  0 siblings, 0 replies; 4+ messages in thread
From: Hans van der Meer @ 2005-12-05 20:12 UTC (permalink / raw)


For your information, the problem arose because Y&Y's MathTimes does  
not has its calligraphic letters in the MathItalic font, but in a  
separate calligraphic font (mtms and friends).

On Dec 4, 2005, at 11:53, Taco Hoekwater wrote:

> Hans van der Meer wrote:
>
>> I am confused about the behaviour of \cal and calligraphic.
>> In a font where the calligraphic letters are in MathItalic all  
>> goes  well.
>> But, in a font where the calligraphic letters come from another  
>> font  I get:
>>   \definefontsynonym [Calligraphic] [FONT_OTHER_THAN_MathSymbol]
>>
>
> The font "Calligraphic" is not the same as the math alphabet for \cal,
> except when the only calligraphic alphabet available is the one in
> the math font. The confusion arises because in text mode, \cal is
> remapped to the \calligraphic command. (switching to math mode would
> be too hard to do reliably at this point).
>

>
> B.: Or there could be:
>
>   in text: \calligraphic{ABC} is ok
>   in text: {\cal ABC} is ok
>   in math: $\calligraphic{ABC}$ is ok
>   in text: ${\cal ABC}$ is ok
>
> This needs an even weirder definition of \cal, but it can be
> done (note: this trashes a math family completely!):
>
>     \def\cal%
>        {\mathortext
>          {\hbox{%
>            \symbolicscaledfont{1}{Calligraphic}%
>            \global\textfont\nnfam=\thedefinedfont
>            \symbolicscaledfont{0.7}{Calligraphic}%
>            \global\scriptfont\nnfam=\thedefinedfont
>            \symbolicscaledfont{0.5}{Calligraphic}%
>            \global\scriptscriptfont\nnfam=\thedefinedfont}%
>           \fam\nnfam }
>         {\symbolicfont{Calligraphic}}}
>

I would think the most elegant solution is the one where \calligraphic 
{ABC} and {\cal ABC} in both text and math modes give the same  
result. Thus no exceptional behaviour for one of these four. Any  
other choice would in my opinion be confusing and difficult to  
understand.

yours sincerely,
Hans van der Meer

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

end of thread, other threads:[~2005-12-05 20:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-03 13:41 cal & calligraphic Hans van der Meer
2005-12-04 10:53 ` Taco Hoekwater
2005-12-05 20:12   ` Hans van der Meer
2005-12-05 11:31 ` 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).