Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
4_domaines_specialises:mathematiques:symboles:polices:changer_de_police_en_mode_mathematique [2016/10/18 21:29] jejust |
4_domaines_specialises:mathematiques:symboles:polices:changer_de_police_en_mode_mathematique [2020/12/04 08:59] (Version actuelle) yannick.tanguy Correction d'une coquille suite à la publication. |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== Comment changer de police en mode mathématique~?}%12.9 | + | ====== Comment changer de police en mode mathématique? |
+ | ===== Avec les extensions amsmath et amssymb ===== | ||
- | $Reponse$ | + | Pour les opérations suivantes, il faut charger |
- | \begin{itemize} | + | |
- | \item pour du gothique~:% '' | + | ==== Les polices classiques ==== |
- | '' | + | |
- | \item pour du calligraphique | + | Il existe un certain nombre de commandes de changement de police |
- | \begin{center} | + | |
- | | + | * '' |
- | \end{center} | + | |
- | On peut aussi générer tout l'alphabet correspondant~: | + | |
+ | * '' | ||
+ | | ||
<code latex> | <code latex> | ||
+ | \documentclass{article} | ||
+ | \usepackage{amsmath, | ||
+ | \begin{document} | ||
+ | \[ \mathrm{ABcd} \neq \mathbf{ABcd} \neq \mathsf{ABcd} \neq \mathtt{ABcd} \neq \mathit{ABcd} \] | ||
+ | \end{document} | ||
+ | </ | ||
- | \DeclareSymbolFont{boldsymbols}{OMS}{cmsy}{b}{n} | + | < |
- | \DeclareSymbolFontAlphabet | + | \documentclass{article} |
- | {\mathbfcal}{boldsymbols} | + | \usepackage{amsmath, |
+ | \pagestyle{empty} | ||
+ | \begin{document} | ||
+ | \[ \mathrm{ABcd} \neq \mathbf{ABcd} \neq \mathsf{ABcd} \neq \mathtt{ABcd} \neq \mathit{ABcd} \] | ||
+ | \end{document} | ||
+ | </ | ||
+ | |||
+ | ==== Une police gothique ==== | ||
+ | |||
+ | Cette police est accessible par la commande '' | ||
+ | |||
+ | <code latex> | ||
+ | \documentclass{article} | ||
+ | \usepackage{amsmath, | ||
+ | \begin{document} | ||
+ | \[ \mathfrak{ABcd} \neq ABcd \] | ||
+ | \[ \boldsymbol{\mathfrak{ABcd}} \neq ABcd \] | ||
+ | \end{document} | ||
</ | </ | ||
- | puis utiliser la commande '' | + | < |
- | + | \documentclass{article} | |
- | <note> | + | \usepackage{amsmath, |
+ | \pagestyle{empty} | ||
+ | \begin{document} | ||
+ | \[ \mathfrak{ABcd} \neq ABcd \] | ||
+ | \[ \boldsymbol{\mathfrak{ABcd}} \neq ABcd \] | ||
+ | \end{document} | ||
+ | </latexdoc> | ||
- | La commande '' | + | ==== Une police calligraphique ===== |
- | </ | + | |
- | \item pour du gras italique~: | + | Cette police s' |
<code latex> | <code latex> | ||
+ | \documentclass{article} | ||
+ | \usepackage{amsmath, | ||
+ | \begin{document} | ||
+ | \[ \mathcal{ABCD} \neq ABCD \] | ||
+ | \[ \boldsymbol{\mathcal{ABCD}} \neq ABCD \] | ||
+ | \end{document} | ||
+ | </ | ||
- | \DeclareMathAlphabet\mbi{OML}{cmm}{b}{it} | + | < |
+ | \documentclass{article} | ||
+ | \usepackage{amsmath, | ||
+ | \pagestyle{empty} | ||
+ | \begin{document} | ||
+ | \[ \mathcal{ABCD} \neq ABCD \] | ||
+ | \[ \boldsymbol{\mathcal{ABCD}} \neq ABCD \] | ||
+ | \end{document} | ||
+ | </ | ||
+ | |||
+ | On peut aussi générer tout l' | ||
+ | |||
+ | <code latex> | ||
+ | \DeclareSymbolFont{boldsymbols}{OMS}{cmsy}{b}{n} | ||
+ | \DeclareSymbolFontAlphabet | ||
+ | {\mathbfcal}{boldsymbols} | ||
</ | </ | ||
- | ou | + | ==== Une police gras italique ===== |
+ | |||
+ | Ce cas demande de déclarer les commandes allant chercher les bons caractères. En voici deux variantes : | ||
<code latex> | <code latex> | ||
+ | \DeclareMathAlphabet\mbi{OML}{cmm}{b}{it} | ||
+ | </ | ||
+ | <code latex> | ||
\DeclareSymbolFont{mathbold}{OML}{cmm}{b}{it} | \DeclareSymbolFont{mathbold}{OML}{cmm}{b}{it} | ||
\DeclareMathSymbol | \DeclareMathSymbol | ||
Ligne 42: | Ligne 100: | ||
</ | </ | ||
- | \item pour des symboles | + | ==== Des symboles gras ==== |
- | <code latex> | + | Comme vu plus haut, ils s' |
+ | <code latex> | ||
\DeclareSymbolFont{mathbold}{OML}{cmm}{b}{it} | \DeclareSymbolFont{mathbold}{OML}{cmm}{b}{it} | ||
\DeclareMathSymbol | \DeclareMathSymbol | ||
{\balpha}{\mathord}{mathbold}{11} | {\balpha}{\mathord}{mathbold}{11} | ||
</ | </ | ||
- | |||
- | \end{itemize} | ||
- | |||
< | < | ||
- | + | Si cela ne marche pas, c'est que les caractères gras correspondants n' | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | \AmS disponibles sur \CTAN. | + | |
</ | </ | ||
+ | ===== D' | ||
+ | ==== Avec la commande \mathversion ==== | ||
- | $Reponse$ | + | Pour écrire toute une formule en gras, on peut aussi utiliser la commande '' |
- | changement de police. Il s'agit de~: | + | |
- | \begin{descrcmd} | + | |
- | \item[mathcal] pour du calligraphique (argument en majuscule), | + | |
- | \item[mathrm] pour du roman, | + | |
- | \item[mathbf] pour du gras (\emph{bold font}), | + | |
- | \item[mathsf] pour du sans empattement (\emph{sans serif}), | + | |
- | \item[mathtt] pour du typewriter (machine à écrire), | + | |
- | \item[mathnormal] pour revenir à la fonte par défaut, | + | |
- | \item[mathit] pour de l'italique. | + | |
- | \end{descrcmd} | + | |
- | |||
- | $Reponse$ | ||
- | commande '' | ||
- | \targ{bold} ou \targ{normal} comme dans l' | ||
- | |||
- | |||
- | Utilisation de '' | ||
<code latex> | <code latex> | ||
+ | \documentclass{article} | ||
+ | \begin{document} | ||
Une formule importante~: | Une formule importante~: | ||
\mathversion{bold} | \mathversion{bold} | ||
Ligne 93: | Ligne 129: | ||
Une formule moins importante~: | Une formule moins importante~: | ||
\mathversion{normal} | \mathversion{normal} | ||
- | \[\sum_{i=0}^n v_i\] | + | \[\sum_{i=0}^n |
+ | \end{document} | ||
</ | </ | ||
+ | < | ||
+ | \documentclass{article} | ||
+ | \usepackage{amsmath, | ||
+ | \pagestyle{empty} | ||
+ | \begin{document} | ||
+ | Une formule importante~: | ||
+ | \mathversion{bold} | ||
+ | \[\sum_{i=0}^n u_i + v_i\] | ||
+ | Une formule moins importante~: | ||
+ | \mathversion{normal} | ||
+ | \[\sum_{i=0}^n u_i + v_i\] | ||
+ | \end{document} | ||
+ | </ | ||
- | $Reponse$ | + | ==== Avec l' |
- | permet de bien gérer les symboles mathématiques en gras. | + | |
+ | L' | ||
+ | |||
+ | <code latex> | ||
+ | \documentclass{article} | ||
+ | \usepackage{bm} | ||
+ | \begin{document} | ||
+ | Une formule importante~: | ||
+ | \[\bm{\sum_{i=0}^n u_i + v_i}\] | ||
+ | |||
+ | Une formule moins importante~: | ||
+ | \[\sum_{i=0}^n u_i + v_i\] | ||
+ | \end{document} | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | \documentclass{article} | ||
+ | \usepackage{bm} | ||
+ | \pagestyle{empty} | ||
+ | \begin{document} | ||
+ | Une formule importante~: | ||
+ | \[\bm{\sum_{i=0}^n u_i + v_i}\] | ||
+ | |||
+ | Une formule moins importante~: | ||
+ | \[\sum_{i=0}^n u_i + v_i\] | ||
+ | \end{document} | ||
+ | </ | ||
+ | {{htmlmetatags> | ||
+ | metatag-og: | ||
+ | metatag-og: | ||
+ | }} | ||