1

I have written a document, that uses tcb-theorems to enclose theorems in the text. I would like to try out how my document looks if the titles were written in the sans serif version of the font I am using. So my question is: How can I change the style of the titles (and maybe the text) of the tcbtheorem environment that I have written below from serif to sans-serif?

\documentclass[a4paper, 11pt]{book}

\usepackage[a4paper,left=3cm,right=3cm,top=3cm,bottom=3cm]{geometry}

\usepackage{lmodern} \usepackage{tcolorbox} \tcbuselibrary{theorems}

\newtcbtheorem[number within=section]{theorem}{Theorem} {colback=blue!25,colframe=blue!25!black,fonttitle=\bfseries}{th}

\begin{document}

afasdsf

\begin{theorem}{Some Titel}{} Some Text. \end{theorem}

\end{document}

Mico
  • 506,678
3nondatur
  • 483
  • 4
    fonttitle=\bfseries\sffamily ? –  Jun 11 '20 at 18:09
  • 2
    @Schrödinger'scat Might want to throw in a \boldmath if they’ll be using math mode within the title. If you want bold sans-serif math, scroll down and read some of the answers further down this page. – Davislor Jun 11 '20 at 19:13
  • 2
    @Davislor I agree. Of course, if our interpretation of the question is correct. BTW, there seems to be a disagreement between users whether or not math should be made bold in e.g. a section, when the surrounding text is bold. I definitely think one should, some disagree. –  Jun 11 '20 at 19:17
  • 1
    @Schrödinger'scat I know that some authors traditionally did that for lack of an alternative. Do you have an example at hand of someone saying they prefer not to use a weight that matches the surrounding text, even if one is available? – Davislor Jun 11 '20 at 19:22
  • 2
    @Davislor I do not know how to find the thread, but I remember to have had this conversation on this site... This is beyond my Google-fu. –  Jun 11 '20 at 19:28
  • 2
    @Davislor -- I won't look for a thread, but I can tell you that, in pure mathematics, variables (usually lightface italic) may have defined variants in upright bold, bold italic, or several other alphabetic forms. For this reason, variables in otherwise bold titles and headings are not made bold in order to avoid changing the meaning. – barbara beeton Jun 11 '20 at 22:23
  • 1
    @barbarabeeton But bold math fonts have extra-bold alphabets for those. Medium is the same weight as the surrounding text, and bold-within-bold is \hm in bm or \boldsymbol{\symbf ...} in unicode-math. Besides, arrows over vectors are a common alternative. – Davislor Jun 11 '20 at 23:01
  • 2
    @Davislor -- Journal publishers tend to be rather conservative, and still judge the quality of their output based on what prints reliably. This may change, but not likely in my lifetime. While there are extra-bold fonts for alphabets, it's hard enough to find competent symbol fonts, and those would have to be provided in bold and extra-bold as well. You're talking about a very large investment of both money and time, and I can't think of any publisher these days that has those resources. Development of the STIX fonts took nearly 20 years, and they're still not perfect. – barbara beeton Jun 11 '20 at 23:51
  • 1
    @barbarabeeton These days, \usepackage{libertinus}, \boldmath, enter math mode, use \symbf. Extra bold, right out of the box. With XITS or Minion, it’s two additional lines of boilerplate. With any other math font, one more to get automatic FakeBold. I get that some publishers still only support 8-bit TeX, but the future is here. – Davislor Jun 12 '20 at 08:47

0 Answers0