[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lyx-devel
Subject:    Re: tex2lyx fails with \subfloat without optional arguments
From:       José_Abílio Matos <jamatos () lyx ! org>
Date:       2016-08-29 22:36:25
Message-ID: 4663375.ki6FS4WomB () myth
[Download RAW message or body]

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
["subfloat-example.tex" (subfloat-example.tex)]

\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}

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic