Include *.sty file from a super/subdirectory of main *.tex file

后端 未结 5 1919
滥情空心
滥情空心 2021-01-31 15:58

I want to share a latex document via git with many other people. Therefore we decided to put all the special sty files, that are not present in everyones latex-installation, in

5条回答
  •  醉酒成梦
    2021-01-31 16:26

    When you use TeX distribution that uses kpathsea, you can use the TEXINPUTS environment variable to specify where TeX is looking for files. The variable needs to be used in the following way.

    The paths in TEXINPUTS are separated by :. An empty path will include the default search paths, i.e., just the colon. Two consecutive slashes means that the directory and all sub-directories are searched.

    Thus, e.g., to build a file document.pdf which uses files in the current directory, all sub-directories of the resources directory and the default directories, you can use the following Makefile.

    document.pdf: document.tex
        TEXINPUTS=.:./resources//: pdflatex document.tex
    

    To speed up the filename lookup, you can build a ls-R database using the mktexlsr command.

    For all the details on kpathsea take a look at the manual.

提交回复
热议问题