* \placeformula and $$ doesn't work anymore
@ 2006-12-04 21:24 Hubertus Schmidt
2006-12-05 21:46 ` Aditya Mahajan
0 siblings, 1 reply; 7+ messages in thread
From: Hubertus Schmidt @ 2006-12-04 21:24 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: \placeformula and $$ doesn't work anymore
2006-12-04 21:24 \placeformula and $$ doesn't work anymore Hubertus Schmidt
@ 2006-12-05 21:46 ` Aditya Mahajan
2006-12-05 22:09 ` Aditya Mahajan
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Aditya Mahajan @ 2006-12-05 21:46 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: \placeformula and $$ doesn't work anymore
2006-12-05 21:46 ` Aditya Mahajan
@ 2006-12-05 22:09 ` Aditya Mahajan
2006-12-05 22:53 ` Taco Hoekwater
2006-12-15 20:07 ` Hubertus
2 siblings, 0 replies; 7+ messages in thread
From: Aditya Mahajan @ 2006-12-05 22:09 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: \placeformula and $$ doesn't work anymore
2006-12-05 21:46 ` Aditya Mahajan
2006-12-05 22:09 ` Aditya Mahajan
@ 2006-12-05 22:53 ` Taco Hoekwater
2006-12-15 20:07 ` Hubertus
2 siblings, 0 replies; 7+ messages in thread
From: Taco Hoekwater @ 2006-12-05 22:53 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: \placeformula and $$ doesn't work anymore
2006-12-05 21:46 ` Aditya Mahajan
2006-12-05 22:09 ` Aditya Mahajan
2006-12-05 22:53 ` Taco Hoekwater
@ 2006-12-15 20:07 ` Hubertus
2006-12-16 8:32 ` Taco Hoekwater
2 siblings, 1 reply; 7+ messages in thread
From: Hubertus @ 2006-12-15 20:07 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: \placeformula and $$ doesn't work anymore
2006-12-15 20:07 ` Hubertus
@ 2006-12-16 8:32 ` Taco Hoekwater
2006-12-21 15:48 ` Aditya Mahajan
0 siblings, 1 reply; 7+ messages in thread
From: Taco Hoekwater @ 2006-12-16 8:32 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: \placeformula and $$ doesn't work anymore
2006-12-16 8:32 ` Taco Hoekwater
@ 2006-12-21 15:48 ` Aditya Mahajan
0 siblings, 0 replies; 7+ messages in thread
From: Aditya Mahajan @ 2006-12-21 15:48 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-12-21 15:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-04 21:24 \placeformula and $$ doesn't work anymore Hubertus Schmidt
2006-12-05 21:46 ` Aditya Mahajan
2006-12-05 22:09 ` Aditya Mahajan
2006-12-05 22:53 ` Taco Hoekwater
2006-12-15 20:07 ` Hubertus
2006-12-16 8:32 ` Taco Hoekwater
2006-12-21 15:48 ` 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).