Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In this MWE, I want to obtain bold letter for the letter "H" (compare the two "H") :

\documentclass[10 pt]{beamer}
\usetheme{default}
\usepackage{lmodern} % load a font with all the characters
\usepackage{fontspec}
\usepackage{cmbright}
\SetSymbolFont{largesymbols}{normal}{OMX}{iwona}{m}{n}
\usepackage{amsmath}%loads amsmath that should go before unicode-math
\usefonttheme{professionalfonts}
\defaultfontfeatures{Mapping=tex-text}  % This seems to be important for mapping glyphs properly

\begin{document}
\begin{frame}
\[
\mbox{First bold H : }\|x\|_{\mathbf{H}},\; \mbox{Second bold H : }\mathbf{H} 
\]
\end{frame}
\end{document}

but I don't know how doing it. THe "H" produced by this MWE is tiny but no bold effect. If I use

\SetSymbolFont{largesymbols}{normal}{OMX}{iwona}{m}{n}

I obtain bold tiny "H" but the font used still not the same.

share|improve this question
    
Just how is this minimal? It is far from that. –  Svend Tveskæg Mar 19 at 11:54
    
question edited. –  SAKLY Mar 19 at 12:16

2 Answers 2

up vote 3 down vote accepted

For sizes below 10pt the cmbright package is subsetting bold fonts (which don't exists) and uses the normal weight instead. You can change this by adding this code behind cmbright:

\usepackage{cmbright}
\fontencoding{OT1}\fontfamily{cmbr}\selectfont %to load ot1cmbr.fd
\DeclareFontShape{OT1}{cmbr}{bx}{n}{% change bx definition
<->cmbrbx10%
}{}
\normalfont % back to normalfont
share|improve this answer
    
All works fine now. Thank you very much! –  SAKLY Mar 19 at 13:56

You can simply load unicode-math

MWE:

\documentclass[10 pt]{beamer}
\usetheme{default}
\usepackage{lmodern} % load a font with all the characters
\usepackage{fontspec}
\usepackage{amsmath}%loads amsmath that should go before unicode-math
\usepackage{unicode-math}
\usepackage{cmbright}
\SetSymbolFont{largesymbols}{normal}{OMX}{iwona}{m}{n}
\usefonttheme{professionalfonts}
\defaultfontfeatures{Mapping=tex-text}  % This seems to be important for mapping glyphs properly

\begin{document}
\begin{frame}
\[
\|x\|_{\mathbf{H}}
\]
\end{frame}
\end{document} 

enter image description here

share|improve this answer
    
\usepackage{amsmath}%loads amsmath that should go before unicode-math ... and then you load it after. :) –  Svend Tveskæg Mar 19 at 12:49
    
@SvendTveskæg Yes, thank you. ;-) –  karlkoeller Mar 19 at 13:12
    
The math font I used is loaded by the cmbright package. I want to keep this font and obtain a bold letter "H" in math mode when writing for example $x_{\mathbf{H}}$ (I edited my MWE to see the difference between two bold "H"). –  SAKLY Mar 19 at 13:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.