Hi all, is there any way to get \insertcrossref to get the title or the short title of the crossref'd publication, too? Right now it only retrieves author/editor name and the year but that doesn't suffice for some bibliography specifications. Thanks, Philipp -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
Philipp Gesang wrote:
Hi all,
is there any way to get \insertcrossref to get the title or the short title of the crossref'd publication, too? Right now it only retrieves author/editor name and the year but that doesn't suffice for some bibliography specifications.
\insertcrossref simply runs \cite internally, so whatever \cite fetches is what you get. However, there is no \cite[title] command, so altering \cite will not work. Luckily, \insertcrossref is short, so maybe this will work: \usemodule[bib] \unprotect \def\bibinsertcrossref#1#2#3% {\bibdoifelse{\@@pb@crossref} {#1\def\MYtitle{}% \getcitedata[title][\@@pb@crossref]to\MYtitle [\MYtitle]% \@EA\cite\@EA[\@@pb@crossref]#2} {#3}} \protect \starttext .... \stoptext (untested, you have to provide a test file if it is doesn't work) Best wishes, Taco
\insertcrossref simply runs \cite internally, so whatever \cite fetches is what you get. However, there is no \cite[title] command, so altering \cite will not work. Luckily, \insertcrossref is short, so maybe this will work:
\usemodule[bib] \unprotect \def\bibinsertcrossref#1#2#3% {\bibdoifelse{\@@pb@crossref} {#1\def\MYtitle{}% \getcitedata[title][\@@pb@crossref]to\MYtitle [\MYtitle]% \@EA\cite\@EA[\@@pb@crossref]#2} {#3}} \protect \starttext .... \stoptext
(untested, you have to provide a test file if it is doesn't work) Well, it works and at the same time it doesn't work: the second argument in "\getcitedata[title][\@@pb@crossref]to\MYtitle", that is "\@@pg@crossref", has no effect. I replaced it with the literal key of
On 2010-02-09 <16:01:41>, Taco Hoekwater wrote: the referenced entry and its title was correctly stored in "\MYtitle". Typing "\@@pb@crossref" somewhere else resolves to the the correct key. (Putting an \expandafter at some place before it doesn't help either.) I'll attach the example file I'm working with; it's only part of the whole bib style I'm preparing so expect to encounter random braces in the output. Philipp -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
It works this way: \let\cref\@@pb@crossref \getcitedata[title][\cref] to \MYtitle% Thanks very much, this saves me a lot of work. Best regards Philipp
participants (2)
-
Philipp Gesang
-
Taco Hoekwater