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 | ||
| domaines_specialises:mathematiques:harmoniser_la_hauteur_des_indices [2020/12/15 21:05] – Correction de code LaTeX dbitouze | 4_domaines_specialises:mathematiques:structures:indices:harmoniser_la_hauteur_des_indices [2022/01/01 12:15] (Version actuelle) – Fusion de deux pages françaises. Correction de la mise en forme. yannick.tanguy | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | ====== | + | ====== |
| + | Toutes choses étant égales par ailleurs, < | ||
| - | Other things being equal, TeX will aim to position subscripts and | + | ===== ===== |
| - | superscripts in places that "look good" | + | <WRAP column 45ex> |
| - | does this for the sub- and superscripts of each atom at a time, so if | + | |
| - | you have | + | |
| <code latex> | <code latex> | ||
| + | \documentclass{article} | ||
| + | \begin{document} | ||
| + | \LARGE | ||
| $ X^{1}_{2} X_{2} $ | $ X^{1}_{2} X_{2} $ | ||
| + | \end{document} | ||
| </ | </ | ||
| - | the second subscript will appear higher, since the first has moved | + | </ |
| - | down to avoid the superscript; | + | |
| - | the effect can be noticeably distracting: | + | |
| - | ![[faq-images1.png|faq-images1.png]] | + | <WRAP column 45ex> |
| + | < | ||
| + | \documentclass{article} | ||
| + | \usepackage[body={8cm, | ||
| + | %\usepackage{mathtools} | ||
| + | \usepackage{lmodern} | ||
| + | \pagestyle{empty} | ||
| + | \begin{document} | ||
| + | \LARGE | ||
| + | $ X^{1}_{2} X_{2} $ | ||
| + | \end{document} | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP clear /> | ||
| + | ====== ====== | ||
| + | |||
| + | Ici, le second indice semble trop haut, puisque le premier a été légèrement déplacé vers le bas pour éviter de toucher l' | ||
| + | |||
| + | ===== Avec des commandes de base ===== | ||
| - | You can avoid the problem, for a single instance, by | + | Vous pouvez éviter ce problème, au sein d'une équation, en utilisant la méthode suivante : |
| + | ==== ==== | ||
| + | <WRAP column 45ex> | ||
| <code latex> | <code latex> | ||
| + | \documentclass{article} | ||
| + | \begin{document} | ||
| + | \LARGE | ||
| $ X^{1}_{2} X^{}_{2} $ | $ X^{1}_{2} X^{}_{2} $ | ||
| + | \end{document} | ||
| </ | </ | ||
| + | </ | ||
| - | here, the dummy superscript has the requisite " | + | <WRAP column 45ex> |
| - | ![[faq-images2.png|faq-images2.png]] | + | < |
| + | \documentclass{article} | ||
| + | \usepackage[body={8cm, | ||
| + | %\usepackage{mathtools} | ||
| + | \usepackage{lmodern} | ||
| + | \pagestyle{empty} | ||
| + | \begin{document} | ||
| + | \LARGE | ||
| + | $ X^{1}_{2} X^{}_{2} $ | ||
| + | \end{document} | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP clear /> | ||
| + | ===== ===== | ||
| + | Ici, l' | ||
| - | While this technique does what is necessary, it is tedious and | + | De façon plus poussée, la commande '' |
| - | potentially error-prone. So, for more than one or two equations | + | ==== ==== |
| - | in a document, the LaTeX user is advised to use the | + | <WRAP column 45ex> |
| - | [[ctanpkg> | + | <code latex> |
| - | subscripts. | + | \documentclass{article} |
| + | \begin{document} | ||
| + | \[ | ||
| + | f_d = f_{\widehat{ef}} | ||
| + | \mathrm{\ devient\ } | ||
| + | f_{\vphantom{\widehat{ef}} d} | ||
| + | = f_{\widehat{ef}}. | ||
| + | \] | ||
| + | \end{document} | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP column 45ex> | ||
| + | < | ||
| + | \documentclass{article} | ||
| + | \usepackage[body={8cm, | ||
| + | %\usepackage{mathtools} | ||
| + | \usepackage{lmodern} | ||
| + | \pagestyle{empty} | ||
| + | \begin{document} | ||
| + | \[ | ||
| + | f_d = f_{\widehat{ef}} | ||
| + | \mathrm{\ devient\ } | ||
| + | f_{\vphantom{\widehat{ef}} d} | ||
| + | = f_{\widehat{ef}}. | ||
| + | \] | ||
| + | \end{document} | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP clear /> | ||
| + | ===== ===== | ||
| - | ----- | + | ===== Avec l' |
| - | // | + | Si la technique ci-dessus fonctionne, elle est fastidieuse et potentiellement source d' |
| - | {{htmlmetatags> | + | ==== Cas de lualatex ==== |
| - | metatag-og: | + | |
| + | Il faut noter que cette extension ne fonctionne pas avec '' | ||
| + | |||
| + | === === | ||
| + | <WRAP column 45ex> | ||
| + | <code latex> | ||
| + | \documentclass{article} | ||
| + | \begin{document} | ||
| + | Avant modification, | ||
| + | X_2^+$ s' | ||
| + | \[X_2 X_2^\dagger X_2^+\] | ||
| + | |||
| + | \Umathsubshiftdown\textstyle=3pt | ||
| + | \Umathsubshiftdown\displaystyle=2.5pt | ||
| + | |||
| + | Après modification, | ||
| + | X_2^+$ s' | ||
| + | \[X_2 X_2^\dagger X_2^+\] | ||
| + | \end{document} | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <WRAP column 45ex> | ||
| + | < | ||
| + | \documentclass{article} | ||
| + | \usepackage[body={8cm, | ||
| + | %\usepackage{mathtools} | ||
| + | \usepackage{lmodern} | ||
| + | \pagestyle{empty} | ||
| + | \begin{document} | ||
| + | Avant modification, | ||
| + | X_2^+$ s' | ||
| + | \[X_2 X_2^\dagger X_2^+\] | ||
| + | |||
| + | \Umathsubshiftdown\textstyle=3pt | ||
| + | \Umathsubshiftdown\displaystyle=2.5pt | ||
| + | |||
| + | Après modification, | ||
| + | X_2^+$ s' | ||
| + | \[X_2 X_2^\dagger X_2^+\] | ||
| + | \end{document} | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP clear /> | ||
| + | ==== ==== | ||
| + | |||
| + | ----- | ||
| + | //Sources :// | ||
| + | * [[faquk> | ||
| + | * [[https:// | ||
| + | |||
| + | {{htmlmetatags> | ||
| + | metatag-og: | ||
| metatag-og: | metatag-og: | ||
| }} | }} | ||
| - | |||

