Skip to content

Toolchain

The latex_toolchain rule.

A latex_toolchain packages everything an action needs to invoke tectonic: the binary itself, optionally a pre-fetched package bundle, and optionally a biber binary for bibliography processing.

Toolchains of this type are registered automatically by the tectonic module extension defined in //latex/toolchain:extensions.bzl.

Rules

Providers

latex_toolchain

load("@rules_latex//latex/toolchain:toolchain.bzl", "latex_toolchain")

latex_toolchain(name, biber, bundle, tectonic)

Defines a tectonic-based LaTeX toolchain.

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
biber Optional biber executable. When set, latex_document actions invoked with biber = True make this binary available on PATH so tectonic can shell out to it for bibliography processing. Vendored for every supported platform (biber 2.21). Label optional None
bundle Optional offline package bundle (.tar). When set, the toolchain runs tectonic with --bundle pointed at this file, making compilation fully hermetic. Label optional None
tectonic The tectonic executable. Label required

LatexToolchainInfo

load("@rules_latex//latex/toolchain:toolchain.bzl", "LatexToolchainInfo")

LatexToolchainInfo(tectonic, bundle, biber)

Resolved tectonic toolchain.

FIELDS

Name Description
tectonic File: the tectonic executable.
bundle File|None: an offline package bundle, or None for online (default) operation.
biber File|None: a biber executable for bibliography processing, or None if biber isn't available for this platform.