[texhax] Question about math fonts in LaTeX

Vafa Khalighi vafakhlgh at gmail.com
Thu Jan 20 17:31:56 CET 2011


On Fri, Jan 21, 2011 at 2:49 AM, jfbu <jfbu at free.fr> wrote:

> The following has its problems but it partially solves your problem:
>
> \documentclass{minimal}
> \DeclareSymbolFont{digitsfont}{OT1}{cmr}{m}{n}
> \SetSymbolFont{digitsfont}{bold}{OT1}{cmtt}{m}{n}
> \DeclareMathVersion{ttfordigits}
> \SetSymbolFont{digitsfont}{ttfordigits}{OT1}{cmtt}{m}{n}
> \DeclareMathSymbol{0}{\mathord}{digitsfont}{`0}
> \DeclareMathSymbol{1}{\mathord}{digitsfont}{`1}
> \DeclareMathSymbol{2}{\mathord}{digitsfont}{`2}
> \DeclareMathSymbol{3}{\mathord}{digitsfont}{`3}
> \DeclareMathSymbol{4}{\mathord}{digitsfont}{`4}
> \DeclareMathSymbol{5}{\mathord}{digitsfont}{`5}
> \DeclareMathSymbol{6}{\mathord}{digitsfont}{`6}
> \DeclareMathSymbol{7}{\mathord}{digitsfont}{`7}
> \DeclareMathSymbol{8}{\mathord}{digitsfont}{`8}
> \DeclareMathSymbol{9}{\mathord}{digitsfont}{`9}
> \let\oldmathbf\mathbf
> \renewcommand\mathbf[1]{\mbox{{\mathversion{ttfordigits}$\oldmathbf{#1}$}}}
>
> \begin{document}
> \[\mathbf{letters\ should\ be\ bold\ and\ digits\ in\ typewriter\
> face:1234567890}\]
> We know try without \texttt{$\backslash$mathbf} but with  a
> \texttt{$\backslash$boldmath} declaration:\boldmath
> \[these\ digits\ are\ again\ in\ tt\ font:1234567890\]
> But perhaps one does want the digits to be also bold in that case, then the
> \begin{verbatim}
> \SetSymbolFont{digitsfont}{bold}{OT1}{cmtt}{m}{n}
> \end{verbatim}
> from the preamble should be
> \begin{verbatim}
> \SetSymbolFont{digitsfont}{bold}{OT1}{cmr}{bx}{n}
> \end{verbatim}
> However \$\texttt{$\backslash$mathbf}\{0123456789\}\$ would then give
> digits
> in cmtt, and non bold, also after \texttt{$\backslash$boldmath}, which
> might
> not be what is wanted.
> \end{document}
>
> Regards,
> Jean-Francois Burnol
>
>

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20110121/cd03d47c/attachment.html>


More information about the texhax mailing list