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 need to create PNG and PDF files from the same .tex source using pdflatex (Texlive 2010, Ubuntu).

To make PNG files, there's no problem with dvipng utility.

But with PDF files (created by the pdflatex --output-format=pdf command), I've no colored output, just black text.

This is my code, can I fix this problem? How?

\documentclass[dvips]{minimal}

\usepackage{color}

\definecolor{colore}{cmyk}{0.3000,1.0000,1.0000,0.3000}

\begin{document}

\textcolor{colore}{ test text }

\end{document}
share|improve this question
    
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). –  Martin Scharrer Sep 21 '11 at 12:41
    
    
Sorry, i'll write better syntax next time :) PNG Works well, trimmed and colored, but not pdf :( –  Flavio Sep 21 '11 at 13:59
add comment

1 Answer

It's a common mistake to specify the dvips or pdftex options. This should never be done in the global options nor when loading graphicx and color.

Only drivers different from these (dvipdfm, for instance) should be specified if needed.

share|improve this answer
    
Thank's, but removing dvips from .tex and using dvipdfm on output i've wrong output. There's no way to let dvips and color package live together? –  Flavio Sep 21 '11 at 13:54
    
You don't need dvipdfm unless you use that program for producing the PDF file. That's the meaning of if needed. Don't specify any option for the standard drivers such as dvipng and dvips or for pdflatex. –  egreg Sep 21 '11 at 14:46
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.