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 [2002/01/28 11:37] benjamin |
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 fonte en mode mathématique ?}%12.9 | + | ====== |
- | \reponse Il faut utiliser | + | ===== Avec les extensions |
- | \pack{amssymb} puis : | + | |
- | \begin{itemize} | + | |
- | \item pour du gothique | + | Pour les opérations suivantes, il faut charger les extensions [[ctanpkg> |
- | \cmd{mathfrak}\marg{Texte} en \LaTeXe | + | |
- | \item pour du caligraphique | + | ==== Les polices classiques ==== |
- | on peut aussi générer tout l' | + | |
- | \begin{verbatim} | + | Il existe un certain nombre de commandes de changement de police pour < |
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | <code latex> | ||
+ | \documentclass{article} | ||
+ | \usepackage{amsmath, | ||
+ | \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 calligraphique ===== | ||
+ | |||
+ | 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{\mathbfcal}{boldsymbols} | + | \DeclareSymbolFontAlphabet |
- | \end{verbatim} | + | |
- | puis utiliser la commande \cmd{mathbfcal}. | + | </ |
- | Remarque : La commande \cmd{mathcal} ne marche qu' | + | ==== Une police gras italique ===== |
- | | + | |
- | \item pour du gras italique | + | Ce cas demande de déclarer les commandes allant chercher les bons caractères. En voici deux variantes |
- | \begin{verbatim} | + | |
+ | <code latex> | ||
\DeclareMathAlphabet\mbi{OML}{cmm}{b}{it} | \DeclareMathAlphabet\mbi{OML}{cmm}{b}{it} | ||
- | \end{verbatim} | + | </ |
- | ou | + | |
- | \begin{verbatim} | + | <code latex> |
\DeclareSymbolFont{mathbold}{OML}{cmm}{b}{it} | \DeclareSymbolFont{mathbold}{OML}{cmm}{b}{it} | ||
- | \DeclareMathSymbol{\biGamma}{\mathord}{mathbold}{0} | + | \DeclareMathSymbol |
- | \end{verbatim} | + | |
+ | </ | ||
- | \item pour des symboles | + | ==== Des symboles gras ==== |
- | \cmd{boldsymbol}\marg{\cmd{alpha}} | + | |
- | ou | + | Comme vu plus haut, ils s' |
- | \begin{verbatim} | + | |
+ | <code latex> | ||
\DeclareSymbolFont{mathbold}{OML}{cmm}{b}{it} | \DeclareSymbolFont{mathbold}{OML}{cmm}{b}{it} | ||
- | \DeclareMathSymbol{\balpha}{\mathord}{mathbold}{11} | + | \DeclareMathSymbol |
- | \end{verbatim} | + | |
- | \end{itemize} | + | </ |
- | Remarque : si cela ne marche pas, c'est que les caractères gras | + | |
- | | + | |
- | | + | |
- | | + | |
- | par ailleurs des versions postscript de fontes AMS | + | |
- | | + | |
- | \reponse Sous \LaTeXe, il existe un certain nombre de commandes de | + | < |
- | changement de fonte. Il s'agit de : | + | Si cela ne marche pas, c'est que les caractères gras correspondants n' |
- | \begin{itemize} | + | </ |
- | \item \cmd{mathcal} pour du calligraphique (argument en majuscule), | + | |
- | \item \cmd{mathrm} pour du roman, | + | |
- | \item \cmd{mathbf} pour du gras, | + | |
- | \item \cmd{mathsf} pour du sans serif, | + | |
- | \item \cmd{mathtt} pour du typewriter (machine à écrire), | + | |
- | \item \cmd{mathnormal} pour revenir à la fonte par défaut, | + | |
- | \item \cmd{mathit} pour de l' | + | |
- | \end{itemize} | + | |
- | \reponse Pour écrire toute une formule en gras, on peut aussi utiliser | + | ===== D'autres solutions pour le gras ===== |
- | la commande \cmd{mathversion}\marg{xxx} de \LaTeXe. \targ{xxx} peut valoir \targ{bold} | + | |
- | ou \targ{normal} comme dans l'exemple~\ref{maths-mathversion}. | + | |
- | \begin{exemple}{Utilisation | + | ==== Avec la commande |
+ | |||
+ | 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} | ||
- | $$\sum_{i=0}^n u_i + v_i$$ | + | \[\sum_{i=0}^n u_i + v_i\] |
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} |
+ | </ | ||
+ | |||
+ | < | ||
+ | \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} | ||
+ | </ | ||
- | \reponse Le package \pack{bm} disponible sur | + | {{htmlmetatags> |
- | \ctan{macros/ | + | metatag-og: |
- | symboles mathématiques | + | metatag-og: |
- | \endinput | + | }} |