Unique TeX features

This section describes features that are unique to MiKTeX's TeX implementation.

Automatic Package Installation

MiKTeX can be configured in such a way that missing packages are automatically installed (see the section called “Automatic Package Installation”).

It is possible to override the global configuration setting with these command line options:

--disable-installer

Missing packages will not be installed.

--enable-installer

Missing packages will be installed.

Finding out Package Usages

The command line option --record-package-usages can be used to find out which packages are used in a job.

For example, you would say

latex -record-package-usages=packages.txt test

to create the file packages.txt, which contains the names of the packages used by test.tex.

If test.tex looks like this:

\documentclass{scrartcl}
\begin{document}
Hello, world!
\end{document}

Then the resulting packages.txt would contain these lines:

cm
koma-script
ltxbase

The package list can be handed over to the package manager (see mpm(1)), e.g.

mpm --update-some=packages.txt

would ensure that you have the latest versions installed.

Specifying Additional Input Directories

The command-line option --include-directory=dir causes the program to include dir into the list of input directories.

For example:

latex --include-directory="C:\My Styles" foo.tex

This prepends C:\My Styles to the input search path, i.e., C:\My Styles will be searched first, when TeX tries to find an input file.

Specifying the Directory for Auxiliary Files

The option --aux-directory=dir causes TeX to create auxiliary files in another directory. For example:

> mkdir C:\texoutput
> mkdir C:\tobedeleted
> latex -output-directory=C:\texoutput -aux-directory=C:\tobedeleted foo.tex
...
> 

This ensures that 1) foo.dvi will be created in C:\texoutput and 2) all other files (foo.log, ) will be created in C:\tobedeleted.