Skip to main content

Crate retex_kpath

Crate retex_kpath 

Source
Expand description

A native implementation of the parts of kpathsea that TeX engines use.

kpathsea finds files in a TeX installation from search paths defined in texmf.cnf. It speeds lookups up with ls-R databases. This crate reproduces its semantics so that retex finds exactly the same files as luatex:

  • texmf.cnf files are found through TEXMFCNF. Definitions in earlier files win. VAR.progname takes precedence over VAR, and environment variables take precedence over both.
  • Values are expanded: $VAR/${VAR}, then braces {a,b}, then ~.
  • In a path element, a leading !! means “look only in the ls-R database” and a trailing or inner // means “any subdirectory”.
  • A lookup of a name with no standard suffix first tries the name with each suffix of the file format, then the name as given.

Structs§

Kpathsea
A configured kpathsea instance.
Options
Configuration for constructing a Kpathsea instance.
ProcessEnv
The process environment.
Refusal
A file name refused by Kpathsea::name_ok.

Enums§

Access
What a file is opened for.
Error
Errors raised while setting up the search machinery.
FileFormat
A kind of file to look up, mirroring kpathsea’s kpse_file_format_type.

Traits§

Env
Source of environment variables, injectable for tests.

Functions§

shared
Wraps a Kpathsea for sharing.

Type Aliases§

Shared
A kpathsea instance shared by several users (engine, font loader).