INTRODUCTION

This graphics folder contains all graphics files from which output
(pdf or eps) files are generated.  Inline asymptote code will also be
generated in this directory. The output .pdf or .eps files are created
as required, also in the graphics directory upon compilation.

The graphics_uncompiled folder contains those included graphics (pdf, eps,
etc.) which are not generated from other files.  Running clean will
not delete these pdf or eps files like it will in the graphics
directory.

Finally the logo folder contains a proprietary logo of the publisher.

See the specific sections below on how particular file types are
compiled in the graphics directory.

You may have downloaded this document with .pdf and/or .eps files
already created in the graphics directory in which case these images
do not need to be generated.  Note if compiling the document using a
compile script provided for a Linux system that the light compile
"compilel" does not regenerate the asymptote pdf/eps files and is
therefore faster. (It also does not require the software to create the
pdf/eps files.)


ASYMPTOTE

Compiling of asymptote files in the graphics directory can be done by
hand can be done with

asy -f pdf *.asy

to produce PDFs or just

asy *.asy

to produce EPS files.  The former compile is done by the "compile" command
and the equivalent line in the latexmkrc file.

Note that the "light compile" command compilel does not regenerate the
asymptote pdf/eps files and is sufficient if graphic files have not
changed.

The localcalculus.asy file is a series of predefined asymptote scripts
that is included by some of the asymptote files in this directory and
hence a link to it must be kept in this directory.  The actual file is
kept in the main directory to make it more visible. To include these
definitions put the line

import localcalculus;

at the beginning of your asymptote document.

Additionally some asymptote files may require LaTeX definitions.
These symbols are included by placing the line

texpreamble("\input{localsymbols.sty}");

at the beginning of the asymptote document.  The latter is a link in
this directory to the definition file calculussymbols.tex in the
top-level directory which gets included by other documents.

Note that asymptote files can also be generated inline in the document using
the asy environment (\begin{asy} ... \end{asy}) and these will be placed
in this directory.  This book has avoided using that environment because it
will not work if embedded in some other environments (answers, exercises,
powerdot slides, etc.)  Certain LaTeX coding workarounds were either awkward
or difficult to maintain so keeping the asymptote files separate was easier
and consistent with other graphics types.

XFIG

Files with the .fig extension are generated by the xfig program.  That
program has the ability to export in a variety of formats.  Because
xfig allows for the inclusion of LaTeX symbols some formats will
generate, in addition to .pdf or .eps files and overlay .tex file
which will provide the symbols when the document is compiled.  This is
mildly cumbersome and we have instead opted to use the two scripts
fig2pdf and fig2eps from the fig2ps package to do the conversion.
These scripts are smart enough to combine all such latex overlays in
the single .eps or .pdf output.

Certain LaTeX inclusions may need other packages and these are included in
the compilation using the --add option.  Similarly custom definitions may
be desirable.  Our compilation command is essentially 

fig2pdf --add=bm,amsfonts,bbm,localsymbols --nogv *.fig

run within the graphics directory.

The file localsymbols.sty file should be created in the graphics
directory to contain such definitions.  The more likely scenario is
that you should just make a link from localsymbols.sty to some other
file in the main directory containing these definitions as these are
likely being included in the document elsewhere.  For this document it
is calculusymbols.tex . Note that the latter file can have the .tex
extension but the localsymbols must have a .sty extension as the --add
option expects a package.  Note that if you are working on an older
filesystem which does not support links (like vfat - the old windows
filesystem) you will need to make an actual copy of the file.  If you
downloaded this code from a git repository to such a filesystem you
may need to rectify this situation by hand.

The actual command line used (for pdf files) is:

TEXINPUTS=$PWD//: fig2pdf --add=bm,amsfonts,bbm,localsymbols --nogv *.fig

The environment variable setting
TEXINPUTS=$PWD//:
before the command is required due to a bug in fig2pdf.  The latter copies
the files to temporary directories to compile but unless the style file
(in our case localsymbols.sty) is installed in the system tex directories
it is not found.  The TEXINPUTS line adds the full path to the current
directory to the TEX search path before executing the executable so that
local inclusions are found.

GENERATED GRAPHICS FILES IN SUBDIRECTORIES

The compile script only compiles images in the graphics directory.
You would need to modify the compile and clean scripts if you want to
have graphics generated in other directories.

The latexmk script is configured to compile images in subdirectories
as well as required.  Note that for xfig files that include symbols
you will need to put a localsymbols.sty link in the subdirectory
containing the xfig file for compilation to work.
