I am having a problem with the formatting of the experimental part of my chemistry thesis. I describe the synthesis and the spectroscopic values of a molecule to wrap around a small graphic representation of it. In the beginning I used wrapfiqure like in the following example:
\documentclass[a4paper, 12pt, twoside]{book}
\usepackage{wrapfig}
\usepackage{picinpar}
\usepackage{chemmacros}
\usechemmodule{spectroscopy}
\begin{document}
\section{Experimental}
\subsection{Ferrocene}
\begin{wrapfigure}{r}{0.1\textwidth}
\vspace{-10pt}
\includegraphics{Fc.eps}
\end{wrapfigure}
Ferrocene was prepared by slow addition of a solution of \ch{FeCl3} in DMSO to a mixture of freshly cracked cycopentadiene and potassium hydroxide in THF at \SI{-78}{\celsius}. %After complete addition the mixture was quenched with water and extracted with \ch{Et2O}, the org. layer was dried over \ch{MgSO4} and the solvent evaporated to leave an orange solid that could be purified by sublimation.
\\
\begin{experimental}[format=\bfseries, coupling-unit={},list=true]
\NMR(500)[CDCl3] =
\val{9.25} ( s, \#{1}, \pos{1} ),
\val{8.23} ( s, \#{1}, \pos{2} ),
\val{8.01} ( s, \#{1}, \pos{3} ),
\val{7.77} ( s, \#{1}, \pos{3} ),
\val{6.20} ( s, \#{2}, \pos{4} ),
\val{5.48} ( s, \#{2}, \pos{6} ),
\val{4.26} ( s, \#{2}, \pos{5} ),
\val{2.71} ( s, \#{1}, \pos{8} ),
\val{1.80} ( s, \#{1}, \pos{9} ).
\\
\NMR{13,C[^1H]}(126, MHz)[CDCl3] =
\val{165.0} ( s, \#{1}, \pos{1} ),
\val{120.6} ( s, \#{1}, \pos{2} ),
\val{119.0} ( s, \#{1}, \pos{3} ),
\val{89.6} ( s, \#{1}, \pos{3} ),
\val{88.2} ( s, \#{2}, \pos{4} ),
\val{73.4} ( s, \#{2}, \pos{6} ),
\val{62.8} ( s, \#{2}, \pos{5} ),
\val{56.0} ( s, \#{1}, \pos{8} ),
\val{40.5} ( s, \#{1}, \pos{9} ).
\end{experimental}
\end{document}
It and it worked fine, until I started to realize, that very short descriptions lead to parts of the spectroscopy data aligning with the picture like this:
So the way I was trying to circumvent this problem was by using a window environment (same packages):
\begin{document}
\section{Experimental}
\subsection{Ferrocene}
\begin{window}[0,r,\includegraphics[scale=0.9]{Fc.eps},{}]
Ferrocene was prepared by slow addition of a solution of \ch{FeCl3} in DMSO to a mixture of freshly cracked cycopentadiene and potassium hydroxide in THF at \SI{-78}{\celsius}. %After complete addition the mixture was quenched with water and extracted with \ch{Et2O}, the org. layer was dried over \ch{MgSO4} and the solvent evaporated to leave an orange solid that could be purified by sublimation.
\\
\begin{experimental}[format=\bfseries, coupling-unit={},list=true]
\NMR(500)[CDCl3] =
%same data as before
\\
\NMR{13,C[^1H]}(126, MHz)[CDCl3] =
%same data as before
\end{experimental}
\end{window}
\end{document}
which, however leaves me with the following type of errors:
/TestExp2.tex:19: LaTeX Error: Something's wrong--perhaps a missing \item. [ \NMR(500)[CDCl3]]
So obviously there seems to be an incompatibility of the window and experimental environment. If i \end{window}
before \begin{experimental}
, then it works fine, however the graphic then sometimes ends up being covered up by the text that follows, depending on its size.
So my question is: Is there a workaround, such that I can actually define a window that includes the experimental environment? Or is this impossible?
I am also open to alternative solutions that do not use wrapfigure
OR window
Thanks in advance!
\marginpar{\includegraphics{graphicname}}
description
), too, so it is not an issue ofchemmacros
, strictly speaking