Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I found out, that my color laser printer prints graphics with gray color in RGB-Representation instead of using black (they are more red then gray). So it seems, that PDFLaTeX is creating RGB-PDF-Files.

I only use pstricks-graphics like this one:

\documentclass[letterpaper,dvips]{article}

\usepackage[utf8]{inputenc}
\usepackage{textcomp}

\usepackage{pst-all}

\usepackage{color}

\begin{document}

    \pagestyle{empty}
    \begin{TeXtoEPS}
        \psset{xunit=1cm,yunit=1cm,runit=1cm}
        \begin{pspicture}(2,2)
            \psset{linewidth=1pt}

            \psframe[fillstyle=solid, linewidth=1pt, fillcolor=lightgray](2,2)

        \end{pspicture}

    \end{TeXtoEPS}

\end{document}

I'm creating eps-files with this steps:

  • latex Grafik1.tex
  • dvips Grafik1.dvi -o Grafik1.ps
  • ps2eps --ignoreBB Grafik1.ps

and include the eps-file with \includegraphics

So is there a way to tell the whole document only create CMYK-Colors or an other way to create a document with the wright colors?

EDIT: The basic Problem is solved, but when creating a gradient, colors are used instead of black

\documentclass[letterpaper,dvips]{article}

\usepackage[utf8]{inputenc}
\usepackage{textcomp}

\PassOptionsToPackage{cmyk}{xcolor}% NB: put this *before* \usepackage{pst-all}
\usepackage{pst-all}


\begin{document}

    \pagestyle{empty}
    \begin{TeXtoEPS}
        \psset{xunit=1cm,yunit=1cm,runit=1cm}
        \begin{pspicture}(2,2)
            \psset{linewidth=1pt}

            \psframe[fillstyle=gradient, gradbegin=white, gradend=black](2,2)

        \end{pspicture}

    \end{TeXtoEPS}

\end{document}
share|improve this question
    
The xcolor package provides the package option cmyk. Also related: PDF colour model and LaTeX –  Qrrbrbirlbel Oct 2 '12 at 14:25
    
Does including \selectcolormodel{gray} help? –  percusse Oct 2 '12 at 17:59
    
I edited your second example to put the \PassOptionsToPackage line in the correct place. –  Lev Bishop Oct 2 '12 at 21:57
add comment

1 Answer

Drop the \usepackage{color} and load pstricks this way (because pstricks loads xcolor for you already, at the proper moment):

\PassOptionsToPackage{cmyk}{xcolor}
\usepackage{pst-all}
share|improve this answer
    
Works great - with one exception: gradients. a \psframe with gradient from white to black is created with color instead of black - even if I pass ``gray'' as xcolor option. –  PascalTurbo Oct 2 '12 at 16:19
2  
@PascalTurbo, edit an example showing the gradient problem into the question and maybe someone can help.... –  Lev Bishop Oct 2 '12 at 17:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.