|
| 1 | +# tectonic -X compile |
| 2 | + |
| 3 | +Compile a standalone TeX document. |
| 4 | + |
| 5 | +***This is a [V2 CLI][v2cli-ref] command. For information on the original (“V1” |
| 6 | +CLI), see [its reference page][v1cli-ref].*** |
| 7 | + |
| 8 | +[v2cli-ref]: ../ref/v2cli.md |
| 9 | +[v1cli-ref]: ../ref/v1cli.md |
| 10 | + |
| 11 | +#### Example |
| 12 | + |
| 13 | +Generate `myfile.pdf` from `myfile.tex`: |
| 14 | + |
| 15 | +```sh |
| 16 | +tectonic -X compile myfile.tex |
| 17 | +``` |
| 18 | + |
| 19 | +#### Usage Synopsis |
| 20 | + |
| 21 | +```sh |
| 22 | +tectonic -X compile # full form |
| 23 | + [--bundle PATH] [-b PATH] |
| 24 | + [--chatter LEVEL] [-c LEVEL] |
| 25 | + [--color WHEN] |
| 26 | + [--format PATH] [-f] |
| 27 | + [--hide PATH...] |
| 28 | + [--keep-intermediates] [-k] |
| 29 | + [--keep-logs] |
| 30 | + [--makefile-rules PATH] |
| 31 | + [--only-cached] [-C] |
| 32 | + [--open] |
| 33 | + [--outdir DIR] [-o] |
| 34 | + [--outfmt FORMAT] |
| 35 | + [--pass PASS] |
| 36 | + [--print] [-p] |
| 37 | + [--reruns COUNT] [-r COUNT] |
| 38 | + [--synctex] |
| 39 | + [--web-bundle URL] [-w] |
| 40 | + [-Z UNSTABLE-OPTION] |
| 41 | + TEXPATH |
| 42 | +``` |
| 43 | + |
| 44 | +#### Remarks |
| 45 | + |
| 46 | +This command compiles a freestanding TeX document, outside of the Tectonic |
| 47 | +[document][docs-ref] framework. It is virtually the same interface as the [“V1” |
| 48 | +command-line interface][v1cli-ref], with lots of options. In comparison, the V2 |
| 49 | +interface is “[cargo]-like”, with a variety of subcommands anchored around a |
| 50 | +[Tectonic.toml] file defining a document to build. |
| 51 | + |
| 52 | +[docs-ref]: ../ref/documents.md |
| 53 | +[cargo]: https://doc.rust-lang.org/cargo/ |
| 54 | +[Tectonic.toml]: ./tectonic-toml.md |
| 55 | + |
| 56 | +Basic usage of this command is often as simple as: |
| 57 | + |
| 58 | +```sh |
| 59 | +tectonic -X compile myfile.tex |
| 60 | +``` |
| 61 | + |
| 62 | +This will compile the file and create `myfile.pdf` if nothing went wrong. You |
| 63 | +can use an input filename of `-` to have Tectonic process standard input. (In |
| 64 | +this case, the output file will be named `texput.pdf`.) |
| 65 | + |
| 66 | + |
| 67 | +#### Options |
| 68 | + |
| 69 | +The following are the available flags. |
| 70 | + |
| 71 | +| Short | Full | Explanation | |
| 72 | +|:------|:--------------------------|:-----------------------------------------------------------------------------------------------| |
| 73 | +| `-b` | `--bundle <PATH>` | Use this Zip-format bundle file to find resource files instead of the default | |
| 74 | +| `-c` | `--chatter <LEVEL>` | How much chatter to print when running. Possible values: `default`, `minimal` | |
| 75 | +| | `--color <WHEN>` | When to colorize the program’s output: `always`, `auto`, or `never` | |
| 76 | +| | `--format <PATH>` | The name of the "format" file used to initialize the TeX engine. Default: `latex` | |
| 77 | +| `-h` | `--help` | Prints help information | |
| 78 | +| | `--hide <PATH>...` | Tell the engine that no file at `<PATH>` exists, if it tries to read it | |
| 79 | +| `-k` | `--keep-intermediates` | Keep the intermediate files generated during processing | |
| 80 | +| | `--keep-logs` | Keep the log files generated during processing | |
| 81 | +| | `--makefile-rules <PATH>` | Write Makefile-format rules expressing the dependencies of this run to `<PATH>` | |
| 82 | +| `-C` | `--only-cached` | Use only resource files cached locally | |
| 83 | +| | `--open` | Open the output PDF after it is built | |
| 84 | +| `-o` | `--outdir <OUTDIR>` | The directory in which to place output files. Default: the directory containing INPUT | |
| 85 | +| | `--outfmt <FORMAT>` | The kind of output to generate. Possible values: `pdf` (the default), `html`, `xdv`, `aux`, `format` | |
| 86 | +| | `--pass <PASS>` | Which engines to run. Possible values: `default`, `tex`, `bibtex_first` | |
| 87 | +| `-p` | `--print` | Print the engine's chatter during processing | |
| 88 | +| `-r` | `--reruns <COUNT>` | Rerun the TeX engine exactly this many times after the first | |
| 89 | +| | `--synctex` | Generate SyncTeX data | |
| 90 | +| `-V` | `--version` | Prints version information | |
| 91 | +| `-w` | `--web-bundle <URL>` | Use this URL find resource files instead of the default | |
| 92 | +| `-Z` | `-Z <UNSTABLE-OPTION>` | Activate experimental “unstable” options | |
| 93 | + |
| 94 | +#### Unstable options |
| 95 | + |
| 96 | +The following unstable options may be available. As the name aims to indicate, |
| 97 | +the set of unstable options is subject to change at any time. |
| 98 | + |
| 99 | +| Expression | Explanation | |
| 100 | +|:-------------------------|:------------| |
| 101 | +| `-Z help` | List all unstable options | |
| 102 | +| `-Z continue-on-errors` | Keep compiling even when severe errors occur | |
| 103 | +| `-Z min-crossrefs=<num>` | Equivalent to bibtex's `-min-crossrefs` flag. Default vaue: 2 | |
| 104 | +| `-Z paper-size=<spec>` | Change the initial paper size. Default: `letter` | |
| 105 | + |
0 commit comments