ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* table: code doesn't work any more with recent beta
@ 2006-10-01 20:17 Mojca Miklavec
  2006-10-01 21:42 ` Sanjoy Mahajan
  0 siblings, 1 reply; 6+ messages in thread
From: Mojca Miklavec @ 2006-10-01 20:17 UTC (permalink / raw)


Hello Hans,

The following code compiles fine with MikTeX (version 2006.08.22), but
fails with a recent beta:

\def\room#1{\starttable[ s0 |r|l|]#1\stoptable}
\def\student#1#2{\NC#1\NC#2\NC\MR}

\starttext
\room{
	\student{A}{B}
	\student{C}{D}
}
\stoptext


I get the following error:


! Undefined control sequence.
\dotextmodediscretionary ...up \let \nextnextnext
                                                  \egroup \def \next ##1#1{\...
<argument>  s0 |
                r|l|
\doifsomething #1->\edef \!!stringa {#1
                                       }\ifx \!!stringa \empty \expandafter ...

\thirdstagestartTABLE ...etall \doifsomething {#1}
                                                   {\def \TABLEformat {#1}\g...

\dorestartTABLE ...restartTABLE {#1}\restartTABLE
                                                  \TABLEnoalign {\globalpush...

\room #1->\starttable [ s0 |r|l|]
                                 #1\stoptable
l.9 }

?
! Emergency stop.

Mojca

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

* Re: table: code doesn't work any more with recent beta
  2006-10-01 20:17 table: code doesn't work any more with recent beta Mojca Miklavec
@ 2006-10-01 21:42 ` Sanjoy Mahajan
  2006-10-02 17:07   ` Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: Sanjoy Mahajan @ 2006-10-01 21:42 UTC (permalink / raw)


I'd seen a similar problem but didn't manage to catch it before it
slithered away.  But I'm pretty sure it used to work (perhaps with an
August 06 release).

Starting from your example, the following was the smallest file I
could find showing the same problem (using the latest beta):

\def\room{\starttable[|r|l|]}
\starttext
\room
\NC a \NC b \NC\MR
\stoptable
\stoptext

I think it's related to the argument processing in \starttable because
this works:

\def\room{\starttable}
\starttext
\room[|r|l|]
\NC a \NC b \NC\MR
\stoptable
\stoptext

-Sanjoy

`Never underestimate the evil of which men of power are capable.'
         --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.

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

* Re: table: code doesn't work any more with recent beta
  2006-10-01 21:42 ` Sanjoy Mahajan
@ 2006-10-02 17:07   ` Wolfgang Schuster
  2006-10-02 18:34     ` John R. Culleton
  2006-10-04  8:00     ` Hans Hagen
  0 siblings, 2 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2006-10-02 17:07 UTC (permalink / raw)


On Sun, 01 Oct 2006 22:42:03 +0100
Sanjoy Mahajan <sanjoy@mrao.cam.ac.uk> wrote:

> I'd seen a similar problem but didn't manage to catch it before it
> slithered away.  But I'm pretty sure it used to work (perhaps with an
> August 06 release).
> 
> Starting from your example, the following was the smallest file I
> could find showing the same problem (using the latest beta):
> 
> \def\room{\starttable[|r|l|]}
> \starttext
> \room
> \NC a \NC b \NC\MR
> \stoptable
> \stoptext
> 
> I think it's related to the argument processing in \starttable because
> this works:
> 
> \def\room{\starttable}
> \starttext
> \room[|r|l|]
> \NC a \NC b \NC\MR
> \stoptable
> \stoptext
> 
> -Sanjoy
> 

The arguments seems to be procesed as a argument for discretionaries.

The following works but it is no real solution for the problem.

\unprotect

%\beginETEX \detokenize

\def\installdiscretionaries#1#2#3%
  {\setevalue{\strippedcsname\mathmodediscretionary\string#1}
{\detokenize{#1}}% \setvalue {\strippedcsname\textmodediscretionary
\string#1}{#3}% \catcode`#1=\@@active
   \scratchcounter=\the\uccode`~
   \uccode`~=`#1
   \uppercase{\unexpanded\def~{\discretionarycommand~}}%
   \uccode`~=\scratchcounter}

%\endETEX

\installdiscretionaries || \compoundhyphen

\protect

\def\room#1{\starttable[ s0 |r|l|]#1\stoptable}
\def\student#1#2{\NC#1\NC#2\NC\MR}

\starttext
\room{
	\student{A}{B}
	\student{C}{D}
}
\stoptext

Wolfgang

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

* Re: table: code doesn't work any more with recent beta
  2006-10-02 17:07   ` Wolfgang Schuster
@ 2006-10-02 18:34     ` John R. Culleton
  2006-10-03 20:53       ` Mojca Miklavec
  2006-10-04  8:00     ` Hans Hagen
  1 sibling, 1 reply; 6+ messages in thread
From: John R. Culleton @ 2006-10-02 18:34 UTC (permalink / raw)


On Monday 02 October 2006 13:07, Wolfgang Schuster wrote:
> On Sun, 01 Oct 2006 22:42:03 +0100
>
> Sanjoy Mahajan <sanjoy@mrao.cam.ac.uk> wrote:
> > I'd seen a similar problem but didn't manage to catch it before it
> > slithered away.  But I'm pretty sure it used to work (perhaps with an
> > August 06 release).

Worst case as an emergency fix you could pick up the table module 
from the texsis suite: TXSruled.tex. I use it all the time in plain tex and
pdfetex. It will work in Context too. Here is a sample:
\input TXSruled.tex
...
\ruledtable
VENDOR \cr
John Culleton \hfill\crnorule
Able Indexers and Typesetters\hfill\crnorule
2401 Haight Avenue\hfill\crnorule
Eldersburg, MD 21784 \hfill
\endruledtable

I find this style of coding less cumbersome than the one adopted for
Context, with all the capitalizations etc.  

-- 
John Culleton
Able Indexing and Typesetting
Precision typesetting (tm) at reasonable cost.
Satisfaction guaranteed. 
http://wexfordpress.com

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

* Re: table: code doesn't work any more with recent beta
  2006-10-02 18:34     ` John R. Culleton
@ 2006-10-03 20:53       ` Mojca Miklavec
  0 siblings, 0 replies; 6+ messages in thread
From: Mojca Miklavec @ 2006-10-03 20:53 UTC (permalink / raw)


On 10/2/06, John R. Culleton wrote:
> On Monday 02 October 2006 13:07, Wolfgang Schuster wrote:
> > On Sun, 01 Oct 2006 22:42:03 +0100
> >
> > Sanjoy Mahajan <sanjoy@mrao.cam.ac.uk> wrote:
> > > I'd seen a similar problem but didn't manage to catch it before it
> > > slithered away.  But I'm pretty sure it used to work (perhaps with an
> > > August 06 release).
>
> Worst case as an emergency fix you could pick up the table module
> from the texsis suite: TXSruled.tex. I use it all the time in plain tex and
> pdfetex. It will work in Context too. Here is a sample:
> \input TXSruled.tex
> ...
> \ruledtable
> VENDOR \cr
> John Culleton \hfill\crnorule
> Able Indexers and Typesetters\hfill\crnorule
> 2401 Haight Avenue\hfill\crnorule
> Eldersburg, MD 21784 \hfill
> \endruledtable
>
> I find this style of coding less cumbersome than the one adopted for
> Context, with all the capitalizations etc.

I don't need a quick fix since I can still use the old version to
compile that specific document - but it would be great if it would be
fixed in the current beta as well.

I also remember some other problems with tables being reported not so
long ago (usage of \AR, \MR, \FR, \LR, ... causing problems in
macros).

But thanks for the hint. I'll take a look at TXSruled, I never heard
about it before. (I hate the way tables are dealt with inside any
flavour of TeX anyway.)

Mojca

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

* Re: table: code doesn't work any more with recent beta
  2006-10-02 17:07   ` Wolfgang Schuster
  2006-10-02 18:34     ` John R. Culleton
@ 2006-10-04  8:00     ` Hans Hagen
  1 sibling, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2006-10-04  8:00 UTC (permalink / raw)


Wolfgang Schuster wrote:
> On Sun, 01 Oct 2006 22:42:03 +0100
> Sanjoy Mahajan <sanjoy@mrao.cam.ac.uk> wrote:
>
>   
>> I'd seen a similar problem but didn't manage to catch it before it
>> slithered away.  But I'm pretty sure it used to work (perhaps with an
>> August 06 release).
>>
>> Starting from your example, the following was the smallest file I
>> could find showing the same problem (using the latest beta):
>>
>> \def\room{\starttable[|r|l|]}
>>     
i've cleaned up some of the | code and due to a change in load order this table in def was broken; i hope the latest beta fixes it

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.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

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

end of thread, other threads:[~2006-10-04  8:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-01 20:17 table: code doesn't work any more with recent beta Mojca Miklavec
2006-10-01 21:42 ` Sanjoy Mahajan
2006-10-02 17:07   ` Wolfgang Schuster
2006-10-02 18:34     ` John R. Culleton
2006-10-03 20:53       ` Mojca Miklavec
2006-10-04  8:00     ` 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).