我在 Biblatex 和参考书目方面遇到了一些问题。我的图书馆里有书籍和在线资源。对于我的一些在线资源,我没有作者。相反,我使用组织字段。为此,我声明了在线样式:
\DeclareBibliographyDriver{online}{%
\usebibmacro{author/editor}%%
\newunit\newblock
\printlist{organization}%
\newunit\newblock
\usebibmacro{title}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\usebibmacro{date}%
\newunit\newblock
\usebibmacro{url+urldate}%
\newunit\newblock
}
这是我的.bib 文件中的一个来源:
@Online{Inc2015,
citationkey = {Inc2015},
title = {Class ArrayList<E>},
url = {https://docs.oracle.com/javase/7/docs/api/java/util/ArrayList.html},
year = {2015a},
note = {in: Java™ Platform, Standard Edition 7 API Specification},
organization = {Oracle America Inc.},
urldate = {2021-01-03},
}
但从格式上看,应该是作者或组织,然后是标题。出于某些原因,当只给出组织时,它会先打印标题。
如果我把组织放在第一位,我的书目排序就不正确。我使用字母排序,但在线资源(有组织)放在书籍之前。
一种解决方法是使用作者字段而不是组织。问题在于:他“检测”了姓名和姓氏,并显示组织,如下所示:
所以现在,我不知道如何解决我的问题。如果我有真正的作者,更改在线来源的作者字段毫无意义。
这是我的配置:
\documentclass[
12pt,
a4paper,
headinclude,
footinclude,
listof=totoc,
toc=sectionentrywithdots,
bibliography=totoc
]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[onehalfspacing]{setspace} % 1,5facher Zeilenabstand
\usepackage[a4paper, top=3cm,bottom=3cm,left=2.5cm,right=2cm]{geometry}
\usepackage{graphicx}
%Literaturverzeichnis Pakete + Anpassungen am Erscheinungsbild
\usepackage[
style=authoryear,
autocite=footnote,
maxcitenames=3,
mincitenames=3,
maxbibnames=8,
minbibnames=8,
]{biblatex}
\usepackage[hang]{footmisc}
\setlength{\footnotemargin}{4mm}
\addbibresource{LaTeX/literatur.bib} % Datei mit Literaturverzeichnis
\renewcommand*{\newunitpunct}{\addcomma\space}
\renewcommand*{\finentrypunct}{}
\DeclareFieldFormat[book]{title}{\mkbibquote{#1\isdot}}
\DeclareFieldFormat[online]{title}{\mkbibquote{#1\isdot}}
\DeclareNameAlias{default}{family-given}
\DeclareNameAlias{sortname}{default}
\DeclareListWrapperFormat{location}{\mkbibparens{#1}}
\DefineBibliographyStrings{german}{
andothers = {et al\adddot},
nodate = {o.J\adddot},
}
\DeclareDelimFormat{nameyeardelim}{\addcomma\space}
\DeclareDelimFormat[bib]{nameyeardelim}{\addcomma\space}
\renewbibmacro*{cite:label}{%
\printtext[bibhyperref]{\printfield{label}}}
\newbibmacro*{cite:labeltitle}{%
\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
\newbibmacro*{cite:organization}{%
\printtext[bibhyperref]{\printfield{organization}}
}
\renewbibmacro*{cite}{%
\ifentrytype{online}%
{\ifnameundef{author}
{\printlist{organization}}
{\printnames{author}}
\setunit{\printdelim{nameyeardelim}}%
\usebibmacro{cite:labeldate+extradate}%
\setunit{\addspace}%
\printtext{Onlinequelle}}
%\bibstring{Onlinequelle}}
{\iffieldundef{shorthand}
{\ifnameundef{labelname}
{\usebibmacro{cite:label}%
\setunit{\printdelim{nonameyeardelim}}}
{\printnames{labelname}%
\setunit{\printdelim{nameyeardelim}}}%
\iffieldequalstr{labeldatesource}{nodate}
{\usebibmacro{cite:labeltitle}}
{\usebibmacro{cite:labeldate+extradate}}}
{\usebibmacro{cite:shorthand}}}}
%\ifentrytype
\newbibmacro{printOnline}{%
Onlinequelle
}
\DeclareDelimFormat{multinamedelim}{\slash}
\DeclareDelimAlias{finalnamedelim}{multinamedelim}
\DeclareFieldFormat{urldate}{(Zugriff am: #1)}
\DeclareBibliographyDriver{online}{%
\usebibmacro{author/editor}%%
\newunit\newblock
\printlist{organization}%
\newunit\newblock
\usebibmacro{title}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\usebibmacro{date}%
\newunit\newblock
\usebibmacro{url+urldate}%
\newunit\newblock
}
使用这些来源将会是这样的:
Test \autocite[Siehe][]{Inc2015}