我的代码如下:
% Using spot colors with xcolor and pstricks.
% process with:
% $ latex xcpst
% $ dvips -h tex.pro -h xcolor.pro -h spot.pro filename.dvi
\begin{filecontents*}{PANTONE300C.pro}
% spot.pro
TeXDict begin
/SpotsCMYK [1 0.62 0.07 0] def
/Pantone300CSpot (Pantone300C) def
/Pantone300CDef SpotsCMYK aload pop Pantone300CSpot
findcmykcustomcolor def
/XC@Pantone300C{ Pantone300CDef 1.0 setcustomcolor}XCdef
/XC@Pantone300C100{ Pantone300CDef 1.0 setcustomcolor}XCdef
/XC@Pantone300C80{ Pantone300CDef 0.8 setcustomcolor}XCdef
/XC@Pantone300C60{ Pantone300CDef 0.6 setcustomcolor}XCdef
/XC@Pantone300C40{ Pantone300CDef 0.4 setcustomcolor}XCdef
/XC@Pantone300C20{ Pantone300CDef 0.2 setcustomcolor}XCdef
/XC@Pantone300C0{ Pantone300CDef 0 setcustomcolor}XCdef
/XC@Pantone300C9{ Pantone300CDef 0.09 setcustomcolor}XCdef
/XC@Pantone300C10{ Pantone300CDef 0.10 setcustomcolor}XCdef
/XC@Pantone300C12{ Pantone300CDef 0.12 setcustomcolor}XCdef
/XC@Pantone300C15{ Pantone300CDef 0.15 setcustomcolor}XCdef
/XC@Pantone300C30{ Pantone300CDef 0.30 setcustomcolor}XCdef
/XC@Pantone300C18{ Pantone300CDef 0.18 setcustomcolor}XCdef
/XC@Pantone300C50{ Pantone300CDef 0.50 setcustomcolor}XCdef
/XC@Pantone300C8{ Pantone300CDef 0.08 setcustomcolor}XCdef
end
\end{filecontents*}
\documentclass{book}
\usepackage[prologue]{xcolor}%
\RequirePackage[dvips]{pstcol}%
\RequirePackage{pst-plot}%
\RequirePackage{pstricks,pst-xkey}%
\input pst-grad%
\input colordvi%%
\usepackage{pgfplots}%
\definecolor{Pantone300C}{cmyk}{1 0 0 0}
\colorlet{Pantone300C100}{Pantone300C}
\colorlet{Pantone300C80}{Pantone300C!10}
\colorlet{Pantone300C60}{Pantone300C!60}
\colorlet{Pantone300C40}{Pantone300C!40}
\colorlet{Pantone300C20}{Pantone300C!20}
\colorlet{Pantone300C10}{Pantone300C!10}%%10 percent
\begin{document}
\colorbox{Pantone300C}{\vbox to 5pc{\hbox to 10pc{\hfill}\vfill}}
\vspace{2pc}
\colorbox{Pantone300C80}{\vbox to 5pc{\hbox to 10pc{\hfill}\vfill}}
\vspace{2pc}
\psframebox[linewidth=0pt,linecolor=white,fillstyle=solid,fillcolor=Pantone300C80]
{\vbox
to 5pc{\vfill\hbox to 5pc{\hfill}\vfill}}
\newpage
\psframebox[linewidth=0pt,linecolor=white,fillstyle=gradient,gradbegin=Pantone300C,gradend=white,gradmidpoint=-.90,framearc=0]{\hbox to 192mm{\vbox to 250mm{}}}
\newpage
\definecolor{gradbeginc}{cmyk}{0, .10, .20, 0.15}
\definecolor{gradendc}{cmyk}{0, 0, .10, 0}
\psset{linestyle=none,fillstyle=gradient,gradlines=60,
gradbegin=gradendc,gradend=gradbeginc,
gradmidpoint=0,gradangle=90}
\psframe(0,0)(13,-22)
Test
\end{document}
没有上述标签\usepackage{pgfplots}
,上述代码可以正常工作,PDF 也可以成功生成,但如果我使用pgfplots
则不会生成 PDF,有人可以建议我如何修复此问题吗?请注意,我应该使用该pgfplots
包。
我使用dvips
以下命令生成 PS 文件:
dvips -Ppdf -h tex.pro -h xcolor.pro -h PANTONE300C.pro test.dvi
然后PS2PDF
生成 PDF 文件