I have a LaTeX document that uses font (and fontmap) files not available among the standard packages. It is compiled with pdflatex
and biber
.
If all the relevant font files are in the same directory as the main .tex file, then LaTeX correctly uses all fonts during compilation.
I know that the optimal way to do this would be to set all these files in an appropriate directory in the texmf tree and then set various environment variables etc. (which I do for documents I don't need to share). But the "incorrect" way above allows me to quickly share my document with other (maybe not so latex-savvy) people: I send them the directory, and they can also compile the tex file without changing their environment variables etc. For example, they can upload everything on their Overleaf account, which does the rest.
The only problem is that the directory ends up having many confusing files. I'd prefer putting all font-related files in a subdirectory instead, say "fontfiles", and if possible let LaTeX search there for them - somehow how it's done with the \graphicspath
command for picture files.
I tried using putting this at the beginning of the document:
\makeatletter
\def\input@path{{./fontfiles/}}
\makeatother
taking a hint from the answer to this question. But it doesn't work.
How could I solve this?
LaTeX
,PDFLaTeX
,XeLaTeX
, etc.?pdflatex
andbiber
. Sorry for forgetting this important info.