On Monday, August 29, 2016 3:00:53 PM WEST Jean-Marc Lasgouttes wrote:
> Le 06/08/2016 à 16:31, José Abílio Matos a écrit :
> > Basically a call like
> >
> > \subfloat{somegraphics}
> >
> > fails to produce a legal lyx file. LyX complains that it gets a corrupted
> > file: "...file ended unexpectedly, which means that it is probably
> > corrupted."
> Hi José,
>
> Do you have a simple test file?
>
> JMarc
The attached file fails to import.
Changing \subfloat{...} to \subfloat[]{...} works.
Regards, :-)
--
José Abílio
\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{subfig}
\begin{document}
\section{Intro}
Hi there!
\begin{figure}[h!]
\begin{center}
\caption{Very interesting results}\label{interesting}
\subfloat{\includegraphics[width=0.45\textwidth]{graphics}}
\hfill
\subfloat{\includegraphics[width=0.45\textwidth]{graphics}}\\
\begin{minipage}{0.95\linewidth}
{\footnotesize \emph{Find the differences in the figures above!}}
\end{minipage}
\end{center}
\end{figure}
\end{document}