ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: NTG-ConTeXt <ntg-context@ntg.nl>
Subject: Re: [ConTeXt] Math fonts: cal etc.
Date: Tue, 06 Jul 1999 15:17:42 +0200	[thread overview]
Message-ID: <378201F6.4102556D@wxs.nl> (raw)
In-Reply-To: <m3btdq2bd0.fsf@kali.coe.uga.edu>

Ed L. Cashin wrote:
> 
> Hans Hagen <pragma@wxs.nl> writes:
> 
> [...]
> > \def\fraktur    #1{\ifmmode\hbox\fi{\frak#1}}
> > \def\gothic     #1{\ifmmode\hbox\fi{\goth#1}}
> > \def\caligraphic#1{\ifmmode\hbox\fi{\cal #1}}
> >
> > will do what you want. I can add those if needed/wanted/agreed upon.
> 
> I have only used "if" a little, but is the "fi" really supposed to go
> *before* the hbox like that?  If it is, then why is it there instead
> of after the hbox as I'd expect?

imagine not being in hmode: 

\ifmmode -> false -> fast read until \fi -> {\frak#1}

but in mmode: 

\ifmmode -> true -> start reading h specs until { expanding everything
-> meet \fi which ends the \if so ok -> see { -> \hbox{\frak#1} 

alternatively you can say: 

\ifmmode\expandafter\hbox\fi{\frak#1}

or when in mmode: 

expandtoken after \hbox being \fi -> so end the \if -> take the \hbox ->
etc etc 

It had to do with the fact that \fi is a signal, not expending to
anything to be typeset or read as keyword. In principle such a \fi can
even go after the { when suitable! 

If yoy want to see a real dirty one (there are some more), take a look
at \doifnumberelse. 

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


  reply	other threads:[~1999-07-06 13:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-05 13:28 Tobias Burnus
1999-07-05 14:27 ` Hans Hagen
1999-07-05 17:42   ` Tobias Burnus
1999-07-05 18:13     ` Hans Hagen
1999-07-06 12:47   ` Ed L. Cashin
1999-07-06 13:17     ` Hans Hagen [this message]
1999-07-06 15:03       ` Ed L. Cashin
1999-07-06 15:13         ` Hans Hagen
1999-07-06 15:37           ` Ed L. Cashin
1999-07-07  8:42 Gilbert van den Dobbelsteen
1999-07-07 21:39 ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=378201F6.4102556D@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).