Biblatex urldate - 如何用方括号替换括号

Biblatex urldate - 如何用方括号替换括号

我想制作一个以尖括号结尾的在线资源参考列表urldate。例如,我希望以下示例以“[访问日期:2016 年 4 月 1 日]”结尾。

在此处输入图片描述

以下是最小的工作示例:

\documentclass[12pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage[british]{babel}
\usepackage[left=2.00cm, right=2.00cm, top=2.00cm, bottom=2.00cm]{geometry}
\usepackage[backend=biber, citestyle=authoryear-ibid,bibstyle=authoryear, sorting=nty, urldate=long]{biblatex}
\usepackage[hidelinks]{hyperref}
\DefineBibliographyStrings{english}{urlseen = {Accessed }    
}
\usepackage{filecontents}
\begin{filecontents}{references.bib} 
@online{Jerald,
author = {Craig D. Jerald},
title = {School culture:'The hidden curriculum'},
year = {2006},
url = {<http://files.eric.ed.gov/fulltext/ED495013.pdf>},
organization = {The Center for Comprehensive School Reform and            Improvement},
urldate = {2016-04-01},
}
\end{filecontents}

\addbibresource{references.bib}

\begin{document}

Some statement \parencite{Jerald}.

\printbibliography[title={References}]
\end{document}

通过浏览此网站,我获得了调整以下内容所需的信息:

\DeclareFieldFormat{urldate}{\mkbibparens{\bibstring{urlseen}\space#1}}

看来我应该\mkbibparens用一个指定方括号的字符串来替换,但我不知道那会是什么字符串。我应该强调的是,我不想为了出版年份或任何其他用途而更改括号样式,只是调整一下呈现方式urldate

答案1

您可以使用 获得(上下文相关的)方括号\mkbibbrackets。它相当于\mkbibparens并根据嵌套级别切换使用的括号。

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[british]{babel}
\usepackage[backend=biber, style=authoryear-ibid, urldate=long]{biblatex}
\usepackage[hidelinks]{hyperref}

\DeclareFieldFormat{urldate}{\mkbibbrackets{\bibstring{urlseen}\space#1}}

\DefineBibliographyStrings{english}{
  urlseen = {Accessed}    
}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib} 
@online{Jerald,
  author       = {Craig D. Jerald},
  title        = {School culture: 'The hidden curriculum'},
  year         = {2006},
  url          = {http://files.eric.ed.gov/fulltext/ED495013.pdf},
  organization = {The Center for Comprehensive School Reform and Improvement},
  urldate      = {2016-04-01},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
Some statement \parencite{Jerald}.

\printbibliography
\end{document}

Jerald, Craig D. (2006)。学校文化:“隐性课程”。综合学校改革与改进中心。网址:http://files.eric.ed.gov/fulltext/ED495013.pdf [2016 年 4 月 1 日访问]。

相关内容