Pack

Some examples.

Version

Many TeX projects publish TeX package in CTAN or Github/Gitlab release if they have a git repository. Github release can tag version while CTAN cannot. Such as:

Version is useful to declare dependency relationship. We recommend stable version rather than source code managed version.

Formats

TeX packages have two formats:

  • source package *-ctan.zip, like lua's *.src.rock and python's sdist *.tar.gz, include *.dts and *.ins
  • binary package *.tds.zip, like lua's *.any.rock and python's *-any.whl, include *.cls and *.sty

We repack *.tds.zip if upstream provide else *-ctan.zip even git zip file to *.src.rock.

Dependencies

*.tds.zip doesn't have meta information about packages. when we create *.rockspec, we need to add it from CTAN.

CTAN doesn't provide dependence information. You need search it. e.g.,

tex/latex/base/ltnews.cls:

% ...
\IfFileExists{hyperref.sty}{%
  \RequirePackage[hidelinks]{hyperref}}{}
% ...

hyperref is an optional dependency of latex-base.

Build Dependencies

Some TeX packages don't provide *.tds.zip. You have to build it from *-ctan.zip or git zip.

luatex --interaction=nonstopmode foo.ins

add { 'luatex', 'latex-base' } to build_dependencies.

generated by LDoc 1.5.0 Last updated 2025-08-16 20:10:55