* Mutiple citations doesn't work with compress=no + interaction
@ 2010-06-08 15:34 Michael Murphy
2010-06-08 18:47 ` taco
0 siblings, 1 reply; 7+ messages in thread
From: Michael Murphy @ 2010-06-08 15:34 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1: Type: text/plain, Size: 646 bytes --]
I know that if I want to have clickable hyperlinks for citations, I need
to turn off 'compress' for the citation type:
\setupcite[authoryears][compress=no]
The problem is that this doesn't seem to work: I get an 'unknown
reference' error.
references : unknown reference [][Balachandran2008
references : unknown reference [][Balachandran2008
references : unknown reference [][Balachandran2008
Strangely, this only happens when I want to refer to multiple authors,
e.g. \cite[ref1, ref2, ref3], and everything works fine if I just do
\cite[ref1].
I've attached a minimal example. Where am I going wrong?
--
Michael Murphy
[-- Attachment #2: min_bib.tex --]
[-- Type: text/x-tex, Size: 338 bytes --]
\setupinteraction[state=start]
\usemodule[bib]
\setuppublications[refcommand=authoryears]
\setupcite[authoryears][compress=no]
\starttext
I can cite single authors, like this \cite[Balachandran2008], but when I
try to cite more together, it doesn't work
\cite[Balachandran2008,Borzi2002,Bose2007].
\blank
\placepublications
\stoptext
[-- Attachment #3: min_bib.bbl --]
[-- Type: text/plain, Size: 1222 bytes --]
\setuppublicationlist[samplesize={CKRGO08},totalnumber=3]
\startpublication[k=Balachandran2008,t=article,
a={{Balachandran},{Gong}},y=2008,o={10.1103/PhysRevA.77.012303},
n=1,s=BG08]
\artauthor[]{Vinitha}[V.]{}{Balachandran}
\artauthor[]{Jiangbin}[J.]{}{Gong}
\pubyear{2008}
\arttitle{Adiabatic quantum transport in a spin chain with a moving potential}
\journal{Phys. Rev. A}
\volume{77}
\issue{1}
\pages{012303}
\doi{10.1103/PhysRevA.77.012303}
\stoppublication
\startpublication[k=Borzi2002,t=article,
a={{Borz\`i},{}},y=2002,
n=2,s=BSH02]
\artauthor[]{Alfio}[A.]{}{Borz\`i}
\artauthor[]{Georg}[G.]{}{Stadler}
\artauthor[]{Ulrich}[U.]{}{Hohenester}
\pubyear{2002}
\arttitle{Optimal quantum control in nanostructures: Theory and application to
a generic three-level system}
\journal{Phys. Rev. A}
\volume{66}
\stoppublication
\startpublication[k=Bose2007,t=article,
a={{Bose}},y=2007,o={http://dx.doi.org/10.1080/00107510701342313},
n=3,s=Bos07]
\artauthor[]{Sougato}[S.]{}{Bose}
\pubyear{2007}
\arttitle{Quantum communication through spin chain dynamics: an introductory
overview}
\journal{Contemporary Physics}
\volume{48}
\issue{1}
\pages{13}
\doi{http://dx.doi.org/10.1080/00107510701342313}
\stoppublication
[-- Attachment #4: Type: text/plain, Size: 486 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] 7+ messages in thread
* Re: Mutiple citations doesn't work with compress=no + interaction
2010-06-08 15:34 Mutiple citations doesn't work with compress=no + interaction Michael Murphy
@ 2010-06-08 18:47 ` taco
2010-06-09 9:21 ` Michael Murphy
0 siblings, 1 reply; 7+ messages in thread
From: taco @ 2010-06-08 18:47 UTC (permalink / raw)
To: mailing list for ConTeXt users
Michael Murphy wrote:
> I know that if I want to have clickable hyperlinks for citations, I need
> to turn off 'compress' for the citation type:
>
> \setupcite[authoryears][compress=no]
>
> The problem is that this doesn't seem to work: I get an 'unknown
> reference' error.
>
> references : unknown reference [][Balachandran2008
> references : unknown reference [][Balachandran2008
> references : unknown reference [][Balachandran2008
>
> Strangely, this only happens when I want to refer to multiple authors,
> e.g. \cite[ref1, ref2, ref3], and everything works fine if I just do
> \cite[ref1].
>
> I've attached a minimal example. Where am I going wrong?
It also only happens in mkiv, something is broken there. As is
usual in the mkiv version of the bib module, I can't figure
it out :(
However, here is a workaround:
%%%%%%%%
\setupinteraction[state=start]
\usemodule[bib]
\let\NORMALcite\cite
\newif\ifSEEN
\def\cite#1[#2]{\SEENfalse
\def\processitem##1{\ifSEEN, \else\SEENtrue \fi \NORMALcite[##1]}%
(\processcommalist[#2]\processitem )}
\setuppublications[refcommand=authoryears]
\setupcite[authoryears][compress=no,left=,right=]
\starttext
..
%%%%%%%%
Best wishes,
Taco
___________________________________________________________________________________
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: Mutiple citations doesn't work with compress=no + interaction
2010-06-08 18:47 ` taco
@ 2010-06-09 9:21 ` Michael Murphy
2010-06-09 9:24 ` Taco Hoekwater
0 siblings, 1 reply; 7+ messages in thread
From: Michael Murphy @ 2010-06-09 9:21 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 08/06/10 20:47, taco wrote:
>
> It also only happens in mkiv, something is broken there. As is
> usual in the mkiv version of the bib module, I can't figure
> it out :(
>
> However, here is a workaround:
>
> ...
>
... and indeed, this works for the minimal example, but in my actual
document, I get an error:
! Undefined control sequence.
\dododescriptioncomponent ...entdescriptioncoding
\s!tex \fi \ifx
and I have no idea why. I guess I'll play around some more.
--
Michael Murphy
___________________________________________________________________________________
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: Mutiple citations doesn't work with compress=no + interaction
2010-06-09 9:21 ` Michael Murphy
@ 2010-06-09 9:24 ` Taco Hoekwater
2010-06-09 9:34 ` Michael Murphy
0 siblings, 1 reply; 7+ messages in thread
From: Taco Hoekwater @ 2010-06-09 9:24 UTC (permalink / raw)
To: mailing list for ConTeXt users
Michael Murphy wrote:
> On 08/06/10 20:47, taco wrote:
>>
>> It also only happens in mkiv, something is broken there. As is
>> usual in the mkiv version of the bib module, I can't figure
>> it out :(
>>
>> However, here is a workaround:
>>
>> ...
> >
>
> ... and indeed, this works for the minimal example, but in my actual
> document, I get an error:
>
> ! Undefined control sequence.
> \dododescriptioncomponent ...entdescriptioncoding
> \s!tex \fi \ifx
>
> and I have no idea why. I guess I'll play around some more.
Wild guess: can you try with this definition in the setup part
of your document?
\unexpanded\def\dodescriptioncomponent
{\doifelsedescriptioncomponent
\nododescriptioncomponent\dododescriptioncomponent}
Best wishes,
Taco
___________________________________________________________________________________
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: Mutiple citations doesn't work with compress=no + interaction
2010-06-09 9:24 ` Taco Hoekwater
@ 2010-06-09 9:34 ` Michael Murphy
2010-06-09 11:02 ` Taco Hoekwater
0 siblings, 1 reply; 7+ messages in thread
From: Michael Murphy @ 2010-06-09 9:34 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: text/plain, Size: 999 bytes --]
On 09/06/10 11:24, Taco Hoekwater wrote:
> Michael Murphy wrote:
>> On 08/06/10 20:47, taco wrote:
>>>
>>> It also only happens in mkiv, something is broken there. As is
>>> usual in the mkiv version of the bib module, I can't figure
>>> it out :(
>>>
>>> However, here is a workaround:
>>>
>>> ...
>> >
>>
>> ... and indeed, this works for the minimal example, but in my actual
>> document, I get an error:
>>
>> ! Undefined control sequence.
>> \dododescriptioncomponent ...entdescriptioncoding
>> \s!tex \fi \ifx
>>
>> and I have no idea why. I guess I'll play around some more.
>
> Wild guess: can you try with this definition in the setup part
> of your document?
>
> \unexpanded\def\dodescriptioncomponent
> {\doifelsedescriptioncomponent
> \nododescriptioncomponent\dododescriptioncomponent}
>
> Best wishes,
> Taco
Thanks for the code, but that turns out not to help. The problem seems
to be when I want to have references in footnotes (see attached minimal
example).
--
Michael Murphy
[-- Attachment #2: min_bib_fn.bbl --]
[-- Type: text/plain, Size: 1222 bytes --]
\setuppublicationlist[samplesize={CKRGO08},totalnumber=3]
\startpublication[k=Balachandran2008,t=article,
a={{Balachandran},{Gong}},y=2008,o={10.1103/PhysRevA.77.012303},
n=1,s=BG08]
\artauthor[]{Vinitha}[V.]{}{Balachandran}
\artauthor[]{Jiangbin}[J.]{}{Gong}
\pubyear{2008}
\arttitle{Adiabatic quantum transport in a spin chain with a moving potential}
\journal{Phys. Rev. A}
\volume{77}
\issue{1}
\pages{012303}
\doi{10.1103/PhysRevA.77.012303}
\stoppublication
\startpublication[k=Borzi2002,t=article,
a={{Borz\`i},{}},y=2002,
n=2,s=BSH02]
\artauthor[]{Alfio}[A.]{}{Borz\`i}
\artauthor[]{Georg}[G.]{}{Stadler}
\artauthor[]{Ulrich}[U.]{}{Hohenester}
\pubyear{2002}
\arttitle{Optimal quantum control in nanostructures: Theory and application to
a generic three-level system}
\journal{Phys. Rev. A}
\volume{66}
\stoppublication
\startpublication[k=Bose2007,t=article,
a={{Bose}},y=2007,o={http://dx.doi.org/10.1080/00107510701342313},
n=3,s=Bos07]
\artauthor[]{Sougato}[S.]{}{Bose}
\pubyear{2007}
\arttitle{Quantum communication through spin chain dynamics: an introductory
overview}
\journal{Contemporary Physics}
\volume{48}
\issue{1}
\pages{13}
\doi{http://dx.doi.org/10.1080/00107510701342313}
\stoppublication
[-- Attachment #3: min_bib_fn.tex --]
[-- Type: text/x-tex, Size: 754 bytes --]
\setupinteraction[state=start]
\usemodule[bib]
\setuppublications[refcommand=authoryears]
\let\NORMALcite\cite
\newif\ifSEEN
\def\cite#1[#2]{\SEENfalse
\def\processitem##1{\ifSEEN, \else\SEENtrue \fi \NORMALcite[##1]}%
(\processcommalist[#2]\processitem )}
\unexpanded\def\dodescriptioncomponent
{\doifelsedescriptioncomponent
\nododescriptioncomponent\dododescriptioncomponent}
\setupcite[authoryears][compress=no,left=,right=]
\starttext
I can cite single authors, like this \cite[Balachandran2008], and now I
can also do more than one\footnote{but unfortunately I get errors when I
have citations
\cite[Balachandran2008]
in footnotes}%
citation \cite[Balachandran2008,Borzi2002,Bose2007].
\blank
\placepublications
\stoptext
[-- Attachment #4: Type: text/plain, Size: 486 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] 7+ messages in thread
* Re: Mutiple citations doesn't work with compress=no + interaction
2010-06-09 9:34 ` Michael Murphy
@ 2010-06-09 11:02 ` Taco Hoekwater
2010-06-09 12:31 ` Michael Murphy
0 siblings, 1 reply; 7+ messages in thread
From: Taco Hoekwater @ 2010-06-09 11:02 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: text/plain, Size: 782 bytes --]
Michael Murphy wrote:
>
> Thanks for the code, but that turns out not to help. The problem seems
> to be when I want to have references in footnotes (see attached minimal
> example).
Ok, now I see. Attached is a new version of min_bib_fn.tex that fixes
citations in footnotes. However ... something totally weird happens
in the current context and beta's: the footnote appears to be repeated
inside the body text.
For some reason I do not understand, \placepublications also seems to
process the footnote list (and because there is no proper definition
for handling them, rubbish appears on the top of the publication list).
This problem is not caused by the \cite inside the \footnote, nor by the
redefinition of \cite, it happens without those as well.
Best wishes,
Taco
[-- Attachment #2: min_bib_fn.tex --]
[-- Type: application/x-tex, Size: 635 bytes --]
[-- Attachment #3: Type: text/plain, Size: 486 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] 7+ messages in thread
* Re: Mutiple citations doesn't work with compress=no + interaction
2010-06-09 11:02 ` Taco Hoekwater
@ 2010-06-09 12:31 ` Michael Murphy
0 siblings, 0 replies; 7+ messages in thread
From: Michael Murphy @ 2010-06-09 12:31 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 09/06/10 13:02, Taco Hoekwater wrote:
> Michael Murphy wrote:
>>
>> Thanks for the code, but that turns out not to help. The problem seems
>> to be when I want to have references in footnotes (see attached
>> minimal example).
>
> Ok, now I see. Attached is a new version of min_bib_fn.tex that fixes
> citations in footnotes. However ... something totally weird happens
> in the current context and beta's: the footnote appears to be repeated
> inside the body text.
>
> For some reason I do not understand, \placepublications also seems to
> process the footnote list (and because there is no proper definition
> for handling them, rubbish appears on the top of the publication list).
>
> This problem is not caused by the \cite inside the \footnote, nor by the
> redefinition of \cite, it happens without those as well.
Thanks, that works a treat. I also noticed the thing with the footnote,
but it doesn't happen in my main document, so I wondered if it had
something to do with the minimal setup. But you're right, it seems to
always happen with \placepublications.
Anyway, I've now modified things slightly so that I can still use the
optional forms of \cite (like \cite[authoryear]), so my file now looks like
\setupinteraction[state=start]
\usemodule[bib]
\setuppublications[refcommand=authoryears, criterium=all]
\let\NORMALcite\cite
\newif\ifSEEN
\unexpanded\def\cite[#1]{\strictdoifnextoptionalelse{\NORMALcite[#1]}%
{\domycite[#1]}}
\def\domycite#1[#2]{\SEENfalse
\def\processitem##1{\ifSEEN, \else\SEENtrue \fi \NORMALcite[##1]}%
(\processcommalist[#2]\processitem )}
\setupcite[authoryears][compress=no,left=,right=]
\setupcite[authoryear][compress=no]
...
Of course, the other disadvantage of this at present is that I don't get
'and' separating the last two references when I use \domycite. But I can
live with that (on screen at least, for printing I can revert to the old
behaviour).
--
Michael Murphy
___________________________________________________________________________________
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:[~2010-06-09 12:31 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-08 15:34 Mutiple citations doesn't work with compress=no + interaction Michael Murphy
2010-06-08 18:47 ` taco
2010-06-09 9:21 ` Michael Murphy
2010-06-09 9:24 ` Taco Hoekwater
2010-06-09 9:34 ` Michael Murphy
2010-06-09 11:02 ` Taco Hoekwater
2010-06-09 12:31 ` Michael Murphy
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).