\documentclass[a4paper,12pt]{article}
\author{Philip Thomas K.}
\title{Carboxylic Acids}
\usepackage{chemfig}

\begin{document}
\maketitle
\section{Introduction}
Carboxylic acids contain the carboxyl group which is  a complex functional group comprised of a hydroxyl group and a carbonyl group.
\newpage

\section{Theory}
This is the general formula of a carboxylic acid:

\begin{center}
    \chemfig{C(-[1]O(-[0]H))(=[-1]O)(-[4]R)}
\end{center}

The hydroxyl group and the carbonyl group are very close together, causing them to affect each other, which results in them reacting differently to the alcohols and the carbonyl compounds. The physical and chemical properties of the carboxyl group are mainly affected by the polarity of the carboxyl group and the length of the carbon chain. As the length of the carbon chain increases, the effect of the carboxylic acid reduces as with most other functional groups. Carboxylic acids can form hydrogen bonds with themselves, forming dimers, meaning that they have relativiely high melting and boiling points. This is how the dimers form:

\begin{center}
    \chemfig{C(-[4]R)(-[-1]\chembelow[4pt]{O}{\delta -}?)(=[1]\chemabove[4pt]{O}{\delta +}(-[0,,,,dash pattern=on 2pt off 2pt]\chemabove[4pt]{H}{\delta +}(-[0]\chemabove{O}{\delta -}(-[-1]C(-[0]R')(=[-3]\chembelow[4pt]{O}{\delta -}(-[4,,,,dash pattern=on 2pt off 2pt]\chembelow[4pt]{H}{\delta +}?))))))}
\end{center}

Since the carboxyl group is so polar, carboxyli

\end{document}
