Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm currently tring to link two different entries, a text and its translation, so that they are output together. The entry of the translation is given in the field "usera". If more code is needed, let me know, for the moment I'll just give an abstract explanation.

So we have @inbook{original, … usera = {translation}} and @inbook{translation, …}.

Which gives something like:

Author: Title, location year [translated as: Title, location year].

In the bibliography I do the output of the translation with a modified version of \fullcite. This is probably a brutal solution, but it works.

Except for two problems:

  • Currently I need two runs of LaTeX and biber. Since the \fullcite is only called when the bibliography is written, the system doesn't know of the entry translation in the first run. I tried all kind of ways to hand the content of usera over to biblatex in the first run, but I failed.

  • Once LaTeX and biber have run twice, I get two entries for translation – one as a part of the bibliography entry of original, and then a separate one for original itself. I know that I could filter this by using categories in the document, but I'd like to come up with a solution where translation isn't printed by default

share|improve this question
2  
There are no really good solutions to this sort of "related entries" issue. It's something which will be fixed in biblatex 2.x/biber 1.0 which will have a general mechanism for doing this sort of thing. It's already implemented in biber but the biblatex interface and default style changes are yet to be done though as it's quite a lot of work. –  PLK Sep 21 '11 at 20:40
    
Well, I thought I could take a shortcut. ;) –  Simifilm Sep 21 '11 at 21:14
add comment

1 Answer

up vote 2 down vote accepted

I guess \fullcite for the translator is issued at \finentry? Under this approach, I suspect the only way you could hope to obtain single-run solution is to invoke \nocite{*} within the document body and filter \printbibliography (using a filter, category or the field: options = {skipbib=true}).

A single-run, filter-free alternative could be obtained using an entryset. However if the translated entry is your actual source, I'd sooner cite it directly and make use of the translator field.

\documentclass{article}
\usepackage{csquotes}
\usepackage[american]{babel}
\usepackage[backend=biber,style=authortitle]{biblatex}

\NewBibliographyString{translatedas}
\DefineBibliographyStrings{english}{%
  translatedas = {translated as}}

\DeclareBibliographyDriver{set}{%
  \entryset
    {\ifnumequal{\thefield{entrysetcount}}{1}
       {}
       {\setunit{}%
        \bibopenbracket%
        \bibsentence\bibstring{translatedas}\addcolon\space}}
    {\ifnumequal{\thefield{entrysetcount}}{1}
       {\adddotspace}
       {\setunit{}%
        \adddot\bibclosebracket}}%
  \let\finentrypunct=\empty%
  \finentry}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Set{orig:trans,
  entryset = {orig,trans}}
@Book{orig,
  author = {Original Author},
  title = {Original Title},
  publisher = {Original Publisher},
  location = {Original Location},
  year = {1986}}
@Book{trans,
  author = {Translator},
  title = {Translated Title},
  publisher = {Translated Publisher},
  location = {Translated Location},
  year = {1986}}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\cite{orig:trans}
\printbibliography
\end{document}

enter image description here

share|improve this answer
    
Thanks, that confirms about what I was thinking. As Phil wrote it doesn't really seem to work (yet) the way I'd like. –  Simifilm Sep 21 '11 at 21:15
    
@Simifilm True. But you have reasonable workarounds to use in the meantime. BTW: \entrydata{\thefield{usera}}{<code>} is a neat alternative if you find \fullcite clumsy. –  Audrey Sep 21 '11 at 23:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.