Bug 160806 - image insertion dialog: cannot set floating type of figure environment
Summary: image insertion dialog: cannot set floating type of figure environment
Status: RESOLVED FIXED
Alias: None
Product: kile
Classification: Applications
Component: general (show other bugs)
Version: 2.0.1rc1
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Michel Ludwig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-14 00:28 UTC by Daniel Tiemann
Modified: 2009-02-22 22:55 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch adds float position and remembers settings for next image insertion (7.42 KB, patch)
2008-04-14 03:02 UTC, Daniel Tiemann
Details
patch includes positioning features of previous patch and "!" (11.80 KB, patch)
2008-05-03 14:25 UTC, Daniel Tiemann
Details
patch for KDE4 (18.92 KB, patch)
2009-02-20 16:40 UTC, David Lonie
Details
KDE4 + extra options (20.64 KB, patch)
2009-02-21 00:51 UTC, David Lonie
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tiemann 2008-04-14 00:28:57 UTC
Version:            (using KDE 3.5.8)
Installed from:    SuSE RPMs
OS:                Linux

The image insertion dialog allows to embed the /includegraphics in a figure environment.
However the floating type ( t,b,p,h ) of the figure environment has to be set manually.

For convenience it would be nice to select the floating type of the image directly in the image insertion dialog.
An additional improvement would be, if a previous selection of the floating type was set as the default selection for any following uses of the image insertion dialog.
Comment 1 Daniel Tiemann 2008-04-14 03:02:18 UTC
Created attachment 24321 [details]
patch adds float position and remembers settings for next image insertion
Comment 2 Thomas Braun 2008-04-14 19:40:26 UTC
Hi,

the patch looks good and it looks quite promising.

Some small enhancements would be nice:
- a box for setting the "!" flag would be nice
- an additional KLineEdit would be nice for flags from external packages like "H"

Thanks,
Thomas
Comment 3 Daniel Tiemann 2008-04-15 16:45:31 UTC
Hi Thomas,

That wouldn't be a problem to implement. Regarding the second point, it might be nice if Kile could read in the /includepackage tags to offer extra options accordingly or/and offer options available from extra packages and add it to the package head with /includepackage if not present already. 

Examples for extra features in image insertion box:
1.option to wrap text around figure when \usepackage{wrapfig} is used.
2.allow multiple images in one figure environment with \subfloat when \usepackage{subfig} is used
(http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions)

A sort of /includepackage-"manager" for could also be interesting for other features than image insertion, as eg amsmath features are offered in kile by default. But probably that should be part of a new "Bug"/wish-report. I know there is something similar to what I have in mind in the wizard (quickdocumentdialog) for making a new document. I will have to look closer into the code of that. I would prefer that "package-manager" to be available also when working with the document not only >before< making it.

Kind Regards
Dan
Comment 4 Thomas Braun 2008-04-15 22:48:07 UTC
Hi Dan,

the information about the included packages is already available in kile.
E.g. insert a cyrillic letter and kile will tell you that you must include some more packages.

But the idea of an package-manager sounds interesting.
Please keep in mind that we already started porting kile to KDE4, and the KDE 3 port is in bugfixing mode only (officially).

Bye,
Thomas


Comment 5 Daniel Tiemann 2008-05-03 14:25:29 UTC
Created attachment 24614 [details]
patch includes positioning features of previous patch and "!"  

This patch allows htbp and ! to select in the dialogue. I have not yet
implemented an alternative Textbox for user-defined positioning keys. However I
have added a scale-box for setting the a scaling-factor, that proportionally
(width&height) scales the image - at times that is more comfortable than
setting the width and height directly.
Comment 6 Thomas Braun 2008-06-08 16:36:36 UTC
Hello Daniel,

your patch looks good.

I would like to add it to kile trunk, which is based on KDE4.

Are you a bit familiar with the QT-Designer?
If yes, it would be nice if you could port your patch to the newly created ui file includegraphicsdialog_base.ui in src/dialogs.
The implementation is in includegraphicsdialog.*

Thanks,
Thomas
Comment 7 Daniel Tiemann 2008-06-09 21:54:53 UTC
Hi Thomas,

That's nice to hear!
Yes I have worked with that designer before. Only at the last time I checked out the trunk I couldn't it get working with KDE4 on my system. I'll have to look into it again ( I should do that anyway) and will do the changes on the ui file then.

Regards
Daniel

Comment 8 Thomas Braun 2009-01-06 23:50:33 UTC
Any update here?
Comment 9 David Lonie 2009-02-20 16:40:21 UTC
Created attachment 31500 [details]
patch for KDE4
Comment 10 David Lonie 2009-02-20 16:42:21 UTC
Patch for KDE4 with designer info above. This just addresses the position arguments, not scaling or arbitrary options.

Would a line edit for additional options be superfluous? Why type latex markup into a config dialog instead of directly into the document?
Comment 11 David Lonie 2009-02-21 00:51:58 UTC
Created attachment 31506 [details]
KDE4 + extra options

Provides additional options to the includegraphics dialog
Comment 12 Thomas Braun 2009-02-22 16:47:34 UTC
Fixed by David Lonie in r929754.
Comment 13 David Lonie 2009-02-22 22:55:52 UTC
SVN commit 930247 by dlonie:

Added textwrapping options to the includegraphics dialog.

CCBUG: 160806
GUI


 M  +130 -25   dialogs/includegraphicsdialog.cpp  
 M  +3 -0      dialogs/includegraphicsdialog.h  
 M  +370 -186  dialogs/includegraphicsdialog_base.ui  
 M  +24 -0     kile.kcfg  


WebSVN link: http://websvn.kde.org/?view=rev&revision=930247