[texhax] finding files

Vladimir Lomov lomov.vl at gmail.com
Wed Dec 16 03:05:31 CET 2009


On Tue, Dec 15, 2009 at 15:45:19 -0500, david allen wrote:
> I just switched from windows to linux (ubuntu) and have installed texlive
> 2009.

> I have a ~/texmf directory where I have put some bib and sty files.

> I have a directory ~/book that contains master.tex. master.tex has things
> like
> \include{chapter1} \include{chaper2} etc. Now, chapter1.tex resides in
> the directory ~/book/chapter1 along with perhaps included graphics files
> and related R programs.

> I would like to cd to book and have latex find the files in its subsidiary
> directories.
> I am not keen on moving book to be subsidiary to texmf because there is a
> lot of non-tex stuff there.

> I am overwhelmed with the Kpathsea documentation and the FAQs weren't
> enough help either. Can someone give explicit direction on how to do this?
> I would greatly appreciate it.

> Sincerely,
> David

Layout:
~/book/
	master.tex
~/book/chapter1/
	chapter1.tex
	fig1-1.eps
	fig1-1.pdf
	...
~book/chapter2/
	chapter2.tex
	fig2-1.eps
	fig2-1.pdf
	...
...

Your master.tex file contains:

\include{chapter1/chapter1.tex}
\include{chapter2/chapter2.tex}

Go into directory and run
bash:[~/book]$ pdflatex master.tex
...

If you use bibtex/makeindex/... then run instead of pdflatex
bash:[~/book]$ latexmk -pdf master.tex

This should work.

Note: if you insert images into your document you should use relative
paths, e.g. in chapter1.tex:

\includegraphics{fig1-1} %%% without extension provided that there are
%%% fig1-1.eps _and_ fig1-1.pdf files


-- 
Uncle Ed's Rule of Thumb:
	Never use your thumb for a rule.
	You'll either hit it with a hammer or get a splinter in it.


More information about the texhax mailing list