Adding \color{<value>} inside the rightmost cell of a 2x1 table creates a vertical offset relative to the leftmost cell. Why, and how to remedy it?
\documentclass{report}
\usepackage{xcolor}
%geometry----------------------------------------------------------
\usepackage[a6paper]{geometry}
\savegeometry{default}
\usepackage{xparse}%----------------------------------------------
\NewDocumentCommand{\thisdoc}{}
{abcdefghijklmnopqrs}
\usepackage{tabularx}%---------------------------------------------
\newcolumntype{R}{>{\raggedleft\arraybackslash}X}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\NewDocumentCommand{\myheaderii}
{+mm}
{%
\begin{tabularx}{\textwidth}{@{}lR@{}}#1\end{tabularx}
}
\begin{document}
\pagestyle{empty}
\begin{titlepage}TITLE\end{titlepage}
% ---------------------------------
\newpage
\pagecolor{white}
\myheaderii{%
\thisdoc
}
{%
1/2
}
\myheaderii{%
\thisdoc
}
{%
\color{red}% CULPRIT
1/2
}
\end{document}

\textcolor{red}{1/2}instead of\color{red}1/2an option? I have not yet an explanation for the behaviour of\color, but\textcolorworks. – gernot Oct 12 '19 at 18:43\begin{document} \begin{tabularx}{\textwidth}{@{}lX@{}}text&\color{red} 1/2\end{tabularx} \end{document}`
– leandriis Oct 12 '19 at 18:51