[Tex/LaTex] Bold vector symbols in heading

math-modesectioning

I want a heading "ExB drift" where the E and B are styled with vector arrows, and where the letters are bold like the rest of the heading. So far I've achieved one or the other, with some font issues. I would prefer to use Linux Libertine typeface, but this is not an absolute.

Miniumum working examples:

\documentclass{article}
\usepackage{fontspec}
\usepackage{unicode-math}
\defaultfontfeatures{Ligatures=TeX}
\setmathfont{Libertinus Math}
\setmainfont{Linux Libertine O}

\begin{document}
\tableofcontents
Fonts: Linux Libertine O, Libertinus Math
\section{$\vec{E}\times\vec{B}$ drift}
$\vec{E}\times\vec{B}$ drift without bold.

\section{$\mathbf{\vec{E}\times\vec{B}}$ drift}
$\mathbf{\vec{E}\times\vec{B}}$ drift with bold.
\end{document}

or replace set*font with

\setmainfont{TeX Gyre Pagella}
\setmathfont{TeX Gyre Pagella Math}

or remove altogether.
Screengrabs of resulting PDFs:

default font (A Computer Modern variant)

Linux Libertine/Libertinus Math

Tex Gyre Pagella/Pagella Math

Is it possible to get the font styled like in Section 2, but with the arrows?

Best Answer

Use the \symbf command, from unicode-math:

\documentclass{article}
\usepackage{fontspec}
\usepackage{unicode-math}
\defaultfontfeatures{Ligatures=TeX}
\setmathfont{Libertinus Math}
\setmainfont{Linux Libertine O}
\usepackage{esvect}

\begin{document}

\tableofcontents
Fonts: Linux Libertine O, Libertinus Math
\section{$\symbf{\vec{E}\times\vec{B}}$ drift}
$\vec{E}\times\vec{B}$ drift without bold.

\section{$\symbf{\vec{E}\times\vec{B}}$ drift}
$\symbf{\vec{E}\times\vec{B}}$ drift with bold.

\end{document} 

enter image description here

Related Question