The next is the MWE that demonstrates the failure of pdflatex and LaTeX to color text that is inside minipage in a center or flushleft/flushright environment using command \color. XeLaTeX works fine and this makes me to think that it probably is a bug. textcolor command works without this problem but this is normal because creates it's own"environment". A tabular environment made me think that an empty environment inside center or flashleft could solve the problem... but doesn't.



% Usage: Run with pdflatex and with LaTeX... no color... 
% Run with XeLaTeX... color is ok...
% Test the commented colors in other places with all engines...
% Replace center environment with commented flashleft...
%\color{green} % works on all
%\color{red} % Doesn't work with pdflatex or LaTex... but works with XeLaTeX
\color{blue} % Doesn't work with pdflatex or LaTex... but works with XeLaTeX... inside tabular works on all
Test (Colored?) 

I just asking if it is a bug that we have to report or if I am losing something important like: "This is why we have the \textcolor command!". If the second, please tell me where to find info.

Edit: My version is : pdfTeX 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian)

Logfile here (runned pdflatex and gave black text): https://sites.google.com/site/koleygrfreelancer/home/readywork/testtitlecolor.log?attredirects=0&d=1

  • 1
    works fine for me with pdflatex. Nov 4, 2017 at 21:47
  • 1
    Works for me too with pdflatex, TL 2017 on Linux with daily updates -- by the way, there's a second \begin{document}
    – user31729
    Nov 4, 2017 at 21:48
  • 1
    off-topic: instead of \begin{center}... I suggest \centering to avoid additional vertical spaces. Nov 4, 2017 at 21:52
  • 1
    The document produces the error ! LaTeX Error: Can be used only in preamble. please edit to be error free and show the log you get from the document Nov 4, 2017 at 21:55
  • 4
    I'm voting to close this question as off-topic because it doesn't affect latex in general, but Debian packaging of texlive. (Not sure if really have to flag it... but I think this is the right behavior)
    – koleygr
    Mar 29, 2018 at 13:20

1 Answer 1


The problem is still there on my Debian pdfTeX 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian)

The comments made me realize that it is a bug in Debian packaging and I am going to open a bug and report it right now.

Here added the link:


After that I will flag the question as off-topic since it affects just Debian distribution and not texlive in general.

PS: Please let me know someone more experienced if the texlive-latex-recommended (that contains the xcolor or texlive-latex-base is the most possible source of the problem)

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