\documentclass[10pt,twoside,]{article}

\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
%\usepackage{graphicx}
\usepackage{fourier}
\usepackage{wrapfig}
\usepackage[
%	showframe,
	paperwidth=216mm,
	paperheight=279mm,
	hoffset=0mm,
%	inner=30mm,
%	outer=20mm,
%	top=20mm,
%	bottom=20mm,
	textwidth=130mm,
	marginparwidth=30mm, % Change to 30mm to display
	marginparsep=5mm, % Change to 5mm when displaying
	bindingoffset=5mm,
	]{geometry}
\usepackage{chemfig}
\usepackage{chemformula}
\usepackage{fancyvrb}

\author{Kenneth John Odle}
\title{Chemical Structures with the \texttt{Chemfig} Package}


\begin{document}

\maketitle

\begin{abstract}
Chemical structures using the \texttt{chemfig} package.
\end{abstract}

\tableofcontents

\section{Organic Compounds}

\subsection{Acids}

\subsubsection{Oxalic Acid}

\begin{wrapfigure}[9]{r}{0.35\textwidth}
\centering
\chemfig{HO-[:-30]C(=[:-90]O)(-[:30]C(-[:-30]OH)(=[:90]O))}
\caption{Oxalic Acid}
\end{wrapfigure}

Oxalic Acid is an organic acid with the systematic name ethanedioic acid and chemical formula \ch{OH-C(=O)-C(=O)-OH}, also written as \ch{(COOH)2} or \ch{CO2H2} or \ch{H2C2O4}. It is the simplest dicarboxylic acid. \marginpar[\raggedleft Description from Wikipedia]{\raggedright Description from Wikipedia} It is a white crystalline solid that forms a colorless solution in water. Its name comes from the fact that early investigators isolated oxalic acid from flowering plants of the genus Oxalis, commonly known as wood-sorrels. It occurs naturally in many foods. Excessive ingestion of oxalic acid or prolonged skin contact can be dangerous.

Oxalic acid has much greater acid strength than acetic acid. It is a reducing agent and its conjugate bases hydrogen oxalate (\ch{HC2O-4}) and oxalate (\ch{C2O2-4}) are chelating agents for metal cations. It is used as a cleaning agent, especially for the removal of rust, because it forms a water-soluble ferric iron complex, the ferrioxalate ion. Oxalic acid typically occurs as the dihydrate with the formula H2C2O4·2H2O.

\begin{Verbatim}[frame=lines, framesep=5mm, label=\fbox{chemfig code for Oxalic Acid}]
\chemfig{HO-[:-30]C(=[:-90]O)(-[:30]C(-[:-30]OH)(=[:90]O))}
\end{Verbatim}


\subsubsection{Acetic Acid}

\begin{wrapfigure}[9]{r}{0.3\textwidth}
\centering
\chemfig{H_3C-[:30]C(=[:90]O)(-[:-30]OH)}
\caption{Acetic Acid}
\end{wrapfigure}

Acetic Acid, systematically named ethanoic acid, is an acidic, colourless liquid and organic compound with the chemical formula \ch{CH3COOH} (also written as \ch{CH3CO2H}, \ch{C2H4O2}, or \ch{HC2H3O2}). Vinegar is at least 4\% acetic acid by volume, making acetic acid the main component of vinegar apart from water. It has been used, as a component of vinegar, throughout history from at least the third century BC.

Acetic acid is the second simplest carboxylic acid (after formic acid). It is an important chemical reagent and industrial chemical across various fields, used primarily in the production of cellulose acetate for photographic film, polyvinyl acetate for wood glue, and synthetic fibres and fabrics. In households, diluted acetic acid is often used in descaling agents. In the food industry, acetic acid is controlled by the food additive code E260 as an acidity regulator and as a condiment. In biochemistry, the acetyl group, derived from acetic acid, is fundamental to all forms of life. When bound to coenzyme A, it is central to the metabolism of carbohydrates and fats.

The global demand for acetic acid as of 2023 is about 17.88 million metric tonnes per year (t/a). Most of the world's acetic acid is produced via the carbonylation of methanol. Its production and subsequent industrial use poses health hazards to workers, including incidental skin damage and chronic respiratory injuries from inhalation.

The trivial name "acetic acid" is the most commonly used and preferred IUPAC name. The systematic name "ethanoic acid", a valid IUPAC name, is constructed according to the substitutive nomenclature. \marginpar[\raggedleft Description from Wikipedia]{\raggedright Description from Wikipedia} 
The name "acetic acid" derives from the Latin word for vinegar, "acetum", which is related to the word "acid" itself.

"Glacial acetic acid" is a name for water-free (anhydrous) acetic acid. Similar to the German name "Eisessig" ("ice vinegar"), the name comes from the solid ice-like crystals that form with agitation, slightly below room temperature at 16.6 °C (61.9 °F). Acetic acid can never be truly water-free in an atmosphere that contains water, so the presence of 0.1\% water in glacial acetic acid lowers its melting point by 0.2 °C.[9]

A common symbol for acetic acid is AcOH (or HOAc), where Ac is the pseudoelement symbol representing the acetyl group \ch{CH3-C(=O)-}; the conjugate base, acetate (\ch{CH3COO-}), is thus represented as AcO-. Acetate is the ion resulting from loss of H+ from acetic acid. The name "acetate" can also refer to a salt containing this anion, or an ester of acetic acid.  (The symbol Ac for the acetyl functional group is not to be confused with the symbol Ac for the element actinium; context prevents confusion among organic chemists). %To better reflect its structure, acetic acid is often written as CH3−C(O)OH, CH3−C(=O)−OH, CH3COOH, and CH3CO2H. In the context of acid–base reactions, the abbreviation HAc is sometimes used,[12] where Ac in this case is a symbol for acetate (rather than acetyl).

The carboxymethyl functional group derived from removing one hydrogen from the methyl group of acetic acid has the chemical formula \ch{-CH2-C(=O)-OH}.



\begin{Verbatim}[frame=lines, framesep=5mm, label=\fbox{chemfig code for Acetic Acid}]
\chemfig{H_3C-[:30]C(=[:90]O)(-[:-30]OH)}
\end{Verbatim}




\end{document}