Hi All! Have an issue getting \cite command working properly. Working on a undergraduate thesis in physics and the bibliography. I have read in bibmod-doc.pdf(Tacos manual) and also on the wiki about how to make this work properly. So I did set this in the preamble of my document. It sees the referenser.bib and a proper *.bbl file is produced. \usemodule [bib] \usemodule[bibltx] \setupbibtex[database=referenser] \setuppublications [alternative=aps,criterium=all] \starttext \cite[ref] does only display [1] as a result. \stoptext I tried \cite[authoryear][ref] but it gets some annoying results. Because i want the result be like this in the output Example: These statements has been declared by [authorlastname,(year)] Please give a code sample how to make this work! Thanks in advance! //Janneman
Jan-Erik Hägglöf wrote:
Hi All!
Have an issue getting \cite command working properly. Working on a undergraduate thesis in physics and the bibliography.
I have read in bibmod-doc.pdf(Tacos manual) and also on the wiki about how to make this work properly. So I did set this in the preamble of my document. It sees the referenser.bib and a proper *.bbl file is produced.
\usemodule [bib] \usemodule[bibltx] \setupbibtex[database=referenser] \setuppublications [alternative=aps,criterium=all]
\starttext \cite[ref] does only display [1] as a result. \stoptext
I tried \cite[authoryear][ref] but it gets some annoying results. Because i want the result be like this in the output
Example: These statements has been declared by [authorlastname,(year)]
Please give a code sample how to make this work!
Why are you using the "aps" style if you don't want aps-style output? That does not make sense. It seems that "apa" is much closer to what you want? Best wishes, Taco
ons 2009-01-21 klockan 13:04 +0100 skrev Taco Hoekwater:
Jan-Erik Hägglöf wrote:
Hi All!
Have an issue getting \cite command working properly. Working on a undergraduate thesis in physics and the bibliography.
I have read in bibmod-doc.pdf(Tacos manual) and also on the wiki about how to make this work properly. So I did set this in the preamble of my document. It sees the referenser.bib and a proper *.bbl file is produced.
\usemodule [bib] \usemodule[bibltx] \setupbibtex[database=referenser] \setuppublications [alternative=aps,criterium=all]
\starttext \cite[ref] does only display [1] as a result. \stoptext
I tried \cite[authoryear][ref] but it gets some annoying results. Because i want the result be like this in the output
Example: These statements has been declared by [authorlastname,(year)]
Please give a code sample how to make this work!
Why are you using the "aps" style if you don't want aps-style output? That does not make sense. It seems that "apa" is much closer to what you want?
Best wishes, Taco
In apa-style there is "author (year)" appearance, and I just want "[authorlastname,(year)]" result with those hooks. Well if it is easier to modify it in apa so it is better. Just that aps=american physical society and I thought it has several sub-standards. Just referring to what styles are used in several books about physics. But maybe I have to investigate it further. //Janneman
Jan-Erik Hägglöf wrote:
Example: These statements has been declared by [authorlastname,(year)]
Please give a code sample how to make this work!
Why are you using the "aps" style if you don't want aps-style output? That does not make sense. It seems that "apa" is much closer to what you want?
Best wishes, Taco
In apa-style there is "author (year)" appearance, and I just want "[authorlastname,(year)]" result with those hooks.
The bib module has no support for just "authorlastname" (as opposed to "author"), if you want that then you have to edit the bbl file. For the rest of the citation formatting: it is easiest to define your own macro: \def\mycite[#1]{[{\cite[author][#1]},({\cite[year][#1]})]} Best wishes, Taco
HI! So I did as you proposed \def\mycite[#1]{[{\cite[author][#1]},({\cite[year][#1]})]} in my preamble environment file also I did \setupbibtex[database=referenser] \setuppublications [alternative=apa,criterium=all] % inherits from adityas thesis example Do not why it is there \let\initializepubslist\relax \def\mycite[#1]{[{\cite[author][#1]},({\cite[year][#1]})]} and did \mycite[ref] Here is the output: ! Missing \endcsname inserted. <to be read again> \@@pvauthorcolor \doactivatecolor ...\ifcsname (cs:\currentpalet #1 )\endcsname \csname (cs:\c... \doattributes ...rtcolor [\csname #1#3\endcsname ] \else \let \dostopattribut... \dogotospace ...edwords {#1}\processisolatedword } \else #1\relax \fi }\else ... \doifreferencefoundelse ...ce \ifreferencefound #2 \else #3\fi \egroup \dores... \dogoto ...#2]}} {\unknownreference {#2}#1\relax } \egroup \referenceinfo {<}... ... l.25 ...tmekaniska effekter\mycite[Gombosi1998pot] kap 3, sid 53. Detta är ... ? end output Something went wrong with the macro? ons 2009-01-21 klockan 14:55 +0100 skrev Taco Hoekwater:
Jan-Erik Hägglöf wrote:
Example: These statements has been declared by [authorlastname,(year)]
Please give a code sample how to make this work!
Why are you using the "aps" style if you don't want aps-style output? That does not make sense. It seems that "apa" is much closer to what you want?
Best wishes, Taco
In apa-style there is "author (year)" appearance, and I just want "[authorlastname,(year)]" result with those hooks.
The bib module has no support for just "authorlastname" (as opposed to "author"), if you want that then you have to edit the bbl file.
For the rest of the citation formatting: it is easiest to define your own macro:
\def\mycite[#1]{[{\cite[author][#1]},({\cite[year][#1]})]}
Best wishes, Taco
Seems that \cite[year][ref] and \cite[author] doesn't work. only default \cite[authoryears][ref] and \cite[authoryear][ref] and just \cite[ref] seems to work. so nothing wrong with the macro. Is there some settings that I have to fix? My Context minimal intallation is: This is luaTeX, Version snapshot-0.31.3 (uppsats.tex ConTeXt ver: 2009.01.14 11:29 MKIV fmt: 2009.1.16 int: english/english //Janneman ons 2009-01-21 klockan 16:03 +0100 skrev Jan-Erik Hägglöf:
HI!
So I did as you proposed
\def\mycite[#1]{[{\cite[author][#1]},({\cite[year][#1]})]} in my preamble environment file
also I did
\setupbibtex[database=referenser] \setuppublications [alternative=apa,criterium=all] % inherits from adityas thesis example Do not why it is there \let\initializepubslist\relax \def\mycite[#1]{[{\cite[author][#1]},({\cite[year][#1]})]}
and did \mycite[ref]
Here is the output:
! Missing \endcsname inserted. <to be read again> \@@pvauthorcolor \doactivatecolor ...\ifcsname (cs:\currentpalet #1 )\endcsname \csname (cs:\c... \doattributes ...rtcolor [\csname #1#3\endcsname ] \else \let \dostopattribut... \dogotospace ...edwords {#1}\processisolatedword } \else #1\relax \fi }\else ... \doifreferencefoundelse ...ce \ifreferencefound #2 \else #3\fi \egroup \dores... \dogoto ...#2]}} {\unknownreference {#2}#1\relax } \egroup \referenceinfo {<}... ... l.25 ...tmekaniska effekter\mycite[Gombosi1998pot] kap 3, sid 53. Detta är ... ? end output
Something went wrong with the macro?
ons 2009-01-21 klockan 14:55 +0100 skrev Taco Hoekwater:
Jan-Erik Hägglöf wrote:
Example: These statements has been declared by [authorlastname,(year)]
Please give a code sample how to make this work!
Why are you using the "aps" style if you don't want aps-style output? That does not make sense. It seems that "apa" is much closer to what you want?
Best wishes, Taco
In apa-style there is "author (year)" appearance, and I just want "[authorlastname,(year)]" result with those hooks.
The bib module has no support for just "authorlastname" (as opposed to "author"), if you want that then you have to edit the bbl file.
For the rest of the citation formatting: it is easiest to define your own macro:
\def\mycite[#1]{[{\cite[author][#1]},({\cite[year][#1]})]}
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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Jan-Erik Hägglöf wrote:
Seems that
\cite[year][ref] and \cite[author] doesn't work.
only default \cite[authoryears][ref] and \cite[authoryear][ref] and just \cite[ref] seems to work.
so nothing wrong with the macro.
Is there some settings that I have to fix?
I need a full example. Can you wrap up a small input tex file and the bib file (and possibly environment you are using) into a package and email that to me? Best wishes, Taco
participants (2)
-
Jan-Erik Hägglöf
-
Taco Hoekwater