在 bibtex 上自定义 urldate

在 bibtex 上自定义 urldate

我正在为我的 bibtex 使用以下内容。

\usepackage[citestyle=authoryear,bibstyle=mla,sorting=nty]{biblatex} % bibliography

这将显示我的“参考文献”部分的以下内容。 在此处输入图片描述

以下是bibtex的代码。

@article{alberts,
author = {Alberts, Bruce},
title = {Cell theory},
journal = {Britannica},
url = "britannica.com/science/cell-theory",
urldate = {2023-06-28},
date = {2023-06-28}
}

我想让我的参考书目看起来像

阿尔伯特斯,布鲁斯。“细胞理论”。大英百科全书,2023 年 6 月 28 日。britannica.com/science/cell-theory。2023 年 6 月 28 日访问。

我怎样才能格式化urldate为“日月年”样式?

这是我的包裹和序言。

\documentclass[12pt,a4paper]{article}

\begin{filecontents}[overwrite]{references.bib}
    @article{alberts,
    author = {Alberts, Bruce},
    title = {Cell theory},
    journal = {Britannica},
    url = "britannica.com/science/cell-theory",
    urldate = {2023-06-28},
    date = {2023-06-28}
}
\end{filecontents}

\usepackage[utf8]{inputenc} % International characters
\usepackage[T1]{fontenc} % Font encoding for international characters
% \usepackage{fouriernc} % Use the New Century Schoolbook font
\usepackage{lmodern} % Use Latin Modern font
% \usepackage{libertine} % Use LLibertine font
% \usepackage{libertinust1math}% Use LLibertine math font
\usepackage{geometry} % Setting page geometry (margins)
\usepackage{blindtext} % Lorem ipsum
\usepackage{textcomp} % For the trademark symbol
\usepackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule in tables for horizontal lines
\usepackage{microtype} % A few refinements to typography that are hardly noticeable
\usepackage[normalem]{ulem} %Strikethrough text
\usepackage{amssymb}
\usepackage{calc}
\usepackage{cases}

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyheadoffset{0cm}
\renewcommand{\headrulewidth}{0pt} 
\renewcommand{\footrulewidth}{0pt}
\fancyhead[R]{\thepage}
\fancypagestyle{plain}{%
  \fancyhf{}%
  \fancyhead[R]{\thepage}%
}

%Itemize
\usepackage{multicol}
 \usepackage{setspace}

%Fonts
\usepackage[english]{babel}
\usepackage{amsfonts}

% Package must come last
\usepackage{xurl}
\usepackage[bookmarks=true]{hyperref} % Hyperrefs for bookmarks
\hypersetup{
    colorlinks=true,
    citecolor=black,
    linkcolor=blue,
    filecolor=magenta,      
    urlcolor=blue,
}
\usepackage{bookmark} % Adds metadata to PDF for bookmarking
% Package settings & macros

\renewcommand{\contentsname}{Contents} % Contents heading

\urldef{\usePercentage}\url{%} % Using the percent symbol in documents: \usePercentage

\usepackage[citestyle=authoryear,bibstyle=mla,sorting=nty]{biblatex} % bibliography

\usepackage{url}
\usepackage{appendix}

\usepackage[autostyle]{csquotes}

\renewcommand{\nameyeardelim}{\addcomma\addspace}
\addbibresource{references.bib}

\def\signed #1{{\leavevmode\unskip\nobreak\hfil\penalty50\hskip2em
  \hbox{}\nobreak\hfil(#1)%
  \parfillskip=0pt \finalhyphendemerits=0 \endgraf}}

\newsavebox\mybox
\newenvironment{aquote}[1]
  {\savebox\mybox{#1}\begin{quote}}
  {\signed{\usebox\mybox}\end{quote}}

\geometry{margin=1in}
\setlength{\parskip}{1ex}
  
\begin{document}
 
Parencite \parencite{alberts}.
 
\printbibliography

\end{document}

相关内容