You seem to be using the commands from the sectsty
package but loading titlesec
. You can use either one of those packages, but using their own commands; the examples below show possible solutions using each package:
Here's one way to achieve it using the extended \titleformat
syntax from titlesec
package:
\documentclass{article}
\usepackage{titlesec}
\titleformat{\section}
{\normalfont\fontfamily{phv}\fontsize{16}{19}\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}
{\normalfont\fontfamily{phv}\fontsize{14}{17}\bfseries}{\thesubsection}{1em}{}
\titleformat{\subsubsection}
{\normalfont\fontfamily{phv}\fontsize{14}{17}\selectfont}{\thesubsubsection}{1em}{}
\begin{document}
\section{Test Section}
\subsection{Test Subsection}
\subsubsection{Test Subsubsection}
\end{document}
And here's an example using the simplified \titleformat*
command:
\documentclass{article}
\usepackage{titlesec}
\titleformat*{\section}{\normalfont\fontfamily{phv}\fontsize{16}{19}\bfseries}
\titleformat*{\subsection}{\normalfont\fontfamily{phv}\fontsize{14}{17}\bfseries}
\titleformat*{\subsubsection}{\normalfont\fontfamily{phv}\fontsize{14}{17}\selectfont}
\begin{document}
\section{Test Section}
\subsection{Test Subsection}
\subsubsection{Test Subsubsection}
\end{document}
And here's an example using sectsty
:
\documentclass{article}
\usepackage{sectsty}
\sectionfont{\normalfont\fontfamily{phv}\fontsize{16}{19}\bfseries}
\subsectionfont{\normalfont\fontfamily{phv}\fontsize{14}{17}\bfseries}
\subsubsectionfont{\normalfont\fontfamily{phv}\fontsize{14}{17}\selectfont}
\begin{document}
\section{Test Section}
\subsection{Test Subsection}
\subsubsection{Test Subsubsection}
\end{document}
Just for completeness's sake, here's one solution without additional packages, redefining the original commands:
\documentclass{article}
\makeatletter
\renewcommand\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\fontfamily{phv}\fontsize{16}{19}\bfseries}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\fontfamily{phv}\fontsize{14}{17}\bfseries}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\normalsize\fontfamily{phv}\fontsize{14}{17}\selectfont}}
\makeatother
\begin{document}
\section{Test Section}
\subsection{Test Subsection}
\subsubsection{Test Subsubsection}
\end{document}
As egreg mentions in his comment, the presence of \bfseries
allows not to specify \selectfont
.
You have at least 4 main ways to have some text in bold:
\textbf{
Bold text is here}
{\bfseries
Bold text is here}
\bfseries
Bold text is here \mdseries
\begin{bfseries}
Bold text is here \end{bfseries}
As said by David Carlisle, you should not use \bf
but \bfseries
instead.
Best Answer
normalfont
permits to have your text as the main part of your document:\item[$\bullet${\normalfont text}}
The following should work too:
\item[$\bullet$] text