im currently writeing a paper in Lyx, and i have a weird problem:
I have a number of ERT boxes with tex code for subfloats. It's been working fine, until now, where suddenly none of them work.
When compiling to pdflatex, i get these errors:
Undefined control sequence \subfloat [Is this is?\label{subfig-1:subfloats}]{ The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined. Missing $ inserted ...e=0.3]{C:/Users/Tobias/Dropbox/DRCMR/Dice_ paper/figures/scheme.png} I've inserted a begin-math/end-math symbol since I think you left one out. Proceed, with fingers crossed. Extra }, or forgotten $. ...opbox/DRCMR/Dice_paper/figures/scheme.png} I've deleted a group-closing symbol because it seems to be spurious, as in `$x}$'. But perhaps the } is legitimate and you forgot something else, as in `\hbox{$x}'. In such cases the way to recover is to insert both the forgotten and the deleted material, e.g., by typing `I$}'. Missing } inserted. \end{figure} I've inserted something that you may have forgotten. (See the <inserted text> above.) With luck, this will get me unwedged. But if you really didn't forget anything, try typing `2' now; then my insertion and my current dilemma will both disappear.
ALL of these mistakes are for JUST one small piece of code:
\begin{figure}[H] \subfloat[Is this is?\label{subfig-1:subfloats}]{ \includegraphics[scale=0.3]{C:/Users/Tobias/Dropbox/DRCMR/Dice_paper/figures/scheme.png} } \hfill \subfloat[Is this is?\label{subfig-2:subfloats}]{ \includegraphics[scale=0.3]{C:/Users/Tobias/Dropbox/DRCMR/Dice_paper/figures/scheme.png} } \caption{} \label{fig:sub-floats} \end{figure}
And have to underline, that this worked JUST fine. Further, if i take that tex code just posted, and put into NEW document it does NOT work. But if i put into another old document with similair boxes already inserted, it works just fine!
I have to say that i am utterly confused about this. It seems like theres an error for every line in that small piece of code above, and then it works just fine in another document with the same settings..
Any, and all input is appriciated.
T