ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [BUG]: `referenceprefix' in `\setuphead' ruins `\cite'
@ 2015-05-29 15:20 Alexander Shukaev
  2015-05-29 15:55 ` Alexander Shukaev
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Shukaev @ 2015-05-29 15:20 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1312 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 3855 bytes --]

[-- Attachment #2: 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] 2+ messages in thread

* Re: [BUG]: `referenceprefix' in `\setuphead' ruins `\cite'
  2015-05-29 15:20 [BUG]: `referenceprefix' in `\setuphead' ruins `\cite' Alexander Shukaev
@ 2015-05-29 15:55 ` Alexander Shukaev
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Shukaev @ 2015-05-29 15:55 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 2187 bytes --]

On Fri, May 29, 2015 at 5:20 PM, Alexander Shukaev <haroogan@gmail.com>
wrote:

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

​It seems to be even worse.  It's enough to simple have `chapter' somewhere
to trigger the bug (no necessary to put `chapter' around
`\placepublications':

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

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

...
\cite[xxx]
...

\startchapter
[title={Chapter}]
\stopchapter

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

\placepublications

will result in [[error 2]] again, and there seems to be no workaround.

[-- Attachment #1.2: Type: text/html, Size: 6563 bytes --]

[-- Attachment #2: 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] 2+ messages in thread

end of thread, other threads:[~2015-05-29 15:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-29 15:20 [BUG]: `referenceprefix' in `\setuphead' ruins `\cite' Alexander Shukaev
2015-05-29 15:55 ` Alexander Shukaev

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