Finding TeX files
peter at silmaril.ie
Wed Jun 10 14:57:48 CEST 2020
> On 10/06/2020 12:34, Jerry wrote:
> On Tue, 9 Jun 2020 22:48:10 +0100, Peter Flynn stated:
>>> kpsewhich article.cls
>> On my Windows 10 machine, I get this result:
>> C:\Users\gerar> kpsewhich article.cls
>> C:/Users/gerar/AppData/Local/Programs/MiKTeX 2.9/tex/latex/base/article.cls
This is useful, thanks.
1. Coupled with what I found on a Mac, and what's on my Linux system, we
have (in that order) the following installation-dependent paths¹:
followed IN EVERY CASE by the installation-INdependent path
2. If you are hunting for a file that you believe ought to be in your
TeX system, ALWAYS try with kpsewhich first. It comes with every TeX
If kpsewhich can't find it, that means TeX can't, either, because TeX
uses the same programming as kpsewhich to find files.
3. If you believe the file does actually exist, the next step is to use
your computer's own indexing system:
Windows: File Explorer
Linux: locate (command)
If that finds the file, then you need to work out why kpsewhich
couldn't. Most likely it was something downloaded manually which ought
to have been put "where TeX can find it" but wasn't. For this, read the
FAQ entry at https://texfaq.org/FAQ-inst-wlcf and keep your files in the
4. If both  and  fail, then EITHER the file is in a place that
nothing ever looks in, OR the file genuinely isn't on your system, and
may need installing.
¹ I don't have details for TeX Live on Windows.
More information about the texhax