Well, there are quite some modifications to be done here.
To change the translation of "and others" from "med flere" to "et al.", we define.
\DefineBibliographyStrings{norsk}{%
andothers = {et\addabbrvspace al\adddot},
andmore = {et\addabbrvspace al\adddot},
}
You can find a list of all the bibstrings (the localisation kyes) in the biblatex
documentation in §4.9.2 Localization Keys. For more on this topic, §4.9 Localization Modules is worth a read.
To change the last name delimiter from "og" ("and") to "&", we redefine
\renewcommand*{\finalnamedelim}{%
%\ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}% there really should be no funny Oxford comma business here
\addspace\&\space}
Note that the second line that normally deals with Oxford commas is uncommented here, but that does not concern Norwegian as that does not use the Oxford comma anyway.
Now, over to @inbook
and @incollection
.
First, the easy part, to get rid of the colon after "I:" ("In:"), define
\renewcommand*{\intitlepunct}{\space}
This will get rid of the colon for all entry types, however; if you prefer to keep it for all the other entry types (Why would you want to do that? It would be pretty pretty inconsistent.), try
\newbibmacro*{in:}{%
\printtext{%
\bibstring{in}%
\ifboolexpr{test {\ifentrytype{inbook}} or test {\ifentrytype{incollection}}}
{\addspace}%
{\intitlepunct}}}
The biggest problem is reordering the output. One could copy and paste the whole driver to the document and modify it, but since you use xpatch
anyway, why not use that?
% This gets rid of page numbers, don't worry they will be re-added later
\xpatchbibdriver{inbook}
{\newunit\newblock
\usebibmacro{chapter+pages}}
{}
{}
{}
\xpatchbibdriver{incollection}
{\newunit\newblock
\usebibmacro{chapter+pages}}
{}
{}
{}
\xpatchbibdriver{incollection}
{\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}%
}
{\renewbibmacro*{date+extrayear}{}%
\usebibmacro{editor+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\ifboolexpr{not (test {\iffieldundef{chapter}} and test {\iffieldundef{pages}})}
{\nopunct\printtext[parens]{\usebibmacro{chapter+pages}}}%
{}%
\newunit\newblock
}%
{}
{\typeout{failed to replace \usebibmacro{byeditor+others} by \usebibmacro{editor+others} in BibliographyDriver{incollection}}}%
\xpatchbibdriver{inbook}
{\usebibmacro{bybookauthor}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}%
}
{\renewbibmacro*{date+extrayear}{}%
\usebibmacro{editor+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\ifboolexpr{not (test {\iffieldundef{chapter}} and test {\iffieldundef{pages}})}
{\nopunct\printtext[parens]{\usebibmacro{chapter+pages}}}%
{}%
}%
{}
{\typeout{failed to replace \usebibmacro{byeditor+others} by \usebibmacro{editor+others} in BibliographyDriver{inbook}}}%
We move the editor macro before the title, but use the editor
not byeditor
macros.
To get the string "editor" in parentheses and to get rid of the comma preceding it, use
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\xpatchbibmacro{bbx:editor}%
{\setunit{\addcomma\space}%
}
{\setunit{\addspace}%
}
{}
{\typeout{failed to patch bibmacro{bbx:editor}}}
The quite long and not so M WE
\documentclass[norsk,12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{lmodern}
\usepackage[style=authoryear-comp, firstinits=true, backend=biber, maxcitenames=3, citetracker=true, maxbibnames=99, dashed=false,texencoding=ascii]{biblatex}
\DeclareNameAlias{sortname}{last-first}
\renewcommand*{\nameyeardelim}{\addcomma\space}
\addbibresource{biblatex-examples.bib}
\usepackage{breakurl}
\DefineBibliographyStrings{norsk}{%
andothers = {et\addabbrvspace al\adddot},
andmore = {et\addabbrvspace al\adddot},
}
%from http://tex.stackexchange.com/questions/48846/biblatex-et-al-beginning-from-second-citation
\usepackage{xpatch}
\AtEveryCitekey{\ifciteseen{}{\clearfield{namehash}}}
\xpatchbibmacro{cite}
{\printnames{labelname}}
{\ifciteseen
{\printnames{labelname}}
{\printnames[][1-999]{labelname}}}
{}
{}
\xpatchbibmacro{textcite}
{\printnames{labelname}}
{\ifciteseen
{\printnames{labelname}}
{\printnames[][1-999]{labelname}}}
{}
{}
\renewcommand*{\finalnamedelim}{%
%\ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}% there really should be no funny Oxford comma business here
\addspace\&\space}
%\renewcommand*{\intitlepunct}{\space}
\newbibmacro*{in:}{%
\printtext{%
\bibstring{in}%
\ifboolexpr{test {\ifentrytype{inbook}} or test {\ifentrytype{incollection}}}
{\addspace}%
{\intitlepunct}}}
\xpatchbibdriver{inbook}
{\newunit\newblock
\usebibmacro{chapter+pages}}
{}
{}
{}
\xpatchbibdriver{incollection}
{\newunit\newblock
\usebibmacro{chapter+pages}}
{}
{}
{}
\xpatchbibdriver{incollection}
{\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}%
}
{\renewbibmacro*{date+extrayear}{}%
\usebibmacro{editor+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\ifboolexpr{not (test {\iffieldundef{chapter}} and test {\iffieldundef{pages}})}
{\nopunct\printtext[parens]{\usebibmacro{chapter+pages}}}%
{}%
\newunit\newblock
}%
{}
{\typeout{failed to replace \usebibmacro{byeditor+others} by \usebibmacro{editor+others} in BibliographyDriver{incollection}}}%
\xpatchbibdriver{inbook}
{\usebibmacro{bybookauthor}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}%
}
{\renewbibmacro*{date+extrayear}{}%
\usebibmacro{byeditor+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\ifboolexpr{not (test {\iffieldundef{chapter}} and test {\iffieldundef{pages}})}
{\nopunct\printtext[parens]{\usebibmacro{chapter+pages}}}%
{}%
}%
{}
{\typeout{failed to replace \usebibmacro{byeditor+others} by \usebibmacro{editor+others} in BibliographyDriver{inbook}}}%
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\xpatchbibmacro{bbx:editor}%
{\setunit{\addcomma\space}%
}
{\setunit{\addspace}%
}
{}
{\typeout{failed to patch bibmacro{bbx:editor}}}
\begin{document}
\cite{aksin} again \cite{aksin}.
\nocite{wilde,kant:kpv,hyman,pines,baez/article}
\printbibliography[title=Kilder]
\end{document}
yields