2

I would like to have a unique font (Times New Roman or an equivalent one) for both text and equations.

I'm actually using the commands below, which work only for text mode:

\usepackage[T1]{fontenc}
\usepackage{newtxmath,newtxtext}

example:enter image description here

\documentclass[twoside,b5paper,12pt,fleqn]{psd_thesis}
\usepackage{amsmath,amssymb,amsfonts}           
\usepackage[T1]{fontenc}
\usepackage{newtxmath,newtxtext}                

% Document
\begin{document}
example text mode: 12345

$example \ math \ mode: 12345$
\end{document}

The psd_thesis.cls is reported below:

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{psd_thesis}

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}

\ProcessOptions

\LoadClass{report}

\renewcommand{\baselinestretch}{1.5}  % Double-spaced

\usepackage[round]{natbib}  % bib style

\usepackage[tx]{sfmath}      % a package of fonts
\usepackage{helvet}             % For Helvetica (Arial is just a bad copy of Helvetica)
\renewcommand\familydefault{\sfdefault}  

\renewcommand{\@makechapterhead}[1]{%
\vspace*{50\p@}%  {\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
    \large \scshape \bfseries \@chapapp\space \thechapter
    \par\nobreak
    \vskip 20\p@
\fi
\interlinepenalty\@M
\large \bfseries #1\par\nobreak
\vskip 40\p@  }}

\renewcommand{\@makeschapterhead}[1]{%
\vspace*{50\p@}%{\parindent \z@ \raggedright
\normalfont
\interlinepenalty\@M
\large \scshape \bfseries  #1\par\nobreak
\vskip 40\p@  }}  

\renewcommand{\section}{\@startsection{section}% % the name{1}% % the level{0mm}% % the indent{3.0\baselineskip}% % the before skip{2.5\baselineskip}% % the after skip{\normalfont \normalsize}} % the style

\renewcommand{\subsection}{\@startsection{subsection}% % the name
{2}% % the level{0mm}% % the indent{-\baselineskip}% % the before skip{1.5\baselineskip}% % the after skip{\normalfont \normalsize}} % the style

\endinput
3
  • 1
    You do get Times for math letters, unless you follow that\usepackage call with some other font selection. A minimal example is needed. – egreg Jul 4 '16 at 8:15
  • Now it's clearer: the fault is apparently on psd_thesis.cls, but a pointer to it is needed. – egreg Jul 4 '16 at 9:00
  • 2
    Remove \usepackage[tx]{sfmath} or, possibly, don't use the class at all. – egreg Jul 4 '16 at 9:24
1

As far as I can see, the class is meant to typeset everything in a sans serif font. So, if you have to use it, don't try changing its settings.

If you are not required to use the class, just avoid it: its typographic decisions are funny, for example the enormous distance between a section title and the following text (twice and a half the baselineskip, with double spacing, means 1.85cm below; it's 2.2cm above).

Anyway, the part of the class that sets everything to sans serif is

\usepackage[tx]{sfmath}      % a package of fonts
\usepackage{helvet}             % For Helvetica (Arial is just a bad copy of Helvetica)
\renewcommand\familydefault{\sfdefault}

Comment it and you'll be free to choose whatever font you like.

2
  • I followed your suggestion but in math mode I got cursive Times New Roman for letters and a different style for numbers: [![enter image description here][1]][1] [1]: i.stack.imgur.com/jAwY0.jpg I would like that numbers appear in the same style as the letters. Thank you – Luca Jul 4 '16 at 13:30
  • @Luca I don't understand: it is traditional to have letters in math mode printed in italic shape and numbers upright. – egreg Jul 4 '16 at 13:56

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.