ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* ConTeXt: Math: \mframed in display mode
@ 1999-02-24 13:38 Tobias Burnus
  1999-02-27 10:34 ` Taco Hoekwater
  0 siblings, 1 reply; 3+ messages in thread
From: Tobias Burnus @ 1999-02-24 13:38 UTC (permalink / raw)


Hi,

If I'm not completely mistaken then is there an difference between

$$
\mframed{\frac{a}{b} = c}
$$

and

$$
\frac{a}{b} = c
$$

It looks as if the former is printed in textstyle.

Tobias


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

* Re: ConTeXt: Math: \mframed in display mode
  1999-02-24 13:38 ConTeXt: Math: \mframed in display mode Tobias Burnus
@ 1999-02-27 10:34 ` Taco Hoekwater
  1999-02-27 13:59   ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Taco Hoekwater @ 1999-02-27 10:34 UTC (permalink / raw)
  Cc: ntg-context

>>>>> "TB" == Tobias Burnus <tburnus@physik.fu-berlin.de> writes:

 TB> Hi, If I'm not completely mistaken then is there an difference
 TB> between

 TB> $$ \mframed{\frac{a}{b} = c} $$

 TB> and

 TB> $$ \frac{a}{b} = c $$

 TB> It looks as if the former is printed in textstyle.

There is. We were at Dante, so this reply is a little late.
inserting \displaystyle yourself works OK, of course. 

For Hans: You need to remove the \restoremathstyle from \normalstrut
redef to get this to work OK.

Taco


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

* Re: ConTeXt: Math: \mframed in display mode
  1999-02-27 10:34 ` Taco Hoekwater
@ 1999-02-27 13:59   ` Hans Hagen
  0 siblings, 0 replies; 3+ messages in thread
From: Hans Hagen @ 1999-02-27 13:59 UTC (permalink / raw)


Taco Hoekwater wrote:

> For Hans: You need to remove the \restoremathstyle from \normalstrut
> redef to get this to work OK.

How about this patch (core-rul.tex): 

\def\domframed[#1][#2]#3%
  {\begingroup
   \ifmmode
     \ifinner
       \let\mframedstyle\restoremathstyle
     \else
       \let\mframedstyle\displaystyle
     \fi
   \else
     \let\mframedstyle\restoremathstyle
   \fi
   #1\ifdone
     \def\normalstrut{$\mframedstyle\vphantom($}%
     \framed
       [\c!kaderoffset=\@@oioffset,\c!offset=\v!overlay,#2]
       {$\mframedstyle#3$}%
   \else
     \inframed
       [#2]
       {$\mframedstyle#3$}%
   \fi
   \endgroup}

The next ones go ok then. 

$\mframed{\frac{a}{b} = c}$

$$\mframed{\frac{a}{b} = c}$$

$$\mframed{\displaystyle \frac{a}{b} = c}$$

$$\frac{a}{b} = c$$

For those unaware of \mframed, I added this one for Tobias some time
ago. It is present in the latest contexts. The complication in these
macro(s) lays in trying to find out the right math modes/styles. 

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | fax: 038 477 53 74 | mail: pragma@wxs.nl

                     ConTeXt and PPCHTeX site: www.ntg.nl/context
-----------------------------------------------------------------


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

end of thread, other threads:[~1999-02-27 13:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-24 13:38 ConTeXt: Math: \mframed in display mode Tobias Burnus
1999-02-27 10:34 ` Taco Hoekwater
1999-02-27 13:59   ` 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).