ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Directories of pictures
@ 2006-10-20 12:34 Maurício
  2006-10-20 12:41 ` Renaud AUBIN
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Maurício @ 2006-10-20 12:34 UTC (permalink / raw)


   Hi,

   When I use \externalfigure inside of \placefigure, Context can only 
find filenames in the current directory, i.e., the directory where I'm 
executing texexec. How can I instruct Context to look for files on the 
same directory of my .tex file?

   Thanks,
   Maurício

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Directories of pictures
  2006-10-20 12:34 Directories of pictures Maurício
@ 2006-10-20 12:41 ` Renaud AUBIN
  2006-10-20 12:45 ` Jörg Hagmann
  2006-10-20 12:48 ` Renaud AUBIN
  2 siblings, 0 replies; 14+ messages in thread
From: Renaud AUBIN @ 2006-10-20 12:41 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 562 bytes --]

Maurício a écrit :

>   Hi,
>
>   When I use \externalfigure inside of \placefigure, Context can only 
>find filenames in the current directory, i.e., the directory where I'm 
>executing texexec. How can I instruct Context to look for files on the 
>same directory of my .tex file?
>
>   Thanks,
>   Maurício
>
>_______________________________________________
>ntg-context mailing list
>ntg-context@ntg.nl
>http://www.ntg.nl/mailman/listinfo/ntg-context
>
>
>  
>

Use \setupexternalfigures[directory={./src/images}] for example.

Renaud

[-- Attachment #1.2: Type: text/html, Size: 1110 bytes --]

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Directories of pictures
  2006-10-20 12:34 Directories of pictures Maurício
  2006-10-20 12:41 ` Renaud AUBIN
@ 2006-10-20 12:45 ` Jörg Hagmann
  2006-10-20 14:29   ` Mari Voipio
  2006-10-20 12:48 ` Renaud AUBIN
  2 siblings, 1 reply; 14+ messages in thread
From: Jörg Hagmann @ 2006-10-20 12:45 UTC (permalink / raw)


Use:

\setupexternalfigures[directory={path_to_your_figures,another_path}]

Cheers, Jörg
On Oct 20, 2006, at 2:34 PM, Maurício wrote:

>    Hi,
>
>    When I use \externalfigure inside of \placefigure, Context can only
> find filenames in the current directory, i.e., the directory where I'm
> executing texexec. How can I instruct Context to look for files on the
> same directory of my .tex file?
>
>    Thanks,
>    Maurício
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Directories of pictures
  2006-10-20 12:34 Directories of pictures Maurício
  2006-10-20 12:41 ` Renaud AUBIN
  2006-10-20 12:45 ` Jörg Hagmann
@ 2006-10-20 12:48 ` Renaud AUBIN
  2006-10-20 14:28   ` Maurício
  2 siblings, 1 reply; 14+ messages in thread
From: Renaud AUBIN @ 2006-10-20 12:48 UTC (permalink / raw)


Maurício a écrit :

>   Hi,
>
>   When I use \externalfigure inside of \placefigure, Context can only 
>find filenames in the current directory, i.e., the directory where I'm 
>executing texexec. How can I instruct Context to look for files on the 
>same directory of my .tex file?
>  
>
I have not read all the message before sending an answer... Sorry.

Consider a small doc I've just written tomorrow:

sample.tex
\starttext

\placefigure[here]{none}{
\startcombination[2*4]
{\externalfigure[lignedroite1][width=.4\textwidth]}{}
{\externalfigure[lignedroite2][width=.4\textwidth]}{}
{\externalfigure[lignedroite3][width=.4\textwidth]}{}
{\externalfigure[lignedroite4][width=.4\textwidth]}{}
{\externalfigure[lignedroite5][width=.4\textwidth]}{}
{\externalfigure[lignedroite6][width=.4\textwidth]}{}
{\externalfigure[lignedroite7][width=.4\textwidth]}{}
{\externalfigure[lignedroite8][width=.4\textwidth]}{}
\stopcombination
}

\placefigure[here]{none}{
\startcombination[2*4]
{\externalfigure[courbe1][width=.4\textwidth]}{}
{\externalfigure[courbe2][width=.4\textwidth]}{}
{\externalfigure[courbe3][width=.4\textwidth]}{}
{\externalfigure[courbe4][width=.4\textwidth]}{}
{\externalfigure[courbe5][width=.4\textwidth]}{}
{\externalfigure[courbe6][width=.4\textwidth]}{}
{\externalfigure[courbe7][width=.4\textwidth]}{}
{\externalfigure[courbe8][width=.4\textwidth]}{}
\stopcombination
}

\stoptext

the directory contains:

courbe1.png  courbe6.png        lignedroite1.png  lignedroite6.png
courbe2.png  courbe7.png        lignedroite2.png  lignedroite7.png
courbe3.png  courbe8.png        lignedroite3.png  lignedroite8.png
courbe4.png  entrainement1.png  lignedroite4.png  reponse2010.tex
courbe5.png  entrainement2.png  lignedroite5.png  roue-vissansfin.png

texexec sample give satisfaction...

My previous answer assumes that your pictures are in ./src/images/


Renaud

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Directories of pictures
  2006-10-20 12:48 ` Renaud AUBIN
@ 2006-10-20 14:28   ` Maurício
  2006-10-20 15:36     ` Hans Hagen
  0 siblings, 1 reply; 14+ messages in thread
From: Maurício @ 2006-10-20 14:28 UTC (permalink / raw)


>>   Hi,
>>
>>   When I use \externalfigure inside of \placefigure, Context can only 
>> find filenames in the current directory, i.e., the directory where I'm 
>> executing texexec. How can I instruct Context to look for files on the 
>> same directory of my .tex file?
>>  
> (...)
> \placefigure[here]{none}{
> \startcombination[2*4]
> {\externalfigure[courbe1][width=.4\textwidth]}{}
> {\externalfigure[courbe2][width=.4\textwidth]}{}
> (...)
> 
> texexec sample give satisfaction...

   That's what I'm doing, but Context looks for the .png files in the 
current directory.

> 
> My previous answer assumes that your pictures are in ./src/images/
> 

   With your previous example, I would have to place my pictures in 
<current_dir>/scr/images. I would like to put my pictures in 
<tex_file_dir>/scr/images, and have Context to find them no matter which 
directory I'm in when I execute texexec. Also, I would like to use 
relative paths, not absolute paths.

   Best,
   Maurício

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Directories of pictures
  2006-10-20 12:45 ` Jörg Hagmann
@ 2006-10-20 14:29   ` Mari Voipio
  2006-10-20 15:06     ` Maurício
  2006-10-23 15:48     ` Maurício
  0 siblings, 2 replies; 14+ messages in thread
From: Mari Voipio @ 2006-10-20 14:29 UTC (permalink / raw)


[-- Attachment #1: Type: TEXT/PLAIN, Size: 409 bytes --]



On Fri, 20 Oct 2006, Jörg Hagmann wrote:
> Use:
> \setupexternalfigures[directory={path_to_your_figures,another_path}]

And you can even use relative paths and go 'down' in the directory tree:

\setupexternalfigures[directory={../pdf-images,../png-images}]


See also: http://wiki.contextgarden.net/Using_Graphics



Mari
(who's had her share of 'why in the bleep doesn't it found that pic')

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Directories of pictures
  2006-10-20 14:29   ` Mari Voipio
@ 2006-10-20 15:06     ` Maurício
  2006-10-23 15:48     ` Maurício
  1 sibling, 0 replies; 14+ messages in thread
From: Maurício @ 2006-10-20 15:06 UTC (permalink / raw)


Mari Voipio wrote:
> 
> 
> On Fri, 20 Oct 2006, Jörg Hagmann wrote:
>> Use:
>> \setupexternalfigures[directory={path_to_your_figures,another_path}]
> 
> And you can even use relative paths and go 'down' in the directory tree:
> 
> \setupexternalfigures[directory={../pdf-images,../png-images}]
> 
> (...)

   But those would be relative to the shell current directory, not to 
tex file directory.

   Best,
   Maurício

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Directories of pictures
  2006-10-20 14:28   ` Maurício
@ 2006-10-20 15:36     ` Hans Hagen
  2006-10-23 15:43       ` Maurício
  0 siblings, 1 reply; 14+ messages in thread
From: Hans Hagen @ 2006-10-20 15:36 UTC (permalink / raw)


� wrote:
>    With your previous example, I would have to place my pictures in 
> <current_dir>/scr/images. I would like to put my pictures in 
> <tex_file_dir>/scr/images, and have Context to find them no matter which 
> directory I'm in when I execute texexec. Also, I would like to use 
> relative paths, not absolute paths.
>   
./src/images 

you can see what happens with 

\traceexternalfigurestrue 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Directories of pictures
  2006-10-20 15:36     ` Hans Hagen
@ 2006-10-23 15:43       ` Maurício
  2006-10-23 20:56         ` Hans Hagen
  0 siblings, 1 reply; 14+ messages in thread
From: Maurício @ 2006-10-23 15:43 UTC (permalink / raw)


Hans Hagen wrote:
> � wrote:
>>    With your previous example, I would have to place my pictures in 
>> <current_dir>/scr/images. I would like to put my pictures in 
>> <tex_file_dir>/scr/images, and have Context to find them no matter which 
>> directory I'm in when I execute texexec. Also, I would like to use 
>> relative paths, not absolute paths.
>>   
> ./src/images 
> 
> you can see what happens with 
> 
> \traceexternalfigurestrue 
> 

   \traceexternalfigurestrue just says it's checking '.', but it doesn't 
say if '.' is current shell directory or tex file directory.

   Maurício

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Directories of pictures
  2006-10-20 14:29   ` Mari Voipio
  2006-10-20 15:06     ` Maurício
@ 2006-10-23 15:48     ` Maurício
  2006-10-25 13:38       ` Hans Hagen
  1 sibling, 1 reply; 14+ messages in thread
From: Maurício @ 2006-10-23 15:48 UTC (permalink / raw)


Mari Voipio wrote:
> 
> 
> On Fri, 20 Oct 2006, Jörg Hagmann wrote:
>> Use:
>> \setupexternalfigures[directory={path_to_your_figures,another_path}]
> 
> And you can even use relative paths and go 'down' in the directory tree:
> 
> \setupexternalfigures[directory={../pdf-images,../png-images}]
> 
> 
> See also: http://wiki.contextgarden.net/Using_Graphics
> 

   Do you think it's possible to say something like:

\setupexternalfigures[directory={<tex_file_directory>/png-images}]  ?

   Note that ./png-images seems to look for 
<current_shell_directory>/png-images.

   Best,
   Maurício

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Directories of pictures
  2006-10-23 15:43       ` Maurício
@ 2006-10-23 20:56         ` Hans Hagen
  0 siblings, 0 replies; 14+ messages in thread
From: Hans Hagen @ 2006-10-23 20:56 UTC (permalink / raw)


Maurício wrote:
> Hans Hagen wrote:
>   
>> � wrote:
>>     
>>>    With your previous example, I would have to place my pictures in 
>>> <current_dir>/scr/images. I would like to put my pictures in 
>>> <tex_file_dir>/scr/images, and have Context to find them no matter which 
>>> directory I'm in when I execute texexec. Also, I would like to use 
>>> relative paths, not absolute paths.
>>>   
>>>       
>> ./src/images 
>>
>> you can see what happens with 
>>
>> \traceexternalfigurestrue 
>>
>>     
>
>    \traceexternalfigurestrue just says it's checking '.', but it doesn't 
> say if '.' is current shell directory or tex file directory.
>   
tex cannot expand a path so we cannot determine that; 

directory={.,default} 

is also an option since default will make context lookj in tex related paths 

Hans 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Directories of pictures
  2006-10-23 15:48     ` Maurício
@ 2006-10-25 13:38       ` Hans Hagen
  2006-10-26  3:48         ` Sanjoy Mahajan
  0 siblings, 1 reply; 14+ messages in thread
From: Hans Hagen @ 2006-10-25 13:38 UTC (permalink / raw)


� wrote:
> Mari Voipio wrote:
>   
>> On Fri, 20 Oct 2006, J�rg Hagmann wrote:
>>     
>>> Use:
>>> \setupexternalfigures[directory={path_to_your_figures,another_path}]
>>>       
>> And you can even use relative paths and go 'down' in the directory tree:
>>
>> \setupexternalfigures[directory={../pdf-images,../png-images}]
>>
>>
>> See also: http://wiki.contextgarden.net/Using_Graphics
>>
>>     
>
>    Do you think it's possible to say something like:
>
> \setupexternalfigures[directory={<tex_file_directory>/png-images}]  ?
>
>    Note that ./png-images seems to look for 
> <current_shell_directory>/png-images.
>
>  
what is tex_file_directory? 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Directories of pictures
  2006-10-25 13:38       ` Hans Hagen
@ 2006-10-26  3:48         ` Sanjoy Mahajan
  2006-10-26  8:07           ` Hans Hagen
  0 siblings, 1 reply; 14+ messages in thread
From: Sanjoy Mahajan @ 2006-10-26  3:48 UTC (permalink / raw)


> >    Note that ./png-images seems to look for 
> > <current_shell_directory>/png-images.
> >
> >  
> what is tex_file_directory? 

I'm guessing "the directory in which the tex source file lives", what
I often wished TeX used as its search path for relative paths -- the
way some (all?) C compilers will when looking for include files.

-Sanjoy

`Never underestimate the evil of which men of power are capable.'
         --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Directories of pictures
  2006-10-26  3:48         ` Sanjoy Mahajan
@ 2006-10-26  8:07           ` Hans Hagen
  0 siblings, 0 replies; 14+ messages in thread
From: Hans Hagen @ 2006-10-26  8:07 UTC (permalink / raw)


Sanjoy Mahajan wrote:
>>>    Note that ./png-images seems to look for 
>>> <current_shell_directory>/png-images.
>>>
>>>  
>>>       
>> what is tex_file_directory? 
>>     
>
> I'm guessing "the directory in which the tex source file lives", what
> I often wished TeX used as its search path for relative paths -- the
> way some (all?) C compilers will when looking for include files.
>   
it depends on your texinputs variable: 

\setupexternalfigures[location={local,global,default}]

here, default will eventually fall back to tex's input path search 

\externalfigure[tmp/cow.pdf]

but, there need to be a tmp path relative to one of the paths that make up texinputs; in context mkiv we can use more clever methods because there we will have more control over finding and opening files; for now, we depend on what tex and kpse/web2c provide 

Hans 


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2006-10-26  8:07 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-20 12:34 Directories of pictures Maurício
2006-10-20 12:41 ` Renaud AUBIN
2006-10-20 12:45 ` Jörg Hagmann
2006-10-20 14:29   ` Mari Voipio
2006-10-20 15:06     ` Maurício
2006-10-23 15:48     ` Maurício
2006-10-25 13:38       ` Hans Hagen
2006-10-26  3:48         ` Sanjoy Mahajan
2006-10-26  8:07           ` Hans Hagen
2006-10-20 12:48 ` Renaud AUBIN
2006-10-20 14:28   ` Maurício
2006-10-20 15:36     ` Hans Hagen
2006-10-23 15:43       ` Maurício
2006-10-23 20:56         ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).