Search code examples
latexrelative-pathtexwaf

waf - tex includes from different folder


├── additives
│   ├── my.pdf
│   ├── some.jpg
│   ├── include.png
│   ├── ...
│
├── pdata.tex
├── letter.tex
├── cv.tex
├── glue
│   ├── cmds.tex
│   ├── combined.tex
│   └── packets.tex


top = '.'
out = 'build'

def configure(conf):
    conf.load('tex')

def build(bld):
    #shared = ['daten.tex', 'anschreiben.tex','lebenslauf.tex','glue/befehle.tex','glue/pakete.tex']
    shared = []

    bld(features = 'tex',
        type     = 'pdflatex',
        source   = ['glue/combined.tex'] + shared,
        outs     = 'pdf',
        prompt   = True
    )

glue/combined.tex includes all other *.tex files, but I can not seem to get glue/combined.tex to include anything from glues parent folder - there I get the no such file error -., which I need to.

Does anybody have an idea on how to circumvent/fix this? Or is this a known bug? I did not find a bugreport.


Solution

  • This is not exactly well documented, neither in waf tex nor in pdflatex.

    def build(bld):
        bld.env['TEXINPUTS'] = 'shared' # : split paths relative to cwd, but waf seems to only handle one dir
        bld(feature='tex', source='glue/combined.tex',...)
    

    http://docs.waf.googlecode.com/git/apidocs_16/_modules/waflib/Tools/tex.html


    Alternativly:

    Just symlink the directory into the desired folder.