[texhax] finding files

Vladimir Lomov lomov.vl at gmail.com
Thu Dec 17 10:22:48 CET 2009


On Wed, Dec 16, 2009 at 09:30:42 -0500, david allen wrote:
David Allen => DA
Ulrike Fischer => UF

DA> Thanks. Also, your graphic display of my layout is much better than my
DA> description.

DA> Another question: In c/c++ and html, if you have a path in an include
DA> statement
DA> the path is relative to the current file. In LaTeX the path is relative to
DA> the master file.
DA> Are these correct observations?

Do you read Ulrike's reply?

DA>> I just switched from windows to linux (ubuntu) and have installed texlive
DA>> 2009.

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

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

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

UF> http://www.tex.ac.uk/cgi-bin/texfaq2html?label=docotherdir

In short:
Yes, 'TeX doesn't have a changable "current directory", so that all
files you refer to have to be specified relative to the same directory
as the main file.'

Just tested:

~/works/tex/test/paths
  master.tex
    \include{chapter1/chap1}

~/works/tex/test/paths/chapter1
  chap1.tex
    \include{sec1-1}
    \include{sec1-2}
  sec1-1.tex

~/works/tex/test/paths/chapter1/sec
  sec1-2.tex

[~/works/tex/test/paths] $ pdflatex master.tex
                               ..........
(./chapter1/chap1.tex

! LaTeX Error: \include cannot be nested.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.5 \include{sec1-1}
                               ..........

-- 
Time-sharing is the junk-mail part of the computer business.
		-- H.R.J. Grosch (attributed)


More information about the texhax mailing list
http://tug.org/pipermail/texhax/2009-December/013939.html
tug.org
crawl=CC-MAIN-2017-43
4553
application/http; msgtype=response
sha1:7ZDGSCH3277N5JEJNB3MEGZNHXMRKZ4Z
<urn:uuid:5a2f0bb2-3a43-4a21-9745-de268965e3e6>
2017-10-18T03:31:00Z
91.121.174.77
text/html
sha1:DTXXMD2UAS2N3D3FSNPV64FIB6GZSUUS
<urn:uuid:6accb7b1-0d5e-4155-a89b-3708063dfc58>
http://tug.org/pipermail/texhax/2009-December/013939.html
response
<urn:uuid:c6abb559-ec75-4b34-89f9-1b2502e5f5d9>
robots: classic
hostname: ip-10-149-172-122.ec2.internal
software: Nutch 1.6 (CC)
isPartOf: CC-MAIN-2017-43
operator: Common Crawl Admin
description: Wide crawl of the web for October 2017
publisher: Common Crawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf