Thread Subject: interpreter='latex' ruins bounding box in eps export

Subject: interpreter='latex' ruins bounding box in eps export

From: Naor Movshovitz

Date: 29 Jul, 2007 11:44:46

Message: 1 of 6

Maybe I'm being too anal, but I love the 'latex' option for text annotations: not only more options but also better looking figures. But any text object in the figure with 'interpreter' set to 'latex' and the exported eps file has no automaticaly set bounding box, which makes it very hard to import into a latex document. Can anyone think of a workaround?
Thanks,
-naor (R2006a, win32xp)

Subject: interpreter='latex' ruins bounding box in eps export

From: Oliver Woodford

Date: 12 Apr, 2010 16:32:04

Message: 2 of 6

"Naor Movshovitz" wrote:
> Maybe I'm being too anal, but I love the 'latex' option for text annotations: not only more options but also better looking figures. But any text object in the figure with 'interpreter' set to 'latex' and the exported eps file has no automaticaly set bounding box, which makes it very hard to import into a latex document. Can anyone think of a workaround?
> Thanks,
> -naor (R2006a, win32xp)

Dear Naor

Did you find a solution to this (other than printing to pdf rather than eps)? Did the problem disappear with a later version of MATLAB?

Thanks,
Oliver

Subject: interpreter

From: Rune Allnor

Date: 12 Apr, 2010 17:11:05

Message: 3 of 6

On 12 apr, 18:32, "Oliver Woodford" <o.j.woodford...@cantab.net>
wrote:
> "Naor Movshovitz" wrote:
> > Maybe I'm being too anal, but I love the 'latex' option for text annotations: not only more options but also better looking figures. But any text object in the figure with 'interpreter' set to 'latex' and the exported eps file has no automaticaly set bounding box, which makes it very hard to import into a latex document. Can anyone think of a workaround?
> > Thanks,
> > -naor (R2006a, win32xp)
>
> Dear Naor
>
> Did you find a solution to this (other than printing to pdf rather than eps)? Did the problem disappear with a later version of MATLAB?

This is a known bug in the utility EPS2PDF in the LaTeX bundle.
Somebody tested a recent version of EPS2PDF not too long ago,
to find that the bug is fixed.

However, if you do want LaTeX fonts in figures exported to
LaTeX, print directly to PDF from matlab, and use pdfLaTeX
to generate the document. You will probably have to manually
set the figure sizes, something like

set(gcf,'paperunits','centimemters')
set(gcf,'papersize',[12,8])
set(gcf,'paperposition',[0,0,10,8])

Rune

Subject: interpreter

From: Oliver Woodford

Date: 13 Apr, 2010 08:59:06

Message: 4 of 6

Rune Allnor wrote:
> This is a known bug in the utility EPS2PDF in the LaTeX bundle.

I'm seeing a similar problem and I'm not using eps2pdf.

Subject: interpreter

From: Oliver Woodford

Date: 13 Apr, 2010 13:42:21

Message: 5 of 6

Rune Allnor wrote:
> Somebody tested a recent version of EPS2PDF not too long ago,
> to find that the bug is fixed.

In my case the problem is caused by MATLAB's print putting embedded font information above the standard eps header (as pointed out by Rune and others), and Ghostcript not finding the bounding box information as a result (even the latest version of gs, 8.71).

This behaviour of print (I have no idea whether it is standards compliant or not) was in R2006b, but was changed in R2007b (and possibly R2007a, but I can't check this), fixing the problem.

Subject: interpreter

From: Oliver Woodford

Date: 13 Apr, 2010 14:42:05

Message: 6 of 6

"Oliver Woodford" wrote:
> This behaviour of print (I have no idea whether it is standards compliant or not) was in R2006b, but was changed in R2007b (and possibly R2007a, but I can't check this), fixing the problem.

For earlier versions of MATLAB I've incorporated a fix into my fix_lines function (http://www.mathworks.com/matlabcentral/fileexchange/23604-fixlines) which will move embedded fonts below the header.

Oliver

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
latex Ned Gulley 29 Jul, 2007 21:53:09
eps export Naor Movshovitz 29 Jul, 2007 07:45:07
annotation grap... Naor Movshovitz 29 Jul, 2007 07:45:07
rssFeed for this Thread

Contact us at files@mathworks.com