Comment spécifier un chemin pour les fichiers à inclure ?

* Il suffit d'utiliser la commande \import{chemin}{fichier}. Elle évite de préciser le chemin où se trouvent les fichiers appelés par la commande \input à chaque appel. %%%% debut macro %%%% % import.sty: allows input of a file from another directory: % % \import{path}{file} \def\import{\begingroup \protected@edef\@tempa{\endgroup \noexpand\@import{\@ifundefined{input@path}{}{\input@path}}% {\@ifundefined{Ginput@path}{}{\Ginput@path}}}% \@tempa} \def\@import#1#2#3#4{% \def\input@path{{#3}#1}\def\Ginput@path{{#3}#2}% \input{#4}% \def\input@path{#1}\ifx\input@path\@empty \let\input@path\@undefined \fi \def\Ginput@path{#2}\ifx\Ginput@path\@empty \let\Ginput@path\@undefined \fi } %%%% fin macro %%%% Exemple : \import{Chapitres/}{chapitre1} %%%% fin exemple %%%% * Pour les figures, la package 'graphicx' propose la commande \graphicspath à utiliser en tête de document. Exemple : \graphicspath{{Chapitre1/gfx/}{Chapitre2/gfx/}} %%%% fin exemple %%%% * On peut également modifier certaines variables d'environnement lorsqu'elles existent. Exemple (UNIX, tcsh) : setenv TEXINPUTS /home/figures/:"$TEXINPUTS" %%%% fin exemple %%%%