From: Pontus Lurcock <pont@talvi.net>
To: ntg-context@ntg.nl
Subject: Re: Bibliography related questions
Date: Fri, 23 Sep 2011 09:58:58 +1200 [thread overview]
Message-ID: <20110922215858.GH17204@rae.vm.bytemark.co.uk> (raw)
In-Reply-To: <1316684937.14639.17.camel@localhost.localdomain>
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
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2011-09-22 21:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-22 9:48 Alexandre Krispin
2011-09-22 10:03 ` Christian
2011-09-22 15:56 ` Stefan Müller
2011-09-22 21:54 ` Christian
2011-09-27 17:50 ` Hans Hagen
2011-09-28 8:57 ` Taco Hoekwater
2011-10-04 17:17 ` Christian
2011-09-22 21:58 ` Pontus Lurcock [this message]
2011-09-23 7:58 ` Alexandre Krispin
2011-09-23 9:17 ` Pontus Lurcock
2011-09-23 16:04 ` Christian
2011-09-24 0:26 ` Pontus Lurcock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110922215858.GH17204@rae.vm.bytemark.co.uk \
--to=pont@talvi.net \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).