我需要定制脚注引文中短标题的打印方式。确切地说,我需要(\ldots)\comma\space
在短标题和脚注的下一部分之间添加。我已经biblatex.cfg
对 verbose-trad2 样式进行了大量修改,但我找不到需要添加的内容\renewbibmacro*{}
我在这里搜索过,只发现了这一点:自定义简短引用(Biblatex Verbose)但我不确定如何根据我的情况进行调整,因此非常感谢任何帮助!
梅威瑟:
bibliografia.bib:
@book{ kowalska1,
author = {J. Kowalska},
title = {Jeden},
location = {Warszawa},
year = {2003}
}
@book{ k,
author = {K. Maciej},
title = {Very Long and Verbose Ttile: even with longer subtitle},
shorttitle = {Short Title},
location = {Warszawa},
year = {2031}
}
文本文件:
\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{polish}
\usepackage[
style=verbose-trad2,
sorting=nty,
isbn=false,
backend=biber]{biblatex}
\addbibresource{bibliografia.bib}
\begin{document}
ipsum \footcite{k}
Lorem \footcite{kowalska1}
ipsum \footcite{k}
\end{document}
答案1
您可以使用源映射,并将其直接添加到字段。
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map[overwrite]{
\step[fieldsource=shorttitle, match=\regexp{\A.+\Z}, final]
\step[fieldset=shorttitle, fieldvalue={\addspace\bibellipsis}, append] % recommended
% \step[fieldset=shorttitle, fieldvalue={\unexpanded{\addspace(\ldots)\isdot}}, append] % if you really need the parentheses
}
}
}
在全:
\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{polish}
\usepackage[
style=verbose-trad2,
isbn=false,
backend=biber]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{ kowalska1,
author = {J. Kowalska},
title = {Jeden},
location = {Warszawa},
year = {2003}
}
@book{ k,
author = {K. Maciej},
title = {Very Long and Verbose Ttile: even with longer subtitle},
shorttitle = {Short Title},
location = {Warszawa},
year = {2031}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map[overwrite]{
\step[fieldsource=shorttitle, match=\regexp{\A.+\Z}, final]
\step[fieldset=shorttitle, fieldvalue={\addspace\bibellipsis}, append] % recommended
% \step[fieldset=shorttitle, fieldvalue={\unexpanded{\addspace(\ldots)\isdot}}, append] % if you really need the parentheses
}
}
}
\begin{document}
ipsum \footcite{k}
Lorem \footcite{kowalska1}
ipsum \footcite{k}
\end{document}
答案2
如果我们足够细心,可以直接更改字段格式citetitle
。我们需要确保我们shorttitle
此刻确实在显示。这就是它的\ifshorttitle
作用,它会检查字段是否shorttitle
使用了labeltitle
,以及shorttitle
和title
是否不同。然后我们\ifshorttitle{\shorttitlepunct}{}
在适当的位置添加。
\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{polish}
\usepackage[
style=verbose-trad2,
isbn=false,
backend=biber]{biblatex}
\newcommand*{\ifshorttitle}{%
\ifboolexpr{test {\iffieldequalstr{labeltitlesource}{shorttitle}}
and not test {\iffieldsequal{shorttitle}{title}}}}
\newcommand*{\shorttitlepunct}{\addspace\bibellipsis}% or {{\normalfont\addspace\bibellipsis}}
\DeclareFieldFormat{citetitle}{\mkbibemph{#1\ifshorttitle{\shorttitlepunct}{}}}
\DeclareFieldFormat
[article,inbook,incollection,inproceedings,patent,thesis,unpublished]
{citetitle}{\mkbibquote{#1\ifshorttitle{\shorttitlepunct}{}\isdot}}
\DeclareFieldFormat
[suppbook,suppcollection,suppperiodical]
{citetitle}{#1\ifshorttitle{\shorttitlepunct}{}}
\begin{filecontents}{\jobname.bib}
@book{ kowalska1,
author = {J. Kowalska},
title = {Jeden},
location = {Warszawa},
year = {2003}
}
@book{ k,
author = {K. Maciej},
title = {Very Long and Verbose Ttile: even with longer subtitle},
shorttitle = {Short Title},
location = {Warszawa},
year = {2031}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
ipsum \autocite{k}
Lorem \autocite{kowalska1}
ipsum \autocite{k}
Lorem \autocite{kowalska1}
\end{document}