TeX Live package dependencies
In general, TL does not try to track package dependencies, since
there is no reliable way to detect dependencies automatically. (That
would mean installing packages during the TeX run, as MiKTeX does, and there are complications
with doing this in TL.)
However, if you as the package author wish to specify
dependencies, this can be done. We do not request this, and do not
particularly recommend it, but since people have asked us, we've defined
the following mechanism. Packages doing this must be uploaded to CTAN.
Provide a file named DEPENDS.txt (with that capitalization
and extension) at the top level of your CTAN upload (sibling to your
README file). A four-line example:
dep1
hard dep2
hard dep3 dep4
soft xedep # XeTeX only
The intent is for the file to be automatically processed. So its syntax
must adhere to the following:
- Whitespace is ASCII space (0x20) and tab (0x09).
- Lines are terminated with ASCII linefeed (0x0a) possibly preceded by
ASCII return (0x0d).
- Blank lines, consisting of only whitespace, are ignored.
- Leading and trailing whitespace on a line are ignored.
- Multiple whitespace characters are the same as one.
- Comments begin with # and continue to the end of line.
- Each non-blank line therefore consists of one or more
whitespace-separated words.
- If the first word on a line is hard, soft, or
package, all subsequent words are the arguments.
- If a line has only one word, hard is assumed (first line of
example above).
- The arguments must be valid package names, as defined by CTAN. For
example, that means they consist of all lowercase ASCII letters a-z,
ASCII numbers 0-9, dash, underscore (very occasionally), and nothing
else. If this is different from the TL package name, use the CTAN
name anyway; we will convert, one way or another. If the package
does not exist in TL at all, the depends file will be ignored.
- The hard directive means the following package(s) are
always required. These will be converted into dependencies for
tlmgr.
- The soft directive means the following package(s) may be
needed, but are not required. As in the example above, perhaps they
are only needed when running XeTeX (or some other specific engine).
These must be listed as soft because not every installation
wants or needs (for example) XeTeX. Similarly with packages that are
only conditionally required, e.g., if some option to your package is
specified. As far as tlmgr goes, soft dependencies are
currently ignored, but they may serve as useful documentation. Your
choice.
- The package directive must be followed by exactly one more
word, and that word is the package name for which any following
dependencies are applied. This is only useful in the extremely
unusual case of two or more packages being distributed from a single
CTAN directory; it's best to leave it out in the normal case.
- A DEPENDS.txt file is not required to have any directives.
An empty or comment-only file is valid, though meaningless.
If experience shows that changes are necessary, we may extend the
syntax in the future, but we don't expect to ever need to make an
incompatible change.
If you have questions or suggestions, email
tex-live@tug.org.
$Date: 2025/07/21 17:30:41 $;
TeX Live;
TUG home page;
join TUG/renew membership;
webmaster;
facebook;
x;
bluesky;
mastodon.