I am using the code provided in this question regarding coloring citations.

The problem is that I don't know how to make (redefine) the cite command to add parentheses around the year


Here is a simple hack, defining a colortextcite command, based on \textcite:


\usepackage[backend=biber, uniquename=false, maxbibnames=99, maxcitenames=2, citestyle=authoryear, bibstyle=authoryear]{biblatex}





  author = {Bartolini, Stefano AND Mair, Peter},
  title = {Identity, Competition and Electoral Availability. The Stabilization of European Electorates 1885-1985},
  publisher = {Cambridge University Press},
  year = 1990,
  address = {Cambridge},



Text \cite{bartolini-mair-1990} text

Text \parencite{bartolini-mair-1990} text

Text \colortextcite{bartolini-mair-1990} text



enter image description here

  • i need to learn how to create my own command/macros...the problem is that i don't know where to start and i don't understand their syntax (e.g. in your hack i don't understand the purpose of [1] and #1 – Yorgos Feb 25 at 12:10
  • [1] is the number of arguments of the macro, and inside the definition of the macro, #1 denotes this argument (which here is replaced by the biblatex key). This being said, you can find lots of tutorials on tug.org. – Bernard Feb 25 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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