美国日期格式

美国日期格式

我正在尝试获取美国日期格式:“月日年”。例如“2022 年 2 月 11 日”。基于此处的讨论使用 biblatex 和 polyglossia 进行本地化日期我正在使用\DeclareLanguageMapping{english}{british}。但它所做的只是将“访问”更改为“访问”。

梅威瑟:

\documentclass[letterpaper,openany,12pt,oneside]{book}
\usepackage[letterpaper,left=1.25in,right=1.25in,top=1in,bottom=1in,headheight=12pt,headsep=12pt,ignorehead,ignorefoot]{geometry}
\usepackage[series={A,B},nocritical,noend,noeledsec,nofamiliar,noledgroup]{reledmac}
\linenumsep=-30pt plus 50pt minus 50pt
\ledlsnotesep=-100pt
\ledrsnotesep=-30pt


\usepackage{fontspec}
\usepackage{polyglossia}


\setmainlanguage[variant=us]{english}
\setotherlanguage{hebrew}
\setotherlanguage[variant=ancient]{greek}
\SetLanguageKeys{english}{indentfirst=true}

\setmainfont{Times New Roman}
\newfontfamily\greekfont{SBL BibLit}[
Script=Greek,
Scale=MatchUppercase,
Ligatures=TeX
]
\newfontfamily\hebrewfont{SBL BibLit}[
Script=Hebrew,
Contextuals=Alternate,
Ligatures=Required
]
\usepackage{ucharclasses}
\setDefaultTransitions{\greekfont}{\rmfamily}
\setDefaultTransitions{\rmfamily}{\greekfont}

\usepackage[style=sbl,maxcitenames=3,maxbibnames=100,minnames=1,backend=biber,citepages=omit,fullbibrefs=true,sblfootnotes=false,citereset=chapter,doi=false,urldate=long,url=true,accessdate]{biblatex}

\begin{filecontents}{web.bib}

@online{janzvat,
  author= {Janz, Timothy},
  title = {Greek Paleography: From Antiquity to the Renaissance: 2. Introduction to Minuscule Bookhands},
  url = {https://spotlight.vatlib.it/greek-paleography/feature/2-introduction-to-minuscule-bookhands},
  urldate = {2022-02-11}
  }
\end{filecontents}

\addbibresource{web.bib}
\DeclareLanguageMapping{english}{american}

\begin{document}
Text.\autocite{janzvat}

\printbibliography[title=\normalfont BIBLIOGRAPHY]

\end{document}

答案1

biblatex-sbl明确将 的“长”日期格式重新定义为american“dd MMM yyyy”。如果您想恢复biblatex的美式标准(“MMM dd, yyyy”),可以尝试以下方法

\documentclass{article}

\usepackage{polyglossia}
\setmainlanguage[variant=us]{english}
\SetLanguageKeys{english}{indentfirst=true}
\usepackage[style=sbl, accessdate]{biblatex}

\makeatletter
\DefineBibliographyExtras{american}{%
  \protected\def\mkdaterangecomp{%
    \lbx@us@mkdaterangetrunc@long{long}}%
  \protected\def\mkdaterangeterse{%
    \lbx@us@mkdaterangetrunc@short{short}}%
  \protected\def\mkdaterangecompextra{%
    \lbx@us@mkdaterangetruncextra@long{long}}%
  \protected\def\mkdaterangeterseextra{%
    \lbx@us@mkdaterangetruncextra@short{short}}%
  \protected\def\mkbibdatelong#1#2#3{%
    \iffieldundef{#2}
      {}
      {\mkbibmonth{\thefield{#2}}%
       \iffieldundef{#3}
         {\iffieldundef{#1}{}{\space}}
         {\nobreakspace}}%
    \iffieldundef{#3}
      {}
      {\stripzeros{\thefield{#3}}%
       \iffieldundef{#1}{}{,\space}}%
     \iffieldbibstring{#1}
       {\bibstring{\thefield{#1}}}
       {\dateeraprintpre{#1}\stripzeros{\thefield{#1}}}}%
}
\makeatother

\begin{filecontents}{\jobname.bib}
@online{janzvat,
  author  = {Janz, Timothy},
  title   = {Greek Paleography: From Antiquity to the Renaissance: 2. Introduction to Minuscule Bookhands},
  url     = {https://spotlight.vatlib.it/greek-paleography/feature/2-introduction-to-minuscule-bookhands},
  urldate = {2022-02-11}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
Text\autocite{janzvat}

\printbibliography
\end{document}

Janz,Timothy。“希腊古文字学:从古代到文艺复兴:2. 小写书法简介。” 访问日期:2022 年 2 月 11 日。https://spotlight.vatlib.it/greek-paleography/feature/2-introduction-to-minuscule-bookhands。

相关内容