1

When I (1) change the color of the mainfont with the fontspec package, (2) put some text in a textblock environment and (3) compile the document with LuaLaTex, the resulting pdf when opened with Adobe Reader 9 displays the following error message:

An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem

The document opens correctly and looks all good. However, this error message is annoying and does not look very professional. When I remove the colour specification in \setmainfont options, the error disappears.

Here is a MWE. Also, notice how the hyphens are kept black, unlike the main body of the text which is correctly painted in red:

\documentclass[]{article}

\usepackage[overlay, absolute]{textpos}
\usepackage{xcolor}
\usepackage[]{fontspec}

\setmainfont[Color = red]{Latin Modern Roman}
\begin{document}
    \begin{textblock}{5}(5, 5)
        LaTeX is a high-quality typesetting system; it includes features designed for the production of technical and scientific documentation. LaTeX is the de facto standard for the communication and publication of scientific documents.
    \end{textblock}
\end{document}

Which results in:

enter image description here

I'm working in TeXstudio 2.6.6. in Ubuntu 14.04 LTS. The compilation is done with the following command "lualatex -synctex=1 -interaction=nonstopmode %.tex". The compilation ends without any error or warning.

Am I the only one experiencing this issue or am I doing something wrong?

closed as off-topic by Philipp Gesang, user13907, user31729, Andrew, Werner Apr 20 '15 at 21:21

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    I can not reproduce the error with "LuaTeX, Version beta-0.79.1 (TeX Live 2014) (rev 4971)" and AR 9.5.5. Which version of LuaTeX do you use? But the hyphens are black. – Martin Schröder Apr 14 '15 at 15:04
  • 1
    This type of color support is a bit "inofficial", it was only added to to copy the xetex feature (github.com/lualatex/luaotfload/issues/41). I don't know if it can be fixed, but you should add an issue to the luaotfload issue tracker. – Ulrike Fischer Apr 15 '15 at 9:00
  • 1
    The issue will be addressed in the upcoming release of Luaotfload. Also, as @Ulrike-Fischer rightfully pointed out, the font-based colorization is little more than a hack for compatibility. Please consider using a proper colorization package instead. – Philipp Gesang Apr 20 '15 at 20:38
  • 4
    I'm voting to close this question as off-topic because it’s something in between a bug report and a feature request for Luaotfload concerning borderline supported functionality ;) The next release will come with a fix. – Philipp Gesang Apr 20 '15 at 20:41
  • 1
    @Jean-Sébastien Gosselin leave the question for reference, it’s valid just IMO not appropriate for this site. Regarding colorization perhaps start with the luacolor package. It’s specifically geared toward the Luatex engine so it should be one of the best options. I’d recommend searching around for other suggestions especially by the crowd that actually do use Latex ;) – Philipp Gesang Apr 21 '15 at 4:59