# \renewcommand{\sfdefault}{phv} font incorrect


I know this should be easy, and I've tried to follow a few other posts but struggling to apply to my setup. Any help greatly appreciated.

\documentclass{article}
\usepackage[tmargin=1.25in,bmargin=1.25in,lmargin=1.5in,rmargin=1.5in]{geometry}
\usepackage{fancyhdr}

\renewcommand{\sfdefault}{phv} % Arial

\begin{document}
\fontfamily{ptm}\selectfont
\pagestyle{fancy}

\sffamily
\noindent\rule{14cm}{1pt}
\begin{center}
\huge{\textbf{Title is using correct font}}
\par
\vspace{7mm}
\end{center}
\vspace{-\baselineskip}
\noindent\rule{14cm}{1pt}
\fontfamily{ptm}\selectfont
\begin{flushleft}

\vspace{7mm}
\par
\renewcommand{\sfdefault}{\large{\textbf{ABSTRACT should be arial 12}}}
\sfdefault
\par
\fontfamily{ptm}\selectfont
\vspace{7mm}
\par
Correctly using  Times New Roman 11
\vspace{7mm}
\par
\sfdefault
\par
\fontfamily{ptm}\selectfont
\vspace{7mm}
\par
Correctly using  Times New Roman 11
\vspace{7mm}
\par

\sfdefault
\par
\fontfamily{ptm}\selectfont
\vspace{7mm}
\par
Correctly using  Times New Roman 11
\vspace{7mm}
\par
\pagestyle{fancy}

\end{flushleft}
\end{document}

• Aside: phv gives an Helvetica clone, not Arial. Of course, many typophiles regard Arial as a weak, undistinguished copy of Helvetica. Thus, your document may be better off (admittedly every so slightly...) by you employing Helvetica and not Arial... – Mico Jun 20 '18 at 22:00
• Incidentally, what are you trying to achieve by redefining \sfdefault, repeatedly? – Mico Jun 20 '18 at 22:01
• Another aside: The commands \large and \huge -- as well as \tiny, \scriptsize, \footnotesize, \small, \normalsize, \Large, and \LARGE -- are switches, i.e., they do not take arguments. Writing \large{blurb} is no different from just writing\large blurb. To confine the scope of \large, you must write {\large blurb}. – Mico Jun 20 '18 at 22:17
• \renewcommand{\sfdefault}{\large{\textbf{ABSTRACT should be arial 12}}} is nothing that should appear in a LaTeX document. What are you trying to achieve? – egreg Jun 20 '18 at 22:20
• You don't have any section headings or sections at all. – cfr Jun 20 '18 at 22:41

I've tried to simplify your code. Note the use of the sectsty package and its \sectionfont macro, and of \section* and \section, to pursue the simplification.

\documentclass[11pt]{article}
\usepackage[vmargin=1.25in,hmargin=1.5in]{geometry}

\usepackage{newtxtext}           % Times Roman
\usepackage[scaled=0.86]{helvet} % Helvetica

\usepackage{sectsty}
\sectionfont{\large\sffamily}

\begin{document}
\raggedright

\hrule
\begin{center}
\huge\bfseries\sffamily Title is using arial
\end{center}
\hrule

\section*{ABSTRACT now uses arial}

Correctly using Times Roman

\section{INTRODUCTION now uses arial}

Correctly using Times Roman

\section{METHODOLOGY now uses arial}

Correctly using Times Roman
\end{document}

• @Mico thats great it looks exactly like I would like and much cleaner code also ! Ive used \sections before but thought I needed to use the renew command to get the font to apply to the sections only. Many thanks thats two questions answered in one day on here - v impressed ! – Bat Jun 20 '18 at 22:58
• @cfr — Thanks. I’ve changed times to newtxtext. – Mico Jun 20 '18 at 23:12