You can do that with the xpatch
package. I think the following corresponds to what you want for online
entries:
\documentclass[12pt]{report}
\usepackage[a4paper,width=150mm,top=25mm,bottom=25mm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage{filecontents}
\begin{filecontents}{referanser.bib}
@online{Ibsen90,
author = {Henrik Ibsen},
title = {Hedda {G}abler},
year = {1890},
url = {http://www.uia.no/no/portaler/bibliotek/finn_fagstoff}}
\end{filecontents}
\usepackage[norsk]{babel}
\usepackage[
backend=biber,
style=ieee,
sorting=none
]{biblatex}
\addbibresource{referanser.bib}
\DeclareFieldFormat[online]{title}{\mkbibemph{#1}\isdot}
\DefineBibliographyStrings{norsk}
{ bibliography = {Litteraturliste},
url = {Tilgjengelig},
}
\usepackage{xpatch}
\xpatchbibdriver{online}{%
\setunit{\adddot\addspace}%
\printtext[parens]{\usebibmacro{date}}%
}{%
\setunit{\addspace}%
\printtext[parens]{\usebibmacro{date}}%
}{}{}
\xpatchbibdriver{online}{%
\newunit\newblock%
\usebibmacro{url+urldate}%
}{%
\setunit{\adddot\space}\newblock%
\usebibmacro{url+urldate}%
}{}{}
\xpatchbibdriver{online}{%
\usebibmacro{finentry}}
{%
}{}{}
\begin{document}
\nocite{*}
\printbibliography
\addcontentsline{toc}{chapter}{Bibliographie}
\end{document}
Well, there are several problems in your code, some related to KOMA-Script, some to called, outdated packages.
Your code gives you several warnings you should read and then change your code like this:
\documentclass[%
listof=totoc,
bibliography=totoc,
paper=a4,
fontsize=12pt,
parskip, % <==================== then \parindent not needed!
final
]{scrbook}
Then you have the line \usepackage{ae,aecompl}
calling two outdated packages. Do not use this packages any longer!
If you use option parskip
for class scrbook
, then you can delete the line
\parindent 0pt % keine einrückung nach absätzen
At last you need to cite one or more bib entrys so that biber
or bibtex
are able to build an bibliography. I added command \nocite{*}
and used the BibLaTeX example bib file biblatex-example.bib
.
And of course you have to be sure that the following order of program calls is done: pdflatex mwe.tex
, bibtex mwe
or biber
, pdflatex mwe.tex
, pdflatex mwe.tex
. If you have problems with the used editor (usually bad configuration) use a terminal or console and use the above given commands to create your document. If that runs, your TeX distribution is okay, and you can check the configuration of your editor ...
Complete MWE with commented packages from your example, which are not needed to show your problem:
\documentclass[%
listof=totoc,
bibliography=totoc,
paper=a4,
fontsize=12pt,
parskip, % <==================== then \parindent not needed!
final
]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
%\usepackage{ae,aecompl} % <====================== outdated, do not use!
\usepackage[ngerman]{babel}
%\usepackage[paper=a4paper,left=25mm,right=25mm,top=30mm,bottom=40mm,bindingoffset=1cm]{geometry}
%\usepackage{setspace}
%\usepackage{graphicx}
\usepackage[babel,german=guillemets]{csquotes}
\usepackage[%
backend=bibtex8, % bibtex8 biber % <==================== change as needed!
]{biblatex}
\usepackage{hyperref}
%\usepackage[nolist]{acronym}
%\hbadness = 10000 % -> disable ``underfull \hbox'' warnings
%\parindent 0pt % keine einrückung nach absätzen
\addbibresource{biblatex-examples.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
and the result:
If you change from BiBTeX to Biber, you have to change the backend for biblatex
(change in line backend=bibtex8, % bibtex8 biber
in my MWE =biblatex8
to =biber
) and you need to start program Biber instead of BiBTeX (see commands shown above).
Best Answer
Ok the problem was that I used bibtex and no "biber" to compile my latex file. I found an answer on SO: