On Sat, Jan 27, 2007 at 03:56:08PM +0100, Abdelrazak Younes wrote: > Georg Baum wrote: > > Am Samstag, 27. Januar 2007 15:44 schrieb Enrico Forestieri: > >> On Fri, Jan 26, 2007 at 11:58:02PM +0100, Abdelrazak Younes wrote: > >> > >>> Abdelrazak Younes wrote: > >>>> Georg Baum wrote: > >>>> I just tried to view the dvi. There's some problem here: > >>>> > >>>> 1) LateX doesn't accept multiple lines caption so we might have to > >>>> forbid that I guess. > >>>> > >>>> 2) If you put multiple captions inside a same float, they are > > numbered > >>>> sequentially even though they refer to the same float. I guess I > > should > >>>> update my patch accordingly... What do you think? > >> I think that you should not try to fix what is not broken ;-) > > > > I agree. > > > >>> + // All caption within this inset will have the same label and number. > >>> + ParagraphList & pars = inset.getText(0)->paragraphs(); > >>> + if (pars.empty()) > >>> + return; > >> This is wrong and will break many documents. I can put several images > >> in the same float, each having their own caption and label. > > Indeed, see [FINAL PATCH]. > > > > > That works here with the last version of the patch: Each caption gets a new > > number. Abdel, does that mean that your code is bnroken, or did you not > > implement that, and we only need to remove the comments? > > Yes, I just forgot to modify the comment. You can modify that to: > + // All caption within this inset will have the same label > + // but not the same number.
This is still wrong, as I can have several labels in the same float. I have not applied the patch, so I don't know if the attached document still compiles correctly. -- Enrico
#LyX 1.5.0svn created this file. For more info see http://www.lyx.org/ \lyxformat 256 \begin_document \begin_header \textclass article \language english \inputencoding auto \font_roman default \font_sans default \font_typewriter default \font_default_family default \font_sc false \font_osf false \font_sf_scale 100 \font_tt_scale 100 \graphics default \paperfontsize default \papersize default \use_geometry false \use_amsmath 1 \use_esint 1 \cite_engine basic \use_bibtopic false \paperorientation portrait \secnumdepth 3 \tocdepth 3 \paragraph_separation indent \defskip medskip \quotes_language english \papercolumns 1 \papersides 1 \paperpagestyle default \tracking_changes false \output_changes false \author "Enrico Forestieri" \end_header \begin_body \begin_layout Standard \begin_inset Float figure wide false sideways false status open \begin_layout Standard \begin_inset Box Frameless position "t" hor_pos "c" has_inner_box 1 inner_pos "t" use_parbox 0 width "45col%" special "none" height "1in" height_special "totalheight" status open \begin_layout Standard \align center \begin_inset Graphics filename placeholder.eps \end_inset \end_layout \begin_layout Caption \begin_inset LatexCommand label name "fig1" \end_inset This is the caption for the first figure in this float. \end_layout \end_inset \hfill \begin_inset Box Frameless position "t" hor_pos "c" has_inner_box 1 inner_pos "t" use_parbox 0 width "45col%" special "none" height "1in" height_special "totalheight" status open \begin_layout Standard \align center \begin_inset Graphics filename placeholder.eps \end_inset \end_layout \begin_layout Caption \begin_inset LatexCommand label name "fig2" \end_inset This is the caption for the second figure in this float. \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Standard As can be seen from Figs.\InsetSpace ~ \begin_inset LatexCommand ref reference "fig1" \end_inset and\InsetSpace ~ \begin_inset LatexCommand ref reference "fig2" \end_inset , more captions, each having their own label, can be put in the same figure float. \end_layout \end_body \end_document
placeholder.eps
Description: PostScript document