ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* label bug with latest beta (2011.04.22)
@ 2011-04-23 16:25 Reviczky, Adam
  2011-04-23 20:29 ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Reviczky, Adam @ 2011-04-23 16:25 UTC (permalink / raw)
  To: ntg-context

[-- Attachment #1: Type: text/plain, Size: 800 bytes --]

Hi

With the latest beta (2011.04.22) I cannot compile my thesis any more.
I think I've narrowed it down to this minimal example:

%%%
\starttext
\startpart[title={Table of Contents}]
\completecontent[criterium=all]
\stoptext
%%%

! LuaTeX error /usr/share/texmf/tex/context/base/strc-lst.lua:496: no string to print
stack traceback:
	[C]: in function 'texsprint'
	/usr/share/texmf/tex/context/base/strc-lst.lua:496: in function 'label'
	<main ctx instance>:1: in main chunk.

Shouldn't be the label function something like this:
function lists.label(n)
    local l = lists.result[n]
    local t = l.titledata
    if t then
        texsprint(t.label or 0) -- 0 if no label?
    end
end

Can someone confirm this?
It works with the 2011.04.20 beta, logs attached.

Adam

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: toc.log --]
[-- Type: text/x-log; name="toc.log", Size: 5798 bytes --]

(toc.tex

ConTeXt  ver: 2011.04.22 18:17 MKIV  fmt: 2011.4.23  int: english/english

system          > cont-new.mkiv loaded
(/usr/share/texmf/tex/context/base/cont-new.mkiv
system          > beware: some patches loaded from cont-new.mkiv
)
system          > toc.top loaded
system          > options > begin of optionfile
system          > options >
system          > options > % runtime options files (command line driven)
system          > options > \unprotect
system          > options > % feedback and basic job control
system          > options > % handy for special styles
system          > options > \startluacode
system          > options > document = document or { }
system          > options > document.arguments={
system          > options > }
system          > options > document.files={
system          > options >  "toc.tex",
system          > options > }
system          > options > \stopluacode
system          > options > % process info
system          > options > \setupsystem[inputfile=toc.tex]
system          > options > \setupsystem[\c!n=2,\c!m=2]
system          > options > % modes
system          > options > % options (not that important)
system          > options > \startsetups *runtime:options
system          > options > \stopsetups
system          > options > % styles and modules
system          > options > \startsetups *runtime:modules
system          > options > \stopsetups
system          > options > % done
system          > options > \protect \endinput
system          > options >
system          > options > end of optionfile
(toc.top)
fonts           > latin modern fonts are not preloaded
languages       > language en is active
{/usr/share/texmf/fonts/map/pdftex/context/mkiv-base.map}
fonts           > preloading latin modern fonts (second stage)
(/usr/share/texmf/tex/context/base/type-siz.mkiv) (/usr/share/texmf/tex/context/base/type-otf.mkiv){/usr/share/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/share/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts           > virtual math > unable to resolve name mapsfromchar
fonts           > fallback modern rm 12pt is loaded
system          > begin file toc.tex at line 1
structure       > sectioning > part @ level 1 : 1 -> Table of Contents
backend         > xmp > using file '/usr/share/texmf/tex/context/base/lpdf-pdx.xml'
pages           > flushing realpage 1, userpage 1, subpage 1
structure       > sectioning > title @ level 2 : 1.0 -> \headtext {content}
! LuaTeX error /usr/share/texmf/tex/context/base/strc-lst.lua:496: no string to print
stack traceback:
	[C]: in function 'texsprint'
	/usr/share/texmf/tex/context/base/strc-lst.lua:496: in function 'label'
	<main ctx instance>:1: in main chunk.

system          > tex > error on line 11 in file toc.tex: LuaTeX error  ...

1     \starttext
2     \startpart[title={Table of Contents}]
3     \completecontent[criterium=all]
4     \stoptext
5     


\listsymbol@default ....label(\currentlistindex )}
                                                  }\leftlabeltext \currentli...
<argument> ...!numbercommand {\currentlistsymbol }
                                                  }\hfill 
\domakelistelement ...ndgroup }{#3{#4}}\else #3{#4
                                                  }\fi 
<argument> ...mmand {\currentlistsymbol }}\hfill }
                                                  }
\firstoftwoarguments #1#2->#1
                             
<argument> ...thc \zeropoint \setbox 2\emptyhbox }
                                                  \setbox 4\hbox {\doif {\li...
...
l.3 \completecontent[criterium=all]
                                   
? q
OK, entering \batchmode...

pages           > flushing realpage 2, userpage 2
system          > end file toc.tex at line 4
 )</usr/share/texmf/fonts/opentype/public/lm/lmroman12-regular.otf>
mkiv lua stats  > used config file          - /usr/share/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path           - /home/reviczky/.texmf-var/luatex-cache/context/e570cb3e0e3ab0118ca08dd148bbec7d
mkiv lua stats  > input load time           - 0.121 seconds
mkiv lua stats  > stored bytecode data      - 284 modules, 58 tables, 342 chunks
mkiv lua stats  > cleaned up reserved nodes - 33 nodes, 9 lists of 423
mkiv lua stats  > node memory usage         - 19 glue_spec
mkiv lua stats  > node list callback tasks  - 6 unique task lists, 5 instances (re)created, 2420 calls
mkiv lua stats  > used backend              - pdf (backend for directly generating pdf output)
mkiv lua stats  > loaded patterns           - en::2
mkiv lua stats  > callbacks                 - 2628 direct, 2965 indirect, 5593 total
mkiv lua stats  > randomizer                - initialized with value 0.20257642641784
mkiv lua stats  > lxml preparation time     - 0.000 seconds, 0 nodes, 18 lpath calls, 3 cached calls
mkiv lua stats  > result saved in file      - toc.pdf
mkiv lua stats  > loaded fonts              - 33 files: stmary10.afm eufb10.tfm eufb7.tfm eufm10.tfm eufm7.tfm msam10.tfm msam7.tfm msbm10.tfm msbm7.tfm lmmono12-regular.otf lmmono8-regular.otf lmmono9-regular.otf lmroman12-bold.otf lmroman12-regular.otf lmroman7-bold.otf lmroman7-regular.otf lmroman9-bold.otf lmroman9-regular.otf lmsans12-regular.otf lmsans8-regular.otf lmsans9-regular.otf lmex10.tfm lmmi12.tfm lmmi7.tfm lmmi9.tfm lmmib10.tfm lmmib7.tfm lmsy10.tfm lmsy7.tfm lmsy9.tfm rm-lmr12.tfm rm-lmr7.tfm rm-lmr9.tfm
mkiv lua stats  > fonts load time           - 0.529 seconds 
mkiv lua stats  > luatex banner             - this is luatex, version beta-0.67.0-2011042312 (rev 4192)
mkiv lua stats  > control sequences         - 30294 of 165536
mkiv lua stats  > current memory usage      - 32 MB (ctx: 32 MB)
mkiv lua stats  > runtime                   - 2.537 seconds, 1 processed pages, 2 shipped pages, 0.788 pages/second


[-- Attachment #3: thesis.log.gz --]
[-- Type: application/x-gzip, Size: 2299 bytes --]

[-- Attachment #4: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: label bug with latest beta (2011.04.22)
  2011-04-23 16:25 label bug with latest beta (2011.04.22) Reviczky, Adam
@ 2011-04-23 20:29 ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2011-04-23 20:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Reviczky, Adam

On 23-4-2011 6:25, Reviczky, Adam wrote:
> Hi
>
> With the latest beta (2011.04.22) I cannot compile my thesis any more.
> I think I've narrowed it down to this minimal example:
>
> %%%
> \starttext
> \startpart[title={Table of Contents}]
> \completecontent[criterium=all]
> \stoptext
> %%%
>
> ! LuaTeX error /usr/share/texmf/tex/context/base/strc-lst.lua:496: no string to print
> stack traceback:
> 	[C]: in function 'texsprint'
> 	/usr/share/texmf/tex/context/base/strc-lst.lua:496: in function 'label'
> 	<main ctx instance>:1: in main chunk.
>
> Shouldn't be the label function something like this:
> function lists.label(n)
>      local l = lists.result[n]
>      local t = l.titledata
>      if t then
>          texsprint(t.label or 0) -- 0 if no label?
>      end
> end
>
> Can someone confirm this?
> It works with the 2011.04.20 beta, logs attached.

more like:

function lists.label(n,default)
     local l = lists.result[n]
     local t = l.titledata
     if t then
         texsprint(t.label or default or "")
     end
end

and then in strc-lst.mkiv:
 
\edef\currentlistlabel{\ctxlua{structures.lists.label(\currentlistindex,"\currentlistlabel")}}%


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: label bug with latest beta (2011.04.22)
  2011-04-24 12:43 ` Hans Hagen
@ 2011-04-24 13:34   ` Reviczky, Adam
  0 siblings, 0 replies; 6+ messages in thread
From: Reviczky, Adam @ 2011-04-24 13:34 UTC (permalink / raw)
  To: Hans Hagen, mailing list for ConTeXt users

> some day leaving out the \stop's will backfire on you

why oh why did I never think about that (probably thought it was a setup)?
thanks for pointing that out

> add added a fallback in the beta

much appreciated

Adam
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: label bug with latest beta (2011.04.22)
  2011-04-23 19:02 Reviczky, Adam
  2011-04-24  6:49 ` Wolfgang Schuster
@ 2011-04-24 12:43 ` Hans Hagen
  2011-04-24 13:34   ` Reviczky, Adam
  1 sibling, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2011-04-24 12:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Reviczky, Adam

On 23-4-2011 9:02, Reviczky, Adam wrote:

> \startbodymatter
> \startpart [title={Table of Contents}]
> \startchapter [title={Chapter}]
> \startsection [title={Section}]

some day leaving out the \stop's will backfire on you

> \stopbodymatter
> \stoptext

add added a fallback in the beta

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: label bug with latest beta (2011.04.22)
  2011-04-23 19:02 Reviczky, Adam
@ 2011-04-24  6:49 ` Wolfgang Schuster
  2011-04-24 12:43 ` Hans Hagen
  1 sibling, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2011-04-24  6:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 23.04.2011 um 21:02 schrieb Reviczky, Adam:

> Further, I have two more problems with the new label system:
> 
> 1) The label "Part" is not shown any more in the ToC.
> 2) Showing the label in the ToC but not in the parts (bodypart for example) doesn't work any more with this solution: http://www.ntg.nl/pipermail/ntg-context/2011/058614.html

\setuplist[part]   [label=part]
\setuplist[chapter][label=chapter]
\setuplist[section][label=section]


and use the \completecontent command without setting for label
because this will otherwise overwrite the settings above.

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: label bug with latest beta (2011.04.22)
@ 2011-04-23 19:02 Reviczky, Adam
  2011-04-24  6:49 ` Wolfgang Schuster
  2011-04-24 12:43 ` Hans Hagen
  0 siblings, 2 replies; 6+ messages in thread
From: Reviczky, Adam @ 2011-04-23 19:02 UTC (permalink / raw)
  To: ntg-context

Further, I have two more problems with the new label system:

1) The label "Part" is not shown any more in the ToC.
2) Showing the label in the ToC but not in the parts (bodypart for example) doesn't work any more with this solution: http://www.ntg.nl/pipermail/ntg-context/2011/058614.html

Here's an example showing both problems:

\setuphead [chapter] [bodypartlabel=] % uncommenting this adds the label again, but in both the toc and the bodypart
\setuphead [section] [bodypartlabel=] % uncommenting this adds the label again, but in both the toc and the bodypart

%\setuplabeltext [en] [part={Part }] % no difference, Part is not shown
\setuplabeltext [en] [chapter={Chapter }]
\setuplabeltext [en] [section={Section }]

\starttext
\startfrontmatter
\completecontent [criterium=all,label=yes]
\stopfrontmatter

\startbodymatter
\startpart [title={Table of Contents}]
\startchapter [title={Chapter}]
\startsection [title={Section}]
\stopbodymatter
\stoptext

Adam
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2011-04-24 13:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-23 16:25 label bug with latest beta (2011.04.22) Reviczky, Adam
2011-04-23 20:29 ` Hans Hagen
2011-04-23 19:02 Reviczky, Adam
2011-04-24  6:49 ` Wolfgang Schuster
2011-04-24 12:43 ` Hans Hagen
2011-04-24 13:34   ` Reviczky, Adam

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