43

I wanted to know how to set font of a document to Times New Roman and size to 12 for text and for Chapter Heading 14 only, for the whole document. I don't want to use the fontspec package for this. Please help me out on this.

migrated from stackoverflow.com Jan 9 '14 at 13:28

This question came from our site for professional and enthusiast programmers.

  • 2
    You should probably start to look at LaTeX-manual. \documentclass[12pt]{article} helps with the font size of the document, \usepackage{times} with the font. – Habi Jan 10 '14 at 9:47
  • The titlese package helps you to change the size of the titles. You could add \usepackage{titlesec} to your document and redefine the chapters with \titleformat{\chapter}{\large\bfseries}{\thechapter}{1em}{} or any other LaTeX size instead of \large. – Habi Jan 10 '14 at 9:51
  • 3
    And please also search on tex.SE before submitting a question, there's several answers regarding Times as a font, for example: tex.stackexchange.com/questions/669/… – Habi Jan 10 '14 at 9:57
  • I am asking about Times New Roman Font and for Chapter heading and none of these are helping sir. – Shivam Dhoot Jan 11 '14 at 13:19
  • 1
    Yes, they are, if your read the answer below; \usepackage{mathptmx} or the deprecated \usepackage{times} to get the LaTeX version of Times New Roman and redefine chapter headers to \large to have them 2.4 points bigger than the 12pt of the document. – Habi Jan 13 '14 at 13:52
45

Let's construct what you're after:

  1. 12 point text font

    For this you can pass a 12pt option to the document class. For example, use

    \documentclass[12pt]{book}
    
  2. Times New Roman font

    While there is no actual Times New Roman font in native LaTeX, the closest you'll get is by adding the mathptmx package

    \usepackage{mathptmx}
    

    or the newtx bundle

    \usepackage{newtxtext,newtxmath}
    

    to your document preamble. To check the actual font is included when doing this, see How do I find out what fonts are used in a document/picture?.

  3. 14 point chapter heading

    Under the 12pt document class option, the closest to 14pt is provided by the \large switch (see What point (pt) font size are \Large etc.?) - it'll actually be 14.4pt, but that would be what the font has to offer. However, the current \chapter heading is set (by default) in a combination of \huge and \Huge (the former for the chapter heading - Chapter X, and the latter for the chapter title A chapter). So, we can patch the appropriate macro(s) (\@makechapterhead and \@makechaptershead) and substitute \large for \huge (with the aid of etoolbox):

    \usepackage{etoolbox}
    
    \makeatletter
    % \patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}
    \patchcmd{\@makechapterhead}{\huge}{\large}{}{}% for \chapter
    \patchcmd{\@makechapterhead}{\Huge}{\large}{}{}% for \chapter
    \patchcmd{\@makeschapterhead}{\Huge}{\large}{}{}% for \chapter*
    \makeatother
    

Here's a MWE that contains the above suggestions:

enter image description here

\documentclass[12pt]{book}

\usepackage{lipsum,mathptmx,etoolbox} % Or swap mathptmx with newtxtext,newtxmath

\makeatletter
% \patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}
\patchcmd{\@makechapterhead}{\huge}{\large}{}{}% for \chapter
\patchcmd{\@makechapterhead}{\Huge}{\large}{}{}% for \chapter
\patchcmd{\@makeschapterhead}{\Huge}{\large}{}{}% for \chapter*
\makeatother

\begin{document}

\chapter{A chapter}
\lipsum[1]

\section{A section}
\lipsum[2]

\end{document}

Note how the \section title is now larger (set using \normalfont\Large\bfseries) than the \chapter title - a definite problem. However, you requested Chapter Heading 14 only.

  • 1
    The newtx combo should be mentioned. – egreg Apr 9 '18 at 20:22
1

In order to have 12pt for your document - this works well

\documentclass[a4paper,12pt]{report}

Use this at the start of the page. There is no predefined times new roman so you can use this instead -

\usepackage{Times} or \usepackage{mathptmx}

I was informed the times one is outdated and after trying the other one there were no visible changes so you can use any of them if you like. Hope this helps

  • Welcome to TeX.SE Nice first post ;-) – Thorbjørn E. K. Christensen Apr 5 '18 at 12:51
  • 9
    According to l2tabu this is a bad idea (the package times). This package is outdated and you should be replaced by mathptmx. – TeXnician Apr 5 '18 at 13:14
  • Thanks!! Great to hear from the most active members of the TeX community @ThorbjørnE.K.Christensen – Yash Trivedi Apr 5 '18 at 13:15
  • 4
    With your edit (and considering good style) this is an exact duplicate of the accepted answer and therefore probably more a comment. – TeXnician Apr 5 '18 at 13:51
  • It is better to use the packages \usepackage{newtxtext} and 'usepackage{newtxmath}, prefer to avoid mathptmx – MadyYuvi Jul 22 at 8:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.