Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
3_composition:illustrations:inclure_une_image:inclure_une_image_depuis_un_autre_repertoire [2018/05/24 10:30]
joseph.wright
3_composition:illustrations:inclure_une_image:inclure_une_image_depuis_un_autre_repertoire [2018/12/04 00:18] (Version actuelle)
jejust
Ligne 1: Ligne 1:
---- +====== Importing graphics from "​somewhere else" ======
-section: Graphics +
-date: 2014-06-10 +
----+
  
-# Importing graphics from ''​somewhere else''​ 
  
-By default, graphics commands like `\includegraphics` look +By default, graphics commands like ''​\includegraphics'' ​look 
-''​wherever TeX files are found'' ​for the graphic file they'​re being+"wherever TeX files are found" ​for the graphic file they'​re being
 asked to use.  This can reduce your flexibility if you choose to hold asked to use.  This can reduce your flexibility if you choose to hold
 your graphics files in a common directory, away from your (La)TeX your graphics files in a common directory, away from your (La)TeX
Ligne 14: Ligne 10:
 The simplest solution is to patch TeX's path, by changing the The simplest solution is to patch TeX's path, by changing the
 default path.  On most systems, the default path is taken from the default path.  On most systems, the default path is taken from the
-environment variable ​`TEXINPUTS`, if it's present; you can adapt that+environment variable ​''​TEXINPUTS''​, if it's present; you can adapt that
 to take in the path it already has, by setting the variable to to take in the path it already has, by setting the variable to
-```latex+ 
 +<​code ​latex>
 TEXINPUTS=.:<​graphics path(s)>:​ TEXINPUTS=.:<​graphics path(s)>:​
-``` +</​code>​ 
-on a Unix system; on a Windows system the separator will be `;` +on a Unix system; on a Windows system the separator will be ''​;''​ 
-rather than `:`.  The `.is there to ensure +rather than ''​:''​.  The ''​.'' ​is there to ensure 
-that the current directory is searched first; the trailing +that the current directory is searched first; the trailing ​''​:'' ​says 
-`:` says ''​patch in the value of `TEXINPUTSfrom +"patch in the value of ''​TEXINPUTS'' ​from your configuration file, here".
-your configuration file, here''​.+
  
-This method has the merit of efficiency ((La)TeX does _all_ of+This method has the merit of efficiency ((La)TeX does //​all// ​of
 the searches, which is quick), but it's always clumsy and may prove the searches, which is quick), but it's always clumsy and may prove
 inconvenient to use in Windows setups (at least). inconvenient to use in Windows setups (at least).
  
-The alternative is to use the [`graphics`](https://​ctan.org/​pkg/​graphicspackage command +The alternative is to use the [[ctanpkg>​graphics|graphics]] package command 
-`\graphicspath`; this command is of course also available to users +''​\graphicspath''​; this command is of course also available to users 
-of the [`graphicx`](https://​ctan.org/​pkg/​graphicxand the [`epsfig`](https://​ctan.org/​pkg/​epsfigpackages. ​ The +of the [[ctanpkg>​graphicx|graphicx]] and the [[ctanpkg>​epsfig|epsfig]] packages. ​ The 
-syntax of `\graphicspath`s one argument is slightly odd: it's a+syntax of ''​\graphicspath''​s one argument is slightly odd: it's a
 sequence of paths (typically relative paths), each of which is sequence of paths (typically relative paths), each of which is
 enclosed in braces. ​ A slightly odd example (slightly modified from one enclosed in braces. ​ A slightly odd example (slightly modified from one
-given in the [`graphics`](https://​ctan.org/​pkg/​graphicsbundle documentation) is: +given in the [[ctanpkg>​graphics|graphics]] bundle documentation) is: 
-<!-- {% raw %} --> + 
-```latex+ 
 +<​code ​latex>
 \graphicspath{{eps/​}{png/​}} \graphicspath{{eps/​}{png/​}}
-``` +</code> 
-<!-- {% endraw %} --+ 
-which will search for graphics files in subdirectories ​`epsand +which will search for graphics files in subdirectories ​''​eps'' ​and 
-`pngof the directory in which LaTeX is running. ​ (Note that +''​png'' ​of the directory in which LaTeX is running. ​ (Note that 
-the trailing ​`/` _is_ required.)+the trailing ​''/''​ //is// required.)
  
 (Note that some (La)TeX systems will only allow you to use files in (Note that some (La)TeX systems will only allow you to use files in
 the current directory and its sub-directories,​ for security reasons. the current directory and its sub-directories,​ for security reasons.
-However, ​`\graphicspathimposes no such restriction:​ as far as +However, ​''​\graphicspath'' ​imposes no such restriction:​ as far as 
-_it_ is concerned, you can access files anywhere.)+//​it// ​is concerned, you can access files anywhere.)
  
-Be aware that `\graphicspathdoes not affect the operations of +Be aware that ''​\graphicspath'' ​does not affect the operations of 
-graphics macros other than those from the graphics bundle&​nbsp;&​mdash; ​in +graphics macros other than those from the graphics bundle ​--- in 
-particular, those of the outdated [`epsf`](https://​ctan.org/​pkg/​epsfand +particular, those of the outdated [[ctanpkg>​epsf|epsf]] and 
-[`psfig`](https://​ctan.org/​pkg/​psfigpackages are immune.+[[ctanpkg>​psfig|psfig]] packages are immune.
  
-The slight disadvantage of the `\graphicspathmethod is+The slight disadvantage of the ''​\graphicspath'' ​method is
 inefficiency. ​ The package will call (La)TeX once for each entry in inefficiency. ​ The package will call (La)TeX once for each entry in
 the list to look for a file, which of course slows things. ​ Further, the list to look for a file, which of course slows things. ​ Further,
Ligne 61: Ligne 58:
 effectively losing memory, so that in the limit a document that uses a effectively losing memory, so that in the limit a document that uses a
 huge number of graphical inputs could be embarrassed by lack of huge number of graphical inputs could be embarrassed by lack of
-memory. ​ (Such ''​memory starvation'' ​is pretty unlikely with any+memory. ​ (Such "memory starvation" ​is pretty unlikely with any
 ordinary document in a reasonably modern (La)TeX system, but it ordinary document in a reasonably modern (La)TeX system, but it
 should be borne in mind.) should be borne in mind.)
  
 If your document is split into a variety of directories,​ and each If your document is split into a variety of directories,​ and each
-directory has its associated graphics, the [`import`](https://​ctan.org/​pkg/​importpackage+directory has its associated graphics, the [[ctanpkg>​import|import]] package
 may well be the thing for you; see the discussion ​ may well be the thing for you; see the discussion ​
-in the question ​''​ +in the question 
-[bits of document in other directories](FAQ-docotherdir.md) +"[[FAQ-docotherdir|bits of document in other directories]]"
-''​.+ 
 + 
 +----- 
 + 
 +//Source:// [[faquk>​FAQ-graphicspath|Importing graphics from "​somewhere else"​]]
  
 +{{htmlmetatags>​metatag-keywords=(LaTeX,​graphics)
 +metatag-og:​title=(Importing graphics from "​somewhere else")
 +metatag-og:​site_name=(FAQ LaTeX francophone)
 +}}
  
3_composition/illustrations/inclure_une_image/inclure_une_image_depuis_un_autre_repertoire.1527150648.txt.gz · Dernière modification: 2018/05/24 10:30 par joseph.wright
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0