Biblatex/Biber 的德语日期格式?

Biblatex/Biber 的德语日期格式?

Biblatex/Biber 的 ISO 日期格式?对于 ISO 日期格式,回答了同样的问题,但我找不到有关如何使用德语格式 (dd.mm.yyyy) 的信息。文档毫无帮助,因为只涵盖了year, short, long, terse, comp, ymdedtf,并且没有关于如何将分隔符从更改为/的信息。我在和中.使用,并且对参考书目也没有影响。americanbabelisodatedatetime

答案1

日期格式取决于您的语言设置。以下示例可显示:

\documentclass[11pt]{article}
\usepackage[american,ngerman]{babel}
\usepackage[]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}
\selectlanguage{ngerman}
\section{ngerman}
\begin{refsection}

\cite{ctan}
\printbibliography
\end{refsection}

\selectlanguage{american}
\section{american}

\begin{refsection}
\cite{ctan}
\printbibliography
\end{refsection}
\end{document}

\mkbibdatelong在您的情况下,您可以使用/的默认德语定义\mkbibdateshort来获取结果:

\documentclass[11pt]{article}
\usepackage[american,ngerman]{babel}
\usepackage[]{biblatex}
\addbibresource{biblatex-examples.bib}

\DefineBibliographyExtras{american}{%
 %from german.lbx
  \protected\def\mkbibdatelong#1#2#3{%
    \iffieldundef{#3}
      {}
      {\mkbibordinal{\thefield{#3}}%
       \iffieldundef{#2}{}{\nobreakspace}}%
    \iffieldundef{#2}
      {}
      {\mkbibmonth{\thefield{#2}}%
       \iffieldundef{#1}{}{\space}}%
    \iffieldbibstring{#1}
      {\bibstring{\thefield{#1}}}
      {\dateeraprintpre{#1}\stripzeros{\thefield{#1}}}}%
  \protected\def\mkbibdateshort#1#2#3{%
    \iffieldundef{#3}
      {}
      {\mkdayzeros{\thefield{#3}}\adddot
       \iffieldundef{#2}{}{\thinspace}}%
    \iffieldundef{#2}
      {}
      {\mkmonthzeros{\thefield{#2}}%
       \iffieldundef{#1}
     {}
     {\iffieldundef{#3}{/}{\adddot\thinspace}}}%
    \iffieldbibstring{#1}
      {\bibstring{\thefield{#1}}}
      {\dateeraprintpre{#1}\mkyearzeros{\thefield{#1}}}}%
}
\begin{document}
\selectlanguage{ngerman}
\section{ngerman}
\begin{refsection}

\cite{ctan}
\printbibliography
\end{refsection}

\selectlanguage{american}
\section{american}

\begin{refsection}
\cite{ctan}
\printbibliography
\end{refsection}
\end{document}

在此处输入图片描述

相关内容