ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Strange \placeformula
@ 2003-03-31  8:20 Michal Kvasnicka
  2003-03-31 10:19 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Kvasnicka @ 2003-03-31  8:20 UTC (permalink / raw)


Good morning!

I' have probably made a strange bug in my document layout. In

adfadfasdfasdf
\placeformula[eq:one]
$$a=b,$$\noindentation
adfasdfadsf

the \placeformula macro doesn't produce a formula number -- the formula has no 
number and \in{equation}[eq:one] doesn't work as well. Sometimes there is 
also no space before the formula and after it. Extremely strange is that

asdfasdfasdf
\placeformula[eq:one]
\startformula
a=b
\stopformula\noindentation
adsfasdfasdf

works well. The bug is definitely in my macros for document layout since 
another document works well. Can some of you hint where to find the bug? I'm 
nearly desperate. Well, I didn't redefined $ nor changed its catcode (at 
least not voluntaryly).

Many thanks for any hint.
With many greetings
Michal Kvasnicka

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

* Re: Strange \placeformula
  2003-03-31  8:20 Strange \placeformula Michal Kvasnicka
@ 2003-03-31 10:19 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2003-03-31 10:19 UTC (permalink / raw)


At 10:20 AM 3/31/2003 +0200, you wrote:
>Good morning!
>
>I' have probably made a strange bug in my document layout. In
>
>adfadfasdfasdf
>\placeformula[eq:one]
>$$a=b,$$\noindentation
>adfasdfadsf

$$ is kind of obsolete

>the \placeformula macro doesn't produce a formula number -- the formula 
>has no
>number and \in{equation}[eq:one] doesn't work as well. Sometimes there is
>also no space before the formula and after it. Extremely strange is that
>
>asdfasdfasdf
>\placeformula[eq:one]
>\startformula
>a=b
>\stopformula\noindentation
>adsfasdfasdf

\startformula is the way to go

>works well. The bug is definitely in my macros for document layout since
>another document works well. Can some of you hint where to find the bug? I'm
>nearly desperate. Well, I didn't redefined $ nor changed its catcode (at
>least not voluntaryly).

\unprotect

\def\doplaatsformule[#1][#2]% #2 = dummy, gobbles spaces
   {\def\redoplaatsformule
      {\bgroup\def\dostartformula####1{\relax}%
       \ifx\next\bgroup
         \@EA\moreplaatsformule % [ref]{}
       \else
         \expandafter\convertargument\e!start\to\asciiA
         \expandafter\convertargument\next   \to\asciiB
         \ExpandBothAfter\doifincsnameelse\asciiA\asciiB
           {\egroup \@EA\dodoplaatsformule}% [ref]\start
           {\egroup \@EA\dispplaatsformule}% [ref]$$
       \fi[#1]{}}%
    \futurelet\next\redoplaatsformule}

\long\def\moreplaatsformule[#1]#2#3#4% #2 dummy #4 gobbles spaces
   {\def\redoplaatsformule
      {\expandafter\convertargument\e!start\to\asciiA
       \expandafter\convertargument\next   \to\asciiB
       \ExpandBothAfter\doifincsnameelse\asciiA\asciiB
         {\egroup \dodoplaatsformule}% [ref]\start
         {\egroup \dispplaatsformule}% [ref]$$
       [#1]{#3}}%
    \futurelet\next\redoplaatsformule#4}

\protect

^^^^ in cont-new.tex
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

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

end of thread, other threads:[~2003-03-31 10:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-31  8:20 Strange \placeformula Michal Kvasnicka
2003-03-31 10:19 ` Hans Hagen

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