[***SPAM***] File access for sourc, graphic, and pictures
![](https://secure.gravatar.com/avatar/018bd5c575dea7380cf18968f26e5b07.jpg?s=120&d=mm&r=g)
I am just learning ConTeXt, so please bare with me. In all of the documentation that I've read so far, it shows the names of imported photographs, graphs, blocks, etc as a simple filename without any filename extensions or pathnames. Having a bunch of photographs anc charts files in the same directory as te tex files reallys clutters things up. I'd like to store photographs, etc., to use used in a subdirectory of the project. Also might be nice to have subdirectories for the sourc e of each part of a book. How do experienced people handle organizing files for large-ish scale projects such as a book? It would be educational to learn how this is handled. Thanks
![](https://secure.gravatar.com/avatar/d39338246f50cca667c8256c313d7cfd.jpg?s=120&d=mm&r=g)
On 2013–03–08 hwitloc@gmail.com wrote:
I am just learning ConTeXt, so please bare with me. In all of the documentation that I've read so far, it shows the names of imported photographs, graphs, blocks, etc as a simple filename without any filename extensions or pathnames.
Avoid hard coded path names in your files, it makes them less portable. ConTeXt adds the file name extension automatically, there's usually no need to specify it manually.
Having a bunch of photographs anc charts files in the same directory as te tex files reallys clutters things up. I'd like to store photographs, etc., to use used in a subdirectory of the project. Also might be nice to have subdirectories for the sourc e of each part of a book.
How do experienced people handle organizing files for large-ish scale projects such as a book? It would be educational to learn how this is handled.
Have a look at the project structure. http://pragma-ade.com/general/magazines/mag-1101.pdf To set the directory for included images, use: \setupexternalfigures [directory=images] To set the directory for included text files, use: \usepath [<directory>] e.g. \usepath [chapters] Marco
![](https://secure.gravatar.com/avatar/5ff42c8d3962c9a0cbbefbb0c74bc4a4.jpg?s=120&d=mm&r=g)
Marko, thanks for the clear and very useful information.
Marco Patzer
Avoid hard coded path names in your files, it makes them less portable. ConTeXt adds the file name extension automatically, there's usually no need to specify it manually.
.....
Have a look at the project structure.
http://pragma-ade.com/general/magazines/mag-1101.pdf
To set the directory for included images, use:
\setupexternalfigures [directory=images]
To set the directory for included text files, use:
\usepath [<directory>] e.g. \usepath [chapters]
![](https://secure.gravatar.com/avatar/2108b4611c915035ac4d553468360111.jpg?s=120&d=mm&r=g)
Hi All,
Am 08.03.2013 um 09:02 schrieb Marco Patzer
On 2013–03–08 hwitloc@gmail.com wrote:
I am just learning ConTeXt, so please bare with me. In all of the documentation that I've read so far, it shows the names of imported photographs, graphs, blocks, etc as a simple filename without any filename extensions or pathnames.
Avoid hard coded path names in your files, it makes them less portable. ConTeXt adds the file name extension automatically, there's usually no need to specify it manually.
IMHO, I would disagree. That is, using hardcoded full paths breaks portability. The trick is using relative paths! In other words using paths "./dir/file" or "../dir/file" is very portable. Furthermore, using relative paths helps finding the files, especially for larger projects or with collaborative work. Thats is for editing. Please, do not get me wrong, using the theproject environments does have its caveats. regards Keith.
participants (4)
-
d.henman
-
hwitloc@gmail.com
-
Keith J. Schultz
-
Marco Patzer