ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Bug in Enumerations
@ 2003-05-28 13:48 Slawek Zak
  2003-05-28 17:02 ` Giuseppe Bilotta
  0 siblings, 1 reply; 8+ messages in thread
From: Slawek Zak @ 2003-05-28 13:48 UTC (permalink / raw)


There is a bug in enumerations' implementation. The following example
is nearly literally taken from english ConTeXt manual 
(cont-eni.pdf, p. 224)

See this example:

  \defineenumeration[step]   [location=left,text={},width=2em]
  \setupenumerations[step]   [headstyle=bold]
  \setupenumerations[substep][headstyle=slanted]

  \starttext
	  \step    One \par
	  \substep Two \par
  \stoptext

The headstyle for substep is bold, just like for step, and not slanted
as stated in the manual.

Help, please :)

/S

PS: Hans, are there any chances to get the new beta with backgrounds'
recalculation bug fixed? Latest beta is from before BachoTeX ;)

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

* Re: Bug in Enumerations
  2003-05-28 13:48 Bug in Enumerations Slawek Zak
@ 2003-05-28 17:02 ` Giuseppe Bilotta
  2003-05-29  8:42   ` Hans Hagen
  2003-05-29  9:05   ` Slawek Zak
  0 siblings, 2 replies; 8+ messages in thread
From: Giuseppe Bilotta @ 2003-05-28 17:02 UTC (permalink / raw)


Wednesday, May 28, 2003 Slawek Zak wrote:

SZ> There is a bug in enumerations' implementation. The following example
SZ> is nearly literally taken from english ConTeXt manual 
SZ> (cont-eni.pdf, p. 224)

SZ> See this example:

SZ>   \defineenumeration[step]  
SZ> [location=left,text={},width=2em]
SZ>   \setupenumerations[step]   [headstyle=bold]
SZ>   \setupenumerations[substep][headstyle=slanted]

SZ>   \starttext
SZ>           \step    One \par
SZ>           \substep Two \par
SZ>   \stoptext

SZ> The headstyle for substep is bold, just like for step, and not slanted
SZ> as stated in the manual.

As a temporary patch, put the following in your cont-loc and
tell me how it works out. If you don't have a cont-loc, put it
in your cont-new.

===============================================================================
\def\special@@definitiewoord#1#2#3#4[#5]#6#7%
  {\strut
   \doifelsevalue{\??dd#1\c!nummer}\v!nee
     \!!doneafalse
     {\doifelse{#5}{-}
        \!!doneafalse
        \!!doneatrue}%
   \chardef\definitiekoppeling\zerocount
   \iflocation
     \doifvaluesomething{\??dd#1\c!koppeling}
       {\processaction % genereert > of <
          [\getvalue{\??dd#1\c!koppelwijze}]
          [ \v!lokaal=>\chardef\definitiekoppeling1, % old: default
           \v!globaal=>\chardef\definitiekoppeling2]}% new: global crosslinking
   \fi
   \stelnummerin % the number is called indirectly
     [\getvalue{\??dd#1\??dd\c!nummer}]
     [\c!sectienummer=\getvalue{\??dd#1\c!sectienummer}]%
   \if!!donea
     \getvalue{\e!volgende#2#1}%
     \iflocation
       \bgroup
       \letvalue{\??dd#1\c!sectienummer}\v!ja
       \protectconversion
       \maakvoorafgaandenummer[\getvalue{\??dd#1\??dd\c!nummer}]%
       \preparethenumber{\??dd#1}\voorafgaandenummer\preparednumber
       \ifcase\definitiekoppeling \or
         \xdef\internaldoornummer{#3{#1}}%
         \rawreference\s!num{#1:\internaldoornummer}{}%
       \or
         \xdef\internaldoornummer{\countervalue{\??dd\c!koppeling#1}}%
         \rawreference\s!num{#1:\internaldoornummer}{}%
       \fi
       \egroup
     \fi
     \maakvoorafgaandenummer[\getvalue{\??dd#1\??dd\c!nummer}]%
     \preparethenumber{\??dd#1}\voorafgaandenummer\preparednumber
     \hbox
       {\let\normalkap\relax % sorry, uppercase causes troubles
        \doattributes        % \nocase primitive needed
          {\??dd#2#1}\c!kopletter\c!kopkleur
          {\getvalue{\??dd#1\c!commando}% hook for taco 
             {\showdntext{#2#1}%
              \domakednnummer{#1}{#2}{#3}}}%
        \iflocation\ifcase\definitiekoppeling \else
          \edef\localconnection{\getvalue{\??dd#1\c!koppeling}:\internaldoornummer}%
          \doifreferencefoundelse\localconnection
            {\in[\localconnection]}{}% genereert > of <
        \fi\fi}%
     \doifnot{#5}{-}{\rawreference\s!num{#5}{#3{#1}}}%
   \else % Why was this strange expansion needed? 
     \hbox
       {\edef\!!stringa{\showdnpuretext{#2#1}}% nog eens testen binnen \expanded
        \expanded{\doattributes{\??dd#1}\noexpand\c!kopletter\noexpand\c!kopkleur
          {\noexpand\getvalue{\??dd#1\c!commando}{\!!stringa}}}%
        \doifnot{#5}{-}{\rawreference\s!num{#5}{}}}%
   \fi}
===============================================================================
FOR HANS: I added a #2 in the \doattributes for kopletter and
kopkleur.

-- 
Giuseppe "Oblomov" Bilotta

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

* Re: Bug in Enumerations
  2003-05-28 17:02 ` Giuseppe Bilotta
@ 2003-05-29  8:42   ` Hans Hagen
  2003-05-29  9:05   ` Slawek Zak
  1 sibling, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2003-05-29  8:42 UTC (permalink / raw)


At 19:02 28/05/2003 +0200, Giuseppe Bilotta wrote:

>As a temporary patch, put the following in your cont-loc and
>tell me how it works out. If you don't have a cont-loc, put it
>in your cont-new.

>        \doattributes        % \nocase primitive needed
>           {\??dd#2#1}\c!kopletter\c!kopkleur
>===============================================================================
>FOR HANS: I added a #2 in the \doattributes for kopletter and
>kopkleur.

ah, cleverly deduced, must be some quite old bug btw, probably introduced 
when \doattributes was extended; thanks

Hans
-------------------------------------------------------------------------
                                   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] 8+ messages in thread

* Re: Bug in Enumerations
  2003-05-28 17:02 ` Giuseppe Bilotta
  2003-05-29  8:42   ` Hans Hagen
@ 2003-05-29  9:05   ` Slawek Zak
  2003-05-29  9:39     ` Hans Hagen
  1 sibling, 1 reply; 8+ messages in thread
From: Slawek Zak @ 2003-05-29  9:05 UTC (permalink / raw)


On Wed, May 28, 2003 at 07:02:00PM +0200, Giuseppe Bilotta wrote:
> SZ> There is a bug in enumerations' implementation. The following example
> SZ> is nearly literally taken from english ConTeXt manual 
> SZ> (cont-eni.pdf, p. 224)

[...]

> As a temporary patch, put the following in your cont-loc and
> tell me how it works out. If you don't have a cont-loc, put it
> in your cont-new.

I made my cont-loc, put your patch there and rebuilt the format. Yes -
the cont-loc is loaded as I put a little \message at the beginning of
this file, but no visible change in compiled document is present :(

Thanks, /S

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

* Re: Bug in Enumerations
  2003-05-29  9:05   ` Slawek Zak
@ 2003-05-29  9:39     ` Hans Hagen
  2003-05-30 17:17       ` Slawek Zak
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2003-05-29  9:39 UTC (permalink / raw)


At 11:05 29/05/2003 +0200, Slawek Zak wrote:
>On Wed, May 28, 2003 at 07:02:00PM +0200, Giuseppe Bilotta wrote:
> > SZ> There is a bug in enumerations' implementation. The following example
> > SZ> is nearly literally taken from english ConTeXt manual
> > SZ> (cont-eni.pdf, p. 224)
>
>[...]
>
> > As a temporary patch, put the following in your cont-loc and
> > tell me how it works out. If you don't have a cont-loc, put it
> > in your cont-new.
>
>I made my cont-loc, put your patch there and rebuilt the format. Yes -
>the cont-loc is loaded as I put a little \message at the beginning of
>this file, but no visible change in compiled document is present :(

if you are willing to recompile ... then just patch core-des.tex instead

Hans
-------------------------------------------------------------------------
                                   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] 8+ messages in thread

* Re: Bug in Enumerations
  2003-05-29  9:39     ` Hans Hagen
@ 2003-05-30 17:17       ` Slawek Zak
  0 siblings, 0 replies; 8+ messages in thread
From: Slawek Zak @ 2003-05-30 17:17 UTC (permalink / raw)


On Thu, May 29, 2003 at 11:39:25AM +0200, Hans Hagen wrote:
> >I made my cont-loc, put your patch there and rebuilt the format. Yes -
> >the cont-loc is loaded as I put a little \message at the beginning of
> >this file, but no visible change in compiled document is present :(
> 
> if you are willing to recompile ... then just patch core-des.tex instead

So much better. Thanks.

/S

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

* Re: Bug in enumerations
  2000-03-03 17:28 Bug in enumerations Zeljko Vrba
@ 2000-03-03 17:44 ` Hans Hagen
  0 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2000-03-03 17:44 UTC (permalink / raw)
  Cc: ntg-context

At 06:28 PM 3/3/2000 +0100, Zeljko Vrba wrote:

>\defineenumeration[definition][location=serried,text=Definicija,way=bychapt
er]
>\definition
>Za {\bf prazan} skup vrijedi
>\placeformula\startformula
>\forall x\in {\cal X}\mu_\emptyset(x)=0
>\stopformula				<--- this is line 156
>Za {\bf univerzalan} skup vrijedi
>\placeformula\startformula
>\forall x\in {\cal X}\mu_{\cal X}(x)=1
>\stopformula
>\par

In that case try: 

\startdefinition

\stopdefinition

if it fails, let me know, because then I have to look into the details of a
core macro. 

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl
-----------------------------------------------------------------


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

* Bug in enumerations
@ 2000-03-03 17:28 Zeljko Vrba
  2000-03-03 17:44 ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Zeljko Vrba @ 2000-03-03 17:28 UTC (permalink / raw)


Hi! I've tried to combine enumerations with formulas:

---
\defineenumeration[definition][location=serried,text=Definicija,way=bychapter]
\definition
Za {\bf prazan} skup vrijedi
\placeformula\startformula
\forall x\in {\cal X}\mu_\emptyset(x)=0
\stopformula				<--- this is line 156
Za {\bf univerzalan} skup vrijedi
\placeformula\startformula
\forall x\in {\cal X}\mu_{\cal X}(x)=1
\stopformula
\par
---

and I get the following error message:

This is pdfTeX, Version 3.14159-14c (Web2C 7.3.1) (format=cont-hr 2000.1.2)  3 MAR 2000 18:19
**&/home/zeljko/cont-hr fuzzy
-- some material cut --
! Extra }, or forgotten \endgroup.
\par ->\egroup 
               \par \@@stopdefinitie {definition}\BeforePar {}\AfterPar {}
\par ->\egroup \par 
                    \@@stopdefinitie {definition}\BeforePar {}\AfterPar {}
\docomplexdoblanko ... \ifblankobuiten \else \par 
                                                  \ifvmode \ifblankoforceer ...

\complexdodoblanko ...ed {\docomplexdoblanko [#1]}
                                                  \fi 
\doifnumberelse ...donetrue \fi \ifdone \egroup #2
                                                  \else \egroup #3\fi 
\doifinstringelse ...{\@@@instring }{#2}#3\else #4
                                                  \fi 
...
l.156 \stopformula

-- I've marked the line in text which is line 156 in original document

? 
! Emergency stop.
\par ->\egroup 
               \par \@@stopdefinitie {definition}\BeforePar {}\AfterPar {}
\par ->\egroup \par 
                    \@@stopdefinitie {definition}\BeforePar {}\AfterPar {}
\docomplexdoblanko ... \ifblankobuiten \else \par 
                                                  \ifvmode \ifblankoforceer ...

\complexdodoblanko ...ed {\docomplexdoblanko [#1]}
                                                  \fi 
\doifnumberelse ...donetrue \fi \ifdone \egroup #2
                                                  \else \egroup #3\fi 
\doifinstringelse ...{\@@@instring }{#2}#3\else #4
                                                  \fi 
...
l.156 \stopformula

End of file on the terminal!

Here is how much of TeX's memory you used:
 869 strings out of 32668
 14648 string characters out of 162758
 307573 words of memory out of 1100001
 21678 multiletter control sequences out of 10000+15000
 16078 words of font info for 51 fonts, out of 200000 for 1000
 14 hyphenation exceptions out of 1000
 65i,19n,97p,329b,1707s stack positions out of 1500i,500n,1500p,50000b,5000s
Output written on fuzzy.dvi (5 pages, 6804 bytes).


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

end of thread, other threads:[~2003-05-30 17:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-28 13:48 Bug in Enumerations Slawek Zak
2003-05-28 17:02 ` Giuseppe Bilotta
2003-05-29  8:42   ` Hans Hagen
2003-05-29  9:05   ` Slawek Zak
2003-05-29  9:39     ` Hans Hagen
2003-05-30 17:17       ` Slawek Zak
  -- strict thread matches above, loose matches on Subject: below --
2000-03-03 17:28 Bug in enumerations Zeljko Vrba
2000-03-03 17:44 ` 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).