Helmut Haberzettl | 3 Apr 17:17
Picon

Question about project tree

Hi,

For many LaTeX projects I use the \input command to retrieve files from 
various directories. If the path information appears explicitly in the 
\input command (for example \input{path/filename}), this appears 
correctly in the project tree as "path/filename" (without quotes) and 
clicking on it opens the corresponding input file. However, if the path 
information is stored in a LaTeX variable (say, \mypath), then 
\input{\mypath/filename} produces "? filename" and clicking on it will 
result in a 'file not found' error message.

My question, therefore, is there a way of transmitting the path 
information in \mypath to the project tree macro? I presume this would 
have to involve retrieving this information from some file header which 
would be okay. (And if it should be possible, I would like the project 
tree to show only "filename" and suppress the path information.) I am 
perfectly willing doing some programming myself if I get pointed to the 
right files to get started.

Thank you.
--hh

PS: I use WinEdt build: 20071003  (v. 5.5).

WinEdt Team | 5 Apr 00:10
Favicon

Re: Question about project tree

> For many LaTeX projects I use the \input command to retrieve
> files from various directories. If the path information appears
> explicitly in the
> \input command (for example \input{path/filename}), this appears
> correctly in the project tree as "path/filename" (without
> quotes) and clicking on it opens the corresponding input file.
> However, if the path information is stored in a LaTeX variable
> (say, \mypath), then
> \input{\mypath/filename} produces "? filename" and clicking on it will
> result in a 'file not found' error message.
>
> My question, therefore, is there a way of transmitting the path
> information in \mypath to the project tree macro? I presume
> this would have to involve retrieving this information from
> some file header which would be okay. (And if it should be
> possible, I would like the project tree to show only "filename"
> and suppress the path information.) I am perfectly willing
> doing some programming myself if I get pointed to the right
> files to get started.

Yes, this can be done.

In Tree.ini (Options -> Advanced -> Tree) change the definition of
input by adding the FILENAME directive identical to the one for
\includefrom by replacing the macro to be executed from
IncludeFrom.edt to IncludePath.edt.

The macro is already there but you may have to modify it
depending on where and how your path is defined. The default
one assumes that the paths are defined in the preamble.
(Continue reading)


Gmane