Use the \graphicspath
macro from the graphics/x
package to specify the directories with your images:
\graphicspath{{path1/fig/}{path2/fig/}}
Then you can remove them from the \includegraphics
macros and only need to change the one line to:
\graphicspath{{path1/fig-gray/}{path2/fig-gray/}}
Alternative you could make the -gray
part a macro, which avoid adding new paths twice:
%\newcommand*{\gray}{-gray}% Uncomment to switch to gray-scale images
\graphicspath{{path1/fig\gray/}{path2/fig\gray/}}
This also works directly with \includegraphics
:
\includegraphics[width=5in]{path1/fig\gray/foo.pdf}
There are two questions here:
1) How to specify the page size. This is best done with the geometry
package, which has good documentation. The key idea is that you only specify as many parameters as necessary, and geometry
fills in the rest. For example, you could say
\usepackage[twoside,papersize={7in,10in},margin=1in]{geometry}
and have the text width and height implicitly defined.
2) How to place crop marks that delineate your user-defined page on the A4 paper. For this, you can use the crop package, for example
\usepackage[cam,a4,center]{crop}
This package also has good documentation. Both packages are part of TeX Live so most likely you already have them installed.
Best Answer
Sometimes the grid in the corner is to far away, when cropping to axis labels. So I made an update, where I add rectangles over the whole image. And I add an optional parameter to control how deep the rectangles are drawn.
The thick lines have a distance of 10mm, the thin ones of 2mm. This is independent of the image if no
width
orheight
argument is passed to the image.Call the macro with
On images it is still necessary to put the
width
from the image to the first argument of\showgrid
.