| 1 | ClutTeX: Process LaTeX document without cluttering your directory |
| 2 | ===== |
| 3 | |
| 4 | ClutTeX is a program to automatically process your LaTeX document. |
| 5 | If necessary, it re-runs (La)TeX program to resolve cross-references and everything. |
| 6 | |
| 7 | One of its main feature is that, it does not clutter your working directory (but the final `.pdf` file is still brought for you). |
| 8 | |
| 9 | Blog: |
| 10 | |
| 11 | * [TeX 実行の自動化ツールを作った (ClutTeX)](https://blog.miz-ar.info/2016/12/cluttex/) |
| 12 | * [LaTeX処理自動化ツール ClutTeX をリリースした](https://blog.miz-ar.info/2018/10/cluttex-release/) |
| 13 | |
| 14 | Features |
| 15 | ----- |
| 16 | |
| 17 | * Does not clutter your working directory with `.aux`, `.log`, etc. files. |
| 18 | * Does not prompt for input when there is a (La)TeX error. |
| 19 | * With pTeX-like engines, automatically run dvipdfmx to produce PDF file. |
| 20 | * Automatically re-run (La)TeX to resolve cross-references and other things. |
| 21 | * Watch input files for change (requires an external program). \[`--watch` option\] |
| 22 | * Support for MakeIndex, BibTeX, Biber, makeglossaries commands. \[`--makeindex`, `--bibtex`, `--biber`, `--makeglossaries` options\] |
| 23 | |
| 24 | Usage |
| 25 | ----- |
| 26 | |
| 27 | `$ cluttex -e pdflatex file.tex` |
| 28 | |
| 29 | More general form: |
| 30 | |
| 31 | `$ cluttex [OPTIONS] [--] INPUT.tex` |
| 32 | |
| 33 | See [example/](example/) for some examples. |
| 34 | |
| 35 | Install |
| 36 | ----- |
| 37 | |
| 38 | ClutTeX is included in [TeX Live](https://tug.org/texlive/). |
| 39 | |
| 40 | If you want to install it manually, go [Releases](https://github.com/minoki/cluttex/releases) page and download the latest archive (zip or tar.gz). Unpack the archive and copy `bin/cluttex` to somewhere in PATH. |
| 41 | |
| 42 | Command-line Options |
| 43 | ----- |
| 44 | |
| 45 | * `-e`, `--engine=ENGINE` |
| 46 | Specify which TeX engine/format to use. |
| 47 | `ENGINE` is one of the following: |
| 48 | `pdflatex`, `pdftex`, |
| 49 | `lualatex`, `luatex`, `luajittex`, |
| 50 | `xelatex`, `xetex`, |
| 51 | `latex`, `etex`, `tex`, |
| 52 | `platex`, `eptex`, `ptex`, |
| 53 | `uplatex`, `euptex`, `uptex`. |
| 54 | * `-o`, `--output=FILE` |
| 55 | The name of output file. \[default: `JOBNAME.FORMAT`\] |
| 56 | * `--fresh` |
| 57 | Clean intermediate files before running TeX. |
| 58 | Cannot be used with `--output-directory`. |
| 59 | * `--max-iterations=N` |
| 60 | Maximum number of running TeX to resolve cross-references. |
| 61 | \[default: 4\] |
| 62 | * `--[no-]change-directory` |
| 63 | Change the current working directory to the output directory when running TeX. |
| 64 | * `--watch[=ENGINE]` |
| 65 | Watch input files for change. |
| 66 | Requires [fswatch](http://emcrisostomo.github.io/fswatch/) program or `inotifywait` program to be installed on Unix systems. |
| 67 | * `--color[=WHEN]` |
| 68 | Make ClutTeX's message colorful. |
| 69 | `WHEN` is one of `always`, `auto`, or `never`. |
| 70 | \[default: `auto` if `--color` is omitted, `always` if `=WHEN` is omitted\] |
| 71 | * `--includeonly=NAMEs` |
| 72 | Insert `\includeonly{NAMEs}`. |
| 73 | * `--make-depends=FILE` |
| 74 | Write dependencies as a Makefile rule. |
| 75 | * `--tex-option=OPTION` |
| 76 | Pass `OPTION` to TeX as a single option. |
| 77 | * `--tex-options=OPTIONs` |
| 78 | Pass `OPTIONs` to TeX as multiple options. |
| 79 | * `--dvipdfmx-option[s]=OPTION[s]` |
| 80 | Same for dvipdfmx. |
| 81 | * `-h`, `--help` |
| 82 | Print this message and exit. |
| 83 | * `-v`, `--version` |
| 84 | Print version information and exit. |
| 85 | * `-V`, `--verbose` |
| 86 | Be more verbose. |
| 87 | * `--print-output-directory` |
| 88 | Print the output directory and exit. |
| 89 | * `--package-support=PKG1[,PKG2,...,PKGn]` |
| 90 | Enable special support for shell-escaping packages. |
| 91 | Currently supported packages are `minted` and `epstopdf`. |
| 92 | * `--engine-executable=COMMAND` |
| 93 | The actual TeX command to use. |
| 94 | * `--check-driver=DRIVER` |
| 95 | Check that the correct driver file is loaded. |
| 96 | `DRIVER` is one of `dvipdfmx`, `dvips`, `dvisvgm`. |
| 97 | Can only be used with `--output-format=dvi`. |
| 98 | * `--config-file=FILE` |
| 99 | Use the specified config file. |
| 100 | |
| 101 | Options to run auxiliary programs: |
| 102 | |
| 103 | * `--makeindex=COMMAND` |
| 104 | Use MakeIndex program to process `.idx` files. |
| 105 | (e.g. `--makeindex=makeindex`, or `--makeindex=mendex`) |
| 106 | * `--bibtex=COMMAND` |
| 107 | Use BibTeX program to produce `.bbl` file from `.aux` files. |
| 108 | (e.g. `--bibtex=bibtex`, or `--bibtex=upbibtex`) |
| 109 | * `--biber[=COMMAND]` |
| 110 | Use Biber program to produce `.bbl` file from `.bcf` file. |
| 111 | * `--makeglossaries[=COMMAND]` |
| 112 | Use makeglossaries program to produce `.gls` file from `.glo` file. |
| 113 | |
| 114 | TeX-compatible options: |
| 115 | |
| 116 | * `--[no-]shell-escape` |
| 117 | * `--shell-restricted` |
| 118 | * `--synctex=NUMBER` |
| 119 | * `--[no-]file-line-error` |
| 120 | \[default: yes\] |
| 121 | * `--[no-]halt-on-error` |
| 122 | \[default: yes\] |
| 123 | * `--interaction=STRING` |
| 124 | (`STRING`=`batchmode`/`nonstopmode`/`scrollmode`/`errorstopmode`) |
| 125 | \[default: `nonstopmode`\] |
| 126 | * `--jobname=STRING` |
| 127 | * `--fmt=FORMAT` |
| 128 | * `--output-directory=DIR` |
| 129 | \[default: somewhere in the temporary directory\] |
| 130 | * `--output-format=FORMAT` |
| 131 | Set output format (`pdf` or `dvi`). |
| 132 | \[default: `pdf`\] |
| 133 | |
| 134 | For TeX-compatible options, single-hypen forms are allowed (e.g. `-synctex=1` in addition to `--synctex=1`). |
| 135 | |
| 136 | If run as `cllualatex` or `clxelatex`, then the default engine is `lualatex` or `xelatex`, accordingly. |
| 137 | |
| 138 | License |
| 139 | ----- |
| 140 | |
| 141 | This program is distributed under GNU General Public License, version 3. |