I am working on a project where in the .cls
and .sty
files installed by the TeX distributions are too old, but they have been patched by other users on github
. I wish to use these updated versions of these .cls
and .sty
files for my project. For various personal reasons (easy portability across computers), I do not wish to use texmf-local
tree and wish to put them in a folder titled custom_cls_sty_files
in the root of my project directory.
I am using latexmk
as my build tool. Following the solution proposed here, I tried configuring my latexmkrc
as
$ENV{'TEXINPUTS'}='./custom_cls_sty_files//:' . $ENV{'TEXINPUTS'};
However, this broke everything. latexmk
is not only unable to find the .sty
and .cls
files, it could not find even main.tex
!
Here is an mwe
of main.tex
\documentclass{article}
\usepackage{setspace}
\usepackage{blindtext}
\begin{document}
\doublespacing
\blinddocument
\end{document}
where a local copy of setspace.sty
is located in the folder custom_cls_sty_files
.
Presently, I am encountering this issue on a Windows 10 machine on TL 2018. But I have a mac
laptop at home and a linux
machine at work where I work on this project through git/github combo. Therefore, I would like a single cross-platform latexmkrc
file that can solve this issue (i.e. assuming that this issue arose in the first place due to OS differences)
Error message when trying the suggested solution
Use of uninitialized value in concatenation (.) or string at (eval 17) line 59, <GEN0> chunk 1.
Latexmk: This is Latexmk, John Collins, 25 October 2018, version: 4.61.
Latexmk: applying rule 'lualatex'...
Rule 'lualatex': Rules & subrules not known to be previously run:
lualatex
Rule 'lualatex': The following rules & subrules became out-of-date:
'lualatex'
------------
Run number 1 of rule 'lualatex'
------------
------------
Running 'lualatex -recorder "main.tex"'
------------
This is LuaTeX, Version 1.07.0 (TeX Live 2018/W32TeX)
restricted system commands enabled.
! I can't find file `main.tex'.
<*> main.tex
(Press Enter to retry, or Control-Z to exit)
Please type another input file name:
./custom_cls_sty_files//
would need to be a subfolder of where the .tex is which may constantly change and not work always as expected & certainly above will not work like that on windows even if working on mac or nix since windows uses different separators. When you say across computers do you mean cross-platform which would require at least two different approaches or do you mean across flavours of Windows since if that is the case the approach will be different to the one you are pursuing. Please EDIT/clarify questioncustom_cls_sty_files
is just a folder in my project's root where all thesty
andcls
files exist. For the 2nd part of the comment, I have updated the question to clarify what I meant by cross-platform.texmf
trees. But I need this custom subfolder approach for archival purposes. Some package that I use are constantly changing breaking backwards compatibility with updates. I wish to use a specific version of these dependency files that can be fully controlled by me, and which will be automatically used bylatexmk
preferred over the system-widesty
files. This way, everything I need for reproducibility is self-contained in the project (at the expense of an increased size, of course)