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/16 07:39] 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: | ||
- | \question{Comment changer de police en mode mathématique~?}%12.9 | + | ====== |
- | \reponse Il faut utiliser | + | ===== Avec les extensions amsmath et amssymb ===== |
- | \begin{itemize} | + | |
- | \item pour du gothique~:% \cmd{frak}\marg{Texte} en \LaTeX2.09 et | + | Pour les opérations suivantes, il faut charger |
- | \cmd{mathfrak}\marg{Texte}% en \LaTeXe | + | |
- | \item pour du calligraphique gras~: | + | ==== Les polices classiques ==== |
- | \begin{center} | + | |
- | \cmd{boldsymbol}\marg{\cmd{mathcal}\marg{TEXTE}}. | + | Il existe un certain nombre de commandes de changement de police pour < |
- | \end{center} | + | * '' |
- | On peut aussi générer tout l' | + | * '' |
- | \begin{noexemple} | + | * '' |
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | <code latex> | ||
+ | \documentclass{article} | ||
+ | \usepackage{amsmath,amssymb} | ||
+ | \begin{document} | ||
+ | \[ \mathrm{ABcd} \neq \mathbf{ABcd} \neq \mathsf{ABcd} \neq \mathtt{ABcd} \neq \mathit{ABcd} \] | ||
+ | \end{document} | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | \documentclass{article} | ||
+ | \usepackage{amsmath, | ||
+ | \pagestyle{empty} | ||
+ | \begin{document} | ||
+ | \[ \mathrm{ABcd} \neq \mathbf{ABcd} \neq \mathsf{ABcd} \neq \mathtt{ABcd} \neq \mathit{ABcd} \] | ||
+ | \end{document} | ||
+ | </ | ||
+ | |||
+ | ==== Une police | ||
+ | |||
+ | 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} | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | \documentclass{article} | ||
+ | \usepackage{amsmath, | ||
+ | \pagestyle{empty} | ||
+ | \begin{document} | ||
+ | \[ \mathfrak{ABcd} \neq ABcd \] | ||
+ | \[ \boldsymbol{\mathfrak{ABcd}} \neq ABcd \] | ||
+ | \end{document} | ||
+ | </ | ||
+ | |||
+ | ==== Une police | ||
+ | |||
+ | Cette police s' | ||
+ | |||
+ | <code latex> | ||
+ | \documentclass{article} | ||
+ | \usepackage{amsmath, | ||
+ | \begin{document} | ||
+ | \[ \mathcal{ABCD} \neq ABCD \] | ||
+ | \[ \boldsymbol{\mathcal{ABCD}} \neq ABCD \] | ||
+ | \end{document} | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | \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} | \DeclareSymbolFont{boldsymbols}{OMS}{cmsy}{b}{n} | ||
\DeclareSymbolFontAlphabet | \DeclareSymbolFontAlphabet | ||
{\mathbfcal}{boldsymbols} | {\mathbfcal}{boldsymbols} | ||
- | \end{noexemple} | + | </ |
- | puis utiliser la commande \cmd{mathbfcal}. | + | |
- | | + | ==== Une police gras italique ===== |
- | La commande \cmd{mathcal} ne marche qu' | + | |
- | | + | Ce cas demande de déclarer les commandes allant chercher les bons caractères. En voici deux variantes : |
- | \item pour du gras italique~: | + | |
- | \begin{noexemple} | + | <code latex> |
\DeclareMathAlphabet\mbi{OML}{cmm}{b}{it} | \DeclareMathAlphabet\mbi{OML}{cmm}{b}{it} | ||
- | \end{noexemple} | + | </ |
- | ou | + | |
- | \begin{noexemple} | + | <code latex> |
\DeclareSymbolFont{mathbold}{OML}{cmm}{b}{it} | \DeclareSymbolFont{mathbold}{OML}{cmm}{b}{it} | ||
\DeclareMathSymbol | \DeclareMathSymbol | ||
{\biGamma}{\mathord}{mathbold}{0} | {\biGamma}{\mathord}{mathbold}{0} | ||
- | \end{noexemple} | + | </ |
- | \item pour des symboles | + | |
- | \begin{noexemple} | + | ==== Des symboles gras ==== |
+ | |||
+ | 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{noexemple} | + | </ |
- | \end{itemize} | + | |
- | \begin{Rq} | + | < |
- | Si cela ne marche pas, c'est que les caractères gras correspondants | + | Si cela ne marche pas, c'est que les caractères gras correspondants n' |
- | | + | </ |
- | | + | |
- | | + | |
- | \pack{amsbsy}. Il existe par ailleurs des versions | + | |
- | \AmS disponibles sur \CTAN. | + | |
- | \end{Rq} | + | |
- | \reponse Sous \LaTeXe, il existe un certain nombre de commandes de | + | ===== D'autres solutions |
- | changement de police. Il s'agit de~: | + | |
- | \begin{descrcmd} | + | |
- | \item[mathcal] | + | |
- | \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' | + | |
- | \end{descrcmd} | + | |
- | \reponse Pour écrire toute une formule en gras, on peut aussi utiliser | + | ==== Avec la commande \mathversion |
- | commande \cmd{mathversion}\marg{xxx} de \LaTeXe. \targ{xxx} peut valoir | + | |
- | \targ{bold} ou \targ{normal} comme dans l' | + | |
- | \begin{exemple}{Utilisation | + | Pour écrire toute une formule en gras, on peut aussi utiliser la commande '' |
+ | |||
+ | <code latex> | ||
+ | \documentclass{article} | ||
+ | \begin{document} | ||
Une formule importante~: | Une formule importante~: | ||
\mathversion{bold} | \mathversion{bold} | ||
Ligne 69: | 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{exemple} | + | \end{document} |
+ | </ | ||
- | \reponse Le package | + | < |
- | permet de bien gérer les symboles mathématiques en gras. | + | \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} | ||
+ | </ | ||
+ | |||
+ | ==== Avec l' | ||
+ | |||
+ | 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} | ||
+ | </ | ||
- | \endinput | + | {{htmlmetatags> |
+ | metatag-og: | ||
+ | metatag-og: | ||
+ | }} | ||