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 | ||
4_domaines_specialises:mathematiques:harmoniser_la_hauteur_des_indices [2021/08/11 19:51] – Compilation des exemples. Mots-Clefs OpenGraph. jejust | 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: | + | |
- | <latex> | + | <WRAP column 45ex> |
+ | < | ||
+ | \documentclass{article} | ||
+ | \usepackage[body={8cm, | ||
+ | %\usepackage{mathtools} | ||
+ | \usepackage{lmodern} | ||
+ | \pagestyle{empty} | ||
+ | \begin{document} | ||
\LARGE | \LARGE | ||
$ X^{1}_{2} X_{2} $ | $ X^{1}_{2} X_{2} $ | ||
- | </latex> | + | \end{document} |
+ | </latexdoc> | ||
+ | </ | ||
+ | <WRAP clear /> | ||
+ | ====== ====== | ||
- | You can avoid the problem, for a single instance, by | + | 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 ===== | ||
+ | |||
+ | 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> |
- | + | <latexdoc> | |
- | <latex> | + | \documentclass{article} |
+ | \usepackage[body={8cm, | ||
+ | %\usepackage{mathtools} | ||
+ | \usepackage{lmodern} | ||
+ | \pagestyle{empty} | ||
+ | \begin{document} | ||
\LARGE | \LARGE | ||
$ X^{1}_{2} X^{}_{2} $ | $ X^{1}_{2} X^{}_{2} $ | ||
- | </latex> | + | \end{document} |
+ | </latexdoc> | ||
+ | </ | ||
+ | <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 [[ctanpkg> | + | <WRAP column 45ex> |
- | which forces the lower position for all subscripts. | + | <code latex> |
+ | \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' | ||
+ | |||
+ | ==== Cas de lualatex ==== | ||
+ | |||
+ | 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 /> | ||
+ | ==== ==== | ||
----- | ----- | ||
- | //Source:// [[faquk> | + | //Sources |
+ | * [[faquk> | ||
+ | * [[https:// | ||
{{htmlmetatags> | {{htmlmetatags> | ||
- | metatag-og: | + | metatag-og: |
metatag-og: | metatag-og: | ||
}} | }} | ||
- |