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 | ||
composition:langues:utiliser_une_nouvelle_langue_avec_babel [2018/05/24 17:08] – joseph.wright | 3_composition:langues:utiliser_une_nouvelle_langue_avec_babel [2022/07/05 14:20] (Version actuelle) – [With teTeX] <> → ⟨⟩ dbitouze | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | --- | + | ====== Comment utiliser un nouveau langage avec “Babel”? ====== |
- | section: How do I do& | + | |
- | subsection: Hyphenation | + | |
- | permalink: / | + | |
- | date: 2014-06-10 | + | |
- | --- | + | |
- | # Using a new language with Babel | + | L' |
- | [`Babel`](https:// | + | < |
- | languages, and a new user often wants to use a language that her | + | |
- | TeX installation is not set up to employ. | + | |
- | use the language, with the command | + | |
- | ```latex | + | |
\usepackage[catalan]{babel} | \usepackage[catalan]{babel} | ||
- | ``` | + | </ |
- | provokes the warning | + | |
- | ```latex | + | Cette commande va toutefois générer le message |
+ | |||
+ | <code text> | ||
Package babel Warning: No hyphenation patterns were loaded for | Package babel Warning: No hyphenation patterns were loaded for | ||
(babel) | (babel) | ||
(babel) | (babel) | ||
- | ``` | + | </ |
- | The problem is that your TeX system doesn't know how to hyphenate | + | Ce qui veut dire « Aucun motif de césure n'a été chargé pour la langue « catalan ». J' |
- | Catalan text: you need to tell it how before Babel can do its work | + | |
- | properly. To do this, for LaTeX installations, | + | < |
- | `language.dat` (which is part of the Babel installation); it will | + | |
- | contain a line | + | |
- | ```latex | + | |
%catalan | %catalan | ||
- | ``` | + | </ |
- | which, if you remove the comment marker, is supposed to instruct | + | |
- | LaTeX to load Catalan hyphenation patterns when you tell it to build | + | Si vous supprimez la marque de commentaire, cette ligne est censée indiquer à < |
- | a new format. | + | |
+ | Malheureusement, dans certaines versions de [[ctanpkg> | ||
+ | |||
+ | Enfin, vous devez régénérer les formats utilisés. | ||
- | Unfortunately, | + | ===== With teTeX ===== |
- | right& | + | |
- | patterns you're going to use. As you can see, in the author' | + | |
- | the name is supposed to be `cahyphen.tex`; | + | |
- | actually present on the system is `cahyph.tex`& | + | |
- | the error should prove little more than an inconvenience (most of the | + | |
- | files are in better distributions anyway, but an elusive one | + | |
- | may be found on CTAN; if you have to retrieve | + | |
- | a new file, ensure that it's correctly installed, for which see | + | |
- | [installing a new package](FAQ-inst-wlcf.md)). | + | |
- | Finally, you need to regenerate the formats used (in fact, most users | + | Il est possible de faire toute l' |
- | of Babel are using it in their LaTeX documents, so regenerating the | + | |
- | LaTeX-related formats will ordinarily be enough; however, the | + | |
- | author always generates the lot, regardless). | + | |
- | - teTeXIt' | + | <code bash> |
- | using the `texconfig` command: | + | |
- | ```latex | + | |
texconfig hyphen latex | texconfig hyphen latex | ||
- | ``` | + | </ |
- | which first enters an editor for you to edit `language.dat`, | + | |
- | and then regenerates the format you specify (`latex` in | + | |
- | this case). | + | |
- | Otherwise, to regenerate all formats, do: | + | Un éditeur est alors lancé sur le fichier '' |
- | `fmtutil --all` | + | Sinon, pour regénérer tous les formats, indiquez : |
- | If you're willing to think through what you're doing (this is | + | <code bash> |
- | _not_ for the faint-hearted), you can select a sequence of | + | fmtutil |
- | | + | </ |
- | `fmtutil --byfmt & | + | Des choses plus fines peuvent être faites en sélectionnant une séquence de formats et, pour chacun, en exécutant (mais ce n'est pas une méthode pas pour les //âmes sensibles// |
- | where _`formatname`_ is something like `latex`, | + | <code bash> |
- | | + | fmtutil --byfmt ⟨nom format⟩ |
+ | </ | ||
- | `fmtutil --byhyphen | + | Un résultat similaire pourra être obtenu avec la commande suivante où ''// |
+ | <code bash> | ||
+ | fmtutil --byhyphen | ||
+ | </ | ||
- | where _`hyphenfile`_ is the file specifying hyphenation | + | ===== With MiKTeX |
- | to the format& | + | |
- | - MiKTeX | + | |
- | `Start`& | + | Sur une distribution [[ctanpkg> |
- | `Programs`& | + | |
- | `MiKTeX`& | + | |
- | `Maintenance`& | + | |
- | `Create all format files` | + | |
- | | + | |
- | `initexmf --dump` | + | Vous pouvez aussi ouvrir une fênetre de commandes DOS et lancer : |
- | On a [`MiKTeX`](https:// | + | <code bash> |
- | | + | initexmf --dump |
- | | + | </ |
- | `Start`& | + | Sur une distribution [[ctanpkg> |
- | `Programs`& | + | |
- | `MiKTeX | + | |
- | `MiKTeX Options`, and select the `Languages` tab. | + | |
- | Select your language from the list, press the `Apply` button, | + | |
- | and then the `OK` button. | + | |
- | tab and press the `Update Now` button. | + | |
- | | + | |
- | | + | * puis sélectionner l' |
+ | * sélectionnez votre langue dans la liste, appuyez sur le bouton '' | ||
+ | | ||
- | `initexmf | + | Sinon, éditez le fichier '' |
- | just as for a pre-v2.0 system. | + | <code bash> |
+ | initexmf | ||
+ | </ | ||
- | *_Caveat_:* It is (just) possible that | + | < |
- | your TeX system may run out of '' | + | Il est possible que votre système < |
- | the new format. | + | </ |
- | for storing the details of hyphenation patterns, but although their | + | |
- | size is adjustable in most modern | + | |
- | size is a fiddle. If you _do_ find you've run out of memory, | + | |
- | it may be worth scanning the list of languages in your | + | |
- | `language.dat` to see whether any could reasonably be removed. | + | |
+ | ----- | ||
+ | //Source:// [[faquk> | ||
+ | {{htmlmetatags> | ||
+ | metatag-og: | ||
+ | metatag-og: | ||
+ | }} |