Insérer des lettres grecques dans LaTeX - comment cela fonctionne
Dans LaTex, vous pouvez écrire des lettres grecques individuelles, des sections de texte grecques et même des documents complets dans l'alphabet grec. Différentes conventions s'appliquent aux variables dans les formules, les unités physiques et le corps du texte. Nous vous montrerons comment écrire le grec.
Écrire des lettres grecques dans LaTeX
En soi, l'insertion de lettres grecques dans les documents LaTeX n'est pas difficile. Mais selon le contexte, les lettres doivent être formatées différemment. Vous écrivez des variables en italique et avec un espace entre deux variables, les unités sont toujours non italiques et les corps de texte sont non italiques et avec un espacement normal des caractères. Nous avons une solution pour chacun de ces cas:
- Vous pouvez écrire des lettres grecques individuelles en mode mathématique et en équations en les écrivant avec une barre oblique inverse:
- Les deux premières lignes de la figure apparaissent comme ceci: $ \ theta $ et $ \ vartheta $
- En règle générale, les caractères sont en italique dans les environnements mathématiques. Les grosses lettres grecques sont une exception.
- Cependant, vous pouvez utiliser l'italique pour mettre en majuscule les grandes lettres grecques en utilisant "\ mathit": $ \ mathit {\ Theta} $
- Les commandes pour toutes les lettres grecques peuvent être trouvées sur Wikibooks, par exemple.
- Insérez le paquet Upgreek dans le préambule de votre document LaTeX en utilisant "\ usepackage {upgreek}".
- Vous pouvez maintenant mettre les lettres grecques "en clair", c'est-à-dire pas en italique: $ \ uptheta $, $ \ upvartheta $
- Pour écrire des sections entières de texte avec des lettres grecques, chargez le package "Betababel" en utilisant "\ usepackage [ngerman] {betababel}". Vous pouvez maintenant écrire "\ bcode {}" dans la zone grecque.
- Dans l'image, vous pouvez voir ce que le package fait avec le code "\ bcode {CHIP Online Practical Tips}".
- Si vous voulez que tout votre document soit écrit en alphabet grec, utilisez le package "\ usepackage {betababel}" sans l'option "[ngerman]". Pour l'instant, l'intégralité du document est écrit en grec.
Nous expliquerons comment formater le texte dans LaTex, par exemple en modifiant la taille de la police, en insérant des trémas ou en changeant la police, dans d'autres conseils pratiques en ligne de CHIP.