0

I am using a header with sffamily as my font, as follows:

\documentclass[]{standalone}

\usepackage{titlesec}
\titleformat{\section}{\Large\sffamily\bfseries}{\thesection}{1em}{}

\begin{document}

\section{Let $x^2=1$}

\end{document}

However, the x=1 part in the header doesn't look nice, as it uses a much thinner font than the header. I tried changing it to \mathbf{$x=1$}, but it still doesn't look like nice as I am using sffamily as my font. Is there any way to make it look a bit better?

1 Answer 1

1

Your example generates an error but you can get bold math via

enter image description here

 \documentclass{article}

\usepackage{titlesec}
\titleformat{\section}{\Large\sffamily\bfseries\boldmath}{\thesection}{1em}{}

\begin{document}

\section{Let $x=1$}
\section{Let $\mathsf{x=1}$}

\end{document}
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .