MiKTeX and proTeXtBeamer + ps4pdf

Information and discussion about MikTeX distribution for Windows and the related proTeXt: Installing, updating, configuring
Post Reply
TWbeta
Posts: 2
Joined: Sat Mar 01, 2008 6:42 pm

Beamer + ps4pdf

Post by TWbeta »

Since I installed Miktex 2.7 I had the following problem when creating a Beamer presentation with pictures: Before I had to do the three steps:

latex %n
dvips -t a4 -P pdf -G0 -o %n-pics.ps %n.dvi
ps2pdf %n-pics.ps %n-pics.pdf

after which pdflatex would work fine.

The problem is that now, the %n-pics.ps file is not correctly created (can't be opened with gv for instance).
I found the problem and I can fix manually. In the .ps file: each page is a figure with the psfrag replacement like that:

%%Page: 1 1
TeXDict begin 1 0 bop 0 -591 a
SDict begin [ {ThisPage}<</Trans << /S /R >> >> /PUT pdfmark end
0 -591 a
-32891 -32891 32891 32891 4661699 0 19333534
...

If I cancel the part
"0 -591 a
SDict begin [ {ThisPage}<</Trans << /S /R >> >> /PUT pdfmark end
0 -591 a"
i.e., keeping only
%%Page: 1 1
TeXDict begin 1 0 bop
-32891 -32891 32891 32891 4661699 0 19333534

then I can convert in pdf and all works.

Does one understand where these extra lines comes from?
Can one fix the error automatically (without opening the postscript file)?

Thank you

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Beamer + ps4pdf

Post by localghost »

TWbeta wrote:Since I installed Miktex 2.7 I had the following problem when creating a Beamer presentation with pictures […]
Which file format do these pictures have?


Best regards
Thorsten
TWbeta
Posts: 2
Joined: Sat Mar 01, 2008 6:42 pm

Re: Beamer + ps4pdf

Post by TWbeta »

The figures are in .eps format. I use psfrag to put the formula I want instead of a tag but this is not directly compatible with pdflatex. pdflatex is however used for beamer presentations.

Example of a picture:
\PSforPDF{
\psfrag{x}[c][][0.8]{$x$}
\psfrag{h}[c][][0.8]{$h(x,t)$}
\includegraphics[height=2.5cm]{h.eps}
}

Until my last update, all was working fine. Now, not anymore.
If there is a simple way to create pdf pictures from the ps with the psfrag replacements, this would also solve the practical problem (by not using ps4pdf anymore).
Post Reply