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.
\documentclass{beamer}
\usepackage{filecontents}
\usepackage[utf8]{inputenc}
\newenvironment{emptyenv}{}{}
% 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...
\begin{document}
\begin{frame}
%\color{green} % works on all
\begin{minipage}{\textwidth}
%\color{red} % Doesn't work with pdflatex or LaTex... but works with XeLaTeX
\begin{center}
%\begin{flushleft}
%%\begin{tabular}{c}
\LARGE\bfseries
%%%\begin{emptyenv}
\color{blue} % Doesn't work with pdflatex or LaTex... but works with XeLaTeX... inside tabular works on all
Test (Colored?)
%%%\end{emptyenv}
%%\end{tabular}
%\end{flushleft}
\end{center}
\end{minipage}
\end{frame}
\end{document}
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
\begin{document}
\begin{center}...
I suggest\centering
to avoid additional vertical spaces.! LaTeX Error: Can be used only in preamble.
please edit to be error free and show the log you get from the document