Ceci est une ancienne révision du document !


Installation temporaire de fichiers (La)TeX

Les systèmes d'exploitation et les applications doivent savoir où trouver les fichiers: de nombreux fichiers dont ils ont besoin sont simplement “appelés” — l'utilisateur ne sait pas nécessairement ils se trouvent, mais il sait qu'il doit les demander. Le cas le plus courant est celui des commandes dont vous tapez le nom dans un interpréteur de commandes (un shell Linux ou l'«invite de commandes» de Windows): celles-ci impliquent généralement le chargement et l'exécution d'un programme, et c'est grâce à la variable $PATH que l'interpréteur de commandes sait où chercher ces fichiers.

Les implémentations modernes de \TeX{} sont livrées avec un certain nombre de chemins de recherche prédéfinis. Dans la plupart des cas, ces chemins sont suffisants, mais il est parfois nécessaire de les étendre pour accéder à des fichiers situés dans des endroits inhabituels: par exemple, nous pouvons souhaiter essayer un nouveau package avant de l'installer «correctement». Pour ce faire, nous devons ajouter le nouveau répertoire aux chemins déjà connus de TeX. Attention, nous ne voulons pas remplacer les chemins prédéfinis (sinon, tous les autres fichiers deviendraient introuvables pour TeX).

To extend a TeX path, we define an operating system environment variable in “path format”, but leaving a gap which TeX will fill with its built-in value for the path. The commonest case is that we want to place our extension in front of the path, so that our new things will be chosen in preference, so we leave our “gap to be filled” at the end of the environment variable. The syntax is simple (though it depends which shell you're actually using): so on a Unix-like system, using the bash shell, the job might be done like:

export TEXINPUTS=/tmp:

while in a Windows system, within a MS-DOS window, it would be:

set TEXINPUTS=C:/temp;

In either case, we're asking TeX to load files from the root disc temporary files directory; in the Unix case, the “empty slot” is designated by putting the path separator : on its own at the end of the line, while in the Windows case, the technique is the same, but the path separator is ;.

Note that in either sort of system, the change will only affect instances of TeX that are started from the shell where the environment variable was set. If you run TeX from another window, it will use the original input path. To make a change of input path that will “stick” for all windows, set the environment variable in your login script or profile (or whatever) in a Unix system and log out and in again, or in autoexec.bat in a Windows system, and reboot the system.

While all of the above has talked about where TeX finds its macro files, it's applicable to pretty much any sort of file any TeX-related program reads — there are lots of these paths, and of their corresponding environment variables. In a web2c-based system, the copious annotations in the texmf.cnf system configuration file help you to learn which path names correspond to which type of file.


Source: Temporary installation of (La)TeX files

5_fichiers/tds/installation_temporaire.1695052985.txt.gz · Dernière modification : 2023/09/18 16:03 de jejust
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0