6

My bibliography is not perfect. I need to make some changes.

NOW:

MUSTERMANN, Hans (1994). The World Wide Web. URL: http:\\websiteisdown.tld\WoWiWe (besucht am 01.02.2013)

Better:

MUSTERMANN, Hans (1994): The World Wide Web. Online http:\\websiteisdown.tld\WoWiWe, Urldate is 02.2013.

The minimal example:

    \documentclass[a4paper,titlepage]{scrartcl}

\usepackage[utf8]{inputenc}

\usepackage[T1]{fontenc}

\usepackage[ngerman]{babel} % lang new german

\usepackage[babel,german=quotes]{csquotes}

\usepackage[style=authoryear]{biblatex}
\bibliography{literaturdatenbank}
\DefineBibliographyStrings{ngerman}{
    references = {Q}
}
% Names
\renewcommand*{\mkbibnamelast}[1]{\textsc{#1}}

\usepackage{filecontents}
\begin{filecontents*}{literaturdatenbank.bib}
@online{ art:web,
  author = {Hans Mustermann},
  title = {The World Wide Web},
  year = {1994},
  url = {http:\\websiteisdown.tld\WoWiWe},
  urldate = {2013-02-01}
}
\end{filecontents*}  

\usepackage[toctextentriesindented]{tocstyle}

\usepackage{hyperref}
\begin{document}






\section{Example}
Content
\footcite[Vgl.][]{art:web}.


\printbibliography
\end{document}

How can I fix this. Thank you.

7
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Feb 8, 2014 at 13:47
  • The only differences I am seeing are related to language strings. Is this correct? Feb 8, 2014 at 13:48
  • 1
    Add urlseen = {Urldate is}, to the biblatex strings you define to get that string. I thought that url or urlfrom would change the 'URL' bit but it doesn't seem to...
    – cfr
    Feb 8, 2014 at 13:50
  • Thanky for answers. @MarcoDaniel: The german languag is correct. @cfr: The urlseen = {Urldate is} make it better. How can I remove the brackets?
    – Aaron
    Feb 8, 2014 at 14:11
  • 1
    Use \DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1} Feb 8, 2014 at 14:19

1 Answer 1

5

I hope this is the result you're looking for.

enter image description here

To achieve it, add the following strings to ngerman:

\DefineBibliographyStrings{ngerman}{
    references = {Q},
    urlseen = {Urldate is},
    url = {Online}
}

Also, redefine the url and urldate as follows:

\DeclareFieldFormat{url}{\bibstring{url}\space\url{#1}\addcomma}
\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}

and add the line

\renewcommand*{\labelnamepunct}{\addcolon\space}

Complete MWE:

\documentclass[a4paper,titlepage]{scrartcl}

\usepackage[utf8]{inputenc}

\usepackage[T1]{fontenc}

\usepackage[ngerman]{babel} % lang new german

\usepackage[babel,german=quotes]{csquotes}

\usepackage[style=authoryear]{biblatex}
\bibliography{literaturdatenbank}
\DefineBibliographyStrings{ngerman}{
    references = {Q},
    urlseen = {Urldate is},
    url = {Online}
}
% Names
\renewcommand*{\mkbibnamelast}[1]{\textsc{#1}}
\renewcommand*{\labelnamepunct}{\addcolon\space}
\DeclareFieldFormat{url}{\bibstring{url}\space\url{#1}\addcomma}
\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}

\usepackage{filecontents}
\begin{filecontents*}{literaturdatenbank.bib}
@online{ art:web,
  author = {Hans Mustermann},
  title = {The World Wide Web},
  year = {1994},
  url = {http:\\websiteisdown.tld\WoWiWe},
  urldate = {2013-02-01}
}
\end{filecontents*}

\usepackage[toctextentriesindented]{tocstyle}

\usepackage{hyperref}
\begin{document}

\section{Example}
Content
\footcite[Vgl.][]{art:web}.

\printbibliography
\end{document} 

Some variants

With

\DeclareFieldFormat{url}{\textsc{\bibstring{url}}\space\url{#1}\addcomma}

you get

enter image description here

while with

\DeclareFieldFormat{url}{\mkbibacro{\bibstring{url}}\space\url{#1}\addcomma}

you get

enter image description here

6
  • 1
    you forgot the colon between the name and the title. I think one may add to the preamble: \renewcommand*{\labelnamepunct}{\addcolon\space}if it is wanted for all types of entry. Or just xpatch \DeclareBibliographyDriver{online}.
    – Bernard
    Feb 8, 2014 at 16:09
  • @Bernard There's no colon in the OP's example. Feb 8, 2014 at 16:13
  • One of us is misunderstanding the other. I was speaking of the Better example: MUSTERMANN, Hans (1994): The World Wide Web.
    – Bernard
    Feb 8, 2014 at 16:20
  • @Bernard Oh, sorry, you're right. I thought after "Online"... Feb 8, 2014 at 16:23
  • 1
    @user5361 The right way is \DeclareFieldFormat{url}{\bibstring{url}\space\url{#1}\addcomma}. I've added in the answer. Feb 9, 2014 at 0:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .