ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* framed getbuffer
@ 2007-03-21 22:52 Wolfgang Werners-Lucchini
  2007-03-22  8:12 ` Taco Hoekwater
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Werners-Lucchini @ 2007-03-21 22:52 UTC (permalink / raw)
  To: ntg-context

Hallo!

The following simple example doesn't compile
(ConTeXt ver. 2007.01.02 and Live ConTeXt).

What am I doing wrong?

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


Wolfgang

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

* Re: framed getbuffer
  2007-03-21 22:52 framed getbuffer Wolfgang Werners-Lucchini
@ 2007-03-22  8:12 ` Taco Hoekwater
  2007-04-11  9:52   ` Aditya Mahajan
  0 siblings, 1 reply; 7+ messages in thread
From: Taco Hoekwater @ 2007-03-22  8:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

You probably have to create small input files and use \input
and \typefile instead

Best wishes,

Taco

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

* Re: framed getbuffer
  2007-03-22  8:12 ` Taco Hoekwater
@ 2007-04-11  9:52   ` Aditya Mahajan
  2007-04-11 10:17     ` luigi scarso
  2007-04-11 10:57     ` Wolfgang Schuster
  0 siblings, 2 replies; 7+ messages in thread
From: Aditya Mahajan @ 2007-04-11  9:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

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

* Re: framed getbuffer
  2007-04-11  9:52   ` Aditya Mahajan
@ 2007-04-11 10:17     ` luigi scarso
  2007-04-11 10:57     ` Wolfgang Schuster
  1 sibling, 0 replies; 7+ messages in thread
From: luigi scarso @ 2007-04-11 10:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

hmm, I can test with two older release.
Same error.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
This is pdfeTeXk, Version 3.141592-1.11a-2.1 (Web2C 7.5.2)
(format=cont-en 2005.8.26)  11 APR 2007 12:12
entering extended mode
 %&-line parsing enabled.
**&cont-en t.tex
(./t.tex{/usr/share/texmf/pdftex/config/pdftex.cfg}
ConTeXt  ver: 2002.6.25  fmt: 2005.8.26  int: english  mes: english
! Missing $ inserted.
<inserted text>
                $
<to be read again>
                   ^
l.4 x^
      2 = x\cdot x
%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)
(format=cont-en 2006.3.2)  11 APR 2007 12:05
entering extended mode
 (/usr/share/texmf/web2c/natural.tcx)
**&cont-en t.tex
(./t.tex

ConTeXt  ver: 2005.01.31  fmt: 2006.3.2  int: english  mes: english

! Missing $ inserted.
<inserted text>
                $
<to be read again>
                   ^
l.4 x^
      2 = x\cdot x
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

luigi

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

* Re: framed getbuffer
  2007-04-11  9:52   ` Aditya Mahajan
  2007-04-11 10:17     ` luigi scarso
@ 2007-04-11 10:57     ` Wolfgang Schuster
  2007-04-11 11:25       ` Taco Hoekwater
  2007-04-11 13:19       ` Aditya Mahajan
  1 sibling, 2 replies; 7+ messages in thread
From: Wolfgang Schuster @ 2007-04-11 10:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1716 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 2295 bytes --]

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: framed getbuffer
  2007-04-11 10:57     ` Wolfgang Schuster
@ 2007-04-11 11:25       ` Taco Hoekwater
  2007-04-11 13:19       ` Aditya Mahajan
  1 sibling, 0 replies; 7+ messages in thread
From: Taco Hoekwater @ 2007-04-11 11:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

>> On Thu, 22 Mar 2007, Taco Hoekwater wrote:
>>
>> > 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.


That was obviously the wrong diagnosis. Just lucky that the patient
didn't die.

Also interesting:

   \setuplayout[grid=yes]
   \hbox{\startformula x^2 \stopformula}

(I tried that because in grid  mode, the \startformula wraps the
body inside a \vbox)

Well done Wolfgang,

Taco

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

* Re: framed getbuffer
  2007-04-11 10:57     ` Wolfgang Schuster
  2007-04-11 11:25       ` Taco Hoekwater
@ 2007-04-11 13:19       ` Aditya Mahajan
  1 sibling, 0 replies; 7+ messages in thread
From: Aditya Mahajan @ 2007-04-11 13:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 11 Apr 2007, Wolfgang Schuster wrote:

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

Ah! Thanks for the explanation.

Aditya

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

end of thread, other threads:[~2007-04-11 13:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-21 22:52 framed getbuffer Wolfgang Werners-Lucchini
2007-03-22  8:12 ` Taco Hoekwater
2007-04-11  9:52   ` Aditya Mahajan
2007-04-11 10:17     ` luigi scarso
2007-04-11 10:57     ` Wolfgang Schuster
2007-04-11 11:25       ` Taco Hoekwater
2007-04-11 13:19       ` Aditya Mahajan

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