ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Bibliography problem
@ 2012-01-27 20:23 Michael Green
  2012-02-01 20:48 ` strc-lst.lua [was: Bibliography problem] Philipp Gesang
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Green @ 2012-01-27 20:23 UTC (permalink / raw)
  To: ntg-context

I'm having a problem with bibliographies.

---- Example file ----------------------------------------

\setupbibtex[database=test]
\setuppublications[alternative=apa]

\starttext
Here is a cite command: \cite[hh2010a]

%\placepublications[criterium=all]

\stoptext

---- test.bib ----------------------------------------

@STRING{hh = {Hans Hagen}}

@ARTICLE{hh2010a,
  author = hh,
  title = {The Font Name Mess},
  journal = {MAPS},
  year = {2010},
  volume = {40},
  pages = {2-8},
  keywords = {context},
}

---- Log ----------------------------------------

This is LuaTeX, Version beta-0.70.1-2011051908 (rev 4277) 
 \write18 enabled.
(2012bib.tex

ConTeXt  ver: 2012.01.25 14:16 MKIV  fmt: 2012.1.26  int: english/english

system          > cont-new.mkiv loaded
(/Users/michaelgreen/Applications/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system          > beware: some patches loaded from cont-new.mkiv
)
system          > 2012bib.top loaded
(2012bib.top)
fonts           > latin modern fonts are not preloaded
languages       > language en is active
publications    > wrote a new auxiliary file \jobname.aux
This is BibTeX, Version 0.99d (TeX Live 2011)
The top-level auxiliary file: 2012bib.aux
The style file: cont-no.bst
Database file #1: test.bib
publications    > loading formatting style from bibl-apa
(/Users/michaelgreen/Applications/context/tex/texmf-context/tex/context/bib/bibl-apa.tex){/Users/michaelgreen/Applications/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts           > preloading latin modern fonts (second stage)
fonts           > typescripts > unknown: library 'loc'
{/Users/michaelgreen/Applications/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/Users/michaelgreen/Applications/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts           > fallback modern rm 12pt is loaded
check           > missing or ungrouped '=' after 'pubs' in line 5 (68>:)
publications    > loading database from 2012bib.bbl
(2012bib.bbl)
! Extra \endgroup.

system          > tex > error on line 5 in file 2012bib.tex: Extra  ...

1     \setupbibtex[database=test]
2     \setuppublications[alternative=apa]
3     
4     \starttext
5 >>  Here is a cite command: \cite[hh2010a]
6     
7     %\placepublications[criterium=all]
8     
9     \stoptext


\docite ...else \donumberedcite {#1}\fi \endgroup 
                                                  
<to be read again> 
                    
l.5 Here is a cite command: \cite[hh2010a]
                                          
? 

___________________________________________________________________________________
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] 7+ messages in thread
* Re: strc-lst.lua [was: Bibliography problem]
@ 2012-02-02 23:26 Michael Green
  2012-02-02 23:46 ` Philipp Gesang
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Green @ 2012-02-02 23:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 2012-02-01 12:48 -800, Philipp Gesang wrote:

> On 2012-01-27 12:23, Michael Green wrote: 
> > I'm having a problem with bibliographies. 
> 
> I believe the bug is in strc-lst.lua. 
> 
> ···· line 526ff. ················································ 
> 
> function lists.location(n) 
> local l = lists.result[n] 
> - return l.references.internal or n 
> + return l and l.references.internal or n 
> end 
> 
> ································································· 
> 
> Works here. 
> 
> Philipp 
> 

Thanks for all your help, but I'm afraid it's still not working for me.

I did two tests. (1) Using this change alone and (2) using this change together with the one you recommended to strc-lst.mkvi
http://archive.contextgarden.net/message/20120201.194023.3e8d62a3.en.html

Alas, the logs were the same both times. If it works for you perhaps there's something amiss on my end. But I don't have the foggiest idea what it might be.



ConTeXt  ver: 2012.01.25 14:16 MKIV  fmt: 2012.2.1  int: english/english

system          > cont-new.mkiv loaded
(/Users/michaelgreen/Applications/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system          > beware: some patches loaded from cont-new.mkiv
)
system          > 2012bib.top loaded
(2012bib.top)
fonts           > latin modern fonts are not preloaded
languages       > language en is active
publications    > wrote a new auxiliary file \jobname.aux
This is BibTeX, Version 0.99d (TeX Live 2011)
The top-level auxiliary file: 2012bib.aux
The style file: cont-no.bst
Database file #1: test.bib
publications    > loading formatting style from bibl-apa
(/Users/michaelgreen/Applications/context/tex/texmf-context/tex/context/bib/bibl-apa.tex){/Users/michaelgreen/Applications/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts           > preloading latin modern fonts (second stage)
fonts           > typescripts > unknown: library 'loc'
{/Users/michaelgreen/Applications/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/Users/michaelgreen/Applications/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts           > fallback modern rm 12pt is loaded
check           > missing or ungrouped '=' after 'pubs' in line 5 (68>:)
publications    > loading database from 2012bib.bbl
(2012bib.bbl)
! Extra \endgroup.

system          > tex > error on line 5 in file 2012bib.tex: Extra  ...

 1     \setupbibtex[database=test]
 2     \setuppublications[alternative=apa]
 3     
 4     \starttext
 5 >>  Here is a cite command: \cite[hh2010a]
 6     
 7     \stoptext
 8     \endinput
 9     %\placepublications[criterium=all]
10     


\docite ...else \donumberedcite {#1}\fi \endgroup 
                                                  
<to be read again> 
                    
l.5 Here is a cite command: \cite[hh2010a]
                                          
? 

---- Example file ---------------------------------------- 
 
\setupbibtex[database=test] 
\setuppublications[alternative=apa] 
 
\starttext 
Here is a cite command: \cite[hh2010a] 
\stoptext 

---- test.bib ---------------------------------------- 
@ARTICLE{hh2010a,
  author = {Hans Hagen},
  title = {The Font Name Mess},
  journal = {MAPS},
  year = {2010},
  volume = {40},
  pages = {2-8},
  keywords = {context},
}
___________________________________________________________________________________
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] 7+ messages in thread
* Re: strc-lst.lua [was: Bibliography problem]
@ 2012-02-03  4:22 Michael Green
  2012-02-03 14:04 ` Philipp Gesang
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Green @ 2012-02-03  4:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 2012-02-02 15:46 -800, Philipp Gesang wrote:
> On 2012-02-02 15:26, Michael Green wrote: 
> > On 2012-02-01 12:48 -800, Philipp Gesang wrote: 
> > 
> > Thanks for all your help, but I'm afraid it's still not working for me. 
> > 
> > I did two tests. (1) Using this change alone and (2) using this change together with the one you recommended to strc-lst.mkvi 
> > http://archive.contextgarden.net/message/20120201.194023.3e8d62a3.en.html 
> 
> I believe the second one should already have fixed it. Have you 
> run “context --make” after you modified both files? 

Aha! That's what I didn't do. Thank you very much!

So, of course, there's another problem.

If I add "\placepublications[criterium=all]", I get errors that appear to be related to what we changed. Note that if I press return twice, the document is produced as expected.

Thanks again for the help.

mjg

---- file ----------------------------

\setupbibtex[database=test]
\setuppublications[alternative=apa]

\starttext
Here is a cite command: \cite[hh2010a]
\placepublications[criterium=all]

\stoptext
\endinput
--------------------------------------

---- test.bib ---------------------

@ARTICLE{hh2010a,
  author = {Hans Hagen},
  title = {The Font Name Mess},
  journal = {MAPS},
  year = {2010},
  volume = {40},
  pages = {2-8},
  keywords = {context},
}
--------------------------------------

---- log ---------------------------
ConTeXt  ver: 2012.01.25 14:16 MKIV  fmt: 2012.2.2  int: english/english

system          > cont-new.mkiv loaded
(/Users/michaelgreen/Applications/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system          > beware: some patches loaded from cont-new.mkiv
)
system          > 2012bib.top loaded
(2012bib.top)
fonts           > latin modern fonts are not preloaded
languages       > language en is active
publications    > wrote a new auxiliary file \jobname.aux
This is BibTeX, Version 0.99d (TeX Live 2011)
The top-level auxiliary file: 2012bib.aux
The style file: cont-no.bst
Database file #1: test.bib
publications    > loading formatting style from bibl-apa
(/Users/michaelgreen/Applications/context/tex/texmf-context/tex/context/bib/bibl-apa.tex){/Users/michaelgreen/Applications/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts           > preloading latin modern fonts (second stage)
fonts           > typescripts > unknown: library 'loc'
{/Users/michaelgreen/Applications/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/Users/michaelgreen/Applications/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts           > fallback modern rm 12pt is loaded
publications    > loading database from 2012bib.bbl
(2012bib.bbl)
publications    > placing all entries, use 'text' to be more selective
! LuaTeX error ...text/tex/texmf-context/tex/context/base/strc-lst.lua:529: attempt to index local 'l' (a nil value)
stack traceback:
	...text/tex/texmf-context/tex/context/base/strc-lst.lua:529: in function 'location'
	...text/tex/texmf-context/tex/context/base/strc-lst.lua:692: in function 'listlocation'
	<main ctx instance>:1: in main chunk.

system          > tex > error on line 4 in file 2012bib.tex: LuaTeX error  ...

 1     \setupbibtex[database=test]
 2     \setuppublications[alternative=apa]
 3     
 4 >>  \starttext
 5     Here is a cite command: \cite[hh2010a]
 6     \placepublications[criterium=all]
 7     
 8     \stoptext
 9     \endinput
10     


\ctxcommand ...\directlua \zerocount {commands.#1}
                                                  
<inserted text> ...cation {\structurelistlocation 
                                                  }\fi \doifstructurelisthas...
\strc_lists_apply_renderingsetup ...enderingsetup 
                                                  \edef \currentlistalternat...
l.4 }
     
\typesetpubslist ...hacks.flush("\@@pbsorttype ")}
                                                  \stoppacked \endgroup 
\dodoplacepublications ...sttrue \typesetpubslist 
                                                  \inpublistfalse \global \a...
...
l.6 \placepublications[criterium=all]
                                     
? 
! LuaTeX error ...text/tex/texmf-context/tex/context/base/strc-lst.lua:529: attempt to index local 'l' (a nil value)
stack traceback:
	...text/tex/texmf-context/tex/context/base/strc-lst.lua:529: in function 'location'
	...text/tex/texmf-context/tex/context/base/strc-lst.lua:692: in function 'listlocation'
	<main ctx instance>:1: in main chunk.

system          > tex > error on line 4 in file 2012bib.tex: LuaTeX error  ...

 1     \setupbibtex[database=test]
 2     \setuppublications[alternative=apa]
 3     
 4 >>  \starttext
 5     Here is a cite command: \cite[hh2010a]
 6     \placepublications[criterium=all]
 7     
 8     \stoptext
 9     \endinput
10     


\ctxcommand ...\directlua \zerocount {commands.#1}
                                                  
<inserted text> ...cation {\structurelistlocation 
                                                  }\fi \doifstructurelisthas...
\strc_lists_apply_renderingsetup ...enderingsetup 
                                                  
l.4 }
     
\typesetpubslist ...hacks.flush("\@@pbsorttype ")}
                                                  \stoppacked \endgroup 
\dodoplacepublications ...sttrue \typesetpubslist 
                                                  \inpublistfalse \global \a...
...
l.6 \placepublications[criterium=all]
                                     
? 
backend         > xmp > using file '/Users/michaelgreen/Applications/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
pages           > flushing realpage 1, userpage 1, subpage 1
 )</Users/michaelgreen/Applications/context/tex/texmf/fonts/opentype/public/lm/lmroman10-italic.otf></Users/michaelgreen/Applications/context/tex/texmf/fonts/opentype/public/lm/lmroman10-regular.otf>
mkiv lua stats  > used config file          - selfautoparent:texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path           - /Users/michaelgreen/Applications/context/tex/texmf-cache/luatex-cache/context/2448223e6631addb83df348d74153606
mkiv lua stats  > resource resolver         - loadtime 0.010 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 16 found files, scanned paths: 
mkiv lua stats  > stored bytecode data      - 301 modules, 65 tables, 366 chunks
mkiv lua stats  > cleaned up reserved nodes - 39 nodes, 9 lists of 431
mkiv lua stats  > node memory usage         - 2 glue, 2 penalty, 9 attribute, 28 glue_spec, 3 attribute_list
mkiv lua stats  > node list callback tasks  - 6 unique task lists, 5 instances (re)created, 189 calls
mkiv lua stats  > used backend              - pdf (backend for directly generating pdf output)
mkiv lua stats  > loaded patterns           - en::2
mkiv lua stats  > jobdata time              - 0.000 seconds saving, 0.000 seconds loading
mkiv lua stats  > callbacks                 - 271 direct, 976 indirect, 1247 total
mkiv lua stats  > lxml preparation time     - 0.000 seconds, 0 nodes, 11 lpath calls, 0 cached calls
mkiv lua stats  > interactive elements      - 0 references, 1 destinations
mkiv lua stats  > result saved in file      - 2012bib.pdf
mkiv lua stats  > loaded fonts              - 3 files: lmmath-regular.otf lmroman10-italic.otf lmroman10-regular.otf
mkiv lua stats  > fonts load time           - 0.220 seconds 
mkiv lua stats  > luatex banner             - this is luatex, version beta-0.70.1-2011051908 (rev 4277)
mkiv lua stats  > control sequences         - 32211 of 65536 + 100000
mkiv lua stats  > current memory usage      - 41 MB (ctx: 42 MB)
mkiv lua stats  > runtime                   - 4.544 seconds, 1 processed pages, 1 shipped pages, 0.220 pages/second

mtx-context     | fatal error: return code: 1localhost:2012 bibliography michaelgreen$ 

--------------------------------------

___________________________________________________________________________________
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] 7+ messages in thread
* Re: strc-lst.lua [was: Bibliography problem]
@ 2012-02-03 17:23 Michael Green
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Green @ 2012-02-03 17:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 2012-02-03 06:04 -800, Philipp Gesang wrote:
> On 2012-02-02 20:22, Michael Green wrote: 
> > 
> > If I add "\placepublications[criterium=all]", I get errors that appear to be related to what we changed...
> 
> Wait a sec -- this should have been fixed by the modification to strc-lst.lua.

You're right. I made a simple error in modifying strc-lst.lua. I typed 1 (numeral) rather than l (letter). Now it all works as you said it should. Thanks!
___________________________________________________________________________________
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] 7+ messages in thread

end of thread, other threads:[~2012-02-03 17:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-27 20:23 Bibliography problem Michael Green
2012-02-01 20:48 ` strc-lst.lua [was: Bibliography problem] Philipp Gesang
2012-02-02 23:26 Michael Green
2012-02-02 23:46 ` Philipp Gesang
2012-02-03  4:22 Michael Green
2012-02-03 14:04 ` Philipp Gesang
2012-02-03 17:23 Michael Green

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