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
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
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
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
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
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
On Wed, 11 Apr 2007, Wolfgang Schuster wrote:
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.
Ah! Thanks for the explanation. Aditya
participants (5)
-
Aditya Mahajan
-
luigi scarso
-
Taco Hoekwater
-
Wolfgang Schuster
-
Wolfgang Werners-Lucchini