1

In the experimental section of my Master's thesis in chemistry, I'm using chemnum to numbering chemical coumpounds. The problem is that the figures disappears when adding a \newpage in front; see below for an example (in Norwegian).

So, if this is the start of the first experiment in the experimental section and I want a short introduction on the page before, then the figure disappears and only shows the text. I write every part of the thesis in different sections and I use the \include command, and the same thing happends when I include some other file in front. What am I doing wrong?

\include{preamble_mastergrad}

\begin{document}
\cmpdreset

\section*{Syntese av: 1,6-dihydroksiphenazin.}

\initcmpd{dihydphen}
\begin{figure}[ht]\label{figur: dihydroksiphenazin.}
\centering
\scriptsize
\cmpdref[TMP1]{dihydphen}
\includegraphics[scale=1]{SYNTESER/27/27.eps}
\caption{1,6-dihydroksiphenazin.}
\end{figure}
\paragraph*{Utbytte:}  Mangler

\paragraph{R\scriptsize{f}\normalsize{:}} mangler

\paragraph*{\HNMR} (600 MHz, Diklormetan-$d2$) \\ 
8.20 (s, 2H), 7.82 – 7.77 (m, 4H), 7.26 (dd, J = 5.7, 2.8 Hz, 2H).

\paragraph*{\CNMR} (151 MHz, Diklormetan-$d2$) \\ 
152.42, 142.13, 135.98, 132.39, 119.92, 109.72, 54.00.

\paragraph*{MS (EI) $m/z$ (relativ intensitet):} 213 (8), 212 (M$^+$ 100), 184 (33), 155 (8).

\paragraph*{HR-MS (EI):} 212.0588. Kalkulert for \BPChem{C\_{12}H\_8N\_2O\_2}: 212.0586 (-0.9ppm).

\paragraph*{Smeltepunkt:}  Mangler

\paragraph*{Prosedyre:} \mbox{} \\
Bla bla bla

I have a mac from 2010, this worked really fine with texmaker 4.2 and mactex before I upgraded to Mavericks and neweste versions of both mactex and texmaker.

Ben

1
  • 1
    It is hard to help given an example that we can not run, it always helps people to answer if you provide a small complete document that demonstrates the problem, also unrelated but \label needs to be after \caption or labels to your figures will not work Oct 3, 2014 at 8:39

1 Answer 1

2

The line

 \include{preamble_mastergrad}

is incorrect, \include should only be used after \begin{document} and is intended for document fragments (usually chapters) not for macro code files.

If you have put your preamble commands into a separate .tex file you can input them with \input, although a preferable alternative is to put them in a .sty file and use \usepackage.

\documentclass[twoside]{book}
\usepackage{mypreamble}
\begin{document}
....

where mypreamble.sty contains all the lines of your preamble_mastergrad.tex except the first, \documentclass, line.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .