ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Weird error
Date: Wed, 10 Sep 2014 18:53:55 +0200	[thread overview]
Message-ID: <EE737D18-9F03-494B-A2A5-6461B8835398@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1409101234200.13776@nqv-guvaxcnq>


Am 10.09.2014 um 18:37 schrieb Aditya Mahajan <adityam@umich.edu>:

> Hi,
> 
> There was a question on TeX.SX about an error message
> http://tex.stackexchange.com/questions/200474/setuppagenumberinglocation-causes-problem-in-context
> 
> The following MWE shows the same error
> 
> \setupfootertexts[\namedheadnumber{chapter}]
> \setuppagenumbering[location=,alternative=doublesided]
> 
> \starttext
> 
> \completecontent
> 
> \chapter{Creating device driver}
> 
> \section{How to create the}
> 
> Chapter text
> 
> \stoptext
> 
> which gives
> 
> lua error       > error on line 8 in file /tmp/test.tex:
> 
> ...uild/src/tex/texmf-context/tex/context/base/strc-doc.lua:904: attempt to index field 'numbers' (a nil value)
> stack traceback:
>        ...uild/src/tex/texmf-context/tex/context/base/strc-doc.lua:904: in function 'getsectionnumber'
>        [\directlua]:1: in main chunk
> 
> The error is weird because it only appears when all parts of the minimal example are present. If I comment either or `location=,` or `alternative=doublesided` or `\completecontent` or `\section{...}`, the error goes away!
> 
> Any thoughts?


The error arises only when there is no aux file. A alternative to \namedheadnumber{XXX} is \getmarking[XXXnumber].

    \setupfootertexts[{\getmarking[chapternumber]}]

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
___________________________________________________________________________________


  reply	other threads:[~2014-09-10 16:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-10 16:37 Aditya Mahajan
2014-09-10 16:53 ` Wolfgang Schuster [this message]
2014-09-10 18:32   ` Aditya Mahajan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=EE737D18-9F03-494B-A2A5-6461B8835398@gmail.com \
    --to=schuster.wolfgang@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).