Bibliography related questions
Hello, I am trying to get references working with Context as well as it did with Biblatex. Since I didn't find anything helpful in the documentation and the mailing-list, I ask here. My setup at the moment is the following : \usemodule[bib] \usemodule[bibltx] \setupbibtex[database=test] \setuppublications[alternative=apa-fr] \setupcolors[state=start] \setupinteraction[state=start,color=darkgreen] - Can I get hyperlinks working with references in Context ? For example, with Biblatex with a citation and its reference, if I select the authoryear style, then I get : "my citation" (author year). And the reader can click on the year and be redirected to the reference in the bibliography. The year is a hyperlink. Can we get the same behaviour with Context ? - Also, I have tried to get the following pattern for my references : (author year, page number). It is the pattern of the Chicago manual of style (http://library.williams.edu/citing/styles/chicago2.php). To get this style, I have tried for example the following : \cite[extras={, p. 41}][guerrien2008theorie] But instead of the pattern (author year, page number), I get (author, year, page number). Can I remove the comma between author and year ? - Finally, is my setup wrong ? Indeed, with the setup I have copy-pasted above my bibliography remains empty. Sincerely, Alexandre Krispin
- Can I get hyperlinks working with references in Context ? For example, with Biblatex with a citation and its reference, if I select the authoryear style, then I get : "my citation" (author year). And the reader can click on the year and be redirected to the reference in the bibliography. The year is a hyperlink. Can we get the same behaviour with Context ?
Unfortunately, interaction only works if one uses the default ref-style, with the shitty "[1]". Then this is clickable. Other alternatives like authoryear are NOT clickable. +1 for implementing interaction for other reference styles.
Hi, On 22.09.2011 12:03, Christian wrote:
- Can I get hyperlinks working with references in Context ? For example, with Biblatex with a citation and its reference, if I select the authoryear style, then I get : "my citation" (author year). And the reader can click on the year and be redirected to the reference in the bibliography. The year is a hyperlink. Can we get the same behaviour with Context ?
Unfortunately, interaction only works if one uses the default ref-style, with the shitty "[1]". Then this is clickable. Other alternatives like authoryear are NOT clickable.
+1 for implementing interaction for other reference styles.
I'm using ConTeXt version 201100920 00:09 MKIV and I get clickable references with \cite[my_reference_tag] (the "shitty [1]" which I use mostly) and also with \cite[author][my_reference_tag]. I don't have something special in my setup: \setupinteraction[state=start] \setupbibtex[database={thesis}] \setuppublications[alternative=ams, refcommand=num] \setupcite[num][lastpubsep={, }] \setupcite[author][left=, right=] HTH, Stefan
Hi,
On 22.09.2011 12:03, Christian wrote:
- Can I get hyperlinks working with references in Context ? For example, with Biblatex with a citation and its reference, if I select the authoryear style, then I get : "my citation" (author year). And the reader can click on the year and be redirected to the reference in the bibliography. The year is a hyperlink. Can we get the same behaviour with Context ?
Unfortunately, interaction only works if one uses the default ref-style, with the shitty "[1]". Then this is clickable. Other alternatives like authoryear are NOT clickable.
+1 for implementing interaction for other reference styles.
I'm using ConTeXt version 201100920 00:09 MKIV and I get clickable references with \cite[my_reference_tag] (the "shitty [1]" which I use mostly) and also with \cite[author][my_reference_tag]. I don't have something special in my setup:
\setupinteraction[state=start] \setupbibtex[database={thesis}] \setuppublications[alternative=ams, refcommand=num] \setupcite[num][lastpubsep={, }] \setupcite[author][left=, right=]
Thanks for your answer. Same here. But NOT with refcommand=authoryear or refcommand=authoryears I'm afraid. I can not imagine that it's supposed to behave like this.
On 22-9-2011 12:03, Christian wrote:
- Can I get hyperlinks working with references in Context ? For example, with Biblatex with a citation and its reference, if I select the authoryear style, then I get : "my citation" (author year). And the reader can click on the year and be redirected to the reference in the bibliography. The year is a hyperlink. Can we get the same behaviour with Context ?
Unfortunately, interaction only works if one uses the default ref-style, with the shitty "[1]". Then this is clickable. Other alternatives like authoryear are NOT clickable.
+1 for implementing interaction for other reference styles.
up to Thomas to add that to the 'todo' list (that he manages) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 09/27/2011 07:50 PM, Hans Hagen wrote:
On 22-9-2011 12:03, Christian wrote:
- Can I get hyperlinks working with references in Context ? For example, with Biblatex with a citation and its reference, if I select the authoryear style, then I get : "my citation" (author year). And the reader can click on the year and be redirected to the reference in the bibliography. The year is a hyperlink. Can we get the same behaviour with Context ?
Unfortunately, interaction only works if one uses the default ref-style, with the shitty "[1]". Then this is clickable. Other alternatives like authoryear are NOT clickable.
with \setupcite[compress=no] you should be able to get links with the more complex styles as well. Best wishes, Taco
-----Ursprüngliche Nachricht----- Von: ntg-context-bounces@ntg.nl [mailto:ntg-context-bounces@ntg.nl] Im Auftrag von Taco Hoekwater Gesendet: Mittwoch, 28. September 2011 10:58 An: mailing list for ConTeXt users Cc: Hans Hagen; Thomas A. Schmitz Betreff: Re: [NTG-context] Bibliography related questions
On 09/27/2011 07:50 PM, Hans Hagen wrote:
On 22-9-2011 12:03, Christian wrote:
- Can I get hyperlinks working with references in Context ? For example, with Biblatex with a citation and its reference, if I select the authoryear style, then I get : "my citation" (author year). And the reader can click on the year and be redirected to the reference in the bibliography. The year is a hyperlink. Can we get the same behaviour with Context ?
Unfortunately, interaction only works if one uses the default ref-style, with the shitty "[1]". Then this is clickable. Other alternatives like authoryear are NOT clickable.
with \setupcite[compress=no] you should be able to get links with the more complex styles as well.
Yes, you are right. But one has to explicitly specify the styles in that command, i.e: \setupcite[authoryears,authoryear][interaccompress=no] With all that together, I can do all that I need. Here's my modified code from the provided samples: ---------------START OF FILE---------------- \setupbibtex[database=sample,sort=author] \setuppublications[alternative=apa-de,sorttype=bbl,refcommand=authoryear] \setupinteraction[state=start,color=darkgreen,style=normal] \setupcite[authoryears,authoryear][compress=no] \def\textpagecite[#1][#2]% {\cite[alternative=authoryear,extras={, S.\,#2}][#1]} \def\pagecite[#1][#2]% {\cite[alternative=authoryears,extras={, S.\,#2}][#1]} \def\indirectpagecite[#1][#2]% {\cite[alternative=authoryears,left={(vgl. },extras={, S.\,#2}][#1]} \starttext \pagecite[Eijkhout1991][3]\\ \indirectpagecite[Eijkhout1991][3]\\ \textpagecite[Eijkhout1991][3] \page[yes] \placepublications[criterium=all] \stoptext ---------------END OF FILE------------------ Thanks to all those who contributed solving this issue!
On Thu 22 Sep 2011, Alexandre Krispin wrote:
I am trying to get references working with Context as well as it did with Biblatex. Since I didn't find anything helpful in the documentation and the mailing-list, I ask here.
It's true that bibliography documentation can be hard to find. The best source is the manual at http://modules.contextgarden.net/bibman , but it is not entirely up to date. In the following I'm going to assume that you're using MkIV.
\usemodule[bib] \usemodule[bibltx]
These are unnecessary. The bib module has been integrated into the core. The bibltx module used to define a \newcommand command for compatibility with some old LaTeX databases, but I don't think it even exists any more. Unless you use \newcommand in your bib file, this should not be a problem. Here's a minimal example which should do what you want: ---8<--- \setupbibtex[database=sample,sort=author] \setuppublications[alternative=apa-fr,sorttype=bbl,refcommand=authoryear] \setupinteraction[state=start,color=darkgreen,style=normal] \setupcite[interaction=start,compress=no] \def\pagecite[#1][#2]% {(\cite[alternative=authoryear,left={},inbetween={ },extras={, p. #2}][#1]} \starttext \cite[alternative=authoryears,inbetween={ },extras={, p. 3}][Eijkhout1991] \pagecite[Eijkhout1991][3] \page[yes] \placepublications[criterium=text] \stoptext ---8<--- This uses ConTeXt's included sample bib file. I'm sure this used to be found automatically in the ConTeXt tree, but in this case I had to copy it into the same directory as the TeX file for it to be found. You can find it in /tex/texmf-context/tex/context/bib/sample.bib . You will see that I use two cite commands. The first is probably the ‘more correct’ way to do it, using the authoryears style. However, this doesn't seem to produce a hyperlink, at least on my version of ConTeXt (from February 2011). I suspect that this may be a bug. The second cite (wrapped in a macro for convenience) modifies the authoryear style instead, which (at least with my setup) does produce a hyperlink. Hope this helps! Pont
Thanks a lot to all ! Yes, I use Context MKIV : ConTeXt ver: 2011.05.18 18:04 MKIV fmt: 2011.8.26 int: english/english The setup pagecite of Pontus Lurcock is exactly what I needed, but even with a minimal example, it does not produce a reference at the end with \completepublications. Here is a minimal example : \setupbibtex[database=sample,sort=author] \setuppublications[alternative=apa-fr,sorttype=bbl,refcommand=authoryear] \setupinteraction[state=start,color=darkgreen,style=normal] \setupcite[interaction=start] \def\pagecite[#1][#2]% {(\cite[alternative=authoryear,left={},inbetween={ },extras={, p. #2}][#1]} \starttext it is a test \pagecite[guerrien2008theorie][41]. \completepublications \stoptext And the following is the database (downloaded from google book in bibtex format) : @Book{ guerrien2008theorie, title = "{La th{\'e}orie {\'e}conomique n{\'e}oclassique: micro{\'e}conomie, macro{\'e}conomie et th{\'e}orie des jeux}", author = "B. Guerrien and E. B{\'e}nicourt", isbn = "9782707154224", series = "Grands Rep{\`e}res. Manuels", url = "http://books.google.com/books?id=8Kx8NwAACAAJ", year = "2008", publisher = "la D{\'e}couverte" } Also, I had to remove "compress=no" in \setupcite[interaction=start,compress=no] to make your setup work. Is it related to my distribution ? I use an up-to-date TeXlive 2011 distribution. 2011-09-23 (金) の 09:58 +1200 に Pontus Lurcock さんは書きました:
\setupbibtex[database=sample,sort=author] \setuppublications[alternative=apa-fr,sorttype=bbl,refcommand=authoryear] \setupinteraction[state=start,color=darkgreen,style=normal] \setupcite[interaction=start,compress=no] \def\pagecite[#1][#2]% {(\cite[alternative=authoryear,left={},inbetween={ },extras={, p. #2}][#1]}
On Fri 23 Sep 2011, Alexandre Krispin wrote:
The setup pagecite of Pontus Lurcock is exactly what I needed, but even with a minimal example, it does not produce a reference at the end with \completepublications.
For \completepublications, as for \placepublications, you need to use \completepublications[criterium=text] .
Also, I had to remove "compress=no" in \setupcite[interaction=start,compress=no] to make your setup work. Is it related to my distribution ? I use an up-to-date TeXlive 2011 distribution.
compress=no is necessary for interaction to work (see http://archive.contextgarden.net/message/20080714.132145.26782c1f.en.html ) -- after a couple of tests I see that using compress=no and \completepublications without criterium=text makes the citation itself disappear. However, adding the [criterium=text] should allow you also to keep the compress=no without problems. Pont
---8<---
\setupbibtex[database=sample,sort=author] \setuppublications[alternative=apa- fr,sorttype=bbl,refcommand=authoryear] \setupinteraction[state=start,color=darkgreen,style=normal] \setupcite[interaction=start,compress=no] \def\pagecite[#1][#2]% {(\cite[alternative=authoryear,left={},inbetween={ },extras={, p. #2}][#1]}
\starttext
\cite[alternative=authoryears,inbetween={ },extras={, p. 3}][Eijkhout1991]
\pagecite[Eijkhout1991][3]
\page[yes]
\placepublications[criterium=text]
\stoptext
---8<---
Thank you for this, it's exactly what I was looking for. The only flaw of this workaround (besides not being the 'proper way') is that the first '(' is not part of the link and therefore not green (but then again, I'll probably set the color of the link to black, anyway). A Fix of linked \cite[alternative=authoryears][reference] still would be nice ;)
On Fri 23 Sep 2011, Christian wrote:
The only flaw of this workaround (besides not being the 'proper way') is that the first '(' is not part of the link and therefore not green (but then again, I'll probably set the color of the link to black, anyway).
A Fix of linked \cite[alternative=authoryears][reference] still would be nice ;)
I've figured out what the problem was: the \setupcite only affects the default authoryear citation style, so if using authoryears (or any others) they need to be explicitly specified. Changing the \setupcite to \setupcite[authoryear,authoryears][interaction=start,compress=no] makes links work for authoryears citations as well. In this case only the author and year are linkified, not the parentheses or page numbers, but at least it's symmetrical. Pont
participants (6)
-
Alexandre Krispin
-
Christian
-
Hans Hagen
-
Pontus Lurcock
-
Stefan Müller
-
Taco Hoekwater