Biblatex apa 更改文本为 urldate

Biblatex apa 更改文本为 urldate

我正在使用biblatexstyle=apa,我想引用网站并提供访问网站的日期。我打算使用urlurldate输入字段来实现这一点。但是,biblatex这无法为我的德语文本产生正确的输出。

我得到的输出如下所示:

Müller,M.(2020 年 4 月 19 日)。新冠病毒危机作为西方社会媒体的终结?德国之声。 2021 年 1 月 10 日生效https://www.dw.com/de/corona-krise-alssternstunde-sozialer-medien/a-53168941

我需要的输出看起来应该是这样的:

Müller,M.(2020 年 4 月 19 日)。新冠病毒危机作为西方社会媒体的终结?德国之声。 发布于 2021 年 1 月 10 日,作者https://www.dw.com/de/corona-krise-alssternstunde-sozialer-medien/a-53168941

当我使用时,bibtexapacite可以通过添加以下代码来修复此问题:

\renewcommand{\BRetrieved}[1]{Abgerufen am {#1} von\ }

有人知道如何改变输出的格式吗?

我的 MWE:

\documentclass[parsikip=full,oneside, 12pt]{scrartcl}

\usepackage[left=2.8cm, right=2.8cm,top=2.1cm, bottom=19mm,includehead=false,footskip=10mm, bindingoffset=0mm]{geometry}

\usepackage[T1]{fontenc} 
\usepackage[utf8]{inputenc}     
\usepackage[ngerman]{babel}     
\usepackage[german=guillemets]{csquotes} 
\usepackage{microtype}      
\usepackage{color}          


\usepackage[style=apa, datelabel=comp, uniquelist=false, backend=biber]{biblatex}
\addbibresource{litSM.bib}


\usepackage[colorlinks=true, linktoc = all, draft = false, linkcolor=black, citecolor=black, urlcolor=blue]{hyperref}


\usepackage[acronym, nopostdot, nogroupskip, nonumberlist, nomain]{glossaries}
\makeglossaries
\newacronym{passiv}{PNSM}{passive Nutzung sozialer Medien}



\setglossarystyle{listdotted}
\setlength{\glslistdottedwidth}{.6\linewidth}


\clubpenalty=10000                                          % Verhindert einzelne Absatzzeile am Ende oder am Anfang
\widowpenalty=10000                                         % einer Seite.
\displaywidowpenalty=10000                                  %
\usepackage{setspace}
\linespread{1.5}

\newcommand{\anf}[1]{\glqq{}#1{}\grqq{}}
\AtBeginDocument{%
%   \renewcommand{\BCBL}{,}%
%   \renewcommand{\BCBT}{,}%
}


\ExecuteBibliographyOptions{maxcitenames=2}

\DeclareFieldFormat{citehyperref}{%
    \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links
    \bibhyperref{#1}}

\DeclareFieldFormat{textcitehyperref}{%
    \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links
    \bibhyperref{%
        #1%
        \ifbool{cbx:parens}
        {\bibcloseparen\global\boolfalse{cbx:parens}}
        {}}}

\savebibmacro{cite}
\savebibmacro{textcite}

\renewbibmacro*{cite}{%
    \printtext[citehyperref]{%
        \restorebibmacro{cite}%
        \usebibmacro{cite}}}

\renewbibmacro*{textcite}{%
    \ifboolexpr{
        ( not test {\iffieldundef{prenote}} and
        test {\ifnumequal{\value{citecount}}{1}} )
        or
        ( not test {\iffieldundef{postnote}} and
        test {\ifnumequal{\value{citecount}}{\value{citetotal}}} )
    }
    {\DeclareFieldAlias{textcitehyperref}{noformat}}
    {}%
    \printtext[textcitehyperref]{%
        \restorebibmacro{textcite}%
        \usebibmacro{textcite}}}

\renewcommand{\baselinestretch}{1.2}
\setlength{\parskip}{\smallskipamount}
\setlength{\parindent}{0pt}

%%%%% Oxford-Komma vor & %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\DeclareDelimFormat[bib,biblist]{finalnamedelim:apa:family-given}{%
    \ifthenelse{\value{listcount}>\maxprtauth}
    {}
    {\addcomma\space\&\space}}

\newcommand{\zittext}[2]{\parencite[S. #2]{#1}}
\newcommand{\hervor}[2]{\parencite[S. #2, Hervorheb. i.O.]{#1}}

\begin{document}

\pagenumbering{roman}

\tableofcontents
\clearpage                      
\printglossary[title=Abkürzungsverzeichnis, type=\acronymtype]

\newacronym{pim}{PIM}{politische Internet-Memes}
\newacronym{mk}{MK}{Meme-Kommunikatoren\_innen}
\clearpage
\setcounter{page}{1}\pagenumbering{arabic}

\input{Einleitung}

\printbibliography[heading=bibintoc]
\end{document}

我的.bib参赛作品:

    @article{welle,
    author = {Müller, Marco},
    title ={Corona-Krise als Sternstunde Sozialer Medien?},
    journal = {Deutsche Welle},
    date={2020-04-19},
    url={https://www.dw.com/de/corona-krise-als-sternstunde-sozialer-medien/a-53168941},
    urldate={2021-01-10}
} 
@book{pmneben,
    title={Mehr als nur ein „lokales Ebay“},
    author={{Universität Augsburg}},
    year={2020},
    publisher={Universität Augsburg},
    url={https://www.uni-augsburg.de/de/campusleben/neuigkeiten/2020/09/03/2728/},
    urldate={2021-01-10}
    
}

答案1

您将需要重新定义 bibstringsretrievedfrom

\DefineBibliographyStrings{ngerman}{
  retrieved = {abgerufen am},
  from      = {von},
}

\documentclass[parskip=full,oneside, 12pt]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[german=guillemets]{csquotes}

\usepackage[style=apa, labeldate=comp, uniquelist=false, backend=biber]{biblatex}
\usepackage[linktoc = all, draft = false,
  colorlinks=true, linkcolor=black, citecolor=black, urlcolor=blue,
]{hyperref}

\ExecuteBibliographyOptions{maxcitenames=2}

\DeclareFieldFormat{citehyperref}{%
  \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links
  \bibhyperref{#1}}

\DeclareFieldFormat{textcitehyperref}{%
  \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links
  \bibhyperref{%
    #1%
    \ifbool{cbx:parens}
      {\bibcloseparen\global\boolfalse{cbx:parens}}
      {}}}

\savebibmacro{cite}
\savebibmacro{textcite}

\renewbibmacro*{cite}{%
  \printtext[citehyperref]{%
    \restorebibmacro{cite}%
    \usebibmacro{cite}}}

\renewbibmacro*{textcite}{%
  \ifboolexpr{
    ( not test {\iffieldundef{prenote}} and
    test {\ifnumequal{\value{citecount}}{1}} )
    or
    ( not test {\iffieldundef{postnote}} and
    test {\ifnumequal{\value{citecount}}{\value{citetotal}}} )
  }
    {\DeclareFieldAlias{textcitehyperref}{noformat}}
    {}%
  \printtext[textcitehyperref]{%
    \restorebibmacro{textcite}%
    \usebibmacro{textcite}}}

\renewcommand{\baselinestretch}{1.2}
\setlength{\parskip}{\smallskipamount}
\setlength{\parindent}{0pt}


\DeclareDelimFormat[bib,biblist]{finalnamedelim:apa:family-given}{%
  \ifthenelse{\value{listcount}>\maxprtauth}
    {}
    {\addcomma\space\&\space}}

\DefineBibliographyStrings{ngerman}{
  retrieved = {abgerufen am},
  from      = {von},
}

\begin{filecontents}{\jobname.bib}
@article{welle,
  author  = {Müller, Marco},
  title   = {Corona-Krise als Sternstunde Sozialer Medien?},
  journal = {Deutsche Welle},
  date    = {2020-04-19},
  url     = {https://www.dw.com/de/corona-krise-als-sternstunde-sozialer-medien/a-53168941},
  urldate = {2021-01-10},
}
@book{pmneben,
  title     = {Mehr als nur ein „lokales Ebay“},
  author    = {{Universität Augsburg}},
  year      = {2020},
  publisher = {Universität Augsburg},
  url       = {https://www.uni-augsburg.de/de/campusleben/neuigkeiten/2020/09/03/2728/},
  urldate   = {2021-01-10},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\nocite{*}
\printbibliography[heading=bibintoc]
\end{document}

Müller,M.(2020 年 4 月 19 日)。新冠病毒危机作为西方社会媒体的终结?德国之声。 发布于 2021 年 1 月 10 日,作者 https://www.dw.com/de/corona-krise-als-sternstunde-sozialer-medien/a-53168941

答案2

中间还有一个逗号日期缺失。也许你也想修复这个问题。

\DefineBibliographyStrings{ngerman}{%
  retrieved = {Abgerufen am},
  from = {von}}

\DeclareFieldFormat{url}{\url{#1}}
\DeclareFieldFormat{abstracturl}{\url{#1}}
\DeclareFieldFormat{urldate}{#1}

\renewbibmacro*{url+urldate}{%
  \ifthenelse{\(\iffieldundef{url}\AND\iffieldundef{abstracturl}\AND\iffieldundef{abstractloc}\)\OR\NOT\iffieldundef{doi}}
  {}
  {\ifthenelse{\iffieldundef{abstracturl}\AND\iffieldundef{abstractloc}}
    {}
    {\printtext{\bibcpstring{abstract}}\addspace}%
    \printtext{\bibstring{retrieved}}%
    \setunit{\addspace}%
    \iffieldundef{urlyear}
    {}
    {\printurldate%
      \setunit*{\addcomma\space}}% hier Komma einfügen
    \printtext{\bibstring{from}}%
    \setunit*{\addspace}%
    \printfield{urldescription}%
    \setunit*{\addcolon\addspace}%
    \iffieldundef{url}{}{\printfield{url}\renewcommand*{\finentrypunct}{\relax}}%
    \iffieldundef{abstractloc}{}{\printfield{abstractloc}\renewcommand*{\finentrypunct}{\relax}}
    \iffieldundef{abstracturl}{}{\printfield{abstracturl}\renewcommand*{\finentrypunct}{\relax}}}}

相关内容