I would like to have the diacritical marks stand out visually by being colored differently. For example, can I have â in which the circumflex is in red, and the 'a' is in black? When I use \textcolor{...} for the diacritical mark, it is not placed correctly over (or under) the letter.


2 Answers 2


The main problem is when you use a T1 encoded font, in which accented chars are no longer composed by overimposing the diacritic on a "unaccented" char, but instead they are a new glyph which includes the diacritic as part of its design.

For this case, the only solution I can imagine is a hack: first write the accented char in red, then backtrace and draw in black the same char but without accent:


a \trick{â}{a} â


  • I tried this with latex on Ubuntu and just got two regular a's with no accent or color. Jan 12, 2015 at 4:58
  • @JosephGarvin Sounds like a encoding issue. Instead of â, try writing \^a. Also, it could be a font problem; you can try using \usepackage{lmodern} instead of \usepackage[T1]{fontenc}
    – JLDiaz
    Jan 12, 2015 at 8:50

Perhaps the following:



\kern-\dimexpr(\wd\accentboxa+\wd\accentboxb)/2\relax #1}





enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .