所以这可能是一个有点具体的问题,但我需要 BibLaTeX 以长 DMY 格式输出日期 - 即 dd.mm.yyyy。
BibLaTeX 文档指出可以使用该date = terse
设置实现 dd/mm/yyyy。
但是,我希望日期分隔符为点而不是斜线。浏览文档时,我没有找到任何简单的方法来实现这一点。
以下是我正在做的工作的 MWE(及其输出),大致如此。我一直在修改该style = chem-rsc
包以满足我的需求(或者更确切地说是我所在大学的要求),但我在这里省略了这些更改,因为它们与本例无关。
\documentclass[a4paper,12pt,british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[labelfont=bf]{caption}
\usepackage[british]{babel}
\usepackage{filecontents}
\usepackage{csquotes}
\usepackage[backend=biber,
style = chem-rsc,
autocite = superscript,
autopunct = true,
sorting = none,
sortcites = true,
eventdate = terse,
datezeros = true,]{biblatex}
\begin{filecontents}{viitteet.bib}
@inproceedings{othusitse2015,
author = {Nhlanhla Othusitse and Edison Muzenda},
title = {Predictive Models of Leaching Processes: A Critical Review},
booktitle = {7th Int. Conf. on Latest Trends in Engineering \& Technology},
location = {Irene, Pretoria, South Africa},
eventdate = {2015-11-26/2015-11-27},
pages = {136--141},
}
\end{filecontents}
\addbibresource{viitteet.bib}
\begin{document}
\section{Section}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\supercite{othusitse2015}
\printbibliography
\end{document}
编辑:
我尝试修补类似的东西......
\DefineBibliographyExtras{british}{%
\renewrobustcmd*{\bibdatesep}{\adperiod}
}
...但无济于事。
答案1
下列的moewes 在这里回答,您可以从具有所需日期格式的语言定义文件中复制日期格式宏,即german.lbx
:
\documentclass[a4paper,12pt,british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[labelfont=bf]{caption}
\usepackage[british]{babel}
\usepackage{filecontents}
\usepackage{csquotes}
\usepackage[backend=biber,
style = chem-rsc,
autocite = superscript,
autopunct = true,
sorting = none,
sortcites = true,
eventdate = terse,
datezeros = true,]{biblatex}
\DefineBibliographyExtras{british}{%
\protected\def\mkbibdatelong#1#2#3{%
\iffieldundef{#3}
{}
{\mkbibordinal{\thefield{#3}}%
\iffieldundef{#2}{}{\nobreakspace}}%
\iffieldundef{#2}
{}
{\mkbibmonth{\thefield{#2}}%
\iffieldundef{#1}{}{\space}}%
\iffieldbibstring{#1}
{\bibstring{\thefield{#1}}}
{\dateeraprintpre{#1}\stripzeros{\thefield{#1}}}}%
\protected\def\mkbibdateshort#1#2#3{%
\iffieldundef{#3}
{}
{\mkdayzeros{\thefield{#3}}\adddot
\iffieldundef{#2}{}{\thinspace}}%
\iffieldundef{#2}
{}
{\mkmonthzeros{\thefield{#2}}%
\iffieldundef{#1}
{}
{\iffieldundef{#3}{/}{\adddot\thinspace}}}%
\iffieldbibstring{#1}
{\bibstring{\thefield{#1}}}
{\dateeraprintpre{#1}\mkyearzeros{\thefield{#1}}}}%
}
\begin{filecontents}{viitteet.bib}
@inproceedings{othusitse2015,
author = {Nhlanhla Othusitse and Edison Muzenda},
title = {Predictive Models of Leaching Processes: A Critical Review},
booktitle = {7th Int. Conf. on Latest Trends in Engineering \& Technology},
location = {Irene, Pretoria, South Africa},
eventdate = {2015-11-26/2015-11-27},
pages = {136--141},
}
\end{filecontents}
\addbibresource{viitteet.bib}
\begin{document}
\section{Section}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\supercite{othusitse2015}
\printbibliography
\end{document}