diff options
Diffstat (limited to 'Build/source/utils/mkjobtexmf/mkjobtexmf.html')
-rw-r--r-- | Build/source/utils/mkjobtexmf/mkjobtexmf.html | 379 |
1 files changed, 379 insertions, 0 deletions
diff --git a/Build/source/utils/mkjobtexmf/mkjobtexmf.html b/Build/source/utils/mkjobtexmf/mkjobtexmf.html new file mode 100644 index 00000000000..78196c8211d --- /dev/null +++ b/Build/source/utils/mkjobtexmf/mkjobtexmf.html @@ -0,0 +1,379 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>mkjobtexmf -- Generate a texmf tree for a particular job</title> +<link rev="made" href="mailto:feedback@suse.de" /> +</head> + +<body style="background-color: white"> + +<p><a name="__index__"></a></p> +<!-- INDEX BEGIN --> + +<ul> + + <li><a href="#name">NAME</a></li> + <li><a href="#synopsis">SYNOPSIS</a></li> + <li><a href="#description">DESCRIPTION</a></li> + <ul> + + <li><a href="#running_the_program">Running the program</a></li> + <li><a href="#file_recording">File recording</a></li> + <li><a href="#analyze_and_link_copy_found_files">Analyze and link/copy found files</a></li> + </ul> + + <li><a href="#options">OPTIONS</a></li> + <li><a href="#examples">EXAMPLES</a></li> + <li><a href="#unsolved_issues__caveats__todos">UNSOLVED ISSUES, CAVEATS, TODOS</a></li> + <li><a href="#files">FILES</a></li> + <li><a href="#author">AUTHOR</a></li> + <li><a href="#copyright_and_license">COPYRIGHT AND LICENSE</a></li> + <li><a href="#history">HISTORY</a></li> +</ul> +<!-- INDEX END --> + +<hr /> +<p> +</p> +<h1><a name="name">NAME</a></h1> +<p>mkjobtexmf -- Generate a texmf tree for a particular job</p> +<p> +</p> +<hr /> +<h1><a name="synopsis">SYNOPSIS</a></h1> +<p>The progam <strong>mkjobtexmf</strong> runs a program and tries to +find the used file names. Two methods are available, +option <code>-recorder</code> of TeX (Web2C) or the program <strong>strace</strong>.</p> +<p>Then it generates a directory with a texmf tree. It checks +the found files and tries sort them in this texmf tree.</p> +<p>It can be used for archiving purposes or to speed up +following TeX runs.</p> +<pre> + mkjobtexmf [options]</pre> +<p>This runs TeX that can be configured by options. +Both methods for getting the used file names are available.</p> +<pre> + mkjobtexmf [options] -- <cmd> [args]</pre> +<p>The latter form runs program <em>cmd</em> with arguments <em>args</em> +instead of TeX. As method only program <strong>strace</strong> is available.</p> +<p>Options:</p> +<pre> + --jobname <name> Name of the job (mandatory). + Usually this is the TeX file + without extension + --texname <file> Input file for TeX. Default is the + job name with extension '.tex' + --texopt <option> Option for TeX run + --destdir <directory> Destination directory, + default is `<jobname>.mjt' + --output Add also output files + --strace Use strace instead of TeX's + option -recorder + --copy Copy files instead of creating + symbol links + --flat Junk paths, do not make directories + inside the destination directory + --cmd-tex <cmd> Command for the TeX compiler + --cmd-kpsewhich <cmd> Command for kpsewhich + --cmd-texhash <cmd> Command for texhash + --cmd-strace <cmd> Command for strace + --verbose Verbose output + --help Brief help message + --man Full documentation</pre> +<p> +</p> +<hr /> +<h1><a name="description">DESCRIPTION</a></h1> +<p> +</p> +<h2><a name="running_the_program">Running the program</a></h2> +<p>First <strong>mkjobtexmf</strong> runs a program, usually TeX. The TeX compiler +is configured by option <strong>--cmd-tex</strong>. Option <strong>--texname</strong> can +be used, if the file name extension differs from <em>.tex</em>:</p> +<pre> + mkjobtexmf --jobname foo --texname foo.ltx</pre> +<p>Even more complicate cases are possible:</p> +<pre> + mkjobtexmf --jobname foo --texname '\def\abc{...}\input{foo}'</pre> +<p>If another program than TeX should be used (dvips, ...), +then this program can be given after <code>--</code>:</p> +<pre> + mkjobtexmf --jobname foo -- dvips foo</pre> +<p> +</p> +<h2><a name="file_recording">File recording</a></h2> +<p>Two methods are available to get the used file names:</p> +<dl> +<dt><strong><a name="item_recorder_of_tex">Recorder of TeX</a></strong><br /> +</dt> +<dd> +Some TeX distributions (e.g. Web2C) support the option <strong>-recorder</strong> +for its TeX compilers. Then the TeX compiler generates a file with +extension <em>.fls</em> that records the used input and output files. +</dd> +<p></p> +<dt><strong><a name="item_program_strace">Program strace</a></strong><br /> +</dt> +<dd> +This program traces system calls and signals. It is used here +to log the used files. +</dd> +<p></p></dl> +<p> +</p> +<h2><a name="analyze_and_link_copy_found_files">Analyze and link/copy found files</a></h2> +<p>The result directory <em><em>jobname</em>.mjt</em> is generated. Inside the +result TEXMF tree is created. Each found file is compared against +a list of paths of TEXMF trees. If a match is found, the file is +linked/copied into the TEXMF tree. The list of paths is generated by +program <strong>kpsewhich</strong>.</p> +<p>If the file cannot be mapped to a TEXMF tree and the file is +a relative file name, then it is directly linked/copied into the +result directory <em><em>jobname</em>.mjt</em>. Absolute file names +are not supported and neither paths with links to parent directories.</p> +<p>Symbolic links are created by default. The files are copied +if option --copy is given or symbolic linking is not available.</p> +<p> +</p> +<hr /> +<h1><a name="options">OPTIONS</a></h1> +<dl> +<dt><strong><a name="item__2d_2djobname_3djobname"><strong>--jobname</strong>=<em>jobname</em></a></strong><br /> +</dt> +<dd> +It is the name of the job. `<jobname>.tex' serves as default for +the TeX file and <jobname> is used for naming various directories +and files. See section <a href="#files">FILES</a>. +</dd> +<p></p> +<dt><strong><a name="item__2d_2dtexname_3dname"><strong>--texname</strong>=<em>name</em></a></strong><br /> +</dt> +<dd> +The name of the TeX input file, if it differs from <jobname>.tex. +</dd> +<p></p> +<dt><strong><a name="item__2d_2dtexopt_3dopt"><strong>--texopt</strong>=<em>opt</em></a></strong><br /> +</dt> +<dd> +Additional option for the TeX compiler, examples are --ini or +--shell-escape. This option can be given more than once. +</dd> +<p></p> +<dt><strong><a name="item__2d_2ddestdir_3ddirectory"><strong>--destdir</strong>=<em>directory</em></a></strong><br /> +</dt> +<dd> +Specifies the name of the destination directory where the result +is collected. As default a directory is generated in the current +directory with the job name and extension `.mjt'. +</dd> +<p></p> +<dt><strong><a name="item__2d_2doutput"><strong>--output</strong></a></strong><br /> +</dt> +<dd> +Also add output files. +</dd> +<p></p> +<dt><strong><a name="item__2d_2dstrace"><strong>--strace</strong></a></strong><br /> +</dt> +<dd> +Use method with program <strong>strace</strong>, see <a href="#description">DESCRIPTION</a>. +</dd> +<p></p> +<dt><strong><a name="item__2d_2dcopy"><strong>--copy</strong></a></strong><br /> +</dt> +<dd> +Files are copied instead of creating symbolic links. +</dd> +<p></p> +<dt><strong><a name="item__2d_2dflat"><strong>--flat</strong></a></strong><br /> +</dt> +<dd> +Files are linked or copied without path elements. +The destination directory will contain a flat list of +files or links without directory. +</dd> +<dd> +<p>The files `ls-R' and `aliases' are ignored.</p> +</dd> +<p></p> +<dt><strong><a name="item__2d_2dcmd_2dtex_3dcmd"><strong>--cmd-tex</strong>=<em>cmd</em></a></strong><br /> +</dt> +<dd> +Command for the TeX compiler. Default is pdflatex. +</dd> +<p></p> +<dt><strong><a name="item__2d_2dcmd_2dkpsewhich_3dcmd"><strong>--cmd-kpsewhich</strong>=<em>cmd</em></a></strong><br /> +</dt> +<dd> +Command for kpsewhich. +</dd> +<p></p> +<dt><strong><a name="item__2d_2dcmd_2dtexhash_3dcmd"><strong>--cmd-texhash</strong>=<em>cmd</em></a></strong><br /> +</dt> +<dd> +Command for updating the file name database of the generated +texmf tree. Default is texmf. +</dd> +<p></p> +<dt><strong><a name="item__2d_2dcmd_2dstrace_3dcmd"><strong>--cmd-strace</strong>=<em>cmd</em></a></strong><br /> +</dt> +<dd> +Command for strace. +</dd> +<p></p> +<dt><strong><a name="item__2d_2dverbose"><strong>--verbose</strong></a></strong><br /> +</dt> +<dd> +Verbose messages. +</dd> +<p></p> +<dt><strong><a name="item__2d_2dhelp"><strong>--help</strong></a></strong><br /> +</dt> +<dd> +Display help screen. +</dd> +<p></p></dl> +<p> +</p> +<hr /> +<h1><a name="examples">EXAMPLES</a></h1> +<p>TeX file <em>test.tex</em> using TeX's recorder method:</p> +<pre> + mkjobtexmf --jobname test</pre> +<p>TeX file <em>test.tex</em> using LaTeX:</p> +<pre> + mkjobtexmf --jobname test --cmd-tex latex</pre> +<p>Format generation:</p> +<pre> + mkjobtexmf --jobname test --texopt -ini --texname pdflatex.ini</pre> +<p>Example, how the new texmf tree (Linux/bash) can be used:</p> +<pre> + TEXMF=!!test.mjt/texmf pdflatex test</pre> +<p>Example for generating a zip archive (Linux/bash):</p> +<pre> + (cd test.mjt && zip -9r ../test .)</pre> +<p>Example for generating a tar archive:</p> +<pre> + tar cjhvf test.tar.bz2 -C test.mjt .</pre> +<p> +</p> +<hr /> +<h1><a name="unsolved_issues__caveats__todos">UNSOLVED ISSUES, CAVEATS, TODOS</a></h1> +<dl> +<dt><strong><a name="item_experimental_software">Experimental software</a></strong><br /> +</dt> +<dd> +Options, defaults, how the program works might change in +future versions. +</dd> +<p></p> +<dt><strong><a name="item_texmf_2ecnf"><em>texmf.cnf</em></a></strong><br /> +</dt> +<dd> +Currently the method with <strong>strace</strong> records this files. +TeX's recorder does not. Useful are <em>texmf.cnf</em> files for +variable settings. Because we have just one TEXMF tree, +the path sections should probably rewritten. +</dd> +<p></p> +<dt><strong><a name="item_settings_in_environment_variables">Settings in environment variables</a></strong><br /> +</dt> +<dd> +They are not stored at all. +</dd> +<p></p> +<dt><strong><a name="item_collisions">Collisions</a></strong><br /> +</dt> +<dd> +The program uses one destination directory and at most +one TEXMF tree for the result. However, the source files +can come from different directories and TEXMF trees. +Therefore name collisions are possible. +</dd> +<dd> +<p>The program follows the strategy not to delete files +in the destination directory. That allows to collect files +from differnt runs. Thus collisions are resolved +in the manner that the first entry that is made in +the destination directory wins.</p> +</dd> +<p></p> +<dt><strong><a name="item_configuration_file">Configuration file</a></strong><br /> +</dt> +<dd> +It would save the user from retyping the same options again and again. +</dd> +<p></p> +<dt><strong><a name="item_uncomplete_recording">Uncomplete recording</a></strong><br /> +</dt> +<dd> +Bugs in TeX's file recording might result in incomplete +file recording (e.g. pdfTeX 1.40.3 does not record .pfb and +.pk files). +</dd> +<p></p> +<dt><strong><a name="item__2e_2e_2e">...</a></strong><br /> +</dt> +</dl> +<p> +</p> +<hr /> +<h1><a name="files">FILES</a></h1> +<dl> +<dt><strong><a name="item__3cjobname_3e_2emjt_2f"><em><jobname>.mjt/</em></a></strong><br /> +</dt> +<dd> +Directory where the resulting texmf tree and symbol links +are stored. +</dd> +<p></p> +<dt><strong><a name="item__3cjobname_3e_2efls"><em><jobname>.fls</em></a></strong><br /> +</dt> +<dd> +Name of TeX's recorder file. +</dd> +<p></p> +<dt><strong><a name="item__3cjobname_3e_2estrace"><em><jobname>.strace</em></a></strong><br /> +</dt> +<dd> +Log file where the result of <strong>strace</strong> is stored. +</dd> +<p></p></dl> +<p> +</p> +<hr /> +<h1><a name="author">AUTHOR</a></h1> +<p>Heiko Oberdiek, email: oberdiek at uni-freiburg.de</p> +<p> +</p> +<hr /> +<h1><a name="copyright_and_license">COPYRIGHT AND LICENSE</a></h1> +<p>Copyright 2007 by Heiko Oberdiek.</p> +<p>This library is free software; you may redistribute it and/or +modify it under the same terms as Perl itself +(Perl Artistic License/GNU General Public License, version 2).</p> +<p> +</p> +<hr /> +<h1><a name="history">HISTORY</a></h1> +<ol> +<li><strong><a name="item__2f04_2f16_v0_2e1">/04/16 v0.1</a></strong><br /> +</li> +* First experimental version. +<p></p> +<li><strong><a name="item__2f05_2f09_v0_2e2">/05/09 v0.2</a></strong><br /> +</li> +* Typo in option name fixed. +<p></p> +<li><strong><a name="item__2f09_2f03_v0_2e3">/09/03 v0.3</a></strong><br /> +</li> +* New options: --copy, --flat, --destdir +<p></p> +<li><strong><a name="item__2f09_2f04_v0_2e4">/09/04 v0.4</a></strong><br /> +</li> +* Bug fix in map_files_texmf. +<p></p></ol> + +</body> + +</html> |