I just started using LaTeX some weeks ago and I'm getting better and better. But now as I try to make up my own .bbx style for biblatex I'm at a point where I'm stuck: I'm having trouble editing the online Driver for the bibliography to fit my needs. I want to mention, if the article I found online also was published in a book or journal.
This is how I got so far:
\DeclareBibliographyDriver{online}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor+others/translator+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{url+urldate}%
\usebibmacro{addendum+pubstate}%
\setunit{\addspace}%
\iffieldundef{crossref}{}{\usebibmacro{in:}}%
\usebibmacro{bybookauthor}%
\setunit*{\addslash} \newblock
\usebibmacro{byeditor+others}%
\setunit{\addcolon\space}\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{journal+issuetitle}%
\printfield{edition}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\usebibmacro{publisher+location+date}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{isbn}}
{}%
\newunit\newblock
\printfield{doi}%
\newunit\newblock
\printfield{eprint}%
\usebibmacro{finentry}}
As you see I tried working with \iffieldundef{crossref}, so that whenever the field{crossref} is defined the bibmacro{in:} is shown and left out if the field is not defined. But with the definition above it doesn't print “In:” at all!
Also I would like to modify the text that is printed by bibmacro{in:}. For example if field{crossref} is defined using english:
Huber, Gerald (2013): Having trouble with biblatex. www.goforlatex.com.
[Visited on 02/19/2013] **Also in**: Jacobs, Daniel (ed.) (2013):
Solvingall the biblatex problems. Vienna: Latex University Press, pp. 1-999.
on the other hand using german:
Huber, Gerald (2013): Having trouble with biblatex. www.goforlatex.com.
[Besucht am 19.2.2013] **Auch in**: Jacobs, Daniel (ed.) (2013): Solving all
the biblatex problems. Vienna: Latex University Press, S. 1-999.
No field{crossref} should simply result in:
Huber, Gerald (2013): Having trouble with biblatex. www.goforlatex.com.
[Visited on 02/19/2013]
So on the one hand I need to make the bibmacro{in:} dependent on the field{crossref} and modify it to show “Also in:” when using english or “Auch in:” when using german.
I don't know wheter or not it was a good idea trying to solve the first problem with \iffieldundef and concerning the language problem, I have no idea where to start. So I'm reaching out for your help, big cyberspace-(bib)latex-community.
Here I have an example of what I have so far:
\documentclass[a4paper,12pt]{scrreprt}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[babel]{csquotes}
%%%bibliography entries
\begin{filecontents}{literatur.bib}
@online{huber.12o,%
author = {1 Crossref},
title = {Having trouble with biblatex},
year = {2013},
url = {www.goforlatex.com},
urldate = {2013-02-19},
crossref = {huber.12},
}
@article{huber.12,%
author = {1 Crossref},
title = {Having trouble with biblatex},
year = {2013},
journal = {The Great Biblatex Journal},
volume = {3},
number = {11},
pages = {1-999},
}
@online{huber.13o,%
author = {2 Crossref},
title = {Having trouble with biblatex},
year = {2013},
url = {www.goforlatex.com},
urldate = {2013-02-19},
crossref = {huber.13},
}
@inbook{huber.13,%
crossref = {jacobs.13},
title = {Having trouble with biblatex},
author = {2 crossref},
pages = {1--999},
year = {2013},
}
@book{jacobs.13,%
editor = {Daniel Jacobs},
year = {2013},
address = {Vienna},
publisher = {Latex University Press},
title = {Solving all the Latex problems},
edition = {5}
}
@online{nocrossref,%
author = {Crossref No},
title = {Some articles are just available in the www},
url = {www.whereisthecross.com},
urldate = {2013-02-19},
year = {2013},
}
\end{filecontents}
\usepackage[citestyle=authoryear,bibstyle=authoryear,sorting=nyt,maxbibnames=3,bibencoding=utf8,backend=biber]{biblatex}
%%% here is where it gets interesting...
\DeclareBibliographyDriver{online}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor+others/translator+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{url+urldate}%
\usebibmacro{addendum+pubstate}%
\setunit{\addspace}%
\iffieldundef{crossref}{}{\usebibmacro{in:}}%
\usebibmacro{bybookauthor}%
\setunit*{\addslash} \newblock
\usebibmacro{byeditor+others}%
\setunit{\addcolon\space}\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{journal+issuetitle}%
\printfield{edition}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\usebibmacro{publisher+location+date}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{isbn}}
{}%
\newunit\newblock
\printfield{doi}%
\newunit\newblock
\printfield{eprint}%
\usebibmacro{finentry}}
\bibliography{literatur.bib}
\begin{document}
\nocite{huber.12o}
\nocite{huber.13o}
\nocite{nocrossref}
\printbibliography
\end{document}
Hope someone can help me out, any hint is appreciated...


