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.

Background

If the following PSTricks diagram

% Circle.tex
\documentclass{article}
\usepackage{pstricks}
\pagestyle{empty}

\begin{document}
\pspicture(-1,-1)(1,1)
\rput(0,0){$E\not=mc^2$}
\pscircle*[linecolor=yellow,opacity=0.5]{1}
\endpspicture
\end{document}

is compiled with MethodA.bat below,

rem MethodA.bat takes an input file name without extension
latex %1
dvips -D10000 %1 -E -o %1-temp.eps
epstool --copy --bbox %1-temp.eps %1.eps

I got a huge EPS output to which the raw PSTricks libraries are attached.

In How to remove PSTricks dictionary or library codes in an EPS file produced by dvips?, I asked this issue and Herbert suggested me to reprocess the resulting EPS with GhostScript in advance. I have tried it with MethodB.bat instead of MethodA.bat as follows.

rem MethodB.bat takes an input file name without extension
latex %1
dvips -D10000 %1 -E -o %1-temp.eps
gswin32c -r10000 -dNOCACHE -dPDFSETTINGS=/prepress -dNOPAUSE -dBATCH -sDEVICE=epswrite -sOutputFile=%1.eps %1-temp.eps

Issue & Question

I import the resulting EPS image from within the following main input file,

% Main.tex
\documentclass{article}
\usepackage{graphicx}

\begin{document}
\includegraphics{Circle}
\end{document}

which is compiled with Batch.bat as follows,

rem Batch.bat takes an input file name without extension.
latex -interaction=nonstopmode %1
latex -interaction=nonstopmode %1
dvips -D10000 -t unknown %1
ps2pdf -r10000 -dCompatibilityLevel#1.5 -dAutoRotatePages#/None -dPDFSETTINGS#/prepress %1.ps

The EPS produced by MethodA.bat preserves the transparency but the one produced by MethodB.bat does not. Thus invoking GhostScript in MethodB.bat is the source of problem, GhostScript seems to be unable to work with transparency. How to fix it?

share|improve this question
1  
Leave the pstricks library codes in. It only makes a difference of 100kB at most, and even this is disappears once you process the eps into pdf. –  Lev Bishop Jul 29 '11 at 20:11
    
Loading pst-barcode takes 700kB. Unused packages should not be loaded as they will make bigger EPS files. –  xport Jul 29 '11 at 20:36
    
Pst-barcode is special, being significantly larger than other pstricks pacakges. It still doesn't matter since it all gets removed when you actually produce a pdf from the eps figures. –  Lev Bishop Jul 30 '11 at 1:35

1 Answer 1

up vote 2 down vote accepted

PostScript in Level 2 doesn't know any kind of transparency, the reason why ghostscript uses its own commands only when it uses the pdfwrite device.

share|improve this answer
    
+1 How to promote my PSTricks diagram to a higher level such that it can be understood by GhostScript with epswrite? –  xport Jul 29 '11 at 18:04
1  
I cannot see any senseful reason to use ghostscript for writing an eps file from a ps file. PostScript Level3 is not available on nearly all printers –  Herbert Jul 29 '11 at 18:12
    
EPS produced by dvips -E input.dvi -o output.eps is too huge because it contains raw PSTricks libraries. Reprocessing the EPS to remove raw PSTricks libraries does make sense here. –  xport Jul 29 '11 at 18:29
1  
we had this discussion more than hundred times ... space so no more a problem today. –  Herbert Jul 29 '11 at 18:37
    
level3 wouldn't help here anyway. –  Lev Bishop Jul 29 '11 at 20:10

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.