更新后 biblatex ieee 样式出现奇怪的括号

更新后 biblatex ieee 样式出现奇怪的括号

我想去掉\textcite命令中数字周围的奇怪括号。它以前没有。我认为这一切都发生在更新之后。此外,如果您使用 hyerref,数字和括号将链接在一起。

梅威瑟:

\documentclass{article}
\usepackage[english]{babel}
\usepackage[style=ieee]{biblatex}
\addbibresource{ref.bib}
\begin{filecontents}{ref.bib}
@Article{Yang09,
    author = "Hukun Yang and Hongyuan Jiang and Antonio Ramos and Pablo Garc{\'i}a-S{\'a}nchez",
    title = "AC electrokinetic pumping on symmetric electrode arrays",
    journal = "Microfluidics and Nano{\-}fluidics",
    publisher = "Springer Berlin / Heidelberg",
    issn = "1613-4982",
    keyword = "Physics and Astronomy",
    pages = "767--772",
    volume = "7",
    issue = "6",
    url = "http://dx.doi.org/10.1007/s10404-009-0434-5",
    year = "2009"
}
\end{filecontents}

\begin{document}
This is referred in \cite{Yang09} or \textcite{Yang09}.
\end{document}

输出:

在此处输入图片描述

根据@Herbert 的回答,问题部分解决,但超链接问题仍然存在。只有数字可以有颜色吗?

梅威瑟:

\documentclass{article}
\usepackage[english]{babel}
\usepackage[style=ieee]{biblatex}
\usepackage[colorlinks=true]{hyperref}

\makeatletter
\newbibmacro*{cite}{%
  \printtext[bibhyperref]{%
    \printfield{prefixnumber}%
    \printfield{labelnumber}%
    \ifbool{bbx:subentry}
      {\printfield{entrysetcount}}
      {}}}
\renewbibmacro*{textcite}{%
  \iffieldequals{namehash}{\cbx@lasthash}
    {\multicitedelim}
    {\cbx@tempa
     \ifnameundef{labelname}
       {\printfield[citetitle]{labeltitle}}
       {\printnames{labelname}}%
     \addspace\bibopenbracket}%
  \ifnumequal{\value{citecount}}{1}
    {\usebibmacro{prenote}}
    {}%
  \usebibmacro{cite}%
  \savefield{namehash}{\cbx@lasthash}%
  \gdef\cbx@tempa{\bibclosebracket\multicitedelim}}
\makeatother

\addbibresource{ref.bib}
\begin{filecontents}{ref.bib}
@Article{Yang09,
    author = "Hukun Yang and Hongyuan Jiang and Antonio Ramos and Pablo Garc{\'i}a-S{\'a}nchez",
    title = "AC electrokinetic pumping on symmetric electrode arrays",
    journal = "Microfluidics and Nano{\-}fluidics",
    publisher = "Springer Berlin / Heidelberg",
    issn = "1613-4982",
    keyword = "Physics and Astronomy",
    pages = "767--772",
    volume = "7",
    issue = "6",
    url = "http://dx.doi.org/10.1007/s10404-009-0434-5",
    year = "2009"
}
\end{filecontents}

\begin{document}
This is referred in \cite{Yang09} or \textcite{Yang09}.
\end{document}

输出: 在此处输入图片描述

答案1

使用

[...]
\usepackage[style=ieee]{biblatex}

\makeatletter
\renewbibmacro*{cite}{%
  \printtext[bibhyperref]{%
    \printfield{prefixnumber}%
    \printfield{labelnumber}%
    \ifbool{bbx:subentry}
      {\printfield{entrysetcount}}
      {}}}
\renewbibmacro*{textcite}{%
  \iffieldequals{namehash}{\cbx@lasthash}
    {\multicitedelim}
    {\cbx@tempa
     \ifnameundef{labelname}
       {\printfield[citetitle]{labeltitle}}
       {\printnames{labelname}}%
     \addspace\bibopenbracket}%
  \ifnumequal{\value{citecount}}{1}
    {\usebibmacro{prenote}}
    {}%
  \usebibmacro{cite}%
  \savefield{namehash}{\cbx@lasthash}%
  \gdef\cbx@tempa{\bibclosebracket\multicitedelim}}
\makeatother
[...]

相关内容