Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

conversion of tikz pictures into eps readable by Word

630 views
Skip to first unread message

Zarko F. Cucej

unread,
Nov 20, 2010, 12:03:36 AM11/20/10
to
Hi!
I have collection of pictures drawn with TikZ, which I store as pdf and
as dvi figures. Unfortunately publisher require to import these figures
into a format appropriate to import in Word document. I try with dvi to
ps and then convert them into eps using GSwiev. Buth for this eps
figures Word (2007) complain that files is currupted.

Please for any suggestion how to convert this my pictures into eps, png
or wmf format usable for Word from dvi or pdf format generated with TikZ?

Thank you in advance!

Regards, Zarko

Rolf Niepraschk

unread,
Nov 20, 2010, 3:40:52 AM11/20/10
to
...
Try the following

pdftops -eps file.pdf file.eps

(see: http://www.foolabs.com/xpdf/)

and/or

pstoedit -f emf file.eps file.emf

(see: http://www.pstoedit.net/pstoedit)

...Rolf

Joseph Wright

unread,
Nov 20, 2010, 3:55:34 AM11/20/10
to

I always use IrfanView to convert to bitmaps at 600 dpi, then past
directly into Word. Of course, these will not scale well but they look
OK for most purposes. When sending to publishers I send the EPS files
and my own PDF conversions along with the Word version.
--
Joseph Wright

Zarko F. Cucej

unread,
Nov 20, 2010, 7:49:21 AM11/20/10
to

Dear Rolf,
thank you for your tip. I use Windows 7 machine and installation of xpdf
is over of my capability to do this, so I will wait on next week and ask
our system administrator to help me at installation of the xpdf.

Regards, Zarko

Christian Stapfer

unread,
Nov 20, 2010, 8:09:36 AM11/20/10
to
"Zarko F. Cucej" <zarko...@google.com> schrieb im Newsbeitrag
news:ic7kv5$4uq$1...@news.siol.net...

I have had good success doing this by using dvips with option -E to produce
eps files that I could import into Word 2007 documents,
see also
http://heinjd.wordpress.com/2010/04/28/creating-eps-figures-using-tikz/

Regards,
Christian

Christian Stapfer

unread,
Nov 20, 2010, 8:28:35 AM11/20/10
to
"Christian Stapfer" <nob...@nowhere.nil> schrieb im Newsbeitrag
news:56146$4ce7c8a0$544ba766$15...@news.hispeed.ch...

Maybe I should mention that those figures were rendered in a very ugly
way by Word 2007 *on screen*, but the *printout* was ok...

Maybe Microsoft just doesn't like eps very much and thinks it necessary to
treat it badly in that way...

Regards,
Christian

Zarko F. Cucej

unread,
Nov 20, 2010, 11:52:03 AM11/20/10
to
On 20.11.2010 14:09, Christian Stapfer wrote:
> "Zarko F. Cucej" <zarko...@google.com> schrieb im Newsbeitrag
> news:ic7kv5$4uq$1...@news.siol.net...
>> Hi!
>> I have collection of pictures drawn with TikZ, which I store as pdf
>> and as dvi figures. Unfortunately publisher require to import these
>> figures into a format appropriate to import in Word document. I try
>> with dvi to ps and then convert them into eps using GSwiev. But for
>> this eps figures Word (2007) complain that files is corrupted.

>>
>> Please for any suggestion how to convert this my pictures into eps,
>> png or wmf format usable for Word from dvi or pdf format generated
>> with TikZ?
>
> I have had good success doing this by using dvips with option -E to produce
> eps files that I could import into Word 2007 documents,
> see also
> http://heinjd.wordpress.com/2010/04/28/creating-eps-figures-using-tikz/
>
> Regards,
> Christian

Dear Christian,
this work, but determining the bounding box by hand is quite annoying,
especialy if lower left and upper right corners of images are out of
image extremes. How do you do this?

Regards, Zarko

Joost Kremers

unread,
Nov 20, 2010, 12:37:38 PM11/20/10
to
Zarko F. Cucej wrote:
> this work, but determining the bounding box by hand is quite annoying,
> especialy if lower left and upper right corners of images are out of
> image extremes. How do you do this?

perhaps the command ebb can be of use:

joost@darkstar:~/ $ ebb -O Abbildung.pdf
%%Title: ./Abbildung.pdf
%%Creator: extractbb 20100328
%%BoundingBox: 0 0 101 37
%%CreationDate: Sat Nov 20 18:36:25 2010

without the -O option, ebb writes a file with the extension .bb containing the
information printed out above. ebb works with jpeg and png files as well.

also check out extractbb, which is the same program as ebb but produces a
different output format (all info in the man page).


--
Joost Kremers joostk...@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)

Christian Stapfer

unread,
Nov 20, 2010, 3:15:38 PM11/20/10
to

"Zarko F. Cucej" <zarko...@google.com> schrieb im Newsbeitrag

news:ic8ufk$s7c$1...@news.siol.net...

Take Joos Kremers' advice or run gswin32c.exe on your eps file, for example,
like this

gswin32c -dNOPAUSE -dBATCH -sDEVICE=bbox <path to eps file>

Here is an example input and output of this procedure:

"C:\Program
Files\gs\gs8.71\bin\gswin32c.exe" -dNOPAUSE -dBATCH -sDEVICE=bbox
Theorie_1.eps
GPL Ghostscript 8.71 (2010-02-10)
Copyright (C) 2010 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
%%BoundingBox: 149 562 285 667
%%HiResBoundingBox: 149.057995 562.892045 284.201991 666.341980

One could write a script automating this fixing of the bounding box if you
have
to do it very often ;-)

Regards,
Christian

Zarko F. Cucej

unread,
Nov 20, 2010, 3:16:51 PM11/20/10
to
On 20.11.2010 18:37, Joost Kremers wrote:
> Zarko F. Cucej wrote:
>> this work, but determining the bounding box by hand is quite annoying,
>> especialy if lower left and upper right corners of images are out of
>> image extremes. How do you do this?
>
> perhaps the command ebb can be of use:
>
> joost@darkstar:~/ $ ebb -O Abbildung.pdf
> %%Title: ./Abbildung.pdf
> %%Creator: extractbb 20100328
> %%BoundingBox: 0 0 101 37
> %%CreationDate: Sat Nov 20 18:36:25 2010
>
> without the -O option, ebb writes a file with the extension .bb containing the
> information printed out above. ebb works with jpeg and png files as well.
>
> also check out extractbb, which is the same program as ebb but produces a
> different output format (all info in the man page).
>
>

I'm very sorry, but I don't know, where tu find and put this command.
Google told me, that is probably Linux stuff. I work with MikTeX and
Windows 7 OS.

Regards, Zarko

Zarko F. Cucej

unread,
Nov 20, 2010, 4:32:22 PM11/20/10
to

Thank you very much, Christian!
Finally I figured out how this work. And this work! I will think about a
script, unfortunately in future I will need this procedure quit often :-( .

Best regards, Zarko

Robin Fairbairns

unread,
Nov 20, 2010, 5:40:58 PM11/20/10
to
"Christian Stapfer" <nob...@nowhere.nil> writes:

> Maybe Microsoft just doesn't like eps very much and thinks it necessary to
> treat it badly in that way...

never attribute to malice that which can be explained by mere stupidity...
--
Robin Fairbairns, Cambridge

GL

unread,
Nov 21, 2010, 3:52:27 AM11/21/10
to
Le 20/11/2010 23:40, Robin Fairbairns a écrit :
> "Christian Stapfer"<nob...@nowhere.nil> writes:
>
>> Maybe Microsoft just doesn't like eps very much and thinks it necessary to
>> treat it badly in that way...
>
> never attribute to malice that which can be explained by mere stupidity...

;-) lol

Do you know Mr Lamport works at Microsoft's ?
As far as I'm concerned, I'll keep on attributing it to malicious
business practices.

Robin Fairbairns

unread,
Nov 21, 2010, 8:31:24 AM11/21/10
to
GL <goua...@gmail.com> writes:

> Le 20/11/2010 23:40, Robin Fairbairns a �crit :


>> "Christian Stapfer"<nob...@nowhere.nil> writes:
>>
>>> Maybe Microsoft just doesn't like eps very much and thinks it necessary to
>>> treat it badly in that way...
>>
>> never attribute to malice that which can be explained by mere stupidity...
>
> ;-) lol
>
> Do you know Mr Lamport works at Microsoft's ?

indeed -- remember, there's a m$ research place next to my place of
work, and a lot of my ex-colleagues and other friends moved across the
road to join them. (m$ pay the university for the right to be there.)

> As far as I'm concerned, I'll keep on attributing it to malicious
> business practices.

imo, there's a significant argument the other way....
--
Robin Fairbairns, Cambridge

Ignasi Furio

unread,
Nov 21, 2010, 10:24:01 AM11/21/10
to
>
> Thank you very much, Christian!
> Finally I figured out how this work. And this work! I will think about a
> script, unfortunately in future I will need this procedure quit often :-( .
>
> Best regards,   Zarko

Some time ago I was using epstool (http://pages.cs.wisc.edu/~ghost/
gsview/epstool.htm) to adjust bounding boxes for ps or eps files. The
MS-DOS script I used to obtain eps and pdf figures with correct
bounding boxes was something like:

LATEX file.tex
DVIPS -Ppdf -j0 -G0 -E file.dvi
D:\archiv~1\epstool-3.08\bin\epstool --copy --bbox file.ps file.eps
copy file.eps finalfile.eps /Y
epstopdf finalfile.eps

Ignasi

Zarko F. Cucej

unread,
Nov 21, 2010, 4:45:37 PM11/21/10
to

Dear Ignasi,
thank you very much. This work fine and what is important, it is far
more convenience as writing correct bounding box data by hand in eps
file ...

Regarding Word, I observe that some of obtained eps files have problems
with text interpretation (I use word 2007). For example, in $(k-1)T$ the
1 slanted, than in some text space between words disappear etc. So on
the end I follow suggestion of Joseph Wright and by help of IrfanView
converted pdf images into high resolution png.

Thanks to all for help!

Regards, Zarko

0 new messages