1

My goal is to have everything in my document in a Times New Roman like font, including math. I am working with the authblk-package to produce a title page.

I have tried with the following but the Title, Subtitle, Sections and Subsections are not with a Times font.

\documentclass[a4paper,12pt,bibliography=totoc]{scrartcl}

\usepackage[affil-it]{authblk} \usepackage{blindtext} \usepackage{newtxtext} \usepackage{newtxmath}

\titlehead{This is in times \hfill} \title{Main Title with wrong font} \subtitle{Sub Title with wrong font} \author[1,2,*]{First Author} \author[1,2]{Second Author} \author[1,3]{Third Author} \author[2,4]{Supervisor Author} \affil[1]{University} \affil[2]{College} \affil[3]{Institute} \affil[4]{School \break} \affil[*]{Corresponding author: first@university.com \newline Contributing authors: second@college.com, third@institute.com, supervisor@school.com} \date{\today}

\begin{document}

\maketitle

\section{This} \subsection{is in} \subsubsection{times}

This is in times.

enter image description here

Same issue with:

% !TEX TS-program = xelatex
%That was the first line of code
%\usepackage{newtxtext} %newtx packages are commented
%\usepackage{newtxmath}

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

  • KOMA-class scrartcl has its own mechanism for defining the fonts ... Did you read the manual for MOMA-Script? – Mensch Sep 15 '21 at 14:54
  • No, but you helped me identify the issue! Just added one line of code (\setkomafont{disposition}{\bfseries}) in the preamble. – Samuel Saari Sep 15 '21 at 14:58

2 Answers2

1

OP here. It seems I was missing one line of code as scrartcl is a KOMA-class.(more info here). Just had to add

\setkomafont{disposition}{\bfseries}

Full MWE:

\documentclass[a4paper,12pt,bibliography=totoc]{scrartcl}

\usepackage[affil-it]{authblk} \usepackage{blindtext} \usepackage{newtxtext} \usepackage{newtxmath} \setkomafont{disposition}{\bfseries} % this was missing %\usepackage{fontspec} %\setmainfont{Times New Roman}

\titlehead{This is in times \hfill} \title{Main Title in Times} \subtitle{Sub Title in Times} \author[1,2,*]{First Author} \author[1,2]{Second Author} \author[1,3]{Third Author} \author[2,4]{Supervisor Author} \affil[1]{University} \affil[2]{College} \affil[3]{Institute} \affil[4]{School \break} \affil[*]{Corresponding author: first@university.com \newline Contributing authors: second@college.com, third@institute.com, supervisor@school.com} \date{\today}

\begin{document}

\maketitle

\section{This is in times} \subsection{This is in times as well} \subsubsection{Times is the way to go}

This is in times.

\end{document}

enter image description here

0

Hope this is not the best, but it works:

\documentclass[a4paper,12pt,bibliography=totoc]{scrartcl}

\makeatletter \renewcommand*{@gr@gsffamily}{%just tweak this tag \if@egregdoesnotlikesansseriftitles\else\rmfamily\fi } \makeatother

\usepackage[affil-it]{authblk} \usepackage{blindtext} \usepackage{newtxtext} \usepackage{newtxmath}

\titlehead{This is in times \hfill} \title{Main Title with wrong font} \subtitle{Sub Title with wrong font} \author[1,2,*]{First Author} \author[1,2]{Second Author} \author[1,3]{Third Author} \author[2,4]{Supervisor Author} \affil[1]{University} \affil[2]{College} \affil[3]{Institute} \affil[4]{School \break} \affil[*]{Corresponding author: first@university.com \newline Contributing authors: second@college.com, third@institute.com, supervisor@school.com} \date{\today}

\begin{document}

\maketitle

\section{This} \subsection{is in} \subsubsection{times}

This is in times.

\end{document}

enter image description here

MadyYuvi
  • 13,693