ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Enrique Jiménez Gallego" <enrique.jimenezgallego@gmail.com>
To: ntg-context@ntg.nl
Subject: MKIV bibliography: attempt to index local 'used' (a nil value)
Date: Fri, 22 Aug 2014 10:19:37 +0200	[thread overview]
Message-ID: <CANwACZNdPheiz82KfZ+==f3GxF7SN4q3a7q1T=tB2to2Lyp-Mw@mail.gmail.com> (raw)

Hi,

I get the following error with the latest beta (Arch Linux, Lua 5.2.3):

ConTeXt  ver: 2014.08.21 09:56 MKIV beta  fmt: 2014.8.22  int: english/english

.../context/tex/texmf-context/tex/context/base/publ-ini.lua:650:
attempt to index local 'used' (a nil value)
stack traceback:
.../context/tex/texmf-context/tex/context/base/publ-ini.lua:650: in
function 'enhance'
.../context/tex/texmf-context/tex/context/base/publ-dat.lua:151: in
function '__index'
.../context/tex/texmf-context/tex/context/base/publ-ini.lua:1349: in
function 'btxpreparelistentries'
[\directlua]:1: in main chunk

1     \usebtxdataset [example][mkiv-publications.bib]
2     \definebtxrendering[example][dataset=example]
3     \starttext
4     \chapter{One}
5         some text.\cite[example::demo-001]
6 >>      \placebtxrendering[example][criterium=all]
7     \stoptext
8
9

Minimal example:

\usebtxdataset [example][mkiv-publications.bib]
\definebtxrendering[example][dataset=example]
\starttext
\chapter{One}
    some text.\cite[example::demo-001]
    \placebtxrendering[example][criterium=all]
\stoptext

The following patch seems to fix the problem:

*** publ-ini.lua.old 2014-08-21 13:53:31.267777602 +0200
--- publ-ini.lua 2014-08-21 13:47:52.967781191 +0200
***************
*** 647,652 ****
--- 647,655 ----
                          local short = formatters["%t%02i"](t,mod(year,100))
                          local s = shorts[short]
                          -- we could also sort on reference i.e. entries.text
+                        if not used then
+                            used = { }
+                        end
                          local u = used[tag]
                          if u then
                              u = u[1].entries.text -- hm
___________________________________________________________________________________
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-08-22  8:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='CANwACZNdPheiz82KfZ+==f3GxF7SN4q3a7q1T=tB2to2Lyp-Mw@mail.gmail.com' \
    --to=enrique.jimenezgallego@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).