我用它使我的参考书目中的日期显示为年月日,但月份即将显示为例如“Mar”。 但我不想要尾随的点。
\iffieldbibstring{#1}{\bibstring{\thefield{#1}}}{\stripzeros{\thefield{#1}}}\iffieldundef{#2}{}{\nobreakspace}%
\iffieldundef{#2}
{}
{\mkbibmonth{\thefield{#2}}%
\iffieldundef{#3}{}{\space}}%
\iffieldundef{#3}
{}
{\thefield{#3}}%
}%
因此它显示为例如(访问于 2015 年 3 月 19 日)但我想要(访问于 2015 年 3 月 19 日)
我找不到缩写的定义位置,我试过了,dateabbrev=false
但我得到了(2015 年 3 月 19 日访问)。
这是一个最小的工作示例:
\documentclass[a4paper,11pt,british]{article}
\usepackage[british]{babel}
\usepackage{csquotes}
\begin{filecontents}{mwe.bib}
@report{example2015,
author = {John Doe},
title = {Example Website},
url = {http://www.example.com/},
urldate = {2015-03-19},
year = {2015}
}
\end{filecontents}
\usepackage[backend=biber,style=numeric,date=comp,urldate=comp]{biblatex}
\makeatletter
\DefineBibliographyExtras{\bbl@main@language}
{
\protected\def\mkbibdatelong#1#2#3{%
%<year><month><day>
\iffieldbibstring{#1}{\bibstring{\thefield{#1}}}{\stripzeros{\thefield{#1}}}\iffieldundef{#2}{}{\nobreakspace}%
\iffieldundef{#2}
{}
{\mkbibmonth{\thefield{#2}}%
\iffieldundef{#3}{}{\space}}%
\iffieldundef{#3}
{}
{\thefield{#3}}%
}%
}
\makeatother
\addbibresource{mwe.bib}
\begin{document}
Hello.\autocite{example2015}
\printbibliography
\end{document}
答案1
月份缩写的定义在language.lbx
文件中,在您的情况下在english.lbx
文件中。要修改行为,您可以使用本地自定义命令(请参阅 biblatex 手册第 3.8 节,textbook biblatex
)
\DefineBibliographyStrings{english}{
january = Jan ,
february = Feb ,
march = Mar ,
april = Apr ,
may = May ,
june = Jun ,
july = Jul ,
august = Aug ,
september = Sep,
october = Oct ,
november = Nov ,
december = Dec ,
}