issue215:latex
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue215:latex [2025/03/30 09:19] – d52fr | issue215:latex [2025/03/31 10:43] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 4: | Ligne 4: | ||
There are a few thousand packages described in the two volumes of The Latex Companion (ISBN 978-0-13-465894-0). There are many more packages available at ctan.org. You should be able to find at least one package that will help you get the result you want. First you need to know if a desired package is already installed.** | There are a few thousand packages described in the two volumes of The Latex Companion (ISBN 978-0-13-465894-0). There are many more packages available at ctan.org. You should be able to find at least one package that will help you get the result you want. First you need to know if a desired package is already installed.** | ||
+ | |||
+ | Bienvenue dans le Full Circle et dans LaTeX. Cette fois, je vais vous expliquer comment installer de nouveaux paquets pour LaTeX sous Linux. Ma machine de « développement » utilise Mint 22.1, un dérivé d' | ||
+ | |||
+ | Dans la chronique du mois dernier, j'ai passé en revue l' | ||
+ | |||
+ | Plusieurs milliers de paquets sont décrits dans les deux volumes de The LaTeX Companion (ISBN 978-0-13-465894-0). De nombreux autres paquets sont disponibles sur ctan.org. Vous devriez trouver au moins un paquet qui vous permettra d' | ||
+ | |||
**I use a tool to help me find files. The command is “locate”. If I remember correctly it is not part of recent standard Linux installations. If it does not exist on your system, it is a very small bit of code, easy to install from a terminal using apt or whatever method your operating system uses. It searches a database of file names so, before you use it the first time, type “sudo updatedb”. The locate database should be updated regularly. It is a good candidate for the root cron. Once the database is built or updated you can use locate to find the package you want to use. | **I use a tool to help me find files. The command is “locate”. If I remember correctly it is not part of recent standard Linux installations. If it does not exist on your system, it is a very small bit of code, easy to install from a terminal using apt or whatever method your operating system uses. It searches a database of file names so, before you use it the first time, type “sudo updatedb”. The locate database should be updated regularly. It is a good candidate for the root cron. Once the database is built or updated you can use locate to find the package you want to use. | ||
Ligne 10: | Ligne 17: | ||
If you have use of tlmgr, it will normally do the work necessary to install any extra package you need. It is similar to apt (or any standard system upgrading and installation program). An easy way to check if tlmgr is installed and/or usable is to run tlmgr update –list. It will go through the installed packages on your device and list all those which need to be updated. Since it checks your complete TexLive/ | If you have use of tlmgr, it will normally do the work necessary to install any extra package you need. It is similar to apt (or any standard system upgrading and installation program). An easy way to check if tlmgr is installed and/or usable is to run tlmgr update –list. It will go through the installed packages on your device and list all those which need to be updated. Since it checks your complete TexLive/ | ||
+ | |||
+ | J' | ||
+ | |||
+ | Une autre façon de savoir si le paquet dont vous avez besoin est installé, c'est de le rechercher avec tlmgr (gestionnaire TexLive). Vous devez connaître le nom du paquet, donc, effectuez une recherche sur CTAN pour trouver un paquet qui correspond à vos besoins. Sur la ligne de commande, saisissez « tlmgr info nom-paquet ». L' | ||
+ | |||
+ | Si vous utilisez tlmgr, il effectuera normalement l' | ||
+ | |||
**Once you have done a couple of searches for Latex files you will see the general structure of the tex directory tree. If you record the location of the major file groups, you may decide you do not need to use locate. I use locate because it is easy for me. | **Once you have done a couple of searches for Latex files you will see the general structure of the tex directory tree. If you record the location of the major file groups, you may decide you do not need to use locate. I use locate because it is easy for me. | ||
Ligne 20: | Ligne 34: | ||
tlmgr install name-of-desired-package.** | tlmgr install name-of-desired-package.** | ||
+ | |||
+ | Après avoir effectué quelques recherches de fichiers LaTeX, vous verrez la structure générale de l' | ||
+ | |||
+ | Sur mon système Mint, les paquets LaTeX sont généralement installés à l'un des trois emplacements suivants : / | ||
+ | |||
+ | Que se passe-t-il si vous utilisez la commande usepackage {nom du paquet souhaité} et que le paquet n'est pas installé ? | ||
+ | |||
+ | Si j' | ||
+ | |||
+ | tlmgr install nom-du-paquet-souhaité. | ||
+ | |||
**Sometimes the package on ctan.org is not structured in a way that tlmgr can use. This seems to happen most frequently with old packages. That is when the locate utility I mentioned becomes useful. Most packages add one (occasionally more than one) style file (.sty) to the tex directories. Some packages add a class file (.cls) instead. Here is the process I have used to install old packages that will not install with tlmgr: | **Sometimes the package on ctan.org is not structured in a way that tlmgr can use. This seems to happen most frequently with old packages. That is when the locate utility I mentioned becomes useful. Most packages add one (occasionally more than one) style file (.sty) to the tex directories. Some packages add a class file (.cls) instead. Here is the process I have used to install old packages that will not install with tlmgr: | ||
Ligne 32: | Ligne 57: | ||
• I copy the .sty / .cls file into the new directory. | • I copy the .sty / .cls file into the new directory. | ||
• I run texhash to rebuild the Tex directory database.** | • I run texhash to rebuild the Tex directory database.** | ||
+ | |||
+ | Il arrive que le paquet sur ctan.org ne soit pas structuré de manière à être utilisable par tlmgr. Cela semble se produire le plus souvent avec les anciens paquets. C'est alors que l' | ||
+ | • Téléchargez le fichier zip du paquet depuis ctan.org. | ||
+ | • Décompressez le fichier zip et lisez toute la documentation, | ||
+ | |||
+ | Il existe une page WikiBooks intitulée LaTeX_Installing_Extra_Packages, | ||
+ | |||
+ | Certains anciens paquets nécessitent les quatre premières étapes du processus listé dans WikiBooks et présenté ci-dessous. J' | ||
+ | ••J' | ||
+ | ••Je crée un nouveau répertoire dans la partie de l' | ||
+ | ••Je copie le fichier .sty/.cls dans le nouveau répertoire. | ||
+ | ••J' | ||
+ | |||
**The instructions from WikiBooks (2022) for installing new packages involve these steps: | **The instructions from WikiBooks (2022) for installing new packages involve these steps: | ||
Ligne 41: | Ligne 79: | ||
System-wide: | System-wide: | ||
+ | |||
+ | Les instructions de WikiBooks (2022) pour l' | ||
+ | ••Extraire les fichiers. Exécuter LaTeX sur le fichier ins fourni. (Voir les commentaires ci-dessous.) | ||
+ | ••Générer la documentation. Exécuter LaTeX sur le fichier .dtx. Cela créera un fichier DVI ou un PDF si pdfLatex est installé. (Voir les commentaires ci-dessous.) | ||
+ | ••Installer les fichiers dans un répertoire local dans la partie ~/texmf de l' | ||
+ | ••Mettre à jour l' | ||
+ | ••Si l' | ||
+ | |||
+ | Sur tout le système : updmap-sys --force --enable Map=newfont.map | ||
+ | |||
**Local: I direct you to www.tug.org/ | **Local: I direct you to www.tug.org/ | ||
Whether installed locally or system-wide, | Whether installed locally or system-wide, | ||
+ | |||
Comments on the Four / Five Step process above. | Comments on the Four / Five Step process above. | ||
Ligne 52: | Ligne 101: | ||
If you use tlmgr update - -all the mktexslr command mentioned with fonts runs automatically once the update is finished. That is very convenient. I also run sudo texhash after the update just to be certain.** | If you use tlmgr update - -all the mktexslr command mentioned with fonts runs automatically once the update is finished. That is very convenient. I also run sudo texhash after the update just to be certain.** | ||
+ | |||
+ | En local : Je vous invite à consulter www.tug.org/ | ||
+ | |||
+ | Que les polices soient installées localement ou à l' | ||
+ | |||
+ | Commentaires sur le processus en quatre ou cinq étapes ci-dessus. | ||
+ | |||
+ | Les étapes de Wikibooks sont inutilement compliquées. Elles étaient peut-être nécessaires par le passé. Pour la plupart des paquets, l' | ||
+ | ••Dans un terminal, tlmgr install nom-du-paquet | ||
+ | ••texhash | ||
+ | |||
+ | Si vous utilisez tlmgr update --all, la commande mktexslr mentionnée pour les polices s' | ||
+ | |||
**This has been sufficient for almost all the packages I have installed while writing these columns. Unlike the Wikibooks 5 Steps, I have used this two step process for font packages with no problems. | **This has been sufficient for almost all the packages I have installed while writing these columns. Unlike the Wikibooks 5 Steps, I have used this two step process for font packages with no problems. | ||
Ligne 58: | Ligne 120: | ||
That is enough for this column. I hope you try to add a few new packages in the near future. Let me know if you have questions or comments. I will talk to you next time about more packages from ctan.** | That is enough for this column. I hope you try to add a few new packages in the near future. Let me know if you have questions or comments. I will talk to you next time about more packages from ctan.** | ||
+ | |||
+ | Cela a été suffisant pour la quasi-totalité des paquets que j'ai installés lors de la rédaction de ces articles. Contrairement aux 5 étapes de Wikibooks, j'ai utilisé sans problème ce processus en deux étapes pour les paquets de polices. | ||
+ | |||
+ | Si vous souhaitez (ou devez) utiliser la procédure manuelle plutôt que tlmgr, gagnez du temps et de l' | ||
+ | |||
+ | Cela suffit pour cet article. J' | ||
issue215/latex.1743319182.txt.gz · Dernière modification : 2025/03/30 09:19 de d52fr