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
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
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
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')
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
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}]
Do you think it's possible to say something like:
\setupexternalfigures[directory={
� 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}]
Do you think it's possible to say something like:
\setupexternalfigures[directory={
/png-images}] ? Note that ./png-images seems to look for
/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 -----------------------------------------------------------------
Note that ./png-images seems to look for
/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.
Sanjoy Mahajan wrote:
Note that ./png-images seems to look for
/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 -----------------------------------------------------------------
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
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
� wrote:
With your previous example, I would have to place my pictures in
/scr/images. I would like to put my pictures in /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 -----------------------------------------------------------------
Hans Hagen wrote:
� wrote:
With your previous example, I would have to place my pictures in
/scr/images. I would like to put my pictures in /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
Maurício wrote:
Hans Hagen wrote:
� wrote:
With your previous example, I would have to place my pictures in
/scr/images. I would like to put my pictures in /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 -----------------------------------------------------------------
participants (6)
-
Hans Hagen
-
Jörg Hagmann
-
Mari Voipio
-
Maurício
-
Renaud AUBIN
-
Sanjoy Mahajan