# Chemistry: Experimental page with Chemfig, tikz, chemnum

I'm currently writing my Master Thesis in Organic chemistry. Since this is uncomfortable in word having many graphics and numbering I figured Latex would be best. Yesterday I discovered chemfig and drew some molecules, now I am just trying to design a classical Experimental Page, which should look something like that. But now I'm having a few problems about the graphics, tikz, chemnum, etc.:

• even though I have molecules differing in size, I want all of them to be depicted in the same size (size of bonds, size of atom labels) - so they shouldn't be fit into a frame, but a frame should fit around the proper sized molecule
• as in the picture, I want Molecule number(counted with chemnum), formula and molecular weight fit centrally under the picture. What is the best way to do that?

I've read through quite a lot of posts, adopted an example then would look like this:

\documentclass{scrbook}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{epsfig}
\usepackage{chemfig}
\usepackage[outdir=./]{epstopdf}

\newcommand{\namemole}[1][]{\chemfig{[1,1,1,1,thick]-[:210]=[::-60]-[::-60]=[::-60]-[:-30](-[:30]-[::-60]-[::-60]N(-[::-60])-[:-30](=[:30]O)-[6])=[:-90]-[:-30]-[:-90]-[:-30]N(-[:30])-[6](=[:-30]O)-[:210]*6(------)}%

\tikzstyle{compound} = [draw, rounded corners, text centered, node distance=.38\textwidth, minimum height=.4\textheight, minimum width=0.35\textwidth ]%

\begin{document}

\begin{frame}{Scaling using \textbackslash scalebox}
\centerline{
\begin{tikzpicture}
\node[compound] (name) {\scalebox{.3}{\namemole}};%
\end{tikzpicture}
}
\end{frame}

\end document


Besides that there is an error I don't know I have no idea how to implement the three lines of text. With my present knowledge I would maybe try to define a or three nodes (numb, formula, mol. wt.) and then stack them over each other.

I hope someone could at least give me hints and guidance if the direction I'm going in is right. But if someone has a complete template from a work out of the field of chemistry, that would of course be very helpful as an example.

• Welcome to TeX SX! Where does the frame environment come from? The only one I know is from beamer. – Bernard May 20 '16 at 19:06
• @Bernard Well, since there's a \frame{} macro defined in the LaTeX format, \begin{frame} ... \end{frame} will kind of work i.e. it will compile without error, although it probably won't do what's wanted. – cfr May 20 '16 at 23:21
• Don't load epsfig. You probably don't need epstopdf either. \tikzstyle is deprecated. \end document won't work. – cfr May 20 '16 at 23:23

Do you want something like this?

\documentclass{scrbook}
\usepackage{wrapfig}
\usepackage{chemfig}
\usetikzlibrary{fit}
\usepackage{kantlipsum}
\newcommand{\namemole}[1][]{%
\chemfig{%
[0,.5,,,thick]-[:210]=[::-60]-[::-60]=[::-60]-[:-30](-[:30]-[::-60]-[::-60]N(-[::-60])-[:-30](=[:30]O)-[6])=[:-90]-[:-30]-[:-90]-[:-30]N(-[:30])-[6](=[:-30]O)-[:210]*6(------)
}%
}
\tikzset{
compound/.style = {%
draw,
rounded corners,
},
}
\begin{document}
\begin{wrapfigure}{l}{.375\textwidth}
\centering
\begin{tikzpicture}
\node [label={[align=center, name=lname]below:numb\\formula\\mol. wt.}] (name) {\namemole};
\node [compound, fit=(name) (lname)] {};
\end{tikzpicture}
\end{wrapfigure}
\kant[1-3]
\end{document}

• Thank you!! That is what I was looking for! I need to arrange it a little for my needs, but that gives a very good start! – PHI Lipp May 21 '16 at 6:38