Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to get rid of the weird parenthesis around the number in the \textcite command. It did not used to be there. I think it all happened after an update. Also if you use hyerref the number and brackets are linked.

MWE:

\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}

Output:

enter image description here

Based on @Herbert answer, the problem is partially solved however the hyperref problem still exists. Can only the number be in color?

MWE:

\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}

Output: enter image description here

share|improve this question
1  
I'll take (yet) another look at this. I'm beginning to suspect there may be a an issue in biblatex with the way labelitem is handled. –  Joseph Wright Dec 17 '12 at 16:17
    
Problem hopefully located: will update CTAN soon. –  Joseph Wright Dec 17 '12 at 22:14
add comment

1 Answer

use

[...]
\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
[...]
share|improve this answer
    
Probably what I'll do, but I'm concerned that the general business with labelnumber is much more complicated that it should be. –  Joseph Wright Dec 17 '12 at 17:37
    
Thanks. Still there is an issue with label number and hyperref. Question is updated now. –  rowman Dec 17 '12 at 18:16
    
@rowman: I cannot see it when I use \renewbibmacro*{cite}{%. I have current TeXLive 2012 –  Herbert Dec 17 '12 at 20:10
    
Strange. I also have updated TeXLive 2012. I am using Ubuntu. Anyway, might be easier to wait for the update to CTAN. Thanks ! –  rowman Dec 18 '12 at 9:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.