| 1 |
<?xml version="1.0" encoding="iso-8859-1" ?> |
| 2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
| 3 |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 4 |
<!--http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd--> |
| 5 |
<html xmlns="http://www.w3.org/1999/xhtml" |
| 6 |
> |
| 7 |
<head><title>driver</title> |
| 8 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> |
| 9 |
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)" /> |
| 10 |
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)" /> |
| 11 |
<!-- xhtml,th4,index --> |
| 12 |
<meta name="src" content="mn.tex" /> |
| 13 |
<link rel="stylesheet" type="text/css" href="mn.css" /> |
| 14 |
<meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 15 |
</head><body |
| 16 |
> |
| 17 |
<a |
| 18 |
href="mn31.html#mn38.html" >exit driver</a> |
| 19 |
<h3 class="SubSectionHead"><a |
| 20 |
name="QQ1-38-78"></a>Driving the Translation of Pictures and Other Tasks</h3> |
| 21 |
<a |
| 22 |
name="index38-78001"></a> <a |
| 23 |
name="index38-78002"></a> <a |
| 24 |
name="index38-78003"></a>TeX4ht outputs a script file (‘<span class="cmtt-10">.lg</span>’) describing how the dvi file (extension ‘<span class="cmtt-10">.idv</span>’) of pictures should |
| 25 |
be processed, the CSS instructions to be included for the file, and user-initiated requests from the |
| 26 |
operating system. In the default setting, the script file holds abstract commands similar to the following |
| 27 |
ones. |
| 28 |
<dl > <dt><span class="cmtt-10">--- needs --- source.idv[i] ==> target.png ---</span></dt><dd> |
| 29 |
<!--l. 8587--><p class="indent" > An abstract command of this form requests that the i’th page in the dvi file will be translated into a target file |
| 30 |
whose name is provided. |
| 31 |
</p> |
| 32 |
</dd><dt><span class="cmtt-10">--- characters --- </span></dt><dd> |
| 33 |
<!--l. 8595--><p class="indent" > This abstract command is a identifies where the requests for pictorial characters start. |
| 34 |
</p> |
| 35 |
</dd></dl> |
| 36 |
<!--l. 8600--><p class="indent" > A manual brute-force execution of the abstract commands can be a tedious job for large number of pictures. |
| 37 |
The <span class="cmtt-10">t4ht </span>is in essence an interpreter for these abstract commands. |
| 38 |
</p><!--l. 8605--><p class="indent" > Another possible approach for automating the process is to request lg scripts in the form of shell scripts or |
| 39 |
batch files. |
| 40 |
</p><!--l. 8612--><p class="indent" > <big><span class="cmbx-10">Alternatives to ‘</span><span class="cmtt-10">--- needs --- source.idv[i] ==> target.png ---</span><span class="cmbx-10">’</span></big> |
| 41 |
</p><!--l. 8615--><p class="indent" > The default setting is made with a request of the form ‘<span class="cmtt-10">--- needs --- %%1.idv[%%2] ==> %%3.png ---</span>’, |
| 42 |
where the parameters <span class="cmtt-10">%%1</span>, <span class="cmtt-10">%%2</span>, and <span class="cmtt-10">%%3 </span>respectively represent the name of the source file without |
| 43 |
its extension, a page number, and a name of the target file. Alternative patterns to these abstract |
| 44 |
commands can be requested in the following locations, with the order reflecting on the priority given to the |
| 45 |
requests. |
| 46 |
</p><!--l. 8624--><p class="indent" > |
| 47 |
</p><ul type="disc" > |
| 48 |
<li>In the <a |
| 49 |
href="mn39.html" >command line</a> of <span class="cmtt-10">tex4ht</span>, where the pattern should be prefixed with ‘<span class="cmtt-10">-s</span>’. |
| 50 |
<!--l. 8628--><p class="noindent" ></p></li> |
| 51 |
<li>In the environment file <span class="cmtt-10">tex4ht.env </span>within a block of consecutive lines, where the lines should be identified with the |
| 52 |
character <a |
| 53 |
href="mn34.html#sc-1" name="sc">‘<span class="cmtt-10">s</span>’</a>. |
| 54 |
<!--l. 8634--><p class="noindent" ></p></li> |
| 55 |
<li>In <span class="cmtt-10">tex4ht </span>with the pattern provided through the variable <a |
| 56 |
href="mn37.html#x-LGPIC" name="LGPIC">LGPIC</a> of <span class="cmtt-10">tex4ht.c</span>. |
| 57 |
</li></ul> |
| 58 |
<!--l. 8641--><p class="indent" > The character ‘<span class="cmtt-10">%</span>’ can be introduced into a pattern through the entry ‘<span class="cmtt-10">%%%</span>’. On the other hand, the |
| 59 |
parameters ‘<span class="cmtt-10">%%1</span>’, ‘<span class="cmtt-10">%%2</span>’, and <span class="cmtt-10">%%3 </span>can specify, between the first two percentage characters (i.e., ‘<span class="cmtt-10">%...%1</span>’, |
| 60 |
‘<span class="cmtt-10">%...%2</span>’, and ‘<span class="cmtt-10">%...%3</span>’), any format for the outcome that is compatible with the print formats of |
| 61 |
C. |
| 62 |
</p><!--l. 8648--><p class="indent" > <big><span class="cmbx-10">Alternatives to ‘</span><span class="cmtt-10">--- characters ---</span><span class="cmbx-10">’</span></big> |
| 63 |
</p><!--l. 8650--><p class="indent" > Substitutions for this abstract command can be requested in the following locations. |
| 64 |
</p><!--l. 8657--><p class="indent" > |
| 65 |
</p><ul type="disc" > |
| 66 |
<li>In the <a |
| 67 |
href="mn39.html" name="mn39.html" >overview</a> of <span class="cmtt-10">tex4ht</span>, prefixed with ‘<span class="cmtt-10">-b</span>’. |
| 68 |
<!--l. 8828--><p class="noindent" ></p></li> |
| 69 |
<li>In a line within the environment file ‘<span class="cmtt-10">tex4ht.file</span>’, where the line should be identified with the character |
| 70 |
‘<a |
| 71 |
href="mn34.html#bsc-1" name="bsc">b</a>’. |
| 72 |
<!--l. 8834--><p class="noindent" ></p></li> |
| 73 |
<li>In <span class="cmtt-10">tex4ht </span>with the substitution provided during compilation time through the variable <a |
| 74 |
href="mn37.html#x-LGSEP" name="LGSEP">LGSEP</a> of |
| 75 |
<span class="cmtt-10">tex4ht.c</span>. |
| 76 |
</li></ul> |
| 77 |
|
| 78 |
<hr /> |
| 79 |
<!--l. 8842--><p class="indent" > <small>Generated August 24, 2020 - <a href="/tex4ht/">tex4ht home page</a></small></p> |
| 80 |
</body></html> |