I want to be able to write, in my text, \cite[myKey] (where myKey is the key of a record in my .bib file), and have this appear in print as: [<a number>] linked to the bibliograpy page where it (<a number>) occurs. I've been puzzling over bibmod-doc.pdf. I think the solution has to do with the commands \setuppublications and \setupcite, but since bibmod-doc never says what these commands do, it's very difficult. I'm guessing \setuppublications might be able to control what argument I should use in the \cite[] command. I'm guessing \setupcite might control how a citation will be printed in the text. (If this is true, the manual should say so so the reader doesn't have to guess.) One cryptic line tells me: "refcommand the default option for \cite" just like that. Based on this, I'm guessing refcommand=key will let me write things like \cite[myFirstKey]. The manual goes on to clear up the confusion by explaining: "The \cite command has a lot of alternatives, as could be seen above in the setting of ‘refcommand’." That's it---no mention of what \setupcite does. Based on this, I'm hoping that \setupcite[num] will cause the citation to be printed as [<some number>], e.g., [1]. So, I'm using: \usemodule[bib] \setupbibtex[database=myProject] \setuppublications[refcommand=key,alternative=apa,setupinteraction=start,numbering=yes] \setuppublicationlist[] \setupcite[num][] ... \placepublications[criterium=all] The bibliography prints out, but citations appear as empty brackets: "[]". I want them to be numbers linked to the appearance of the same number in the bibliography. There must be a way of doing this?
Michael Saunders wrote:
One cryptic line tells me:
"refcommand the default option for \cite"
just like that. Based on this, I'm guessing refcommand=key will let me write things like \cite[myFirstKey]. The manual goes on to clear up the confusion by explaining:
Well, no. You always use keys as arguments, the option controls the resulting output. It called an option because it controls the optional argument of \cite. A reference key is mandatory, because otherwise the whole command would be pointless.
\setuppublications[refcommand=key,alternative=apa,setupinteraction=start,numbering=yes]
Try \setuppublications[alternative=num] Best wishes, Taco
In mkIV the option seems mandatory too. Otherwise I get the empty brackets. But only the authoryear and authoryears works for me. Not authornum.
This is how I use it. (following the habit of using natbib in Latex)
\usemodule[bib]
\setupbibtex
[database={Manuscript},
sort=author]
\setuppublications[numbering=yes]
\def\LocalRefList {\subject{References}\placepublications[criterium=chapter, option=continue]}
\def\citet[#1]{\cite[authoryear][#1]}
\def\citep[#1]{\cite[authoryears][#1]}
The line
\def\LocalRefList {\subject{References}\placepublications[criterium=chapter, option=continue]}
worked in mkII but not in mkIV.
Best regards,
Salil
________________________________
From: Taco Hoekwater
One cryptic line tells me:
"refcommand the default option for \cite"
just like that. Based on this, I'm guessing refcommand=key will let me write things like \cite[myFirstKey]. The manual goes on to clear up the confusion by explaining:
Well, no. You always use keys as arguments, the option controls the resulting output. It called an option because it controls the optional argument of \cite. A reference key is mandatory, because otherwise the whole command would be pointless.
\setuppublications[refcommand=key,alternative=apa,setupinteraction=start,numbering=yes]
Try \setuppublications[alternative=num] 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 ___________________________________________________________________________________
participants (3)
-
Michael Saunders
-
Salil Sayed
-
Taco Hoekwater