[NTG-context] [BUG]: `referenceprefix' in `\setuphead' ruins `\cite'

Alexander Shukaev haroogan at gmail.com
Fri May 29 17:20:13 CEST 2015


Hello,

I think I've experienced a severe bug here.  Consider the following:

\setuphead
[chapter][%
  referenceprefix={chapter},
]

...
\cite[xxx]
...

\startpublication[
  k={xxx},
  t={...},
  a={...},
  y={...},
]
...
\stoppublication


\startchapter
[title={BIBLIOGRAPHY}]

\whitespace
\placepublications

\stopchapter

will render [[error 2]] in place of `\cite[xxx]' because of
`referenceprefix' in `\setuphead'.  Why?  I don't believe `referenceprefix'
in `\setuphead' should have something to do with `\cite' at all.

Thankfully, it's pretty rare that one uses `chapter' for bibliography, but
still I think it's better to fix this.  For instance, right now the
following works fine for me:

\setuphead
[chapter][%
  referenceprefix={chapter},
]

\setuphead
[title][%
  referenceprefix={},
]

...
\cite[xxx]
...

\startpublication[
  k={xxx},
  t={...},
  a={...},
  y={...},
]
...
\stoppublication


\starttitle
[title={BIBLIOGRAPHY}]

\whitespace
\placepublications

\stoptitle

NOTE: It's extremely important to explicitly do `referenceprefix={}' for
`title' because somehow `title' inherits `referenceprefix={chapter}' from
`chapter'; and therefore, not doing `referenceprefix={}' will again result
in [[error 2]] in place of `\cite[xxx]'.

Looking forward to your feedback.

Kind regards,
Alexander
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20150529/f420358a/attachment.html>


More information about the ntg-context mailing list