1

I need to set a document in Times New Roman with bold headings (I need to use fontspec because some parts of the document are to be set in another font). However, the command \bfseries for headings seems to be ignored in the preamble, whereas \textbf works as expected in the main body.

MWE:

\documentclass{scrreprt}
\usepackage[english]{babel}


\usepackage{fontspec}
\setmainfont{Times New Roman}
\newfontfamily\timesfont{Times New Roman}

\addtokomafont{chapter}{\timesfont\bfseries\large}
\addtokomafont{section}{\timesfont\large}


\begin{document}

\chapter{First Chapter - should be bold}

Some text and \textbf{some bold text.}

\section{First Section - not bold, as defined}

\end{document}

I also tried \section{\textbf{First Section}} (remains non-bold} and, in the preamble, \addtokomafont{disposition}{\bfseries\timesfont}, which makes the font Times New Roman, but it still isn't bold. How do I get bold fonts in the headings of a scrreprt document using fontspec with Times New Roman?

C.Carl
  • 728
  • 1
    Please tell us (a) the operating system you use (with version information) and which TeX distribution you employ (again with version information). Please also clarify the issue you're facing, i.e., which sectioning headers are incorrectly either bold or non-bold. – Mico Apr 14 '20 at 08:44
  • 5
    Works as expected in a current tex system. But imho \addtokomafont{chapter}{\rmfamily\bfseries\large} would be better. – Ulrike Fischer Apr 14 '20 at 08:47
  • 2
    @Mico I use Windows 10 Pro Version 1903 and MikTeX 2.9 7302. I just updated MikTeX to 7364 and it works now... once again a reminder that one should update the LaTeX distribution very frequently. Thanks for your input! – C.Carl Apr 14 '20 at 08:54
  • 1
    Is your miktex up-to-date? Did you check for updates in the miktex console in user and admin mode? – Ulrike Fischer Apr 14 '20 at 08:59
  • 1
    @UlrikeFischer I just updated and it works now. I feel silly. Thank you for your input! – C.Carl Apr 14 '20 at 09:00
  • 4
    I’m voting to close this question because the OP solved the issue with a software update – egreg Oct 23 '21 at 13:27

1 Answers1

0

I used \textrm{} to change every paragraph using Times New Roman... Not elegantly

Another way is using

\newenvironment{zhuyi}[1][zhuyi]{
    \rmfamily
}{}
\begin{zhuyi}
This is Times New Roman
\end{zhuyi}

Reference: \bfseries is to \textbf as WHAT is to \textsf

Mensch
  • 65,388