I use a biblatex bibliography where i have customized the urlseen message. However, I want to display the message after the URL, not in front. What im most confused about is that all examples i see from other questions have it in the order i want, as it would be default.
\documentclass[12pt]{article}
\usepackage[ngerman]{babel}
\usepackage[backend=biber,
style=apa,
sorting=nyvt,
giveninits=true,
maxbibnames=99,
maxcitenames=2]{biblatex}
\DeclareFieldFormat{urldate}{\mkbibparens{\bibstring{urlseen}\space#1}}
\DefineBibliographyStrings{ngerman}{ %alles für Abrufdatum am
urlseen = {Abrufdatum:}
}
\begin{filecontents}{references.bib}
@online{bdew_allgemeine_2022,
title = {Allgemeine Festlegungen zu den {EDIFACT}- und {XML}-Nachrichten},
url = {/},
author = {{BDEW}},
urldate = {2024-04-22},
date = {2022-08-01}
}
\end{filecontents}
\addbibresource{references.bib}
\begin{document}
\nocite{bdew_allgemeine_2022}
\newpage
\raggedright
\printbibliography[heading=bibintoc,title={Bibliography}]
\end{document}
I use a biblatex bibliography where i have customized the urlseen message. However, I want to display the message after the URL, not in front. What im most confused about is that all examples i see from other questions have it in the order i want, as it would be default.
\documentclass[12pt]{article}
\usepackage[ngerman]{babel}
\usepackage[backend=biber,
style=apa,
sorting=nyvt,
giveninits=true,
maxbibnames=99,
maxcitenames=2]{biblatex}
\DeclareFieldFormat{urldate}{\mkbibparens{\bibstring{urlseen}\space#1}}
\DefineBibliographyStrings{ngerman}{ %alles für Abrufdatum am
urlseen = {Abrufdatum:}
}
\begin{filecontents}{references.bib}
@online{bdew_allgemeine_2022,
title = {Allgemeine Festlegungen zu den {EDIFACT}- und {XML}-Nachrichten},
url = {https://www.bundesnetzagentur.de/DE/},
author = {{BDEW}},
urldate = {2024-04-22},
date = {2022-08-01}
}
\end{filecontents}
\addbibresource{references.bib}
\begin{document}
\nocite{bdew_allgemeine_2022}
\newpage
\raggedright
\printbibliography[heading=bibintoc,title={Bibliography}]
\end{document}
Share
Improve this question
edited Mar 23 at 18:34
samcarter_is_at_topanswers.xyz
39.3k5 gold badges58 silver badges77 bronze badges
asked Mar 23 at 18:08
Lennart HerrmannLennart Herrmann
111 bronze badge
1 Answer
Reset to default 0You could re-order the elements in the url+urldate
macro:
\documentclass[12pt]{article}
\usepackage[ngerman]{babel}
\usepackage[backend=biber,
style=apa,
sorting=nyvt,
giveninits=true,
maxbibnames=99,
maxcitenames=2]{biblatex}
\DeclareFieldFormat{urldate}{\mkbibparens{\bibstring{urlseen}\space#1}}
\DefineBibliographyStrings{ngerman}{ %alles für Abrufdatum am
urlseen = {Abrufdatum:}
}
\makeatletter
\renewbibmacro*{url+urldate}{%
\ifthenelse{\iffieldundef{url}\OR\NOT\iffieldundef{doi}}
{}
{\iffieldundef{urlyear}
{}
{\printfield{url}
\setunit{\addspace}}%
\printurldate}}
\makeatother
\begin{filecontents*}[overwrite]{references.bib}
@online{bdew_allgemeine_2022,
title = {Allgemeine Festlegungen zu den {EDIFACT}- und {XML}-Nachrichten},
url = {https://www.bundesnetzagentur.de/DE/},
author = {{BDEW}},
urldate = {2024-04-22},
date = {2022-08-01}
}
\end{filecontents*}
\addbibresource{references.bib}
\begin{document}
\nocite{bdew_allgemeine_2022}
\newpage
\raggedright
\printbibliography[heading=bibintoc,title={Bibliography}]
\end{document}