Katate Masatsuka (方手雅塚)

Katate Masatsuka speaks.

Archive for May 2015

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

%d bloggers like this: