我必须为我的论文使用非常具体的引用样式。由于verbose
这是我能找到的最接近这种样式的样式,所以我决定使用biblatex.cfg
文件对其进行自定义。
tex 的 MWE 为:
\documentclass{article}
\usepackage[backend=biber, style=verbose]{biblatex}
\addbibresource{\jobname.bib}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{alexyRechtVernunftDiskurs1995,
title = {Recht, Vernunft, Diskurs: Studien zur Rechtsphilosophie},
shorttitle = {Recht, Vernunft, Diskurs},
author = {Alexy, Robert},
date = {1995},
edition = {1},
volume = {2}
}
\end{filecontents}
\begin{document}
\footcite{alexyRechtVernunftDiskurs1995}
\printbibliography
\end{document}
下一步,我想正确引用书籍。使用上述 MWE,verbose
输出:
亚历克西,罗伯特。法,效力,讨论:法哲学研究。第 1 版卷2.1995年
我想要的是:
Alexy,《Recht, Vernunft》,讨论:法哲学研究 II¹(1995 年)。
如果没有音量则应该显示:
Alexy,《Recht, Vernunft》,《讨论:法哲学研究》¹(1995 年)。
我已将卷数和版本更改为罗马数字和上标:
\DeclareFieldFormat{volume}{\RN{#1}}
\DeclareFieldFormat{edition}{\textsuperscript{#1}}
然而这导致
亚历克西,罗伯特。法,效力,讨论:法哲学研究。 ¹.二. 1995 年。
现在唯一缺少的是更改卷和版本的顺序,并省略版本前的空格和分隔符以及卷前的分隔符。我该如何实现这一点?
答案1
我以为我们已经讨论过这个问题了?请参阅末尾的 MWE我的答案对你的问题自定义详细引用样式。
基本上,您的样式与标准样式有很大不同,因此最简单的方法是编写您自己的参考书目驱动程序。这样不仅可以更轻松地控制字段格式,还可以更轻松地控制字段的顺序以及字段之间的标点符号。以下是@book
和的驱动程序@collection
。
许多命令已在自定义详细引用样式(或自定义 biblatex 样式的指南)。将驱动程序的代码与 中的定义进行比较standard.bbx
。我尽可能地保留了原样,只修改了需要更改的部分。由于您想要的样式忽略了标准biblatex
将打印的相当多字段,因此驱动程序会变得更短一些。
\documentclass[naustrian]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[backend=biber,
style=verbose,
citepages=suppress,
autocite=footnote,
dashed=false,
]{biblatex}
\renewcommand*{\newunitpunct}{\addcomma\space}
\DeclareNameFormat{family}{%
\usebibmacro{name:family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}%
\usebibmacro{name:andothers}}
\DeclareNameWrapperFormat{family}{\mkbibemph{#1}}
\DeclareNameAlias{default}{family}
\DeclareNameAlias{sortname}{default}
\DeclareNameAlias{labelname}{default}
\DeclareNameWrapperAlias{default}{family}
\DeclareNameWrapperAlias{sortname}{default}
\DeclareNameWrapperAlias{labelname}{default}
\DeclareDelimFormat{multinamedelim}{\slash}
\DeclareDelimAlias{finalnamedelim}{multinamedelim}
\DeclareDelimFormat[textcite]{multinamedelim}{\addcomma\space}
% not sure if a no-breaking space is the best choice here,
% so I'd probably prefer \addspace over \addnbspace
\DeclareDelimFormat[textcite]{finalnamedelim}{\addspace\bibstring{and}\space}
\DeclareFieldFormat{pages}{#1}
\DeclareFieldFormat{postnote}{\mknormrange{#1}}
\DeclareFieldFormat{multipostnote}{\mknormrange{#1}}
\renewcommand*{\subtitlepunct}{\addcolon\space}
\DeclareFieldFormat*{title}{#1}
\DeclareFieldFormat*{booktitle}{#1}
\DeclareFieldFormat*{citetitle}{#1}
\DeclareFieldFormat*{journaltitle}{#1}
\DeclareFieldFormat{volume}{\RN{#1}}
\DeclareFieldFormat{date}{\mkbibparens{#1}}
\DeclareFieldFormat{superedition}{\mkbibsuperscript{#1}}
\DeclareBibliographyDriver{book}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor}%
\setunit{\printdelim{nametitledelim}}\newblock
\usebibmacro{maintitle+title}%
\setunit{\space}%
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}%
\setunit{}%
\printfield[superedition]{edition}%
\setunit{\addspace}\newblock
\usebibmacro{date}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{collection}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{editor}%
\setunit{\printdelim{nametitledelim}}\newblock
\usebibmacro{maintitle+title}%
\setunit{\space}%
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}%
\setunit{}%
\printfield[superedition]{edition}%
\setunit{\addspace}\newblock
\usebibmacro{date}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}
\renewcommand*{\finentrypunct}{}
\begin{filecontents}{\jobname.bib}
@book{alexyRechtVernunftDiskurs1995,
title = {Recht, Vernunft, Diskurs},
subtitle = {Studien zur Rechtsphilosophie},
author = {Alexy, Robert},
date = {1995},
edition = {1},
publisher = {Suhrkamp},
location = {Frankfurt am Main},
isbn = {978-3-518-28767-5},
langid = {german},
note = {OCLC: 243802548},
number = {1167},
pagetotal = {292},
series = {Suhrkamp"=Taschenbuch Wissenschaft},
volume = {2},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
Lorem \autocite{alexyRechtVernunftDiskurs1995}
ipsum \autocite{alexyRechtVernunftDiskurs1995}
\printbibliography
\end{document}