Katate Masatsuka (方手雅塚)

Katate Masatsuka speaks.

Bounding box fix for Eps file (e.g., those generated by Matlab)

leave a comment »

1. brew update
2. brew install epstool

Then, do the following

% epstool --copy --bbox input.eps temp.eps
% mv temp.eps input.eps

NOTE: The command “epstool --copy --bbox input.eps input.eps” didn’t work (don’t know why).
It has to be written as temp.eps first and then rename it.

FINAL SOLUTION:

Added the following to .bashrc file:

####################################################
##### Custom command to fix the bb for eps files.
eps_fix_bb_function() {
#do things with parameters like $1 such as
epstool –copy –bbox $1 tmp.eps
mv tmp.eps $1
}
alias bbfix=eps_fix_bb_function
####################################################

so that I can now process eps files as
% bbfix filename.eps

Written by Katate Masatsuka

May 5, 2015 at 5:50 am

Posted in Memo

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: