<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>6.2 Handling dependencies in compilation</title><link rel="stylesheet" type="text/css" href="../latex-suite.css"></link><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"></meta><link rel="home" href="index.html" title="Latex-Suite Reference"></link><link rel="up" href="latex-compiling.html" title="6 LaTeX Compiling"></link><link rel="prev" href="compiler-rules.html" title="6.1 Setting Compilation rules"></link><link rel="next" href="compiling-multiple.html" title="6.3 Compiling multiple times"></link></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">6.2 Handling dependencies in compilation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="compiler-rules.html">Prev</a> </td><th width="60%" align="center">6 LaTeX Compiling</th><td width="20%" align="right"> <a accesskey="n" href="compiling-multiple.html">Next</a></td></tr></table><hr></hr></div><div class="section" title="6.2 Handling dependencies in compilation"><div class="titlepage"><div><div><h3 class="title"><a id="compiler-dependency"></a>6.2 Handling dependencies in compilation</h3></div></div></div><p> Latex-Suite also handles compiling dependencies automatically via certain rules which specify the "dependency chain" for each target format. For example, if in your case, you use </p><pre class="programlisting">.tex -> .dvi -> .ps -> .pdf</pre><p> to generate <code class="literal">pdf</code> files from <code class="literal">dvi</code> files, then you will need to specify the following setting in your Latex-Suite configuration (see <a class="link" href="customizing-latex-suite.html" title="11 Customizing Latex-Suite">customizing Latex-Suite</a> for where these settings should go): </p><pre class="programlisting"> let g:Tex_FormatDependency_pdf = 'dvi,ps,pdf' </pre><p> This is a comma separated string of formats specifying the order in which the formats to be compiled into should be chosen. With this setting, if you set the target format to <code class="literal">pdf</code>, then the next time you compile via the <code class="literal">\ll</code> shortcut, Latex-Suite will first generate a <code class="literal">dvi</code> file, then use that to generate the <code class="literal">ps</code> file and finally create the <code class="literal">pdf</code> file from that. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> If any of the intermediate formats is listed in the <code class="literal">g:Tex_MultipleCompileFormats</code> setting as described in the section <a class="link" href="compiling-multiple.html" title="6.3 Compiling multiple times">Compiling multiple times</a>, then Latex-Suite might make multiple calls to the compiler to generate the output file of that format. </p></div><p> Along with the <code class="literal">g:Tex_FormatDependency_{format}</code> setting, you should ofcourse specify the rule for compiling to each of the formats as described in the <a class="link" href="compiler-rules.html" title="6.1 Setting Compilation rules">previous section</a>. For example, with the setting above, you could use: </p><pre class="programlisting"> let g:Tex_CompileRule_dvi = 'latex --interaction=nonstopmode $*' let g:Tex_CompileRule_ps = 'dvips -Ppdf -o $*.ps $*.dvi' let g:Tex_CompileRule_pdf = 'ps2pdf $*.ps'</pre><p> </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> By default, Latex-Suite does not specify any compiler dependencies. Each target format for which a rule has been derived will be compiled independently. </p></div></div><div class="navfooter"><hr></hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="compiler-rules.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="latex-compiling.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="compiling-multiple.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">6.1 Setting Compilation rules </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 6.3 Compiling multiple times</td></tr></table></div></body></html>