issue213: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 | ||
issue213:latex [2025/02/05 17:41] – d52fr | issue213:latex [2025/02/08 15:38] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 14: | Ligne 14: | ||
\end{document}** | \end{document}** | ||
+ | |||
+ | Cette fois-ci, je vais vous présenter le paquet babel, le moyen moderne d' | ||
+ | - Indiquez à babel la ou les langues requises. | ||
+ | - Sélectionnez une ou plusieurs polices de caractères appropriées si nécessaire. | ||
+ | - Dans les documents multilingues, | ||
+ | |||
+ | Par exemple : | ||
+ | \documentclass[french]{article} | ||
+ | |||
+ | \n-usepackage{babel} | ||
+ | |||
+ | \begin{document} | ||
+ | |||
+ | Plus \c{c}a change, plus c'est la m\^{e}me chose. | ||
+ | |||
+ | \end{document} | ||
+ | |||
**The [french] option in the document class informs Latex this document uses the French language and it is monolingual. To make a bilingual (or multilingual) document include two (or more) languages as options in the documentclass instruction. The last one will be the default language. To use French as the primary language and German as an occasional language, the option would be [german, | **The [french] option in the document class informs Latex this document uses the French language and it is monolingual. To make a bilingual (or multilingual) document include two (or more) languages as options in the documentclass instruction. The last one will be the default language. To use French as the primary language and German as an occasional language, the option would be [german, | ||
Ligne 19: | Ligne 36: | ||
Localization requires a lot more than simply spelling words correctly and using the correct letters. There is a 45-page chapter in volume 2 of The Latex Companion dedicated to this topic. There are more than sixty languages which can be produced with Latex. This includes many languages that use an alphabet and others which do not. Of course in order for a document to be produced, not only must a suitable font be used but the user must also know how to type that particular language. For example, unless you are familiar with typing French, would you have guessed what Latex command to use to generate ç or ê? | Localization requires a lot more than simply spelling words correctly and using the correct letters. There is a 45-page chapter in volume 2 of The Latex Companion dedicated to this topic. There are more than sixty languages which can be produced with Latex. This includes many languages that use an alphabet and others which do not. Of course in order for a document to be produced, not only must a suitable font be used but the user must also know how to type that particular language. For example, unless you are familiar with typing French, would you have guessed what Latex command to use to generate ç or ê? | ||
If you work in two languages, how to switch from one language to another and back in one document? Babel uses the command \selectlanguage for large blocks of text like paragraphs and \foreignlanguage for small bits inside paragraphs. Here is the example used on p. 303 of vol. 2 of The Latex Companion . Because of some limitations in my system I had to use the csquotes package as well in order to generate the appropriate quotation marks.. ** | If you work in two languages, how to switch from one language to another and back in one document? Babel uses the command \selectlanguage for large blocks of text like paragraphs and \foreignlanguage for small bits inside paragraphs. Here is the example used on p. 303 of vol. 2 of The Latex Companion . Because of some limitations in my system I had to use the csquotes package as well in order to generate the appropriate quotation marks.. ** | ||
+ | |||
+ | L' | ||
+ | |||
+ | La localisation nécessite bien plus que simplement épeler correctement les mots et utiliser les bonnes lettres. Il y a un chapitre de 45 pages dans le volume 2 de The LaTeX Companion consacré à ce sujet. Il existe plus de soixante langues qui peuvent être produites avec LaTeX. Cela inclut de nombreuses langues qui utilisent un alphabet et d' | ||
+ | |||
+ | Si vous travaillez dans deux langues, comment passer d'une langue à l' | ||
+ | |||
**Typesetting a document in a foreign language is not as simple as changing the words. Many languages require accents. Most languages in the world do not use what is often called the Latin alphabet. So relevant fonts have to be developed and then the font package used in the preamble in the Latex document. Different languages may require different shapes than English for numbers. | **Typesetting a document in a foreign language is not as simple as changing the words. Many languages require accents. Most languages in the world do not use what is often called the Latin alphabet. So relevant fonts have to be developed and then the font package used in the preamble in the Latex document. Different languages may require different shapes than English for numbers. | ||
Ligne 25: | Ligne 49: | ||
Punctuation marks differ between languages. The example in the graphic shows three different types of quotation marks. There are other ways quotations are indicated in other languages. Even the simple period is not always used between sentences. In Chinese an open circle is often (although not exclusively) used. Sometimes it appears in the centre of the line of text ◦◦, | Punctuation marks differ between languages. The example in the graphic shows three different types of quotation marks. There are other ways quotations are indicated in other languages. Even the simple period is not always used between sentences. In Chinese an open circle is often (although not exclusively) used. Sometimes it appears in the centre of the line of text ◦◦, | ||
+ | |||
+ | La composition d'un document dans une langue étrangère n'est pas aussi simple que de changer les mots. De nombreuses langues nécessitent des accents. La plupart des langues du monde n' | ||
+ | |||
+ | Une partie très importante de la composition d'un document est la césure. Je n' | ||
+ | |||
+ | Les signes de ponctuation diffèrent selon les langues. L' | ||
+ | |||
**Babel provides translations for document element names Latex uses in its document classes. (This feature is not working on my machine.) Terms like chapter name, figure name, table name are called language dependent strings in babel and will be translated using commands like \figurename. | **Babel provides translations for document element names Latex uses in its document classes. (This feature is not working on my machine.) Terms like chapter name, figure name, table name are called language dependent strings in babel and will be translated using commands like \figurename. | ||
Ligne 33: | Ligne 64: | ||
Generally, numerical values are shown with the same Arabic numbers we all know. As mentioned in Bulgarian and Greek, numbers can be represented with letters. That is also true in a few other languages, although this usage seems to be slowly disappearing. According to The Latex Companion (vol 2, p. 319), Icelandic documents require special formatting for numbers and need the command \tala. In French, there are shorthand commands to generate the first four ordinal numbers \primo, \secundo, \tertia, \quattro. ** | Generally, numerical values are shown with the same Arabic numbers we all know. As mentioned in Bulgarian and Greek, numbers can be represented with letters. That is also true in a few other languages, although this usage seems to be slowly disappearing. According to The Latex Companion (vol 2, p. 319), Icelandic documents require special formatting for numbers and need the command \tala. In French, there are shorthand commands to generate the first four ordinal numbers \primo, \secundo, \tertia, \quattro. ** | ||
+ | |||
+ | Babel fournit des traductions pour les noms d' | ||
+ | |||
+ | Les dates sont formatées différemment selon les langues, certaines langues ont plus d'une façon de formater les dates. Au Canada, nous ne pouvons pas décider quelle méthode utiliser. De nombreuses organisations utilisent la norme internationale du plus grand au plus petit : aaaa mm jj. D' | ||
+ | |||
+ | De nombreuses langues ont un format standard pour les dates. Il est possible que le nom du mois soit toujours en lettres. En bulgare, le mois est indiqué par des chiffres romains majuscules. En grec, les nombres peuvent être écrits avec des lettres (deux systèmes différents) ou avec des chiffres. Les dates en grec peuvent être écrites avec l'une des trois manières possibles de représenter les nombres ou en épelant le nom du mois. | ||
+ | |||
+ | En général, les valeurs numériques sont affichées avec les mêmes chiffres arabes que nous connaissons tous. Comme mentionné en bulgare et en grec, les nombres peuvent être représentés par des lettres. C'est également vrai dans quelques autres langues, bien que cet usage semble disparaître lentement. Selon The LaTeX Companion (vol 2, p. 319), les documents islandais nécessitent un formatage spécial pour les nombres et nécessitent la commande \tala. En français, il existe des commandes abrégées pour générer les quatre premiers nombres ordinaux \primo, \secundo, \tertio, \quattro. | ||
+ | |||
**If you typeset documents using either the Greek or one of the Cyrillic alphabets, you should read the documentation available in The Latex Companion and any other helpful documentation. The authors recommend using either XeTex or LuaTex instead of pdfTex for Greek. | **If you typeset documents using either the Greek or one of the Cyrillic alphabets, you should read the documentation available in The Latex Companion and any other helpful documentation. The authors recommend using either XeTex or LuaTex instead of pdfTex for Greek. | ||
Ligne 47: | Ligne 87: | ||
\begin{document}** | \begin{document}** | ||
+ | |||
+ | Si vous composez des documents en utilisant l' | ||
+ | |||
+ | La saisie en chinois, en coréen ou en japonais nécessite une assistance supplémentaire. Il est nécessaire de pouvoir saisir le code approprié pour chaque caractère dans ces langues. En chinois, la méthode la plus courante pour « épeler » un caractère chinois est le pinyin. La méthode de saisie accepte la saisie au clavier et présente une série de choix qui correspondent au pinyin qui a été tapé (un peu comme un correcteur orthographique). L' | ||
+ | |||
+ | Pour écrire dans l'une de ces trois langues, il faut avoir accès à des jeux de caractères correspondant à la méthode de saisie. Le premier et le meilleur ensemble de paquets permettant d' | ||
+ | |||
+ | \documentclass[12pt]{article} | ||
+ | |||
+ | \usepackage{CJKutf8} %Charger la version UTF8 de CJK | ||
+ | |||
+ | \usepackage{noto-serif} %Charger une police pour ce document. | ||
+ | |||
+ | \begin{document} | ||
Ligne 56: | Ligne 110: | ||
This excursion into the world of typesetting for more than one language points out a feature of Tex that is hidden from users who install a variant of Tex in one language. Some variants of Tex are fully compatible with Unicode, others are not. This is similar to issues between some variations of Linux. For example, to install krecipes on Linux that is not based in Ubuntu requires the addition of many packages because krecipes uses features of Ubuntu that are not normally installed with other variants of Linux. If you never want to use krecipes you never have to think about this situation.** | This excursion into the world of typesetting for more than one language points out a feature of Tex that is hidden from users who install a variant of Tex in one language. Some variants of Tex are fully compatible with Unicode, others are not. This is similar to issues between some variations of Linux. For example, to install krecipes on Linux that is not based in Ubuntu requires the addition of many packages because krecipes uses features of Ubuntu that are not normally installed with other variants of Linux. If you never want to use krecipes you never have to think about this situation.** | ||
+ | |||
+ | Bien qu'il soit possible d' | ||
+ | |||
+ | Je peux taper du pinyin pour générer des caractères chinois. Pour générer des caractères chinois (ou japonais ou coréens), je dois ajouter un paquet à LaTeX. Il est recommandé d' | ||
+ | |||
+ | Comme vous le savez peut-être, l' | ||
+ | |||
+ | Cette excursion dans le monde de la composition typographique pour plusieurs langues met en évidence une fonctionnalité de Tex qui est cachée aux utilisateurs qui installent une variante de Tex dans une langue. Certaines variantes de Tex sont entièrement compatibles avec Unicode, d' | ||
**I did find some workaround code that makes my plain vanilla Latex work with and produce characters I do not often use. The other choice would have been to install at least one other version of Tex, probably pdfTex or LuaTex. I chose not to add more files to my machine. This is in keeping with Knuth’s original design idea. Do not make the user install any more bits of software than they need. Unlike some other versions of Latex, mine does not automatically install any required packages. Instead, it generates an error which indicates it cannot find a particular package the user requires. | **I did find some workaround code that makes my plain vanilla Latex work with and produce characters I do not often use. The other choice would have been to install at least one other version of Tex, probably pdfTex or LuaTex. I chose not to add more files to my machine. This is in keeping with Knuth’s original design idea. Do not make the user install any more bits of software than they need. Unlike some other versions of Latex, mine does not automatically install any required packages. Instead, it generates an error which indicates it cannot find a particular package the user requires. | ||
Ligne 62: | Ligne 124: | ||
This is the end for this time. Keep exploring Tex / Latex. Ask me any questions you have about it.** | This is the end for this time. Keep exploring Tex / Latex. Ask me any questions you have about it.** | ||
+ | |||
+ | J'ai trouvé un code de contournement qui permet à mon LaTeX de fonctionner avec des caractères que je n' | ||
+ | |||
+ | L'une des opérations que j' | ||
+ | |||
+ | C'est la fin pour cette fois. Continuez à explorer Tex/LaTeX. Posez-moi toutes les questions que vous avez à ce sujet. | ||
issue213/latex.1738773704.txt.gz · Dernière modification : 2025/02/05 17:41 de d52fr