Re: [PATCH] floatflt->wrapfig, now with .lyx version number increase

2007-09-10 Thread Uwe Stöhr

> I meant not only floatflt -> wrapfig, but the typographic aspects of
> using it (i.e., avoid overly thin text columns, which is a temptation
> here)

I have something written for the text wrap floats in the new UserGuide that you find in branch and 
trunk. Can you have a look if this is what you want. When something is missing, please report me and 
I'll add it.


regards Uwe


Re: [PATCH] floatflt->wrapfig, now with .lyx version number increase

2007-09-10 Thread Helge Hafting

Uwe Stöhr wrote:

> Here is the patch again, with version 284 and do-nothing reversion.
>
> I don't think I have the power to commit such things, so
> I hope someone else can do that - provided the patch is ok of course.

Well done!
I adjusted your patch only a bit:

- remove the tab in lyx_1_6.py (would otherwise not compile)
- adjusted the placement options so that we support all 4: o, i, l, r
- set up the LaTeXConfig.lyx.in file

I committed it:
http://www.lyx.org/trac/changeset/20185

Thanks, this way you made the wrapfig support even better!

Helge Hafting


Re: [PATCH] floatflt->wrapfig, now with .lyx version number increase

2007-09-09 Thread Martin Vermeer
On Mon, Sep 10, 2007 at 02:13:01AM +0200, Uwe Stöhr wrote:
> > But there still should be something in the manual about it.
> 
> I'll do this later because the UserGuide is currently rewritten to be up to 
> date for LyX 1.5.2.
> You can be sure that I won't forget it.

Great!

I meant not only floatflt -> wrapfig, but the typographic aspects of 
using it (i.e., avoid overly thin text columns, which is a temptation
here)

- Martin



Re: [PATCH] floatflt->wrapfig, now with .lyx version number increase

2007-09-09 Thread Uwe Stöhr

> But there still should be something in the manual about it.

I'll do this later because the UserGuide is currently rewritten to be up to 
date for LyX 1.5.2.
You can be sure that I won't forget it.

regards Uwe


Re: [PATCH] floatflt->wrapfig, now with .lyx version number increase

2007-09-09 Thread Uwe Stöhr

> Here is the patch again, with version 284 and do-nothing reversion.
>
> I don't think I have the power to commit such things, so
> I hope someone else can do that - provided the patch is ok of course.

Well done!
I adjusted your patch only a bit:

- remove the tab in lyx_1_6.py (would otherwise not compile)
- adjusted the placement options so that we support all 4: o, i, l, r
- set up the LaTeXConfig.lyx.in file

I committed it:
http://www.lyx.org/trac/changeset/20185

Now only the optional argument of the overhang is missing in the dialog. I'll do this when I find 
the time.


Now we can also provide a table wrap float, I created an enhancement request for this that it won't 
be forgotten: http://bugzilla.lyx.org/show_bug.cgi?id=4219


thanks and regards
Uwe


Re: [PATCH] floatflt->wrapfig, now with .lyx version number increase

2007-09-09 Thread Martin Vermeer
On Sun, Sep 09, 2007 at 11:37:01AM +0200, Helge Hafting wrote:
> On Sun, Sep 09, 2007 at 12:34:07PM +0300, Martin Vermeer wrote:
> > On Sun, Sep 09, 2007 at 10:46:52AM +0200, Jürgen Spitzmüller wrote:
> > > Darren Freeman wrote:
> > > > In which case maybe we can accept the words (broken) or (bugs) or (see
> > > > docs) in the 1.5.x menu items?
> > > 
> > > No.
> > > 
> > > Jürgen
> > 
> > I seem to remember once proposing to throw this whole 
> > (mis-)feature behind the rhododendrons... just because
> > time/life/newsweek does it, doesn't make it good typography.
> 
> Why waste the entire page width when some figure is thin?
> Do you consider wrapped figures apalling typography in all cases?

No, but I have seen very few examples of good use. 
 
> I though dropping the feature might be the right thing to do given
> the useless floatflt implementation, but wrapfig seems to
> do a better job.

If it really is, then OK. But there still should be something in the
manual about it.

> Helge Hafting

- Martin



Re: [PATCH] floatflt->wrapfig, now with .lyx version number increase

2007-09-09 Thread Helge Hafting

Richard Heck wrote:
I haven't tested, but I know you'll need to add a do-nothing reversion 
as well. And the format number went to 283 earlier, so: 

Thanks. Here is the patch again, with version 284 and do-nothing reversion.

I don't think I have the power to commit such things, so
I hope someone else can do that - provided the patch is ok of course.

Helge Hafting
Index: src/insets/InsetWrap.cpp
===
--- src/insets/InsetWrap.cpp	(revisjon 20164)
+++ src/insets/InsetWrap.cpp	(arbeidskopi)
@@ -175,7 +175,7 @@
 
 void InsetWrap::validate(LaTeXFeatures & features) const
 {
-	features.require("floatflt");
+	features.require("wrapfig");
 	InsetCollapsable::validate(features);
 }
 
@@ -195,12 +195,13 @@
 int InsetWrap::latex(Buffer const & buf, odocstream & os,
 		 OutputParams const & runparams) const
 {
-	os << "\\begin{floating" << from_ascii(params_.type) << '}';
+	os << "\\begin{wrap" << from_ascii(params_.type) << '}';
 	if (!params_.placement.empty())
-		os << '[' << from_ascii(params_.placement) << ']';
+		os << '{' << from_ascii(params_.placement) << '}';
+		else os << "{o}"; //Outer is default in the current UI
 	os << '{' << from_ascii(params_.width.asLatexString()) << "}%\n";
 	int const i = InsetText::latex(buf, os, runparams);
-	os << "\\end{floating" << from_ascii(params_.type) << "}%\n";
+	os << "\\end{wrap" << from_ascii(params_.type) << "}%\n";
 	return i + 2;
 }
 
Index: src/frontends/qt4/GuiWrap.cpp
===
--- src/frontends/qt4/GuiWrap.cpp	(revisjon 20164)
+++ src/frontends/qt4/GuiWrap.cpp	(arbeidskopi)
@@ -103,7 +103,7 @@
 		params.placement = "r";
 		break;
 	case 3:
-		params.placement = "p";
+		params.placement = "o";
 		break;
 	}
 }
@@ -112,10 +112,9 @@
 static string const numtostr(double val)
 {
 	string a = convert(val);
-	// FIXME: Will this test ever trigger? (Lgb)
-	if (a == "0")
-		a.erase();
 	return a;
+	//0pt is a legal width now, it yields a
+	//wrapfloat just wide enough for the contents.
 }
 
 
@@ -132,7 +131,7 @@
 		item = 1;
 	else if (params.placement == "r")
 		item = 2;
-	else if (params.placement == "p")
+	else if (params.placement == "o")
 		item = 3;
 
 	valignCO->setCurrentIndex(item);
Index: src/factory.cpp
===
--- src/factory.cpp	(revisjon 20164)
+++ src/factory.cpp	(arbeidskopi)
@@ -173,7 +173,7 @@
 			string const argument = to_utf8(cmd.argument());
 			if (argument == "figure")
 return new InsetWrap(params, argument);
-			lyxerr << "Non-existent floatflt type: " << argument << endl;
+			lyxerr << "Non-existent wrapfig type: " << argument << endl;
 			return 0;
 		}
 
Index: src/LaTeXFeatures.cpp
===
--- src/LaTeXFeatures.cpp	(revisjon 20164)
+++ src/LaTeXFeatures.cpp	(arbeidskopi)
@@ -397,7 +397,7 @@
 	"latexsym",
 	"pifont",
 	"subfigure",
-	"floatflt",
+	"wrapfig",
 	"varioref",
 	"prettyref",
 	"float",
Index: src/Buffer.cpp
===
--- src/Buffer.cpp	(revisjon 20164)
+++ src/Buffer.cpp	(arbeidskopi)
@@ -142,7 +142,7 @@
 
 namespace {
 
-int const LYX_FORMAT = 283;
+int const LYX_FORMAT = 284;
 
 } // namespace anon
 
Index: lib/lyx2lyx/LyX.py
===
--- lib/lyx2lyx/LyX.py	(revisjon 20164)
+++ lib/lyx2lyx/LyX.py	(arbeidskopi)
@@ -78,7 +78,7 @@
("1_3", [221], generate_minor_versions("1.3" , 7)),
("1_4", range(222,246), generate_minor_versions("1.4" , 5)),
("1_5", range(246,277), generate_minor_versions("1.5" , 1)),
-   ("1_6", range(277,284), generate_minor_versions("1.6" , 0))]
+   ("1_6", range(277,285), generate_minor_versions("1.6" , 0))]
 
 
 def formats_list():
Index: lib/lyx2lyx/lyx_1_6.py
===
--- lib/lyx2lyx/lyx_1_6.py	(revisjon 20164)
+++ lib/lyx2lyx/lyx_1_6.py	(arbeidskopi)
@@ -187,10 +187,12 @@
[280, [axe_show_label]],
[281, []],
[282, []],
-   [283, [convert_flex]]
+   [283, [convert_flex]],
+	   [284, []]
   ]
 
 revert =  [
+   [283, []],
[282, [revert_flex]],
[281, []],
[280, [revert_begin_modules]],
Index: lib/chkconfig.ltx
===
--- lib/chkconfig.ltx	(revisjon 20164)
+++ lib/chkconfig.ltx	(arbeidskopi)
@@ -230,7 +230,7 @@
 \TestPackage{esint}
 \TestPackage{fancybox}
 \TestPackage{fancyhdr}
-\TestPackage{floatflt}
+\TestPackage{wrapfig}
 \TestPackage{framed}
 \TestPackage{geometry}
 \TestPackage{jurabib}
Index: development/FORMAT
===
--- development/FORMAT	(revisjon 20164)
+++ develop

Re: [PATCH] floatflt->wrapfig, now with .lyx version number increase

2007-09-09 Thread Helge Hafting
On Sun, Sep 09, 2007 at 12:34:07PM +0300, Martin Vermeer wrote:
> On Sun, Sep 09, 2007 at 10:46:52AM +0200, Jürgen Spitzmüller wrote:
> > Darren Freeman wrote:
> > > In which case maybe we can accept the words (broken) or (bugs) or (see
> > > docs) in the 1.5.x menu items?
> > 
> > No.
> > 
> > Jürgen
> 
> I seem to remember once proposing to throw this whole 
> (mis-)feature behind the rhododendrons... just because
> time/life/newsweek does it, doesn't make it good typography.

Why waste the entire page width when some figure is thin?
Do you consider wrapped figures apalling typography in all cases?

I though dropping the feature might be the right thing to do given
the useless floatflt implementation, but wrapfig seems to
do a better job.

Helge Hafting


Re: [PATCH] floatflt->wrapfig, now with .lyx version number increase

2007-09-09 Thread Martin Vermeer
On Sun, Sep 09, 2007 at 10:46:52AM +0200, Jürgen Spitzmüller wrote:
> Darren Freeman wrote:
> > In which case maybe we can accept the words (broken) or (bugs) or (see
> > docs) in the 1.5.x menu items?
> 
> No.
> 
> Jürgen

I seem to remember once proposing to throw this whole 
(mis-)feature behind the rhododendrons... just because
time/life/newsweek does it, doesn't make it good typography.

- Martin



Re: [PATCH] floatflt->wrapfig, now with .lyx version number increase

2007-09-09 Thread Jürgen Spitzmüller
Darren Freeman wrote:
> In which case maybe we can accept the words (broken) or (bugs) or (see
> docs) in the 1.5.x menu items?

No.

Jürgen


Re: [PATCH] floatflt->wrapfig, now with .lyx version number increase

2007-09-09 Thread Darren Freeman
On Sat, 2007-09-08 at 23:39 +0200, Helge Hafting wrote:
> Second iteration of the floatflt->wrapfig transition patch,
> for lyx-1.6 only  due to the format change.

In which case maybe we can accept the words (broken) or (bugs) or (see
docs) in the 1.5.x menu items? It seems to have been agreed now that it
won't be fixed in 1.5. The LaTeX package would have to be fixed instead.

Can we have a mechanism for bringing up a popup message with checkboxes
for "Don't remind me again" and "Remind me once per session"? This would
be a nice way to alert the user to errata that they need to read in the
manual etc. for features that are quirky or for any reason not
intuitive. I think it would be appreciated by users, without cluttering
the interface.

Have fun,
Darren



Re: [PATCH] floatflt->wrapfig, now with .lyx version number increase

2007-09-08 Thread Richard Heck
I haven't tested, but I know you'll need to add a do-nothing reversion 
as well. And the format number went to 283 earlier, so:

Index: lib/lyx2lyx/lyx_1_6.py
===
[279, [long_charstyle_names]],
[280, [axe_show_label]],
[281, []],
[282, []],
-   [283, [convert_flex]]
+   [283, [convert_flex]],
+   [284, []]
   ]
 


revert =  [
+  [283, []],
   [282, [revert_flex]],
  


--
==
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto