1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html
><head><!--mn46.html from mn.tex (TeX4ht, 1999-03-31 04:46:00)-->
<title>driver</title><link
rel="stylesheet" type="text/css" href="mn.css"></head><body
> <a
href="mn39.html#mn46.html" >exit driver</a>
<h3 class="SubSectionHead"><a
name="QQ1-46-34"></a>Driving the Translation of Pictures and Other Tasks</h3>
<!--5998--><p class="noindent">Tex4ht outputs a script file (`<code><SPAN CLASS="cmtt-10">.lg</SPAN></code>') describing how the dvi file (extension `<code><SPAN CLASS="cmtt-10">.idv</SPAN></code>') of pictures should
be processed, the CSS instructions to be included for the file, and user-initiated requests from the
operating system. In the default setting, the script file holds abstract commands similar to the following
ones.
<DL > <DT><SPAN CLASS="cmtt-10">--- needs --- source.idv[i] ==> target.gif ---</SPAN>
<DD>An abstract command of this form requests that the i'th page in the dvi file will be translated into a target file
whose name is provided.
<!--6010--><p class="indent"> <DT><SPAN CLASS="cmtt-10">--- characters ---</SPAN>
<DD>This abstract command is a identifies where the requests for pictorial characters start.
</DL>
A manual brute-force execution of the abstract commands can be a tedious job for large number of pictures.
The <code><SPAN CLASS="cmtt-10">t4ht</SPAN></code> is in essence an interpreter for these abstract commands.
<!--6024--><p class="indent"> Another possible approach for automating the process is to request lg scripts in the form of shell scripts or
batch files.
<!--6031--><p class="indent"> <BIG><SPAN CLASS="cmbx-10">Alternatives to `</SPAN><SPAN CLASS="cmtt-10">--- needs --- source.idv[i] ==> target.gif ---</SPAN><SPAN CLASS="cmbx-10">'</SPAN></BIG>
<!--6034--><p class="indent"> The default setting is made with a request of the form `<code><SPAN CLASS="cmtt-10">--- needs --- %%1.idv[%%2] ==> %%3.gif ---</SPAN></code>',
where the parameters <code><SPAN CLASS="cmtt-10">%%1</SPAN></code>, <code><SPAN CLASS="cmtt-10">%%2</SPAN></code>, and <code><SPAN CLASS="cmtt-10">%%3</SPAN></code> respectively represent the name of the source file without
its extension, a page number, and a name of the target file. Alternative patterns to these abstract
commands can be requested in the following locations, with the order reflecting on the priority given to the
requests.
<!--6043--><p class="indent">
<UL TYPE="disc" >
<LI>In the <a
href="mn27.html" >command line</a> of <code><SPAN CLASS="cmtt-10">tex4ht</SPAN></code>, where the pattern should be prefixed with `<code><SPAN CLASS="cmtt-10">-s</SPAN></code>'.
<!--6047--><p class="indent"> </LI>
<LI>In the environment file <code><SPAN CLASS="cmtt-10">tex4ht.env</SPAN></code> within a block of consecutive lines, where the lines should be identified with the
character <a
href="mn42.html#sc-1" name="sc">`<code><SPAN CLASS="cmtt-10">s</SPAN></code>'</a>.
<!--6051--><p class="indent"> </LI>
<LI>In <code><SPAN CLASS="cmtt-10">tex4ht</SPAN></code> with the pattern provided through the variable <a
href="mn45.html#-LGPIC" name="LGPIC">LGPIC</a> of <code><SPAN CLASS="cmtt-10">tex4ht.c</SPAN></code>.
</LI></UL>
The character `<code><SPAN CLASS="cmtt-10">%</SPAN></code>' can be introduced into a pattern through the entry `<code><SPAN CLASS="cmtt-10">%%%</SPAN></code>'. On the other hand, the
parameters `<code><SPAN CLASS="cmtt-10">%%1</SPAN></code>', `<code><SPAN CLASS="cmtt-10">%%2</SPAN></code>', and <code><SPAN CLASS="cmtt-10">%%3</SPAN></code> can specify, between the first two percentage characters (i.e., `<code><SPAN CLASS="cmtt-10">%...%1</SPAN></code>',
`<code><SPAN CLASS="cmtt-10">%...%2</SPAN></code>', and `<code><SPAN CLASS="cmtt-10">%...%3</SPAN></code>'), any format for the outcome that is compatible with the print formats of
C.
<!--6063--><p class="indent"> <BIG><SPAN CLASS="cmbx-10">Alternatives to `</SPAN><SPAN CLASS="cmtt-10">--- characters ---</SPAN><SPAN CLASS="cmbx-10">'</SPAN></BIG>
<!--6065--><p class="indent"> Substitutions for this abstract command can be requested in the following locations.
<!--6072--><p class="indent">
<UL TYPE="disc" >
<LI>In the <a
href="mn27.html" >command line</a> of <code><SPAN CLASS="cmtt-10">tex4ht</SPAN></code>, prefixed with `<code><SPAN CLASS="cmtt-10">-b</SPAN></code>'.
<!--6077--><p class="indent"> </LI>
<LI>In a line within the environment file `<code><SPAN CLASS="cmtt-10">tex4ht.file</SPAN></code>', where the line should be identified with the character
`<a
href="mn42.html#bsc-1" name="bsc">b</a>'.
<!--6081--><p class="indent"> </LI>
<LI>In <code><SPAN CLASS="cmtt-10">tex4ht</SPAN></code> with the substitution provided during compilation time through the variable <a
href="mn45.html#-LGSEP" name="LGSEP">LGSEP</a> of
<code><SPAN CLASS="cmtt-10">tex4ht.c</SPAN></code>.
</LI></UL>
</body>
</html>
|