我正在使用 biblatex 来管理我的参考书目。我希望能够将引文和参考文献的标签从 [1] 更改为[参考文献 1]最后是一些颜色。我能够使用以下方法更改文档中的标签:
\documentclass{report}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{nature,
author = {Rosa Rademakers and Manuela Neumann and Ian R. Mackenzie},
title = {Advances in understanding the molecular basis of frontotemporal dementia - elongated title},
journal = {Nature Reviews Neurology},
volume = {8},
year = {2012},
pages = {423-434},
doi = {10.1038/nrneurol.2012.117},
}
\end{filecontents*}
\usepackage[style=ext-numeric, defernumbers=true, sorting=none]{biblatex}
\addbibresource{\jobname.bib}
\usepackage[svgnames]{xcolor}
\usepackage{color, colortbl}
\definecolor{bracketcol}{RGB}{12,127,172}
\newcommand{\mkbibbracketscol}[1]{\textbf{\textcolor{bracketcol}{\mkbibbrackets{#1}}}}
\DeclareCiteCommand{\cite}[\mkbibbracketscol]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite}}
{\multicitedelim}
{\usebibmacro{postnote}}
\begin{document}
\cite{nature}
\printbibliography[heading=bibintoc]
\end{document}
但它只会在文档中发生变化,而不会影响参考书目部分。我想问一下我该怎么做?
答案1
书目中的引文标签的格式numeric
由字段格式控制labelnumberwidth
。您只需为其提供适当的定义。
\documentclass{article}
\usepackage[style=ext-numeric, defernumbers=true, sorting=none]{biblatex}
\usepackage[svgnames]{xcolor}
\definecolor{bracketcol}{RGB}{12,127,172}
\newcommand{\mkbibbracketscol}[1]{\textbf{\textcolor{bracketcol}{\mkbibbrackets{#1}}}}
\DeclareFieldFormat{labelnumberwidth}{\mkbibbracketscol{#1}}
\DeclareCiteCommand{\cite}[\mkbibbracketscol]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite}}
{\multicitedelim}
{\usebibmacro{postnote}}
\addbibresource{biblatex-examples.bib}
\begin{document}
\cite{sigfridsson}
\printbibliography[heading=bibintoc]
\end{document}