[Tex/LaTex] Overfull \hbox in subsection

sectioning

Apologies that my document has a very long preamble, it is a RSC template that I have modified to fit the specifications of my dissertation. I have some subsections with very long chemical names as their titles and these are producing overfull \hbox errors. I am happy for the subsection titles to incorporate a dash in order for it to go over to the next line without exceeding the bounds of the document. Is there a way that I can do this automatically. \usepackage{microtype} does not help. I am aware that I can manually add a dash and then use \sloppy, but is there a way I can produce the same effect automatically? Thanks in advance. Example below:

\documentclass[12pt,oneside,onecolumn]{report}
\oddsidemargin 2.0cm %this makes the bound margin
\evensidemargin 0cm
\textwidth 15cm %controls column width, indirectly
\headheight 1.0in
\topmargin -3.0cm %can be used to adjust top and bottom margins
\textheight 22cm % if both margins top and bottom margins are too small this          must be changed
\usepackage[super,sort&compress,comma]{natbib} 
\usepackage[version=3]{mhchem}
\usepackage{times,mathptmx}
% \usepackage{times}
% feel free not to use mathptmx if it causes difficulties
\usepackage{sectsty}
\usepackage{balance} 
\usepackage{gensymb}
\usepackage{graphicx} %eps figures can be used instead
\usepackage{epstopdf}
\usepackage{lastpage}
\usepackage[format=plain,justification=raggedright,singlelinecheck=false,font=small,labelfont=bf,labelsep=space]{caption} 
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{amsmath}
\usepackage{float}
\pagestyle{fancy}
\fancyhf{}
\usepackage{titlesec, blindtext, color}
\newcommand{\hsp}{\hspace{5pt}}
\titleformat{\chapter}[hang]{\normalfont\Large\bfseries}{\thechapter\hsp$\cdotp$\hsp}{0pt}{\normalfont\Large\bfseries}
\titlespacing*{\chapter}{0pt}{-30pt}{20pt}

\newcommand{\sur}[1]{\ensuremath{^{\textrm{#1}}}}
\newcommand{\sub}[1]{\ensuremath{_{\textrm{#1}}}}


\usepackage{setspace}
\usepackage{lastpage}
\rfoot{\thepage }
%Page  \hspace{1pt} of \pageref{LastPage}
\usepackage[utf8]{inputenc}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{chemscheme}
\begin{document}


\spacing{1.3} %this is where the spacing is controlled

\thispagestyle{plain}
\fancypagestyle{plain}{
\renewcommand{\headrulewidth}{1pt}}
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\renewcommand\footnoterule{\vspace*{1pt}% 
\hrule width 7.5cm height 0.4pt \vspace*{5pt}} 
\setcounter{secnumdepth}{5}



\makeatletter 
\def\subsubsection{\@startsection{subsubsection}{3}{10pt}{-1.25ex plus -1ex minus -.1ex}{0ex plus 0ex}{\normalsize\bf}} 
\def\paragraph{\@startsection{paragraph}{4}{10pt}{-1.25ex plus -1ex minus -.1ex}{0ex plus 0ex}{\normalsize\textit}} 
\renewcommand\@biblabel[1]{#1}            
\renewcommand\@makefntext[1]% 
{\noindent\makebox[0pt][r]{\@thefnmark\,}#1}
\makeatother 
\renewcommand{\figurename}{\small{Fig.}~}
\sectionfont{\normalsize}
\subsectionfont{\normalsize} 

\newcommand{\plus}{\raisebox{.4\height}{\scalebox{.6}{+}}}
\newcommand{\minus}{\raisebox{.4\height}{\scalebox{.8}{-}}}

\subsection{\textit{P,P'}-bis(1,1-dimethylethyl)-\textit{P,P'}-1,3-phenyleneesterphosphinousacid (\textsuperscript{tBu}POCOP)\cite{Goettker-Schnetmann2004b}}


\end{document}

problematic result

Best Answer

I work with a lot of ancient Greek names that don't automatically break even when I use \hyphenation{Tol-ist-o-bog-ii} in the preamble. I'll manually create breakpoints in the text itself using \-, e.g. Tol\-ist\-o\-bog\-ii.

In your case this leaves a dash if you stick one (\-) before the parenthesis (where it seems to work).

I'd just use a \\ instead but this is probably bad form.

Thus:

\subsection{\textit{P,P'}-bis(1,1-dimethylethyl)-\textit{P,P'}-1,3-phenyleneesterphosphinousacid \\ (\textsuperscript{tBu}POCOP)\cite{Goettker-Schnetmann2004b}}

There's this with a little more info: Breaking words at the end of line