Aligning LaTeX images
eharetea

This bash script helps to align images, or define boundaries for external postscript files within a tex file that uses pstricks.

Align images and figures in LaTeX and pstricks.

Date Created:Sunday February 22nd, 2009 05:22 PM
Date Modified:Sunday February 22nd, 2009 05:36 PM

First try compiling your LaTeX using makeps.sh

makeps myfile.tex
This should create a file myfile.ps. Then use boundingbox.sh to create a new tex file that draws a bounding box around the image:
boundingbox myfile.ps
Then use makeps.sh to generate a pdf for viewing the bounding box version:
makeps ghostbox.tex
Edit the ghostbox.ps file directly. Change the bounding box values, which are represented as x1 y1 x2 y2:
%%BoundingBox: 120 460 420 760
where (x1,y1) represents the lower left corner, and (x2,y2) represents the upper right corner. Continually repeat the last two steps until you are satisfied with the bounding size. Then you can include your graphics like this:
\begin{figure}[htp]
\centering
\includegraphics{images/Filename.ps}
\caption{ Caption goes here... }
\label{ fig:Filename }
\end{figure}
Enjoy!



Downloads:
Download: boundbox.sh 499 B
Download: makeps.sh 181 B

Please login or Click Here to register for downloads
Creative Commons License
Aligning LaTeX images by Dan Lynch
is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
Based on a work at www.3daet.com
Permissions beyond the scope of this license may be available at http://www.3daet.com