KPSEWHICH(1)
๐ KPSEWHICH(1) โ the General Commands Manual glow-up ๐
okay bestie, this is kpsewhich, from the General Commands Manual section of your local man tree. she's the standalone girlie for path lookup and and expansion for kpathsea. (yes the double "and" is canon, i don't make the rules ๐
)
โจ NAME โจ
kpsewhich โ standalone path lookup and and expansion for kpathsea
๐ธ SYNOPSIS ๐ธ
kpsewhich [options] [filenames]
๐ฆ DESCRIPTION ๐ฆ
okay so first things first, this manual page is not meant to be exhaustive. the full โจcompleteโจ documentation for this version of TeX lives in the info file or manual Kpathsea: A library for path searching. so if you need the deep lore, that's where you go, not here.
kpsewhich is the standalone front-end of the kpathsea library, and she has two whole jobs: examining variables and finding files. main character energy fr.
here's the tea on how she searches ๐ when the -format option is not given, the search path she uses when looking for a file is inferred from the name you gave her, by looking for a known extension. and if no known extension is found? she just uses the search path for TeX source files. no cap.
๐ OPTIONS ๐
kpsewhich accepts the following options, and yes we're doing all of them, no skips:
-debug numโ Set debugging flags.-D numโ Use a base resolution of num; the default, set by the installer, is typically600.-dpi numโ As-D.-engine stringโ Set$enginein the environment, which is used in some search paths.-expand-braces stringโ Print variable and brace expansion of string.-expand-path stringโ Print complete path expansion of string.-expand-var stringโ Print variable expansion of string.-format nameโ Use file type name. See the info manual for a list of valid names, or use the-helpoption to print the list.-helpโ Print help message and exit.-interactiveโ Ask for additional filenames to look up.-mktex fmtโ enablemktexfmtgeneration. (fmt=pk/mf/tex/tfm)-mode stringโ Set device name for$MAKETEX_MODEto string; no default.-must-existโ Search the disk as well asls-Rif necessary.-no-mktex fmtโ disablemktexfmtgeneration. (fmt=pk/mf/tex/tfm)-path stringโ Search in the path string.-progname stringโ Set program name to string.-show-path nameโ Output search path for file type name. See the info manual for a list of valid names, or use the-helpoption to print the list.-var-value variableโ Print the expansion of variable.-versionโ Print version information and exit.
pro tip from me to you:-formatand-show-pathboth want a valid name, and neither of them is gonna guess it for you โ hit up the info manual or just run-helpand let her list them. ๐ซถ
๐ SEE ALSO ๐
go give these iconics some love too:
okay that's the whole page bestie, you ate it ๐ this was Kpathsea 6.4.1, dated 1 March 2011, and that's the kpsewhich manual, periodt. now go find some files. ๐โจ
๐ฆ where this page comes from
- alpine 3.24: texlive-doc 2026.0-r0 ยท GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 44: texlive-kpathsea 12:svn77861-105.fc44 ยท LGPL-2.1-or-later
- fedora 44: texlive-kpathsea 12:svn77861-111.fc44 ยท LGPL-2.1-or-later
- opensuse-leap 16.0: texlive-kpathsea-doc 2025.221.svn73918-160000.3.1 ยท LGPL-2.1-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms