Biblatex 脚注样式,包含第二个名字、括号和标题

Biblatex 脚注样式,包含第二个名字、括号和标题

使用 biblatex 生成的脚注并不完美。

现在
Footnote Now
好多了:

¹Vgl。 MUSTERMANN,Hans (1994): 万维网

最小的例子:

\documentclass[a4paper,titlepage]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage[babel,german=quotes]{csquotes}

\usepackage[style=authoryear]{biblatex}
\bibliography{literaturdatenbank}
\DefineBibliographyStrings{ngerman}{
    references = {Q},
    urlseen = {URLSEEN is},
    url = {Online}
}

% Config for Bibliography list:
\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}% Remove the () im Datum
\DeclareFieldFormat{url}{\bibstring{url}\space\url{#1}\addcomma}
\renewcommand*{\mkbibnamelast}[1]{\textsc{#1}}
\renewcommand*{\labelnamepunct}{\addcolon\space}


% Interne Literaturdatenbank normalerweise auszulagern
\usepackage{filecontents}
\begin{filecontents*}{literaturdatenbank.bib}
@online{ art:web,
  author = {Hans Mustermann},
  title = {The World Wide Web},
  year = {1994},
  url = {http://www.pageisdown.tld/subpage.html},
  urldate = {2013-02-01}
}
\end{filecontents*}

\usepackage[toctextentriesindented]{tocstyle}
\usepackage{hyperref}
\begin{document}
\section{Text}
Text\footcite[Vgl.][]{art:web}.
\printbibliography
\end{document}

答案1

您可以使用以下定义:

  1. 声明引用的名称格式:

    \DeclareNameAlias{labelname}{last-first}
    
  2. 定义一个新的 cite-macro:

    \newbibmacro*{cite:footnote}{%
      \iffieldundef{shorthand}
        {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
           {\usebibmacro{cite:label}%
            \setunit{\addspace}}
           {\printnames{labelname}%
            \setunit{\nameyeardelim}}%
            \printtext[parens]{\usebibmacro{cite:labelyear+extrayear}}%
            \setunit{\addcolon\space}%
            \usebibmacro{cite:label}%
        }
        {\usebibmacro{cite:shorthand}}}
    
  3. 引文中的最后一个点由 完成\bibfootnotewrapper。因此,您可以将默认定义更改为:

    \renewcommand{\bibfootnotewrapper}[1]{\bibsentence#1}
    
  4. 重新定义初始\footcite命令

    \DeclareCiteCommand{\footcite}[\mkbibfootnote]
      {\usebibmacro{prenote}}
      {\DeclareNameAlias{labelname}{last-first}%
       \usebibmacro{citeindex}%
       \usebibmacro{cite:footnote}}
      {\multicitedelim}
      {\usebibmacro{postnote}}
    

以下是完整的 MWE:

\documentclass[a4paper,titlepage]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage[babel,german=quotes]{csquotes}

\usepackage[style=authoryear]{biblatex}
\bibliography{literaturdatenbank}
\DefineBibliographyStrings{ngerman}{
    references = {Q},
    urlseen = {URLSEEN is},
    url = {Online}
}

% Config for Bibliography list:
\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}% Remove the () im Datum
\DeclareFieldFormat{url}{\bibstring{url}\space\url{#1}\addcomma}
\renewcommand*{\mkbibnamelast}[1]{\textsc{#1}}
\renewcommand*{\labelnamepunct}{\addcolon\space}

\renewcommand{\bibfootnotewrapper}[1]{%
  \bibsentence#1}
\DeclareCiteCommand{\footcite}[\mkbibfootnote]
  {\usebibmacro{prenote}}
  {\DeclareNameAlias{labelname}{last-first}%
   \usebibmacro{citeindex}%
   \usebibmacro{cite:footnote}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\newbibmacro*{cite:footnote}{%
  \iffieldundef{shorthand}
    {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
       {\usebibmacro{cite:label}%
        \setunit{\addspace}}
       {\printnames{labelname}%
        \setunit{\nameyeardelim}}%
        \printtext[parens]{\usebibmacro{cite:labelyear+extrayear}}%
        \setunit{\addcolon\space}%
        \usebibmacro{cite:label}%
    }%
    {\usebibmacro{cite:shorthand}}}

% Interne Literaturdatenbank normalerweise auszulagern
\usepackage{filecontents}
\begin{filecontents*}{literaturdatenbank.bib}
@online{ art:web,
  author = {Hans Mustermann},
  title = {The World Wide Web},
  year = {1994},
  url = {http://www.pageisdown.tld/subpage.html},
  urldate = {2013-02-01}
}
\end{filecontents*}

\usepackage[toctextentriesindented]{tocstyle}
\usepackage[colorlinks=true]{hyperref}
\begin{document}
\section{Text}
Text\footcite[Vgl.][]{art:web}.
\printbibliography
\end{document}

enter image description here

相关内容