1

Here is my code :

\setuphead[section][style={\ssb\bf}]

\starttext
\section{Hi, my name is Arnaud and I love maths: \math{e^{i\pi} = -1}}
\stoptext

I would like it to display Hi, my name is Arnaud and I love maths: in bold but the equation in regular weight. Is that possible? By default, both the text and the equation are bold.

I am asking this because I use two fonts (sans & maths) that are not the same weight even though both are set to bold. In this case, I prefer to clearly distinguish normal text and equations.

Thanks in advance!

3
  • The equation is not bold for me. Is your system up-to-date? Jan 2, 2018 at 18:00
  • @UlrikeFischer In TL2017 it's bold, in beta it isn't. Jan 2, 2018 at 20:41
  • @UlrikeFischer It's a bug. Bold maths does not work at all in beta. Jan 2, 2018 at 21:14

1 Answer 1

3

Unfortunately, I did not find any high-level switch to turn off automatic font weight deduction for maths. You just have to operate it out of \everymathematics.

\unprotect

\removetoks
    \font_helpers_synchronize_math_family % auto bold
\from \everymathematics

\protect

\setuphead[section][style={\ssb\bf}]

\starttext

\startsection[title={Hi, my name is Arnaud and I love maths: \math{e^{i\pi} = -1}}]

  % Manual math bold still works
  Hi, my name is Arnaud and I love maths: \math{\mb e^{i\pi} = -1}

\stopsection

\stoptext

enter image description here

1
  • It's not a high-level switch indeed but it's very efficient! I will therefore accept your answer. Thank you! Jan 4, 2018 at 11:30

You must log in to answer this question.

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