From: W. Trevor King Date: Sat, 14 May 2011 17:41:27 +0000 (-0400) Subject: Transition from \asyfig to the stock \asyinclude. X-Git-Tag: v1.0~359 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=814ad84078a6ee0dbc07fd9654e47dde302e29a1;p=thesis.git Transition from \asyfig to the stock \asyinclude. --- diff --git a/tex/site_cons/site_tools/asymptote.py b/tex/site_cons/site_tools/asymptote.py index 1ad5466..f954bd1 100644 --- a/tex/site_cons/site_tools/asymptote.py +++ b/tex/site_cons/site_tools/asymptote.py @@ -9,8 +9,8 @@ import doctest double_quoted_string_re = re.compile(r'"([^"]*)"', re.M) -# SCons' LaTeX scanner doesn't understand \asyfig{}, so keep track of -# all Asymptote graphics for phony target creation. +# SCons' LaTeX scanner doesn't understand \asyinclude{}, so keep track +# of all Asymptote graphics for phony target creation. asyfigs = [] def asymptote_scan(node, env, path, arg=None): @@ -58,10 +58,8 @@ def asymptote_scan(node, env, path, arg=None): def asymptote_emitter(target, source, env): assert str(source[0]).endswith('.asy'), str(source[0]) filebase = str(source[0])[:-len('.asy')] - target.extend(['%s_%s' % (filebase, ext) - for ext in ['.tex', '.pre', '0.pdf']]) - target.extend(['%s-comp.%s' % (filebase, ext) - for ext in ['idx', 'log', 'nlo', 'pdf']]) + target.extend(['%s%s' % (filebase, ext) + for ext in ['.tex', '.pre', '_0.pdf']]) source.append(SCons.Script.Alias('asytools')) # side effect, keep track of all asymptote graphics. asyfigs.append(target[0]) @@ -79,13 +77,12 @@ def generate(env): #pdf.generate(env) env['BUILDERS']['Asymptote'] = SCons.Script.Builder( - action=AsymptoteAction, suffix='_.tex', src_suffix = '.asy', + action=AsymptoteAction, suffix='.tex', src_suffix = '.asy', emitter=asymptote_emitter) - env['ASYMPTOTE'] = '../asy/asyprocess' + + env['ASYMPTOTE'] = 'asy' env['ASYMPTOTEFLAGS'] = SCons.Util.CLVar( - "--texinputs=../..: " - "--pretex='\documentclass{drexel-thesis} \input{packages}' " - "--") + '-tex pdflatex -inlineimage -inlinetex') env['ASYMPTOTECOM'] = 'cd ${TARGET.dir} && $ASYMPTOTE $ASYMPTOTEFLAGS ${SOURCE.filebase}' env.Append(SCANNERS=SCons.Scanner.Base( function=asymptote_scan, diff --git a/tex/src/apparatus/afm.tex b/tex/src/apparatus/afm.tex index 1fb8b56..65b358e 100644 --- a/tex/src/apparatus/afm.tex +++ b/tex/src/apparatus/afm.tex @@ -16,7 +16,7 @@ bending force constant of the cantilever is known\citep{levy02}, the force applied to the sample can be calculated. \begin{figure} - \asyfig{figures/schematic/afm}% + \asyinclude{figures/schematic/afm}% \caption{Operating principle for an Atomic Force Microscope\index{AFM}. A sharp tip integrated at the end of a cantilever interacts with the sample. Cantilever bending is diff --git a/tex/src/apparatus/procedure.tex b/tex/src/apparatus/procedure.tex index 1c3e186..e1927f3 100644 --- a/tex/src/apparatus/procedure.tex +++ b/tex/src/apparatus/procedure.tex @@ -33,10 +33,10 @@ multi-domain test proteins. \begin{figure} \begin{center} - \subfloat[][]{\asyfig{figures/schematic/unfolding}% + \subfloat[][]{\asyinclude{figures/schematic/unfolding}% \label{fig:unfolding-schematic}} % \hspace{.25in}% - \subfloat[][]{\asyfig{figures/expt-sawtooth/expt-sawtooth}% + \subfloat[][]{\asyinclude{figures/expt-sawtooth/expt-sawtooth}% \label{fig:expt-sawtooth}} \caption{(a) Schematic of the experimental setup for mechanical unfolding of proteins using an AFM (not to scale). An experiment diff --git a/tex/src/blurb/acknowledgments.tex b/tex/src/blurb/acknowledgments.tex index ea72b96..fd02ef2 100644 --- a/tex/src/blurb/acknowledgments.tex +++ b/tex/src/blurb/acknowledgments.tex @@ -5,8 +5,7 @@ This work was produced using the following open source software projects: \href{http://www.ctan.org/}{CTAN}] Typesetting. \item[\href{http://sourceforge.net/projects/pgf/}{PGF}/% - \href{http://asymptote.sourceforge.net/}{Asymptote}/% - \href{http://github.com/wspr/asyfig/}{Asyfig}] + \href{http://asymptote.sourceforge.net/}{Asymptote}] Graphical programming. \item[\href{http://www.python.org/}{Python}] General purpose scripting. diff --git a/tex/src/cantilever-calib/contour_integration.tex b/tex/src/cantilever-calib/contour_integration.tex index 0f05d25..6bae7e6 100644 --- a/tex/src/cantilever-calib/contour_integration.tex +++ b/tex/src/cantilever-calib/contour_integration.tex @@ -5,7 +5,7 @@ As a brief review, some definite integrals from $-\infty$ to $\infty$% along the contour \C\ shown in \cref{fig:UHP-contour}. \begin{figure} - \asyfig{figures/contour/contour} + \asyinclude{figures/contour/contour} \caption{Integral contour \C\ enclosing the upper half of the complex plane. If the integrand $f(z)$ goes to zero ``quickly enough'' as the radius of \C\ approaches infinity, then the only diff --git a/tex/src/cantilever/methods.tex b/tex/src/cantilever/methods.tex index 373f045..83f100b 100644 --- a/tex/src/cantilever/methods.tex +++ b/tex/src/cantilever/methods.tex @@ -36,7 +36,7 @@ averaged across each cantilever-stiffness/pulling-speed group to produce \cref{fig:cant:v-dep}. \begin{figure} - \asyfig{figures/cantilever-data/v-dep} + \asyinclude{figures/cantilever-data/v-dep} \caption{Pulling speed dependence of I27 for different cantilever stiffnesses. The listed stiffnesses are averages across several individual cantilevers and calibrations. Each box is the average @@ -55,6 +55,6 @@ loading rates were extracted from the data by taking the slope of the fit WLC\index{WLC} at unfolding. \begin{figure} - \asyfig{figures/cantilever-data/loading-rate} + \asyinclude{figures/cantilever-data/loading-rate} \caption{Loading rate.\label{fig:cant:load-dep}} \end{figure} diff --git a/tex/src/cantilever/simulations.tex b/tex/src/cantilever/simulations.tex index fd9ff15..db4744c 100644 --- a/tex/src/cantilever/simulations.tex +++ b/tex/src/cantilever/simulations.tex @@ -9,19 +9,19 @@ following results (\cref{fig:cant:sim:v-dep,fig:cant:sim:load-dep,fig:cant:sim:i-dep}). \begin{figure} - \asyfig{figures/cantilever-sim/v-dep} + \asyinclude{figures/cantilever-sim/v-dep} \caption{Unfolding force velocity dependence for different cantilevers.\label{fig:cant:sim:v-dep}} \end{figure} \begin{figure} - \asyfig{figures/cantilever-sim/loading-rate} + \asyinclude{figures/cantilever-sim/loading-rate} \caption{Unfolding force loading rate dependence simulations for different cantilevers.\label{fig:cant:sim:load-dep}} \end{figure} \begin{figure} - \asyfig{figures/cantilever-sim/i-dep} + \asyinclude{figures/cantilever-sim/i-dep} \caption{Unfolding force peak index dependence simulations for different cantilevers.\label{fig:cant:sim:i-dep}} \end{figure} diff --git a/tex/src/cantilever/theory.tex b/tex/src/cantilever/theory.tex index ae30cd9..0daf5fe 100644 --- a/tex/src/cantilever/theory.tex +++ b/tex/src/cantilever/theory.tex @@ -1,7 +1,7 @@ \section{Theory} \begin{figure} - \asyfig{figures/schematic/landscape-cant} + \asyinclude{figures/schematic/landscape-cant} \caption{Energy landscape schematic.\label{fig:landscape}} \end{figure} diff --git a/tex/src/packages.tex b/tex/src/packages.tex index f6d62f2..ce6e2e7 100644 --- a/tex/src/packages.tex +++ b/tex/src/packages.tex @@ -61,7 +61,7 @@ \usetikzlibrary{automata} % graph-theory library \usetikzlibrary{calc} % coordinate-calculation library -\usepackage{asyfig} % more fancy graphics ;). +\usepackage[inline]{asymptote} % more fancy graphics ;). \usepackage{epsdice} % dice-face font diff --git a/tex/src/root.tex b/tex/src/root.tex index 785af80..c8c908e 100644 --- a/tex/src/root.tex +++ b/tex/src/root.tex @@ -33,6 +33,16 @@ \input{packages} \begin{document} + +% Work-directory for Asymptote files (no spaces): +\def\asydir{figures/scratch} +\begin{asydef} +// Global Asymptote definitions go here. +//texpreamble("\documentclass{drexel-thesis}"); +//usepackage("packages"); +\end{asydef} + + \begin{preamble} \include{blurb/dedications} diff --git a/tex/src/sawsim/discussion.tex b/tex/src/sawsim/discussion.tex index ec63d63..777e50c 100644 --- a/tex/src/sawsim/discussion.tex +++ b/tex/src/sawsim/discussion.tex @@ -23,10 +23,10 @@ deviation of $25\U{pN}$. \begin{figure} \vspace{-1in} \begin{center} -\subfloat[][]{\asyfig{figures/sim-sawtooth/sim-sawtooth}% +\subfloat[][]{\asyinclude{figures/sim-sawtooth/sim-sawtooth}% \label{fig:sawsim:sim-sawtooth}% }\\ -\subfloat[][]{\asyfig{figures/sim-hist/sim-hist}% +\subfloat[][]{\asyinclude{figures/sim-hist/sim-hist}% \label{fig:sawsim:sim-hist}% } \caption{(a) Three simulated force curves from pulling a polymer of @@ -157,7 +157,7 @@ unfolding order and polymer length. \begin{figure} \begin{center} - \asyfig{figures/order-dep/order-dep} + \asyinclude{figures/order-dep/order-dep} \caption{The dependence of the unfolding force on the temporal unfolding order for four polymers with $4$, $8$, $12$, and $16$ identical protein domains. Each point in the figure is the @@ -217,7 +217,7 @@ to WLC\index{WLC} or other polymer models (\cref{fig:expt-sawtooth}). \begin{figure} \begin{center} -\asyfig{figures/kappa-sawteeth/kappa-sawteeth} +\asyinclude{figures/kappa-sawteeth/kappa-sawteeth} \caption{Simulated force curves obtained from pulling a polymer with eight protein molecules using cantilevers with different force constants $\kappa_c$. Parameters used in generating these curves @@ -302,10 +302,10 @@ about the protein from other sources. \begin{figure} \begin{center} - \subfloat[][]{\asyfig{figures/v-dep/v-dep}% + \subfloat[][]{\asyinclude{figures/v-dep/v-dep}% \label{fig:sawsim:v-dep}% } \\ - \subfloat[][]{\asyfig{figures/v-dep/v-dep-sd}% + \subfloat[][]{\asyinclude{figures/v-dep/v-dep-sd}% \label{fig:sawsim:width-v-dep}% } \caption{(a) The dependence of the unfolding forces on the pulling @@ -324,7 +324,7 @@ about the protein from other sources. \begin{figure} \begin{center} - \asyfig{figures/fit-space/fit-valley} + \asyinclude{figures/fit-space/fit-valley} \caption{Fit quality between an experimental data set and simulated data sets obtained using various values of unfolding rate parameters $k_{u0}$ and $\Delta x_u$. The experimental data are diff --git a/tex/src/sawsim/methods.tex b/tex/src/sawsim/methods.tex index 69d9082..ec8de7e 100644 --- a/tex/src/sawsim/methods.tex +++ b/tex/src/sawsim/methods.tex @@ -174,7 +174,7 @@ group of $N_f$ identical domains to unfold in a given time step is where the approximation is valid when $N_fP_1 \ll 1$. \begin{figure} - \asyfig{figures/schematic/monte-carlo} + \asyinclude{figures/schematic/monte-carlo} \caption{Once the unfolding probability has been caculated, we need to determine whether or not a domain should unfold. We do this by generating a random number, and comparing that number to the