When I manually colorize the capitals of words the kerning breaks. Is there a way to preserve this without manually adding in negative spaces?

The error



1 Answer 1


Compiling your document with LuaLaTeX instead of pdfLaTeX and loading the luacolor package solves the kerning issue.

If you need to load the xcolor package as well, you should load xcolor before luacolor. E.g., if you need to load xcolor with the option table, you should run \usepackage[table]{xcolor} before running \usepackage{luacolor}.

enter image description here

% !TEX TS-program = lualatex
  \verb+{\color{red}W}onder+     & {\color{red}W}onder \\
  \verb+\textcolor{red}{W}onder+ & \textcolor{red}{W}onder \\
  \verb+Wonder+                  & Wonder \\

You must log in to answer this question.

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