我找到如何將彩色影像轉換為灰階(黑白)比例的答案,請參閱以下連結:
但是,如果我遵循建議,即dvips -I g ,則會出現一些錯誤“dvips: ! Invalid option `-I'. Try --help for more information.”,請建議我的標籤和我的標籤出了什麼問題標籤如下:
\documentclass{book}
\usepackage{color,graphicx}
\begin{document}
\begin{figure}
\centerline{\includegraphics{Color.eps}}
\end{figure}
\end{document}
答案1
最後我得到了解決我的要求的答案,參考https://groups.google.com/forum/#!msg/comp.text.tex/E2EtYQC-A0Y/RoLCFm_5CAAJ特別感謝赫伯特......答案如下:
\documentclass{book}
\usepackage{graphicx}
\def\setGray{\special{ps:
true setglobal globaldict begin
/setrgbcolor { 0.07 mul exch 0.71 mul add exch 0.21 mul add setgray
} def
end false setglobal
}}
\AtBeginDocument{\setGray}
\begin{document}
\begin{figure}
\setGray
\centerline{\includegraphics{colorrgbmake2.eps}}
\end{figure}
\clearpage
\begin{figure}
\setGray
\centerline{\includegraphics{colorrgbmake2.eps}}
\end{figure}
\end{document}