\placeformula and $$ doesn't work anymore
Hi all, for some weeks I need to tex formulas again and tried the way I used to do it: \placeformula $$ f(t)={1\over2\pi}\int_0^\infty e^{i(\omega t-kx)} dx $$ It didn't work anymore?!? It doesn't place a number nor does it do the spacing properly. It does work the "context" way using \placeformula \startformula f(t)={1\over2\pi}\int_0^\infty e^{i(\omega t-kx)} dx \stopformula but to be honest that's quit a lot to type. "$$" is just nice and short and all the old documents I wrote wont work anymore... I run This is pdfeTeX, Version 3.141592-1.30.4-2.2 (Web2C 7.5.5) (format=cont-en 2006. 12.4) 4 DEC 2006 21:46 ... ConTeXt ver: 2006.11.29 09:55 MK II fmt: 2006.12.4 int: english/english I would be very glad for some hints. Many thanks in advance. Hubertus
On Mon, 4 Dec 2006, Hubertus Schmidt wrote:
Hi all, for some weeks I need to tex formulas again and tried the way I used to do it:
\placeformula $$ f(t)={1\over2\pi}\int_0^\infty e^{i(\omega t-kx)} dx $$
It didn't work anymore?!? It doesn't place a number nor does it do the spacing properly. It does work the "context" way using
\placeformula \startformula f(t)={1\over2\pi}\int_0^\infty e^{i(\omega t-kx)} dx \stopformula
This is a bug in doplaceformula. I do not know how to avoid it, but the next code illustrates what is happening. \def\dotest{ \def\nextnext{$}% \ifx\next\nextnext Inside dispplaceformula\ldots % This always fails \else Inside dodoplaceformula\ldots \fi} \def\test{\futurelet\next\dotest} \test$$A = B$$ This prints "Inside dodoplaceformula" even though the next character is \$. So, the \next=\nextnext branch never matches. I do not know why this happens, but a more robust check is needed in doplaceformula. Aditya
On Tue, 5 Dec 2006, Aditya Mahajan wrote:
On Mon, 4 Dec 2006, Hubertus Schmidt wrote:
Hi all, for some weeks I need to tex formulas again and tried the way I used to do it:
\placeformula $$ f(t)={1\over2\pi}\int_0^\infty e^{i(\omega t-kx)} dx $$
It didn't work anymore?!? It doesn't place a number nor does it do the spacing properly. It does work the "context" way using
\placeformula \startformula f(t)={1\over2\pi}\int_0^\infty e^{i(\omega t-kx)} dx \stopformula
This is a bug in doplaceformula. I do not know how to avoid it, but the next code illustrates what is happening.
\def\dotest{ \def\nextnext{$}% \ifx\next\nextnext Inside dispplaceformula\ldots % This always fails \else Inside dodoplaceformula\ldots \fi}
\def\test{\futurelet\next\dotest}
\test$$A = B$$
This prints "Inside dodoplaceformula" even though the next character is \$.
So, the \next=\nextnext branch never matches. I do not know why this happens, but a more robust check is needed in doplaceformula.
\ifcat seems to be working, but I do not really know how robust this is? \unprotect \def\doplaceformula[#1][#2]% #2 = dummy, gobbles spaces {\def\redoplaceformula {\bgroup \ifx\next\bgroup \egroup \@EA\moreplaceformula % [ref]{} \else % \def\nextnext{$}% % \ifx\next\nextnext \ifcat\next$% \egroup \@EAEAEA\dispplaceformula % [ref]$$ \else \egroup \@EAEAEA\dodoplaceformula % [ref]\start \fi \fi[#1]{}}% \futurelet\next\redoplaceformula} \long\def\moreplaceformula[#1]#2#3#4% #2 dummy #4 gobbles spaces {\def\redoplaceformula {\bgroup % \def\nextnext{$}% % \ifx\next\nextnext \ifcat\next$% \egroup \@EA\dispplaceformula % [ref]$$ \else \egroup \@EA\dodoplaceformula % [ref]\start \fi [#1]{#3}}% \futurelet\next\redoplaceformula#4} \protect \starttext \placeformula[eq:test] $$A = B$$ \stoptext Aditya
Aditya Mahajan wrote:
This is a bug in doplaceformula. I do not know how to avoid it, but the next code illustrates what is happening.
\def\dotest{ \def\nextnext{$}% \ifx\next\nextnext Inside dispplaceformula\ldots % This always fails \else Inside dodoplaceformula\ldots \fi}
\def\test{\futurelet\next\dotest}
\test$$A = B$$
This prints "Inside dodoplaceformula" even though the next character is \$.
So, the \next=\nextnext branch never matches. I do not know why this happens, but a more robust check is needed in doplaceformula.
One is a macro, the other a \let character. This would work: \def\dotest{ \let\nextnext=$ \ifx\next\nextnext Inside dispplaceformula\ldots % This always fails \else Inside dodoplaceformula\ldots \fi} but the \ifcat is file as well, I think Taco
Hello again, I've been offline for the last week, so I could'nd write. Thanks for your answers! Well my problem is, that I'm just some kind of ordinary user. I've no clue about tex. I've had a look into the conre-mat.tex and tried to compare it with your posts. But, alas, no success. Is this a bug which is going to be fixed, or do I have to do it myself? If that is the case, please give me more detailed informations about what I have to do. Have a good weekend Hubertus
Hubertus wrote:
Hello again, I've been offline for the last week, so I could'nd write. Thanks for your answers! Well my problem is, that I'm just some kind of ordinary user. I've no clue about tex. I've had a look into the conre-mat.tex and tried to compare it with your posts. But, alas, no success. Is this a bug which is going to be fixed, or do I have to do it myself? If that
Either Aditya's or my fix should be in the next release (next week?). Taco
On Sat, 16 Dec 2006, Taco Hoekwater wrote:
Hubertus wrote:
Hello again, I've been offline for the last week, so I could'nd write. Thanks for your answers! Well my problem is, that I'm just some kind of ordinary user. I've no clue about tex. I've had a look into the conre-mat.tex and tried to compare it with your posts. But, alas, no success. Is this a bug which is going to be fixed, or do I have to do it myself? If that
Either Aditya's or my fix should be in the next release (next week?).
The current release fixes the problem. Aditya
participants (4)
-
Aditya Mahajan
-
Hubertus
-
Hubertus Schmidt
-
Taco Hoekwater