我想在作者和标题之间显示机构。我该如何更改代码才能实现这一点?
\begin{filecontents}{\jobname.bib}
@online{musk,
author = {Elon Musk},
title = {Tesla Model X},
url = {https://www.tesla.com/modelx?redirect=no},
date = {2017-07-04},
organization = {Tesla},
urldate = {2018-10-16},
}
\end{filecontents}
\documentclass{article}
\usepackage[style=authortitle,]{biblatex}
\addbibresource{\jobname.bib}
\DeclareListFormat{organization}{%
\usebibmacro{list:delim}{#1}%
\mkbibemph{#1}\isdot
\usebibmacro{list:andothers}}
\begin{document}
Let's cite! \footcite{musk}
\printbibliography
\end{document}
答案1
您可以重新定义online
bibdriver 以达到此目的:
\begin{filecontents}{\jobname.bib}
@online{musk,
author = {Elon Musk},
title = {Tesla Model X},
url = {https://www.tesla.com/modelx?redirect=no},
date = {2017-07-04},
organization = {Tesla},
urldate = {2018-10-16},
}
\end{filecontents}
\documentclass{article}
\usepackage[style=authortitle]{biblatex}
\addbibresource{\jobname.bib}
\DeclareListFormat{organization}{%
\usebibmacro{list:delim}{#1}%
\mkbibemph{#1}\isdot
\usebibmacro{list:andothers}}
\DeclareBibliographyDriver{online}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor+others/translator+others}%
\setunit{\printdelim{nametitledelim}}\newblock
\printlist{organization}%
\newunit\newblock
\usebibmacro{title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\printfield{version}%
\newunit
\printfield{note}%
\newunit\newblock
\usebibmacro{date}%
\newunit\newblock
\iftoggle{bbx:eprint}
{\usebibmacro{eprint}}
{}%
\newunit\newblock
\usebibmacro{url+urldate}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}
\begin{document}
Let's cite! \footcite{musk}
\printbibliography
\end{document}