Ling Li wrote:

> Hi,
> 
> I thought I had a new idea about subfigure (making a separate
> subfigure inset so it can be applied to external materials). After
> searching in the mail archive, I found this have already been
> discussed, at least by Angus
> (http://www.mail-archive.com/[EMAIL PROTECTED]/msg62163.html).
> 
> So I took a look at the current CVS. It appears that "Insert
> External Material" has disappeared, and "Insert Graphics" now
> accepts file types like XFig files. So subfigure can be applied too.
> Excellent!

Not true I'm afraid. The External inset is to be found under 
Insert->File->External Material. Not sure why.

The External inset can now do *almost* everything that the Graphics 
inset does. Some functionality is missing still however:
1. The Graphics inset has this SubFigure stuff. This shouldn't be a 
part of the inset, so I haven't added it to the External inset. 
Instead, we should move the functionality out of the Graphics inset 
and into a new SubFigure inset, also as you describe.
2. The Graphics inset exports bitmapped graphics and vector graphics 
differently, albeit in a hard-coded manner. It should be 
straight-forward to define different External templates for these so 
that they do the right thing when converted to postscript or pdf 
documents using either latex or pdflatex. However, it still needs to 
be done.
3. The Graphics inset can handle .ps.gz files. Some thought is needed 
about how best this can be done by the External inset.

Once these three are implemented, then the Graphics inset can just 
die.

> After playing the new InsetGraphics inset for a while, I comes to a
> few questions:
> 
> 1. How can I tell LyX to convert .fig files in the "1.3.x" way? That
> is, generating .eps and .pstex_t files so that math equations in
> .fig files is nicely displayed.

You can't. That's what the External inset is for.

> 2. Will inset subfigure be implemented? Having a subfigure inset
> still has its own merits, even after the merge of InsetGraphics and
> InsetExternal. For example, adding labels to subfigures might be
> easier. (See my old thoughts below).

The quickest way to add a missing feature is to provide a patch...

> 3. Is it a better strategy to have both InsetExternal and the
> improved InsetGraphics? InsetGraphics can still handle "easier"
> external materials and InsetExternal is left for complicated ones,
> such as .fig files containing math equations. Users can pick
> whatever they need.

I don't think so. The problems I describe are hardly insumountable.

> === My old thoughts: subfigure as a separate inset/module? ===
> 
> I have an idea for subfigure.
> 
> Currently when a figure (graphics) is inserted, we have an option to
> make it a "subfigure" in the LyX:Graphics:Extra panel. If the option
> is selected, subfigure package will be included and \includegraphics
> will be wrapped by \subfigure. However, if the figure is included by
> other means, such as XFig external files, subfigure option cannot be
> applied (unless we use the evil red text).
> 
> If we can make subfigure a standalone inset, the above situation is
> easily solved. We first insert a subfigure inset, then insert the
> XFig file inside it.
> 
> We may also add a label feature to the subfigure inset (like that
> for math equations). For now, when we want to add a label to a
> subfigure, we have to 1. add it as raw latex code in subfigure's
> caption; and 2. refer it via red text. This is inconvenient.

I think that the whole world agrees with you here.
-- 
Angus

Reply via email to