From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/34185 Path: news.gmane.org!not-for-mail From: "Wolfgang Schuster" Newsgroups: gmane.comp.tex.context Subject: Re: framed getbuffer Date: Wed, 11 Apr 2007 12:57:22 +0200 Message-ID: <115224fb0704110357u7b247c9ai8f744d3756c474f3@mail.gmail.com> References: <4601C521.12365.E9A5CF@wwl.musensturm.de> <46023A75.5060900@elvenkind.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2080170445==" X-Trace: sea.gmane.org 1176298780 31478 80.91.229.12 (11 Apr 2007 13:39:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 11 Apr 2007 13:39:40 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Wed Apr 11 15:39:37 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1HbaWD-0006Qa-6k for gctc-ntg-context-518@m.gmane.org; Wed, 11 Apr 2007 12:57:41 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 679EC1FCA3; Wed, 11 Apr 2007 12:57:39 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 13964-02-5; Wed, 11 Apr 2007 12:57:31 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AE5961FC78; Wed, 11 Apr 2007 12:57:31 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A3AB11FC78 for ; Wed, 11 Apr 2007 12:57:29 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 13982-05-3 for ; Wed, 11 Apr 2007 12:57:23 +0200 (CEST) Original-Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.240]) by ronja.ntg.nl (Postfix) with ESMTP id 7CCD41FC9B for ; Wed, 11 Apr 2007 12:57:23 +0200 (CEST) Original-Received: by an-out-0708.google.com with SMTP id d33so146226and for ; Wed, 11 Apr 2007 03:57:22 -0700 (PDT) Original-Received: by 10.100.195.10 with SMTP id s10mr243284anf.1176289042697; Wed, 11 Apr 2007 03:57:22 -0700 (PDT) Original-Received: by 10.100.106.19 with HTTP; Wed, 11 Apr 2007 03:57:22 -0700 (PDT) In-Reply-To: X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:34185 Archived-At: --===============2080170445== Content-Type: multipart/alternative; boundary="----=_Part_8175_27308522.1176289042499" ------=_Part_8175_27308522.1176289042499 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 2007/4/11, Aditya Mahajan : > > On Thu, 22 Mar 2007, Taco Hoekwater wrote: > > > Wolfgang Werners-Lucchini wrote: > >> Hallo! > >> > >> The following simple example doesn't compile > >> (ConTeXt ver. 2007.01.02 and Live ConTeXt). > >> > >> What am I doing wrong? > > > > Diagnostics: > > > > The problem is not caused by the \framed, but by the (lack of) > > parsing done by the buffering routines. > > Because the \startformula is not expanded, TeX does not realise > > you are in math mode, so it objects to the ^ character. > > > > > > This is 'not right' but I suspect it is not all that simple > > to fix the context core to do this properly (I would love to be > > proved wrong). > > This is a serious bug. Even a simple example fails with the same > error. > > \starttext > \framed{ > \startformula > x^2 = x\cdot x > \stopformula} > \stoptext > > A quick workaround is to use frametext instead of framed, but I am > pretty sure that the above example used to work at some stage. > > Aditya Hi Aditya, it is more a problem related to horizontal and vertical modes/boxes, you can test it by placing \startformula .. \startformula into a hbox/vbox and only the vbox solution works. This is working \vbox {\startformula x^2 = x\cdot x \stopformula} This fails \hbox {\startformula x^2 = x\cdot x \stopformula} You can use disply math in a frame by setting explivied values for width and height of the frame. \framed [width=5cm,height=4cm] {\startformula x^2 = x\cdot x \stopformula} This solution works also in combination with a buffer \startbuffer \startformula x^2 = x\cdot x \stopformula \stopbuffer \framed[width=6cm,height=4cm]{\getbuffer} Wolfgang ------=_Part_8175_27308522.1176289042499 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

2007/4/11, Aditya Mahajan <adityam@umich.edu>:
On Thu, 22 Mar 2007, Taco Hoekwater wrote:

> Wolfgang Werners-Lucchini wrote:
>> Hallo!
>>
>> The following simple example doesn't compile
>> (ConTeXt ver. 2007.01.02 and Live ConTeXt).
>>
>> What am I doing wrong?
>
> Diagnostics:
>
> The problem is not caused by the \framed, but by the (lack of)
> parsing done by the buffering routines.
> Because the \startformula is not expanded, TeX does not realise
> you are in math mode, so it objects to the ^ character.
>
>
> This is 'not right' but I suspect it is not all that simple
> to fix the context core to do this properly (I would love to be
> proved wrong).

This is a serious bug. Even a simple example fails with the same
error.

\starttext
\framed{
\startformula
x^2 = x\cdot x
\stopformula}
\stoptext

A quick workaround is to use frametext instead of framed, but I am
pretty sure that the above example used to work at some stage.

Aditya

Hi Aditya,

it is more a problem related to horizontal and vertical modes/boxes, you can
test it by placing \startformula .. \startformula into a hbox/vbox and only the
vbox solution works.

This is working

\vbox
  {\startformula
   x^2 = x\cdot x
   \stopformula}

This fails

\hbox
  {\startformula
  x^2 = x\cdot x
  \stopformula}

You can use disply math in a frame by setting explivied values for width
and height of the frame.

\framed
  [width=5cm,height=4cm]
  {\startformula
   x^2 = x\cdot x
   \stopformula}

This solution works also in combination with a buffer

\startbuffer
\startformula
x^2 = x\cdot x
\stopformula
\stopbuffer

\framed[width=6cm,height=4cm]{\getbuffer}


Wolfgang

------=_Part_8175_27308522.1176289042499-- --===============2080170445== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context --===============2080170445==--