Meaning of Outline

2007-06-16 Thread Ramon Flores
Hi:

I am the translator of LyX to Galician. I have found a (killer) bug for the 
LyX-1.5.0rc1, and I have open the following report
=
Bug#: 3872

When I click in Document-Outline LyX crashed with the following message:

Assertion triggered in const lyx::docstring lyx::from_ascii(const char*) by
failing check static_castunsigned char(*c)  0x80 in file docstring.cpp:32

I am using lyx-1.5.0rc1 on Mandriva 2007.
==

As I can not click on Outline I can not know what this mean. I would thank if 
somebody could tell me what of the following meanings, that appear in the 
American Heritage Dictionary, is the correct one in this case:

01. A line marking the outer contours or boundaries of an object or figure.
02. The shape of an object or figure.
03. A style of drawing in which objects are delineated in contours without 
shading.
04. A sketch done in this style.
05. A general description covering the main points of a subject: an outline of 
American literature.
06. A statement summarizing the important points of a text.
07. A summary of a written work or speech, usually analyzed in headings and 
subheadings.
08. A style of drawing in which objects are delineated in contours without 
shading.
09. A sketch done in this style.
10 A general description covering the main points of a subject: an outline of 
American literature.
11 A statement summarizing the important points of a text.
12 A summary of a written work or speech, usually analyzed in headings and 
subheadings.
13. A general description covering the main points of a subject: an outline of 
American literature.
14. A statement summarizing the important points of a text.
15. A summary of a written work or speech, usually analyzed in headings and 
subheadings.
16. A preliminary draft or plan, as of a project or proposal.


Thanks
Ramon


Re: Meaning of Outline

2007-06-16 Thread Alfredo Braunstein
Hi,

Ramon Flores wrote:

 Assertion triggered in const lyx::docstring lyx::from_ascii(const char*)
 by failing check static_castunsigned char(*c)  0x80 in file
 docstring.cpp:32

I believe this bug is solved in the development version.
 
 I am using lyx-1.5.0rc1 on Mandriva 2007.
 ==
 
 As I can not click on Outline I can not know what this mean. I would thank
 if somebody could tell me what of the following meanings, that appear in
 the American Heritage Dictionary, is the correct one in this case:
 
 01. A line marking the outer contours or boundaries of an object or
 figure. 02. The shape of an object or figure.
 03. A style of drawing in which objects are delineated in contours without
 shading.
 04. A sketch done in this style.
 05. A general description covering the main points of a subject: an
 outline of American literature.
 06. A statement summarizing the important points of a text.
 07. A summary of a written work or speech, usually analyzed in headings
 and subheadings.
 08. A style of drawing in which objects are delineated in contours without
 shading.
 09. A sketch done in this style.
 10 A general description covering the main points of a subject: an outline
 of American literature.
 11 A statement summarizing the important points of a text.
 12 A summary of a written work or speech, usually analyzed in headings and
 subheadings.
 13. A general description covering the main points of a subject: an
 outline of American literature.
 14. A statement summarizing the important points of a text.
 15. A summary of a written work or speech, usually analyzed in headings
 and subheadings.
 16. A preliminary draft or plan, as of a project or proposal.

7, 12, 15 (your dictionary is a bit redundant) ;-)

Regards,

A/




Re: [patch] Space displayed after macro, #3705

2007-06-16 Thread Andre Poenitz
On Fri, Jun 15, 2007 at 08:39:14AM +0200, Stefan Schimanski wrote:
 Here is a patch for http://bugzilla.lyx.org/show_bug.cgi?id=3705. It  
 adds the kerning method to a macro to inherit the kerning from the  
 expanded form. Moreover the marker metrics calls are remove as they  
 are not drawn anyway.
 
 Stefan
 
 Index: src/mathed/MathMacro.h
 ===
 --- src/mathed/MathMacro.h(Revision 18774)
 +++ src/mathed/MathMacro.h(Arbeitskopie)
 @@ -54,6 +54,8 @@
   ///
   docstring name() const;
   ///
 + int kerning() const { return kerning_; }

Could that be 

int kerning() const { return expanded_.kerning(); }

or is expanded_ smashed before we access its kerning?

Andre'


Re: RC2 coming soon

2007-06-16 Thread José Matos
On Friday 15 June 2007 19:50:42 Richard Heck wrote:
 I think it'd be nice to have Abdel's child docs TOC patch by then. I'm
 working on it now. There are still some issues.

  I agree. :-)
  And I said that already in another thread. :-)

 Richard

-- 
José Abílio


Re: RC2 coming soon

2007-06-16 Thread José Matos
On Friday 15 June 2007 23:44:27 Edwin Leuven wrote:
 José Matos wrote:
  Hi all,
  I will start looking to remaining issues before RC2, AFAIR there are two
  patches that I would like to have before the release, one by Jürgen that
  has a file format change and another related with reverting documents to
  1.4.
 
  Is there anything else that I am missing before RC2?

 tearing of math panels using attached patch?

This patch breaks the rule that only bugfixes should go after RC1.

On the other hand there is life after 1.5.0 release. :-)

If no one opposes this patch and I have thumbs up from people testing the code 
I will consider it. Fair enough?
-- 
José Abílio


Re: user auth patches

2007-06-16 Thread José Matos
On Friday 15 June 2007 20:42:58 Peter Kümmel wrote:
 Sorry, ;) The result of the reply rules: I press reply and choose the
 mailing list.

I think this is part of your secret agenda to push dbus into lyx. ;-)

-- 
José Abílio


Re: [patch] tex2lyx crash when full path is given from commandline on Win32

2007-06-16 Thread Andre Poenitz
On Fri, Jun 15, 2007 at 11:39:23PM -0400, hzluo wrote:
 We've been relaxing the rules lately; support/ uses
 QtCore for a number of things and I think it would
 be much saner at this point to use QFileInfo, QProcess
 and QNetwork to replace our hand-made local code.
 If somebody steps up to encapsulate this Qt API
 in our API (forkedControllers, Socket and FileName)
 he will have at least my full support (and help) and
 probably not much resistance from others.
 
 But it needs a _lot_ of change. All file open/create
 must be patched. As a result, the work needs the involvement
 of the whole lyx development community. It's kind of
 impossible thing for me. And I don't think it's worth
 to do so. Certainly, if this problem lies not only
 on Windows but also on other platforms, it may worth
 to have a though clean of the code.
 
 And I just tested that Qt converts the filenames between
 local encoding and UTF-32 correctly. So the evil is solely
 from M$'s disgusting stdc++ library. I really hate this --
 even though Win32 API supports local encoding very well,
 M$'s clib breaks it completely..
 
 I'm trying to hack the disgusting M$ stdc++ library
 to allow proper local 8-bit filename support. In that
 way we do not need to patch anything other than M$ library.
 And one programer is enough. If this problem affects
 only Windows, I believe it's good enough.
 
 Now the remaining problem is to test whether other platforms
 and compilers/stdc++ libararies have the same problem.
 I do not have access to such platforms so I can't do the test.
 Could anyone help to test it?

What was from with the five lines or so I posted that uses
QCoreApplication::arguments()?

Andre'


Re: [patch] tex2lyx crash when full path is given from commandline on Win32

2007-06-16 Thread Andre Poenitz
On Sat, Jun 16, 2007 at 12:10:27PM +0200, Andre Poenitz wrote:
 What was from with the five lines or so I posted that uses
 QCoreApplication::arguments()?

s/from/wrong with/

Andre'


Re: [Cvslog] r18692 - /lyx-devel/trunk/src/LaTeXFeatures.cpp

2007-06-16 Thread Michael Gerz

[EMAIL PROTECTED] schrieb:

Author: rgheck
Date: Wed Jun  6 21:33:57 2007
New Revision: 18692

URL: http://www.lyx.org/trac/changeset/18692
Log:
Fix bug 3823: Division needs not to return an integer.

Also added some comments about a different possible fix.

  

Two things:
- Why do we divide by 255 and not by 256?
- There are two more places where a floating point division may be useful.

Please have a look at the attached patch.

Comments? Ok?

Michael
Index: LaTeXFeatures.cpp
===
--- LaTeXFeatures.cpp	(Revision 18800)
+++ LaTeXFeatures.cpp	(Arbeitskopie)
@@ -491,7 +491,7 @@
 	// shadecolor for shaded
 	if (mustProvide(framed)  mustProvide(color)) {
 		RGBColor c = RGBColor(lcolor.getX11Name(Color::shadedbg));
-		//255.0 to force conversion to double
+		//256.0 to force conversion to double
 		//NOTE As Jürgen Spitzmüller pointed out, an alternative would be
 		//to use the xcolor package instead, and then we can do
 		// \define{shadcolor}{RGB}...
@@ -499,7 +499,7 @@
 		//in InsetNote::validate().
 		int const stmSize = packages.precision(2);
 		packages  \\definecolor{shadecolor}{rgb}{
-			 c.r/255.0  ','  c.g/255.0  ','  c.b/255.0  }\n;
+			 c.r / 256.0  ','  c.g / 256.0  ','  c.b / 256.0  }\n;
 		packages.precision(stmSize);
 	}
 
@@ -664,11 +664,11 @@
 	if (mustProvide(ct-xcolor-soul)) {
 		RGBColor cadd = RGBColor(lcolor.getX11Name(Color::addedtext));
 		macros  \\providecolor{lyxadded}{rgb}{
-		cadd.r/255  ','  cadd.g/255  ','  cadd.b/255  }\n;
+		cadd.r / 256.0  ','  cadd.g / 256.0  ','  cadd.b / 256.0  }\n;
 
 		RGBColor cdel = RGBColor(lcolor.getX11Name(Color::deletedtext));
 		macros  \\providecolor{lyxdeleted}{rgb}{
-		cdel.r/255  ','  cdel.g/255  ','  cdel.b/255  }\n;
+		cdel.r / 256.0  ','  cdel.g / 256.0  ','  cdel.b / 256.0  }\n;
 
 		macros  \\newcommand{\\lyxadded}[3]{{\\color{lyxadded}#3}}\n
 		\\newcommand{\\lyxdeleted}[3]{{\\color{lyxdeleted}\\st{#3}}}\n;
Index: Color.cpp
===
--- Color.cpp	(Revision 18800)
+++ Color.cpp	(Arbeitskopie)
@@ -162,9 +162,9 @@
 		}
 	}
 
-	r = static_castint(::floor((rd * 255.0) + 0.5));
-	g = static_castint(::floor((gd * 255.0) + 0.5));
-	b = static_castint(::floor((bd * 255.0) + 0.5));
+	r = static_castint(::floor((rd * 256.0) + 0.5));
+	g = static_castint(::floor((gd * 256.0) + 0.5));
+	b = static_castint(::floor((bd * 256.0) + 0.5));
 }
 
 
@@ -176,9 +176,9 @@
 
 HSVColor::HSVColor(RGBColor const  rgb)
 {
-	double const r = rgb.r / 255.0;
-	double const g = rgb.g / 255.0;
-	double const b = rgb.b / 255.0;
+	double const r = rgb.r / 256.0;
+	double const g = rgb.g / 256.0;
+	double const b = rgb.b / 256.0;
 
 	double const maxval = max(max(r, g), b);
 	double const minval = min(min(r, g), b);


Re: RC2 coming soon

2007-06-16 Thread Edwin Leuven

José Matos wrote:

On Friday 15 June 2007 23:44:27 Edwin Leuven wrote:

José Matos wrote:

Hi all,
I will start looking to remaining issues before RC2, AFAIR there are two
patches that I would like to have before the release, one by Jürgen that
has a file format change and another related with reverting documents to
1.4.

Is there anything else that I am missing before RC2?

tearing of math panels using attached patch?


This patch breaks the rule that only bugfixes should go after RC1.


what about

http://bugzilla.lyx.org/show_bug.cgi?id=3840

and

http://bugzilla.lyx.org/show_bug.cgi?id=3839

?


On the other hand there is life after 1.5.0 release. :-)

If no one opposes this patch and I have thumbs up from people testing the code 
I will consider it. Fair enough?


no problem


Re: [patch] tex2lyx crash when full path is given from commandline on Win32

2007-06-16 Thread Alfredo Braunstein
Andre Poenitz wrote:

 On Sat, Jun 16, 2007 at 12:10:27PM +0200, Andre Poenitz wrote:
 What was from with the five lines or so I posted that uses
 QCoreApplication::arguments()?
 
 s/from/wrong with/
 
 Andre'

s=/wrong\ with=/wrong=

;-)

A/




Re: RC2 coming soon

2007-06-16 Thread José Matos
On Saturday 16 June 2007 12:00:42 Edwin Leuven wrote:
 what about

 http://bugzilla.lyx.org/show_bug.cgi?id=3840
 and
 http://bugzilla.lyx.org/show_bug.cgi?id=3839

  If Jürgen gives an OK to these I give my OK as well.  

  On the other hand there is life after 1.5.0 release. :-)
 
  If no one opposes this patch and I have thumbs up from people testing the
  code I will consider it. Fair enough?

 no problem

  Just to be clear, if this does not go in 1.5.0 I consider it a good 
candidate to go in 1.5.x.

-- 
José Abílio


Fwd: tear-off math panels

2007-06-16 Thread Roger Mc Murtrie

Re Intel Mac OSX 10.4
Previous testing for both Mac and Linux done after make using src/lyx.
Now, after doing a make install on the Mac and starting  the  
resulting LyX.app, the correct characters are displayed for all  
palettes with the exception of the Big Operators palette for which  
only some work correctly while others are displayed as text strings  
such as oiint.
I assume this Big Operators problem might be due to some missing  
fonts in my system??


Hoping that the tear-off math palette feature makes it into rc2
Roger


Begin earlier message:


From: Roger Mc Murtrie [EMAIL PROTECTED]
Date: 15 June 2007 1:36:31 PM
To: lyx-devel@lists.lyx.org
Cc: E. Leuven [EMAIL PROTECTED]
Subject: Re: tear-off math panels

I have tested the tear off panels on both Linux and Mac.
Panels tear off when single clicked above a math palette's dashed  
line.
There is one inconsistency between the Linux panel and the Mac  
panel in that the linux palette has a maximise icon whereas the Mac  
palette doesn't.


This is a great improvement in math functionality and usability.

I have a problem with the Mac's LyX display.
When characters are entered from a math palette, the correct symbol  
is not displayed, instead an English character or string is  
displayed. For example, the math symbol greater-than-or-equal  
displays as geqq.

However, ViewPDF (pdflatex) does produce the correct symbols.

Roger




Re: [patch] tex2lyx crash when full path is given from commandline on Win32

2007-06-16 Thread hzluo
I didn't check that yet. And your suggestion resolves different problem of 
Win32 platform.
So we need both patches to enable lyx support CJK filename on all Win32 
platform.


Hangzai

- Original Message - 
Sent: Saturday, June 16, 2007 6:10 AM
Subject: Re: [patch] tex2lyx crash when full path is given from commandline 
on Win32


What was from with the five lines or so I posted that uses
QCoreApplication::arguments()?

Andre' 




Re: 2007 LyX Meeting: Invitation

2007-06-16 Thread Martin Vermeer
On Fri, Jun 15, 2007 at 03:22:55PM +0200, Jean-Marc Lasgouttes wrote:
  Martin == Martin Vermeer [EMAIL PROTECTED] writes:
 
 Martin INVITATION
 
 Martin Hereby I invite everyone interested to participate in the ?th
 Martin International LyX Developers' Meeting in Bromarv, Western
 Martin Uusimaa, municipality of Ekenäs.
 
 What is the status? Who is coming and when? There are some convenient
 Air France Flights, but I need to know more about when to come. 
 
 Also, is 1 hour enough to go to city center and catch the bus?

The bus takes half an hour and goes at intervals of 20-30 minutes, 
also walking to the bus statin takes 10 min. So an hour is a bit tight. Take 
two hours at least. A taxi would be a backup option.

- Martin

 
 JMarc


Re: RC2 coming soon

2007-06-16 Thread Uwe Stöhr

Is there anything else that I am missing before RC2?


This bug is in my opinion a blocker because it makes tex2lyx nearly
unusable:
http://bugzilla.lyx.org/show_bug.cgi?id=3750

Hangzai Luo has sent a patch but besides general statements nobody
really provided a better patch for LyX 1.5:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg120560.html

regards Uwe


Re: Fwd: tear-off math panels

2007-06-16 Thread Edwin Leuven

Roger Mc Murtrie wrote:

Re Intel Mac OSX 10.4
Previous testing for both Mac and Linux done after make using src/lyx.
Now, after doing a make install on the Mac and starting  the resulting 
LyX.app, the correct characters are displayed for all palettes with the 
exception of the Big Operators palette for which only some work 
correctly while others are displayed as text strings such as oiint.
I assume this Big Operators problem might be due to some missing fonts 
in my system??


some missing pixmaps probably...


Re: [Cvslog] r18692 - /lyx-devel/trunk/src/LaTeXFeatures.cpp

2007-06-16 Thread Enrico Forestieri
On Sat, Jun 16, 2007 at 12:29:55PM +0200, Michael Gerz wrote:

 [EMAIL PROTECTED] schrieb:
  Author: rgheck
  Date: Wed Jun  6 21:33:57 2007
  New Revision: 18692
 
  URL: http://www.lyx.org/trac/changeset/18692
  Log:
  Fix bug 3823: Division needs not to return an integer.
 
  Also added some comments about a different possible fix.
 

 Two things:
  - Why do we divide by 255 and not by 256?

If the range [0, 255] is to be translated to the range [0.0, 1.0], you
must divide by 255 and not 256.

-- 
Enrico


Re: Meaning of Outline

2007-06-16 Thread Richard Heck

Alfredo Braunstein wrote:

As I can not click on Outline I can not know what this mean. I would thank
if somebody could tell me what of the following meanings, that appear in
the American Heritage Dictionary, is the correct one in this case:

07. A summary of a written work or speech, usually analyzed in headings
and subheadings.
12 A summary of a written work or speech, usually analyzed in headings and
subheadings.
15. A summary of a written work or speech, usually analyzed in headings
and subheadings.


7, 12, 15 (your dictionary is a bit redundant) ;-)
  

In this sense, an outline might look like this:
I. Introduction
A. First Topic
B. Second Topic
II. Section One
A. First Issue
i. First sub-issue
etc. I'm not sure any of the definitions, other than (7), quite get at 
this meaning. But maybe one would call that a formal outline or 
something of the sort.


Richard

--
==
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



[Fwd: Re: [Cvslog] r18692 - /lyx-devel/trunk/src/LaTeXFeatures.cpp]

2007-06-16 Thread Richard Heck

[EMAIL PROTECTED] schrieb:
Author: rgheck Date: Wed Jun  6 21:33:57 2007 New Revision: 18692 
URL: http://www.lyx.org/trac/changeset/18692 Log: Fix bug 3823: 
Division needs not to return an integer. Also added some comments 
about a different possible fix.   
Two things: - Why do we divide by 255 and not by 256? 

Enrico answered that one.
- There are two more places where a floating point division may be 
useful. 
Yes. Surprising no bug reports about that one, as it'll give the same problem. But anyway, 
we should just have: 


Index: LaTeXFeatures.cpp
===
--- LaTeXFeatures.cpp   (Revision 18800)
+++ LaTeXFeatures.cpp   (Arbeitskopie)
@@ -664,11 +664,11 @@
if (mustProvide(ct-xcolor-soul)) {
RGBColor cadd = RGBColor(lcolor.getX11Name(Color::addedtext));
macros  \\providecolor{lyxadded}{rgb}{
-   cadd.r/255  ','  cadd.g/255  ','  cadd.b/255  
}\n;
+   cadd.r / 255.0  ','  cadd.g / 255.0  ','  cadd.b / 255.0 
 }\n;

RGBColor cdel = RGBColor(lcolor.getX11Name(Color::deletedtext));
macros  \\providecolor{lyxdeleted}{rgb}{
-   cdel.r/255  ','  cdel.g/255  ','  cdel.b/255  
}\n;
+   cdel.r / 255.0  ','  cdel.g / 255.0  ','  cdel.b / 255.0 
 }\n;

macros  \\newcommand{\\lyxadded}[3]{{\\color{lyxadded}#3}}\n

\\newcommand{\\lyxdeleted}[3]{{\\color{lyxdeleted}\\st{#3}}}\n;




--
==
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



Re: [PATCH] Strip unused originaldir flag from Converters.{cpp,h}

2007-06-16 Thread Richard Heck


Jose, JMarc, Georg,

Views about whether this should now go in?

rh

Richard Heck wrote:

Georg Baum wrote:

Jean-Marc Lasgouttes wrote:

Extended.lyx has a reference to it related to literate programming.
Are you sure it is not relevant anymore? 
The problem is that it is horribly broken currently, and fixing it 
would be

a lot of work (see old discussions). I guess that writing a copier for
literate programming files would be easier than fixing originaldir, so I
think removing the flag is the right thing to do. 
I've now added the default copier for the Program format with the HTML 
export fix.
Yes, I think Georg and I talked about this a while ago, when I was 
pursuing HTML export a quite different way. We agreed that this was 
broken. In fact, it could lead to data loss, especially if you 
combined originaldir with other flags. I got bit by this once.


Regarding the Extended Features manual, I've removed the originaldir 
reference. I've also added a cross-reference to the now more extensive 
discussion of converters in the Customization manual.


So, shall I commit? The now current patch is attached. Note that the 
bit about configure.py is not yet included in the patch, as I've got 
other stuff going on there at the moment.


Richard

  


--
==
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

Index: src/Converter.cpp
===
--- src/Converter.cpp	(revision 18803)
+++ src/Converter.cpp	(working copy)
@@ -119,7 +119,7 @@
 		 string const  c, string const  l)
 	: from(f), to(t), command(c), flags(l),
 	  From(0), To(0), latex(false), xml(false),
-	  original_dir(false), need_aux(false)
+	  need_aux(false)
 {}
 
 
@@ -134,8 +134,6 @@
 			latex = true;
 		else if (flag_name == xml)
 			xml = true;
-		else if (flag_name == originaldir)
-			original_dir = true;
 		else if (flag_name == needaux)
 			need_aux = true;
 		else if (flag_name == resultdir)
@@ -400,12 +398,10 @@
 			}
 
 			// FIXME UNICODE
-			string const infile2 = (conv.original_dir)
-? infile.absFilename() : to_utf8(makeRelPath(from_utf8(infile.absFilename()),
-	 from_utf8(path)));
-			string const outfile2 = (conv.original_dir)
-? outfile.absFilename() : to_utf8(makeRelPath(from_utf8(outfile.absFilename()),
-	  from_utf8(path)));
+			string const infile2 = 
+to_utf8(makeRelPath(from_utf8(infile.absFilename()), from_utf8(path)));
+			string const outfile2 = 
+to_utf8(makeRelPath(from_utf8(outfile.absFilename()), from_utf8(path)));
 
 			string command = conv.command;
 			command = subst(command, token_from, quoteName(infile2));
@@ -428,19 +424,19 @@
 buffer-message(_(Executing command: )
 + from_utf8(command));
 
-			Systemcall::Starttype const type = (dummy)
-? Systemcall::DontWait : Systemcall::Wait;
 			Systemcall one;
 			int res;
-			if (conv.original_dir) {
-FileName path(buffer-filePath());
-support::Path p(path);
-res = one.startscript(type,
+			if (dummy) {
+res = one.startscript(Systemcall::DontWait,
 	to_filesystem8bit(from_utf8(command)));
-			} else
-res = one.startscript(type,
-	to_filesystem8bit(from_utf8(command)));
+// We're not waiting for the result, so we can't do anything
+// else here.
+return true; 
+			}
 
+			res = one.startscript(Systemcall::Wait,
+to_filesystem8bit(from_utf8(command)));
+			
 			if (!real_outfile.empty()) {
 Mover const  mover = getMover(conv.to);
 if (!mover.rename(outfile, real_outfile))
Index: src/Converter.h
===
--- src/Converter.h	(revision 18803)
+++ src/Converter.h	(working copy)
@@ -55,8 +55,6 @@
 	bool latex;
 	/// The converter is xml
 	bool xml;
-	/// Do we need to run the converter in the original directory?
-	bool original_dir;
 	/// This converter needs the .aux files
 	bool need_aux;
 	/// If the converter put the result in a directory, then result_dir
Index: lib/doc/Extended.lyx
===
--- lib/doc/Extended.lyx	(revision 18803)
+++ lib/doc/Extended.lyx	(working copy)
@@ -1,5 +1,5 @@
-#LyX 1.5.0rc1 created this file. For more info see http://www.lyx.org/
-\lyxformat 271
+#LyX 1.5.0svn created this file. For more info see http://www.lyx.org/
+\lyxformat 274
 \begin_document
 \begin_header
 \textclass book
@@ -38,7 +38,6 @@
 \tracking_changes false
 \output_changes false
 \author usti 
-\author Richard Heck 
 \end_header
 
 \begin_body
@@ -17901,7 +17900,7 @@
 If the document is of any literate class LyX will then use the internal
  LyX 

Re: [Fwd: Re: [Cvslog] r18692 - /lyx-devel/trunk/src/LaTeXFeatures.cpp]

2007-06-16 Thread Enrico Forestieri
On Sat, Jun 16, 2007 at 11:08:19AM -0400, Richard Heck wrote:

  - There are two more places where a floating point division may be 
  useful. 
 Yes. Surprising no bug reports about that one, as it'll give the same 
 problem. But anyway, 
 we should just have: 

Yes. Possibly, limiting the precision to two decimal digits, as in the
other case.

-- 
Enrico


Re: UTF8-UCS4 failure on FreeBSD 6.2-RELEASE

2007-06-16 Thread Koji Yokota

Jean-Marc Lasgouttes wrote:

Koji == Koji Yokota [EMAIL PROTECTED] writes:



Koji Then, is a sort of modification as the attached patch
Koji acceptable? It seems it solved the problem and is working fine!

This particular patch does not look good, but we'll find one around
this idea. Isn't there some define that we can test against to detect
the faulty freebsd versions?
  
I'm not quite sure whether _GLIBCPP_USE_WCHAR_T is set in forthcoming 
7.0-release, but as far as judging from the documentation which comes 
with the newest gcc-4.2 which 7.0-release will adopt, it probably is 
not. If it is the case, all versions of FreeBSD at this moment do not 
support it. So simply look at the define __FreeBSD__?


Koji


Re: [Cvslog] r18692 - /lyx-devel/trunk/src/LaTeXFeatures.cpp

2007-06-16 Thread Michael Gerz

Hi,

Based on Enrico's comment, here comes a shorter patch.

I need one more OK.

Michael

Index: LaTeXFeatures.cpp
===
--- LaTeXFeatures.cpp	(Revision 18800)
+++ LaTeXFeatures.cpp	(Arbeitskopie)
@@ -499,7 +499,7 @@
 		//in InsetNote::validate().
 		int const stmSize = packages.precision(2);
 		packages  \\definecolor{shadecolor}{rgb}{
-			 c.r/255.0  ','  c.g/255.0  ','  c.b/255.0  }\n;
+			 c.r / 255.0  ','  c.g / 255.0  ','  c.b / 255.0  }\n;
 		packages.precision(stmSize);
 	}
 
@@ -664,11 +664,11 @@
 	if (mustProvide(ct-xcolor-soul)) {
 		RGBColor cadd = RGBColor(lcolor.getX11Name(Color::addedtext));
 		macros  \\providecolor{lyxadded}{rgb}{
-		cadd.r/255  ','  cadd.g/255  ','  cadd.b/255  }\n;
+		cadd.r / 255.0  ','  cadd.g / 255.0  ','  cadd.b / 255.0  }\n;
 
 		RGBColor cdel = RGBColor(lcolor.getX11Name(Color::deletedtext));
 		macros  \\providecolor{lyxdeleted}{rgb}{
-		cdel.r/255  ','  cdel.g/255  ','  cdel.b/255  }\n;
+		cdel.r / 255.0  ','  cdel.g / 255.0  ','  cdel.b / 255.0  }\n;
 
 		macros  \\newcommand{\\lyxadded}[3]{{\\color{lyxadded}#3}}\n
 		\\newcommand{\\lyxdeleted}[3]{{\\color{lyxdeleted}\\st{#3}}}\n;


Re: [Cvslog] r18692 - /lyx-devel/trunk/src/LaTeXFeatures.cpp

2007-06-16 Thread Michael Gerz

Sorry, folks :-(

Here comes a better patch.

Still one more OK needed.

Michael

Index: LaTeXFeatures.cpp
===
--- LaTeXFeatures.cpp	(Revision 18800)
+++ LaTeXFeatures.cpp	(Arbeitskopie)
@@ -499,7 +499,7 @@
 		//in InsetNote::validate().
 		int const stmSize = packages.precision(2);
 		packages  \\definecolor{shadecolor}{rgb}{
-			 c.r/255.0  ','  c.g/255.0  ','  c.b/255.0  }\n;
+			 c.r / 255.0  ','  c.g / 255.0  ','  c.b / 255.0  }\n;
 		packages.precision(stmSize);
 	}
 
@@ -662,14 +662,18 @@
 		macros  changetracking_dvipost_def;
 	}
 	if (mustProvide(ct-xcolor-soul)) {
+		int const prec = macros.precision(2);
+	
 		RGBColor cadd = RGBColor(lcolor.getX11Name(Color::addedtext));
 		macros  \\providecolor{lyxadded}{rgb}{
-		cadd.r/255  ','  cadd.g/255  ','  cadd.b/255  }\n;
+		cadd.r / 255.0  ','  cadd.g / 255.0  ','  cadd.b / 255.0  }\n;
 
 		RGBColor cdel = RGBColor(lcolor.getX11Name(Color::deletedtext));
 		macros  \\providecolor{lyxdeleted}{rgb}{
-		cdel.r/255  ','  cdel.g/255  ','  cdel.b/255  }\n;
+		cdel.r / 255.0  ','  cdel.g / 255.0  ','  cdel.b / 255.0  }\n;
 
+		macros.precision(prec);
+
 		macros  \\newcommand{\\lyxadded}[3]{{\\color{lyxadded}#3}}\n
 		\\newcommand{\\lyxdeleted}[3]{{\\color{lyxdeleted}\\st{#3}}}\n;
 	}


Re: [Cvslog] r18692 - /lyx-devel/trunk/src/LaTeXFeatures.cpp

2007-06-16 Thread Richard Heck

Michael Gerz wrote:

Hi,

Based on Enrico's comment, here comes a shorter patch.

I need one more OK.

As Enrico mentioned, you probably want the limiting-precision bit here, too:

if (mustProvide(ct-xcolor-soul)) {
RGBColor cadd = RGBColor(lcolor.getX11Name(Color::addedtext));
+   int const stmSize = macros.precision(2);

macros  \\providecolor{lyxadded}{rgb}{
-   cadd.r/255  ','  cadd.g/255  ','  cadd.b/255  
}\n;
+   cadd.r / 255.0  ','  cadd.g / 255.0  ','  cadd.b / 255.0 
 }\n;

RGBColor cdel = RGBColor(lcolor.getX11Name(Color::deletedtext));
macros  \\providecolor{lyxdeleted}{rgb}{
-   cdel.r/255  ','  cdel.g/255  ','  cdel.b/255  
}\n;
+   cdel.r / 255.0  ','  cdel.g / 255.0  ','  cdel.b / 255.0 
 }\n;

+   marcos.precision(stmSize);

macros  \\newcommand{\\lyxadded}[3]{{\\color{lyxadded}#3}}\n

\\newcommand{\\lyxdeleted}[3]{{\\color{lyxdeleted}\\st{#3}}}\n;


With that, I say OK, too.

Richard



Michael



  



--
==
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



Re: [Cvslog] r18692 - /lyx-devel/trunk/src/LaTeXFeatures.cpp

2007-06-16 Thread Richard Heck


Beat me to it. Definitely OK, then.

Michael Gerz wrote:

Sorry, folks :-(

Here comes a better patch.

Still one more OK needed.

Michael



Index: LaTeXFeatures.cpp
===
--- LaTeXFeatures.cpp   (Revision 18800)
+++ LaTeXFeatures.cpp   (Arbeitskopie)
@@ -499,7 +499,7 @@
//in InsetNote::validate().
int const stmSize = packages.precision(2);
packages  \\definecolor{shadecolor}{rgb}{
-c.r/255.0  ','  c.g/255.0  ','  c.b/255.0  
}\n;
+c.r / 255.0  ','  c.g / 255.0  ','  c.b / 255.0  
}\n;
packages.precision(stmSize);
}
 
@@ -662,14 +662,18 @@

macros  changetracking_dvipost_def;
}
if (mustProvide(ct-xcolor-soul)) {
+   int const prec = macros.precision(2);
+   
RGBColor cadd = RGBColor(lcolor.getX11Name(Color::addedtext));
macros  \\providecolor{lyxadded}{rgb}{
-   cadd.r/255  ','  cadd.g/255  ','  cadd.b/255  
}\n;
+   cadd.r / 255.0  ','  cadd.g / 255.0  ','  cadd.b / 255.0 
 }\n;
 
 		RGBColor cdel = RGBColor(lcolor.getX11Name(Color::deletedtext));

macros  \\providecolor{lyxdeleted}{rgb}{
-   cdel.r/255  ','  cdel.g/255  ','  cdel.b/255  
}\n;
+   cdel.r / 255.0  ','  cdel.g / 255.0  ','  cdel.b / 255.0 
 }\n;
 
+		macros.precision(prec);

+
macros  \\newcommand{\\lyxadded}[3]{{\\color{lyxadded}#3}}\n

\\newcommand{\\lyxdeleted}[3]{{\\color{lyxdeleted}\\st{#3}}}\n;
}
  



--
==
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



Shaded note = Colored Note???

2007-06-16 Thread Michael Gerz

Hi,

why is a shaded note called shaded? AFAICS, a shaded note is in fact 
a colored note both on screen and in LaTeX output!


I suggest renaming the menu item and the underlying code. If you agree, 
I will prepare a patch.


Michael


Re: Edit-Table Settings dialog

2007-06-16 Thread Michael Gerz

José Matos schrieb:

On Tuesday 15 May 2007 10:51:47 Abdelrazak Younes wrote:
  

Nothing. Close would be better though... Or maybe no button at all.



 I prefer Done but Close is OK. Cancel is indeed confusing. :-)
  

What was the reason that nobody fixed this?

Michael


Re: Shaded note = Colored Note???

2007-06-16 Thread Richard Heck

Michael Gerz wrote:

Hi,

why is a shaded note called shaded? AFAICS, a shaded note is in 
fact a colored note both on screen and in LaTeX output!
I have no idea. When I added that menu entry, I stuck with the existing 
terminology.
I suggest renaming the menu item and the underlying code. If you 
agree, I will prepare a patch.

I agree.

Richard

--
==
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



Re: RC2 coming soon

2007-06-16 Thread Georg Baum
Am Samstag, 16. Juni 2007 16:12 schrieb Uwe Stöhr:
  Is there anything else that I am missing before RC2?
 
 This bug is in my opinion a blocker because it makes tex2lyx nearly
 unusable:
 http://bugzilla.lyx.org/show_bug.cgi?id=3750

Annoying? Yes. Should be fixed? Yes. Unusable? No. It will simply translate 
captions to ERT, that is all.

 Hangzai Luo has sent a patch but besides general statements nobody
 really provided a better patch for LyX 1.5:
 http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg120560.html

This patch generates an invalid file. If you apply it you will rpeat the 
relyx mistakes. I wrote in http://bugzilla.lyx.org/show_bug.cgi?id=3750#c3 
what could be done alternatively.


Georg


[PATCH] Child TOC Crash, Again

2007-06-16 Thread Richard Heck


The attached patch builds on Abdel's earlier work and, I think, solves 
the remaining problems. Whether this is the best way to do it, I'm not 
sure. Abdel was talking about a more major re-organization of the code, 
but maybe that could wait.


What I've done is add an optional argument to LFUN_BUFFER_CHILD_OPEN 
indicating whether the file is being auto-loaded. (Contrary to what I 
said before, this is ok, since we're expecting a valid LyX filename, and 
one isn't going to end with |true.) There are also corresponding 
booleans in LyXView::loadLyXFile and BufferView::loadLyXFile.


Abdel, I'll leave it up to you to decide what's best here. But either 
way, please see the long FIXME at the end of LyXView::loadLyXFile(). It 
looks to me as if we're doing a lot of things twice.


Richard

--
==
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

Index: src/Buffer.cpp
===
--- src/Buffer.cpp	(revision 18803)
+++ src/Buffer.cpp	(working copy)
@@ -1616,7 +1616,11 @@
 
 void Buffer::setParentName(string const  name)
 {
-	params().parentname = name;
+	if (name == pimpl_-filename.absFilename())
+		// Avoids recursive include.
+		params().parentname.clear();
+	else
+		params().parentname = name;
 }
 
 
Index: src/BufferView.cpp
===
--- src/BufferView.cpp	(revision 18803)
+++ src/BufferView.cpp	(working copy)
@@ -233,8 +233,8 @@
 		graphics::Previews::get().generateBufferPreviews(*buffer_);
 }
 
-
-bool BufferView::loadLyXFile(FileName const  filename, bool tolastfiles)
+// FIXME: all of this should go in a helper file in buffer_func.
+Buffer * BufferView::loadLyXFile(FileName const  filename, bool auto_open)
 {
 	// File already open?
 	if (theBufferList().exists(filename.absFilename())) {
@@ -246,12 +246,13 @@
 			text, 0, 1,  _(Revert), _(Switch to document));
 
 		if (ret != 0) {
-			setBuffer(theBufferList().getBuffer(filename.absFilename()));
-			return true;
+  Buffer * buf = theBufferList().getBuffer(filename.absFilename());
+			setBuffer(buf);
+			return buf;
 		}
 		// FIXME: should be LFUN_REVERT
 		if (!theBufferList().close(theBufferList().getBuffer(filename.absFilename()), false))
-			return false;
+			return 0;
 		// Fall through to new load. (Asger)
 		buffer_ = 0;
 	}
@@ -262,7 +263,7 @@
 		b = theBufferList().newBuffer(filename.absFilename());
 		if (!lyx::loadLyXFile(b, filename)) {
 			theBufferList().release(b);
-			return false;
+			return 0;
 		}
 	} else {
 		docstring text = bformat(_(The document %1$s does not yet 
@@ -274,34 +275,15 @@
 		if (ret == 0) {
 			b = newFile(filename.absFilename(), string(), true);
 			if (!b)
-return false;
+return 0;
 		} else
-			return false;
+			return 0;
 	}
 
-	setBuffer(b);
-	// Send the errors signal in case of parsing errors
-	b-errors(Parse);
+  if (!auto_open)
+  	setBuffer(b);
 
-	// Update the labels and section numbering.
-	updateLabels(*buffer_);
-	// scroll to the position when the file was last closed
-	if (lyxrc.use_lastfilepos) {
-		pit_type pit;
-		pos_type pos;
-		boost::tie(pit, pos) = LyX::ref().session().lastFilePos().load(filename);
-		// if successfully move to pit (returned par_id is not zero), update metrics and reset font
-		if (moveToPosition(pit, pos, 0, 0).get1()) {
-			if (fitCursor())
-updateMetrics(false);
-			buffer_-text().setCurrentFont(cursor_);
-		}
-	}
-
-	if (tolastfiles)
-		LyX::ref().session().lastFiles().add(FileName(b-fileName()));
-
-	return true;
+	return b;
 }
 
 
Index: src/BufferView.h
===
--- src/BufferView.h	(revision 18803)
+++ src/BufferView.h	(working copy)
@@ -94,7 +94,8 @@
 	void resize();
 
 	/// load a buffer into the view.
-	bool loadLyXFile(support::FileName const  name, bool tolastfiles = true);
+  /// returns the buffer or 0 if not loaded
+	Buffer * loadLyXFile(support::FileName const  name, bool auto_open = false);
 
 	/// perform pending metrics updates.
 	/** \c Update::FitCursor means first to do a FitCursor, and to
Index: src/LyX.cpp
===
--- src/LyX.cpp	(revision 18803)
+++ src/LyX.cpp	(working copy)
@@ -613,7 +613,7 @@
 	if (!pimpl_-files_to_load_.empty()) {
 		for_each(pimpl_-files_to_load_.begin(),
 			pimpl_-files_to_load_.end(),
-			bind(LyXView::loadLyXFile, view, _1, true));
+			bind(LyXView::loadLyXFile, view, _1, true, false, false));
 		// clear this list to save a few bytes of RAM
 		pimpl_-files_to_load_.clear();
 		pimpl_-session_-lastOpened().clear();
@@ 

Re: Sample test files and improved patch Re: [patch] Enable tex2lyx read back lyx exported .tex as much as possible

2007-06-16 Thread Georg Baum
Am Samstag, 16. Juni 2007 06:31 schrieb hzluo:

 2. I also dislike current tex2lyx structure. But I also
dislike the idea of python script. If let me make the
choice, I will choose flex, or flex+bison. Flex syntax
is extremely suitable for parsers, for both programming
and maintenance. I don't see any advantage of python
at this point. Certainly, flex in it's original state
is not suitable to be used to develop tex2lyx. We need
several distict features that are not supported by
original flex. But we can make our improved flex.
And it's not difficult at all. I believe we just need
to have a new template for the code generation. I have
used flex as this way, and I have a template that is
able to support true C++ lexer, abstract input/output,
etc. If needed, I can distribute my work to this community
and make some improvements to satisfy the tex2lyx needs.
And, another benefit of flex is speed. I assure it will
be much faster than current C++ code.

I have used flex in the past, and it is really a great tool for writing 
parsers. The problem is that you need a grammar for these tools, and it is 
impossible to construct one for TeX/LaTeX.
Believe me, the basic TeX parser in tex2lyx is quite good, and if you can 
use a tool like flex at all you will still need to add a lot of manual 
code.
Improving the speed of the existing code should be easy, speed issues have 
been almost ignored for now.

 4. As of incorrect file format, my idea is, if tex2lyx+lyx2lyx
produces correct output, we can think it's OK.

IMO no. This approach has caused troubles with relyx in the past.

Because we always 
go tex2lyx+lyx2lyx. If needed, we can call lyx2lyx in tex2lyx,
so that the final output of tex2lyx is absolutely valid.

That would be an interesting intermediate option, but it would need to be 
well documented at the places where future stuff is written to the file.

And in 
this way, the encoding problem is also solved.

The encoding problem is not solved, because tex2lyx implicitly assumes 
latin1 encoding in a few places and can only convert some files in other 
encodings.


Georg


Re: [PATCH] Strip unused originaldir flag from Converters.{cpp,h}

2007-06-16 Thread Georg Baum
Am Samstag, 16. Juni 2007 17:20 schrieb Richard Heck:
 
 Jose, JMarc, Georg,
 
 Views about whether this should now go in?

I think so, but why this return statement?

+   // We're not waiting for the result, so we 
can't do anything
+   // else here.
+   return true; 

AFAICS this is not equivalent to the old code.


Georg


Toolbar status - Translation Problem

2007-06-16 Thread Michael Gerz

Hi,

this patch fixes a problem with an untranslated toolbar name.

OK?

Michael
Index: src/LyXFunc.cpp
===
--- src/LyXFunc.cpp	(Revision 18805)
+++ src/LyXFunc.cpp	(Arbeitskopie)
@@ -1758,20 +1758,19 @@
 		case LFUN_TOOLBAR_TOGGLE: {
 			BOOST_ASSERT(lyx_view_);
 			string const name = cmd.getArg(0);
-			bool const allowauto = cmd.getArg(1) == allowauto;
+			bool const allowauto = (cmd.getArg(1) == allowauto);
 			lyx_view_-toggleToolbarState(name, allowauto);
-			ToolbarInfo::Flags const flags = 
-lyx_view_-getToolbarState(name);
+			ToolbarInfo const  tbi = lyx_view_-getToolbarInfo(name);
 			docstring state;
-			if (flags  ToolbarInfo::ON)
+			if (tbi.flags  ToolbarInfo::ON)
 state = _(on);
-			else if (flags  ToolbarInfo::OFF)
+			else if (tbi.flags  ToolbarInfo::OFF)
 state = _(off);
-			else if (flags  ToolbarInfo::AUTO)
+			else if (tbi.flags  ToolbarInfo::AUTO)
 state = _(auto);
 
 			setMessage(bformat(_(Toolbar \%1$s\ state set to %2$s), 
-		   from_ascii(name), state));
+			   _(tbi.gui_name), state));
 			break;
 		}
 
Index: src/frontends/Toolbars.cpp
===
--- src/frontends/Toolbars.cpp	(Revision 18805)
+++ src/frontends/Toolbars.cpp	(Arbeitskopie)
@@ -169,21 +169,22 @@
 }
 
 
-ToolbarInfo::Flags Toolbars::getToolbarState(string const  name)
+ToolbarInfo const  Toolbars::getToolbarInfo(string const  name)
 {
 	ToolbarBackend::Toolbars::const_iterator cit = toolbarbackend.begin();
 	ToolbarBackend::Toolbars::const_iterator end = toolbarbackend.end();
 
 	for (; cit != end; ++cit) {
 		if (cit-name == name)
-			return cit-flags;
+			return *cit;
 	}
 
 	LYXERR(Debug::GUI)  Toolbar::display: no toolbar named 
 		 name  endl;
 
 	// return dummy for msvc
-	return ToolbarInfo::OFF;
+	static ToolbarInfo dummy;
+	return dummy;
 }
 
 
Index: src/frontends/Toolbars.h
===
--- src/frontends/Toolbars.h	(Revision 18805)
+++ src/frontends/Toolbars.h	(Arbeitskopie)
@@ -91,7 +91,7 @@
 	void display(std::string const  name, bool show);
 
 	/// get toolbar state (on/off/auto)
-	ToolbarInfo::Flags getToolbarState(std::string const  name);
+	ToolbarInfo const  getToolbarInfo(std::string const  name);
 
 	/** toggle the state of toolbars (on/off/auto). Skip auto
 	 * when allowauto is false.
Index: src/frontends/LyXView.cpp
===
--- src/frontends/LyXView.cpp	(Revision 18805)
+++ src/frontends/LyXView.cpp	(Arbeitskopie)
@@ -347,9 +347,9 @@
 }
 
 
-ToolbarInfo::Flags LyXView::getToolbarState(string const  name)
+ToolbarInfo const  LyXView::getToolbarInfo(string const  name)
 {
-	return toolbars_-getToolbarState(name);
+	return toolbars_-getToolbarInfo(name);
 }
 
 
Index: src/frontends/LyXView.h
===
--- src/frontends/LyXView.h	(Revision 18805)
+++ src/frontends/LyXView.h	(Arbeitskopie)
@@ -153,8 +153,8 @@
 
 	/// update the toolbar
 	void updateToolbars();
-	/// get toolbar state
-	ToolbarInfo::Flags getToolbarState(std::string const  name);
+	/// get toolbar info
+	ToolbarInfo const  getToolbarInfo(std::string const  name);
 	/// toggle toolbar state
 	void toggleToolbarState(std::string const  name, bool allowauto);
 	/// update the menubar


bad bugzilla news

2007-06-16 Thread Uwe Stöhr

I've just found another crash:
http://bugzilla.lyx.org/show_bug.cgi?id=3875

two regressions:
http://bugzilla.lyx.org/show_bug.cgi?id=3876
http://bugzilla.lyx.org/show_bug.cgi?id=3877
(3877 should be fixed for LyX 1.5.0 when we want to keep our promise to bring 
the speed back)

and in my opinion another showstopper:
http://bugzilla.lyx.org/show_bug.cgi?id=3878

Note that we already have these two crash bugs without a known patch
http://bugzilla.lyx.org/show_bug.cgi?id=3561
http://bugzilla.lyx.org/show_bug.cgi?id=3859

regards Uwe


help needed for bug 3878

2007-06-16 Thread Uwe Stöhr
Bug 3878 http://bugzilla.lyx.org/show_bug.cgi?id=3878 prevents the Userguide from beeing compiled, 
so I tried to fix this quickly.


The attahed patch fixes this bug but reintroduce bug 1942 
http://bugzilla.lyx.org/show_bug.cgi?id=1942 because the patch for bug 1942 is incorrect. The 
correct fix would be not to use the wasy symbols for \iint and \iiint. Could anybody help me how to 
do this because I've never worked on the math code of LyX yet.


thanks and regards
Uwe
Index: LaTeXFeatures.cpp
===
--- LaTeXFeatures.cpp	(revision 18805)
+++ LaTeXFeatures.cpp	(working copy)
@@ -431,37 +431,27 @@
 	ostringstream packages;
 	TextClass const  tclass = params_.getTextClass();
 
+	// some packages redefine amsmath commands e.g. waswasym redefines \iint,
+	// therefore amsmath must be the first loaded package
+	// see http://bugzilla.lyx.org/show_bug.cgi?id=3878
+	if (mustProvide(amsmath)
+	 params_.use_amsmath != BufferParams::package_off) {
+		packages  \\usepackage{amsmath}\n;
+	}
+
+	// These are all the 'simple' includes. i.e
+	// packages which we just \usepackage{package}
 	//
-	//  These are all the 'simple' includes.  i.e
-	//  packages which we just \usepackage{package}
-	//
 	for (int i = 0; i  nb_simplefeatures; ++i) {
 		if (mustProvide(simplefeatures[i]))
 			packages  \\usepackage{
   simplefeatures[i]  }\n;
 	}
 
-	//
 	// The rest of these packages are somewhat more complicated
 	// than those above.
 	//
 
-	if (mustProvide(amsmath)
-	 params_.use_amsmath != BufferParams::package_off) {
-		packages  \\usepackage{amsmath}\n;
-	}
-
-	// wasysym is a simple feature, but it must be after amsmath if both
-	// are used
-	// wasysym redefines some integrals (e.g. iint) from amsmath. That
-	// leads to inconsistent integrals. We only load this package if
-	// esint is used, since esint redefines all relevant integral
-	// symbols from wasysym and amsmath.
-	// See http://bugzilla.lyx.org/show_bug.cgi?id=1942
-	if (mustProvide(wasysym)  isRequired(esint) 
-	params_.use_esint != BufferParams::package_off)
-		packages  \\usepackage{wasysym}\n;
-
 	// color.sty
 	if (mustProvide(color)) {
 		if (params_.graphicsDriver == default)


Re: Shaded note = Colored Note???

2007-06-16 Thread Uwe Stöhr

 I suggest renaming the menu item and the underlying code. If you agree, I 
will prepare a patch.
 I agree.

Me too.

Uwe


Re: Meaning of Outline

2007-06-16 Thread Ramon Flores
Richard Heck wrote:

 Alfredo Braunstein wrote:
  07. A summary of a written work or speech, usually analyzed in headings
and subheadings.

7, 12, 15 (your dictionary is a bit redundant) ;-)

In this sense, an outline might look like this:
I. Introduction
A. First Topic
B. Second Topic
II. Section One
A. First Issue
i. First sub-issue

etc. I'm not sure any of the definitions, other than (7), quite get at this
meaning. But maybe one would call that a formal outline or something of the 
sort.  

And what is the difference between Outline and TOC ?

Thanks

Ramon


Re: Meaning of Outline

2007-06-16 Thread Mael Hilléreau

Le 16 juin 07 à 20:26, Ramon Flores a écrit :


Richard Heck wrote:


Alfredo Braunstein wrote:
 07. A summary of a written work or speech, usually analyzed in  
headings

   and subheadings.


   7, 12, 15 (your dictionary is a bit redundant) ;-)



In this sense, an outline might look like this:
I. Introduction
A. First Topic
B. Second Topic
II. Section One
A. First Issue
i. First sub-issue

etc. I'm not sure any of the definitions, other than (7), quite  
get at this
meaning. But maybe one would call that a formal outline or  
something of the

sort.


And what is the difference between Outline and TOC ?


Outline is probably more general: you can display TOC, LOF, LOT, or LOA.

Mael.




Re: [PATCH] Child TOC Crash, Again

2007-06-16 Thread Abdelrazak Younes

Richard Heck wrote:


The attached patch builds on Abdel's earlier work and, I think, solves 
the remaining problems. Whether this is the best way to do it, I'm not 
sure. Abdel was talking about a more major re-organization of the code, 
but maybe that could wait.


Maybe yes.



What I've done is add an optional argument to LFUN_BUFFER_CHILD_OPEN 
indicating whether the file is being auto-loaded. (Contrary to what I 
said before, this is ok, since we're expecting a valid LyX filename, and 
one isn't going to end with |true.) There are also corresponding 
booleans in LyXView::loadLyXFile and BufferView::loadLyXFile.


At this point BufferView::loadLyXFile() do not need to be a member of 
BufferView so please put that in buffer_func.cpp along the other 
loadLyXFile().




Abdel, I'll leave it up to you to decide what's best here.


I am fine with your addition and as it looks like I won't have time to 
do more work on this before RC2, I'd say put it in (Jose and Stefan 
already gave their OK). Please re-use my SVN log posted with the patch.



But either 
way, please see the long FIXME at the end of LyXView::loadLyXFile(). It 
looks to me as if we're doing a lot of things twice.


Yes and that's what I was going to cleanup but you're probably right, 
this can wait :-)


Thanks,
Abdel.



XPM images --- a thought

2007-06-16 Thread Angus Leeming
LyX still uses XPM images in lib/images. The XPM format is plain text, 
so it still makes sense to store XPM files in the SVN repository 
because we get versioning history for free. Clearly, that's not the 
case if we were to store a binary image format like PNG.


However, in these days of a PNG-aware frontend, it does seem strange 
that we still ship these XPM files to our consumers. Here's a thought: 
why don't we make the XPM - PNG transformation part of the build 
process and ship the resulting PNGs?


Angus (just musing)



Meaning of Outline

2007-06-16 Thread Ramon Flores
Hi:

I am the translator of LyX to Galician. I have found a (killer) bug for the 
LyX-1.5.0rc1, and I have open the following report
=
Bug#: 3872

When I click in Document->Outline LyX crashed with the following message:

Assertion triggered in const lyx::docstring lyx::from_ascii(const char*) by
failing check "static_cast(*c) < 0x80" in file docstring.cpp:32

I am using lyx-1.5.0rc1 on Mandriva 2007.
==

As I can not click on Outline I can not know what this mean. I would thank if 
somebody could tell me what of the following meanings, that appear in the 
American Heritage Dictionary, is the correct one in this case:

01. A line marking the outer contours or boundaries of an object or figure.
02. The shape of an object or figure.
03. A style of drawing in which objects are delineated in contours without 
shading.
04. A sketch done in this style.
05. A general description covering the main points of a subject: an outline of 
American literature.
06. A statement summarizing the important points of a text.
07. A summary of a written work or speech, usually analyzed in headings and 
subheadings.
08. A style of drawing in which objects are delineated in contours without 
shading.
09. A sketch done in this style.
10 A general description covering the main points of a subject: an outline of 
American literature.
11 A statement summarizing the important points of a text.
12 A summary of a written work or speech, usually analyzed in headings and 
subheadings.
13. A general description covering the main points of a subject: an outline of 
American literature.
14. A statement summarizing the important points of a text.
15. A summary of a written work or speech, usually analyzed in headings and 
subheadings.
16. A preliminary draft or plan, as of a project or proposal.


Thanks
Ramon


Re: Meaning of Outline

2007-06-16 Thread Alfredo Braunstein
Hi,

Ramon Flores wrote:

> Assertion triggered in const lyx::docstring lyx::from_ascii(const char*)
> by failing check "static_cast(*c) < 0x80" in file
> docstring.cpp:32

I believe this bug is solved in the development version.
 
> I am using lyx-1.5.0rc1 on Mandriva 2007.
> ==
> 
> As I can not click on Outline I can not know what this mean. I would thank
> if somebody could tell me what of the following meanings, that appear in
> the American Heritage Dictionary, is the correct one in this case:
> 
> 01. A line marking the outer contours or boundaries of an object or
> figure. 02. The shape of an object or figure.
> 03. A style of drawing in which objects are delineated in contours without
> shading.
> 04. A sketch done in this style.
> 05. A general description covering the main points of a subject: an
> outline of American literature.
> 06. A statement summarizing the important points of a text.
> 07. A summary of a written work or speech, usually analyzed in headings
> and subheadings.
> 08. A style of drawing in which objects are delineated in contours without
> shading.
> 09. A sketch done in this style.
> 10 A general description covering the main points of a subject: an outline
> of American literature.
> 11 A statement summarizing the important points of a text.
> 12 A summary of a written work or speech, usually analyzed in headings and
> subheadings.
> 13. A general description covering the main points of a subject: an
> outline of American literature.
> 14. A statement summarizing the important points of a text.
> 15. A summary of a written work or speech, usually analyzed in headings
> and subheadings.
> 16. A preliminary draft or plan, as of a project or proposal.

7, 12, 15 (your dictionary is a bit redundant) ;-)

Regards,

A/




Re: [patch] Space displayed after macro, #3705

2007-06-16 Thread Andre Poenitz
On Fri, Jun 15, 2007 at 08:39:14AM +0200, Stefan Schimanski wrote:
> Here is a patch for http://bugzilla.lyx.org/show_bug.cgi?id=3705. It  
> adds the kerning method to a macro to inherit the kerning from the  
> expanded form. Moreover the marker metrics calls are remove as they  
> are not drawn anyway.
> 
> Stefan
> 
> Index: src/mathed/MathMacro.h
> ===
> --- src/mathed/MathMacro.h(Revision 18774)
> +++ src/mathed/MathMacro.h(Arbeitskopie)
> @@ -54,6 +54,8 @@
>   ///
>   docstring name() const;
>   ///
> + int kerning() const { return kerning_; }

Could that be 

int kerning() const { return expanded_.kerning(); }

or is expanded_ smashed before we access its kerning?

Andre'


Re: RC2 coming soon

2007-06-16 Thread José Matos
On Friday 15 June 2007 19:50:42 Richard Heck wrote:
> I think it'd be nice to have Abdel's child docs TOC patch by then. I'm
> working on it now. There are still some issues.

  I agree. :-)
  And I said that already in another thread. :-)

> Richard

-- 
José Abílio


Re: RC2 coming soon

2007-06-16 Thread José Matos
On Friday 15 June 2007 23:44:27 Edwin Leuven wrote:
> José Matos wrote:
> > Hi all,
> > I will start looking to remaining issues before RC2, AFAIR there are two
> > patches that I would like to have before the release, one by Jürgen that
> > has a file format change and another related with reverting documents to
> > 1.4.
> >
> > Is there anything else that I am missing before RC2?
>
> tearing of math panels using attached patch?

This patch breaks the rule that only bugfixes should go after RC1.

On the other hand there is life after 1.5.0 release. :-)

If no one opposes this patch and I have thumbs up from people testing the code 
I will consider it. Fair enough?
-- 
José Abílio


Re: user auth patches

2007-06-16 Thread José Matos
On Friday 15 June 2007 20:42:58 Peter Kümmel wrote:
> Sorry, ;) The result of the reply rules: I press reply and choose the
> mailing list.

I think this is part of your secret agenda to push dbus into lyx. ;-)

-- 
José Abílio


Re: [patch] tex2lyx crash when full path is given from commandline on Win32

2007-06-16 Thread Andre Poenitz
On Fri, Jun 15, 2007 at 11:39:23PM -0400, hzluo wrote:
> >We've been relaxing the rules lately; support/ uses
> >QtCore for a number of things and I think it would
> >be much saner at this point to use QFileInfo, QProcess
> >and QNetwork to replace our hand-made local code.
> >If somebody steps up to encapsulate this Qt API
> >in our API (forkedControllers, Socket and FileName)
> >he will have at least my full support (and help) and
> >probably not much resistance from others.
> 
> But it needs a _lot_ of change. All file open/create
> must be patched. As a result, the work needs the involvement
> of the whole lyx development community. It's kind of
> impossible thing for me. And I don't think it's worth
> to do so. Certainly, if this problem lies not only
> on Windows but also on other platforms, it may worth
> to have a though clean of the code.
> 
> And I just tested that Qt converts the filenames between
> local encoding and UTF-32 correctly. So the evil is solely
> from M$'s disgusting stdc++ library. I really hate this --
> even though Win32 API supports local encoding very well,
> M$'s clib breaks it completely..
> 
> I'm trying to hack the disgusting M$ stdc++ library
> to allow proper local 8-bit filename support. In that
> way we do not need to patch anything other than M$ library.
> And one programer is enough. If this problem affects
> only Windows, I believe it's good enough.
> 
> Now the remaining problem is to test whether other platforms
> and compilers/stdc++ libararies have the same problem.
> I do not have access to such platforms so I can't do the test.
> Could anyone help to test it?

What was from with the five lines or so I posted that uses
QCoreApplication::arguments()?

Andre'


Re: [patch] tex2lyx crash when full path is given from commandline on Win32

2007-06-16 Thread Andre Poenitz
On Sat, Jun 16, 2007 at 12:10:27PM +0200, Andre Poenitz wrote:
> What was from with the five lines or so I posted that uses
> QCoreApplication::arguments()?

s/from/wrong with/

Andre'


Re: [Cvslog] r18692 - /lyx-devel/trunk/src/LaTeXFeatures.cpp

2007-06-16 Thread Michael Gerz

[EMAIL PROTECTED] schrieb:

Author: rgheck
Date: Wed Jun  6 21:33:57 2007
New Revision: 18692

URL: http://www.lyx.org/trac/changeset/18692
Log:
Fix bug 3823: Division needs not to return an integer.

Also added some comments about a different possible fix.

  

Two things:
- Why do we divide by 255 and not by 256?
- There are two more places where a floating point division may be useful.

Please have a look at the attached patch.

Comments? Ok?

Michael
Index: LaTeXFeatures.cpp
===
--- LaTeXFeatures.cpp	(Revision 18800)
+++ LaTeXFeatures.cpp	(Arbeitskopie)
@@ -491,7 +491,7 @@
 	// shadecolor for shaded
 	if (mustProvide("framed") && mustProvide("color")) {
 		RGBColor c = RGBColor(lcolor.getX11Name(Color::shadedbg));
-		//255.0 to force conversion to double
+		//256.0 to force conversion to double
 		//NOTE As Jürgen Spitzmüller pointed out, an alternative would be
 		//to use the xcolor package instead, and then we can do
 		// \define{shadcolor}{RGB}...
@@ -499,7 +499,7 @@
 		//in InsetNote::validate().
 		int const stmSize = packages.precision(2);
 		packages << "\\definecolor{shadecolor}{rgb}{"
-			<< c.r/255.0 << ',' << c.g/255.0 << ',' << c.b/255.0 << "}\n";
+			<< c.r / 256.0 << ',' << c.g / 256.0 << ',' << c.b / 256.0 << "}\n";
 		packages.precision(stmSize);
 	}
 
@@ -664,11 +664,11 @@
 	if (mustProvide("ct-xcolor-soul")) {
 		RGBColor cadd = RGBColor(lcolor.getX11Name(Color::addedtext));
 		macros << "\\providecolor{lyxadded}{rgb}{"
-		   << cadd.r/255 << ',' << cadd.g/255 << ',' << cadd.b/255 << "}\n";
+		   << cadd.r / 256.0 << ',' << cadd.g / 256.0 << ',' << cadd.b / 256.0 << "}\n";
 
 		RGBColor cdel = RGBColor(lcolor.getX11Name(Color::deletedtext));
 		macros << "\\providecolor{lyxdeleted}{rgb}{"
-		   << cdel.r/255 << ',' << cdel.g/255 << ',' << cdel.b/255 << "}\n";
+		   << cdel.r / 256.0 << ',' << cdel.g / 256.0 << ',' << cdel.b / 256.0 << "}\n";
 
 		macros << "\\newcommand{\\lyxadded}[3]{{\\color{lyxadded}#3}}\n"
 		   << "\\newcommand{\\lyxdeleted}[3]{{\\color{lyxdeleted}\\st{#3}}}\n";
Index: Color.cpp
===
--- Color.cpp	(Revision 18800)
+++ Color.cpp	(Arbeitskopie)
@@ -162,9 +162,9 @@
 		}
 	}
 
-	r = static_cast(::floor((rd * 255.0) + 0.5));
-	g = static_cast(::floor((gd * 255.0) + 0.5));
-	b = static_cast(::floor((bd * 255.0) + 0.5));
+	r = static_cast(::floor((rd * 256.0) + 0.5));
+	g = static_cast(::floor((gd * 256.0) + 0.5));
+	b = static_cast(::floor((bd * 256.0) + 0.5));
 }
 
 
@@ -176,9 +176,9 @@
 
 HSVColor::HSVColor(RGBColor const & rgb)
 {
-	double const r = rgb.r / 255.0;
-	double const g = rgb.g / 255.0;
-	double const b = rgb.b / 255.0;
+	double const r = rgb.r / 256.0;
+	double const g = rgb.g / 256.0;
+	double const b = rgb.b / 256.0;
 
 	double const maxval = max(max(r, g), b);
 	double const minval = min(min(r, g), b);


Re: RC2 coming soon

2007-06-16 Thread Edwin Leuven

José Matos wrote:

On Friday 15 June 2007 23:44:27 Edwin Leuven wrote:

José Matos wrote:

Hi all,
I will start looking to remaining issues before RC2, AFAIR there are two
patches that I would like to have before the release, one by Jürgen that
has a file format change and another related with reverting documents to
1.4.

Is there anything else that I am missing before RC2?

tearing of math panels using attached patch?


This patch breaks the rule that only bugfixes should go after RC1.


what about

http://bugzilla.lyx.org/show_bug.cgi?id=3840

and

http://bugzilla.lyx.org/show_bug.cgi?id=3839

?


On the other hand there is life after 1.5.0 release. :-)

If no one opposes this patch and I have thumbs up from people testing the code 
I will consider it. Fair enough?


no problem


Re: [patch] tex2lyx crash when full path is given from commandline on Win32

2007-06-16 Thread Alfredo Braunstein
Andre Poenitz wrote:

> On Sat, Jun 16, 2007 at 12:10:27PM +0200, Andre Poenitz wrote:
>> What was from with the five lines or so I posted that uses
>> QCoreApplication::arguments()?
> 
> s/from/wrong with/
> 
> Andre'

s=/wrong\ with=/wrong=

;-)

A/




Re: RC2 coming soon

2007-06-16 Thread José Matos
On Saturday 16 June 2007 12:00:42 Edwin Leuven wrote:
> what about
>
> http://bugzilla.lyx.org/show_bug.cgi?id=3840
> and
> http://bugzilla.lyx.org/show_bug.cgi?id=3839

  If Jürgen gives an OK to these I give my OK as well.  

> > On the other hand there is life after 1.5.0 release. :-)
> >
> > If no one opposes this patch and I have thumbs up from people testing the
> > code I will consider it. Fair enough?
>
> no problem

  Just to be clear, if this does not go in 1.5.0 I consider it a good 
candidate to go in 1.5.x.

-- 
José Abílio


Fwd: tear-off math panels

2007-06-16 Thread Roger Mc Murtrie

Re Intel Mac OSX 10.4
Previous testing for both Mac and Linux done after "make" using src/lyx.
Now, after doing a "make install" on the Mac and starting  the  
resulting LyX.app, the correct characters are displayed for all  
palettes with the exception of the Big Operators palette for which  
only some work correctly while others are displayed as text strings  
such as "oiint".
I assume this Big Operators problem might be due to some missing  
fonts in my system??


Hoping that the tear-off math palette feature makes it into rc2
Roger


Begin earlier message:


From: Roger Mc Murtrie <[EMAIL PROTECTED]>
Date: 15 June 2007 1:36:31 PM
To: lyx-devel@lists.lyx.org
Cc: "E. Leuven" <[EMAIL PROTECTED]>
Subject: Re: tear-off math panels

I have tested the tear off panels on both Linux and Mac.
Panels "tear off" when single clicked above a math palette's dashed  
line.
There is one inconsistency between the Linux panel and the Mac  
panel in that the linux palette has a maximise icon whereas the Mac  
palette doesn't.


This is a great improvement in math functionality and usability.

I have a problem with the Mac's LyX display.
When characters are entered from a math palette, the correct symbol  
is not displayed, instead an English character or string is  
displayed. For example, the math symbol greater-than-or-equal  
displays as geqq.

However, View>PDF (pdflatex) does produce the correct symbols.

Roger




Re: [patch] tex2lyx crash when full path is given from commandline on Win32

2007-06-16 Thread hzluo
I didn't check that yet. And your suggestion resolves different problem of 
Win32 platform.
So we need both patches to enable lyx support CJK filename on all Win32 
platform.


Hangzai

- Original Message - 
Sent: Saturday, June 16, 2007 6:10 AM
Subject: Re: [patch] tex2lyx crash when full path is given from commandline 
on Win32


What was from with the five lines or so I posted that uses
QCoreApplication::arguments()?

Andre' 




Re: 2007 LyX Meeting: Invitation

2007-06-16 Thread Martin Vermeer
On Fri, Jun 15, 2007 at 03:22:55PM +0200, Jean-Marc Lasgouttes wrote:
> > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:
> 
> Martin> INVITATION
> 
> Martin> Hereby I invite everyone interested to participate in the ?th
> Martin> International LyX Developers' Meeting in Bromarv, Western
> Martin> Uusimaa, municipality of Ekenäs.
> 
> What is the status? Who is coming and when? There are some convenient
> Air France Flights, but I need to know more about when to come. 
> 
> Also, is 1 hour enough to go to city center and catch the bus?

The bus takes half an hour and goes at intervals of 20-30 minutes, 
also walking to the bus statin takes 10 min. So an hour is a bit tight. Take 
two hours at least. A taxi would be a backup option.

- Martin

 
> JMarc


Re: RC2 coming soon

2007-06-16 Thread Uwe Stöhr

Is there anything else that I am missing before RC2?


This bug is in my opinion a blocker because it makes tex2lyx nearly
unusable:
http://bugzilla.lyx.org/show_bug.cgi?id=3750

Hangzai Luo has sent a patch but besides general statements nobody
really provided a better patch for LyX 1.5:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg120560.html

regards Uwe


Re: Fwd: tear-off math panels

2007-06-16 Thread Edwin Leuven

Roger Mc Murtrie wrote:

Re Intel Mac OSX 10.4
Previous testing for both Mac and Linux done after "make" using src/lyx.
Now, after doing a "make install" on the Mac and starting  the resulting 
LyX.app, the correct characters are displayed for all palettes with the 
exception of the Big Operators palette for which only some work 
correctly while others are displayed as text strings such as "oiint".
I assume this Big Operators problem might be due to some missing fonts 
in my system??


some missing pixmaps probably...


Re: [Cvslog] r18692 - /lyx-devel/trunk/src/LaTeXFeatures.cpp

2007-06-16 Thread Enrico Forestieri
On Sat, Jun 16, 2007 at 12:29:55PM +0200, Michael Gerz wrote:

> [EMAIL PROTECTED] schrieb:
> > Author: rgheck
> > Date: Wed Jun  6 21:33:57 2007
> > New Revision: 18692
> >
> > URL: http://www.lyx.org/trac/changeset/18692
> > Log:
> > Fix bug 3823: Division needs not to return an integer.
> >
> > Also added some comments about a different possible fix.
> >
> >   
> Two things:
>  - Why do we divide by 255 and not by 256?

If the range [0, 255] is to be translated to the range [0.0, 1.0], you
must divide by 255 and not 256.

-- 
Enrico


Re: Meaning of Outline

2007-06-16 Thread Richard Heck

Alfredo Braunstein wrote:

As I can not click on Outline I can not know what this mean. I would thank
if somebody could tell me what of the following meanings, that appear in
the American Heritage Dictionary, is the correct one in this case:

07. A summary of a written work or speech, usually analyzed in headings
and subheadings.
12 A summary of a written work or speech, usually analyzed in headings and
subheadings.
15. A summary of a written work or speech, usually analyzed in headings
and subheadings.


7, 12, 15 (your dictionary is a bit redundant) ;-)
  

In this sense, an outline might look like this:
I. Introduction
A. First Topic
B. Second Topic
II. Section One
A. First Issue
i. First sub-issue
etc. I'm not sure any of the definitions, other than (7), quite get at 
this meaning. But maybe one would call that a "formal outline" or 
something of the sort.


Richard

--
==
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



[Fwd: Re: [Cvslog] r18692 - /lyx-devel/trunk/src/LaTeXFeatures.cpp]

2007-06-16 Thread Richard Heck

[EMAIL PROTECTED] schrieb:
Author: rgheck Date: Wed Jun  6 21:33:57 2007 New Revision: 18692 
URL: http://www.lyx.org/trac/changeset/18692 Log: Fix bug 3823: 
Division needs not to return an integer. Also added some comments 
about a different possible fix.   
Two things: - Why do we divide by 255 and not by 256? 

Enrico answered that one.
- There are two more places where a floating point division may be 
useful. 
Yes. Surprising no bug reports about that one, as it'll give the same problem. But anyway, 
we should just have: 


Index: LaTeXFeatures.cpp
===
--- LaTeXFeatures.cpp   (Revision 18800)
+++ LaTeXFeatures.cpp   (Arbeitskopie)
@@ -664,11 +664,11 @@
if (mustProvide("ct-xcolor-soul")) {
RGBColor cadd = RGBColor(lcolor.getX11Name(Color::addedtext));
macros << "\\providecolor{lyxadded}{rgb}{"
-  << cadd.r/255 << ',' << cadd.g/255 << ',' << cadd.b/255 << 
"}\n";
+  << cadd.r / 255.0 << ',' << cadd.g / 255.0 << ',' << cadd.b / 255.0 
<< "}\n";

RGBColor cdel = RGBColor(lcolor.getX11Name(Color::deletedtext));
macros << "\\providecolor{lyxdeleted}{rgb}{"
-  << cdel.r/255 << ',' << cdel.g/255 << ',' << cdel.b/255 << 
"}\n";
+  << cdel.r / 255.0 << ',' << cdel.g / 255.0 << ',' << cdel.b / 255.0 
<< "}\n";

macros << "\\newcommand{\\lyxadded}[3]{{\\color{lyxadded}#3}}\n"
   << 
"\\newcommand{\\lyxdeleted}[3]{{\\color{lyxdeleted}\\st{#3}}}\n";




--
==
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



Re: [PATCH] Strip unused originaldir flag from Converters.{cpp,h}

2007-06-16 Thread Richard Heck


Jose, JMarc, Georg,

Views about whether this should now go in?

rh

Richard Heck wrote:

Georg Baum wrote:

Jean-Marc Lasgouttes wrote:

Extended.lyx has a reference to it related to literate programming.
Are you sure it is not relevant anymore? 
The problem is that it is horribly broken currently, and fixing it 
would be

a lot of work (see old discussions). I guess that writing a copier for
literate programming files would be easier than fixing originaldir, so I
think removing the flag is the right thing to do. 
I've now added the default copier for the Program format with the HTML 
export fix.
Yes, I think Georg and I talked about this a while ago, when I was 
pursuing HTML export a quite different way. We agreed that this was 
broken. In fact, it could lead to data loss, especially if you 
combined originaldir with other flags. I got bit by this once.


Regarding the Extended Features manual, I've removed the originaldir 
reference. I've also added a cross-reference to the now more extensive 
discussion of converters in the Customization manual.


So, shall I commit? The now current patch is attached. Note that the 
bit about configure.py is not yet included in the patch, as I've got 
other stuff going on there at the moment.


Richard

  


--
==
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

Index: src/Converter.cpp
===
--- src/Converter.cpp	(revision 18803)
+++ src/Converter.cpp	(working copy)
@@ -119,7 +119,7 @@
 		 string const & c, string const & l)
 	: from(f), to(t), command(c), flags(l),
 	  From(0), To(0), latex(false), xml(false),
-	  original_dir(false), need_aux(false)
+	  need_aux(false)
 {}
 
 
@@ -134,8 +134,6 @@
 			latex = true;
 		else if (flag_name == "xml")
 			xml = true;
-		else if (flag_name == "originaldir")
-			original_dir = true;
 		else if (flag_name == "needaux")
 			need_aux = true;
 		else if (flag_name == "resultdir")
@@ -400,12 +398,10 @@
 			}
 
 			// FIXME UNICODE
-			string const infile2 = (conv.original_dir)
-? infile.absFilename() : to_utf8(makeRelPath(from_utf8(infile.absFilename()),
-	 from_utf8(path)));
-			string const outfile2 = (conv.original_dir)
-? outfile.absFilename() : to_utf8(makeRelPath(from_utf8(outfile.absFilename()),
-	  from_utf8(path)));
+			string const infile2 = 
+to_utf8(makeRelPath(from_utf8(infile.absFilename()), from_utf8(path)));
+			string const outfile2 = 
+to_utf8(makeRelPath(from_utf8(outfile.absFilename()), from_utf8(path)));
 
 			string command = conv.command;
 			command = subst(command, token_from, quoteName(infile2));
@@ -428,19 +424,19 @@
 buffer->message(_("Executing command: ")
 + from_utf8(command));
 
-			Systemcall::Starttype const type = (dummy)
-? Systemcall::DontWait : Systemcall::Wait;
 			Systemcall one;
 			int res;
-			if (conv.original_dir) {
-FileName path(buffer->filePath());
-support::Path p(path);
-res = one.startscript(type,
+			if (dummy) {
+res = one.startscript(Systemcall::DontWait,
 	to_filesystem8bit(from_utf8(command)));
-			} else
-res = one.startscript(type,
-	to_filesystem8bit(from_utf8(command)));
+// We're not waiting for the result, so we can't do anything
+// else here.
+return true; 
+			}
 
+			res = one.startscript(Systemcall::Wait,
+to_filesystem8bit(from_utf8(command)));
+			
 			if (!real_outfile.empty()) {
 Mover const & mover = getMover(conv.to);
 if (!mover.rename(outfile, real_outfile))
Index: src/Converter.h
===
--- src/Converter.h	(revision 18803)
+++ src/Converter.h	(working copy)
@@ -55,8 +55,6 @@
 	bool latex;
 	/// The converter is xml
 	bool xml;
-	/// Do we need to run the converter in the original directory?
-	bool original_dir;
 	/// This converter needs the .aux files
 	bool need_aux;
 	/// If the converter put the result in a directory, then result_dir
Index: lib/doc/Extended.lyx
===
--- lib/doc/Extended.lyx	(revision 18803)
+++ lib/doc/Extended.lyx	(working copy)
@@ -1,5 +1,5 @@
-#LyX 1.5.0rc1 created this file. For more info see http://www.lyx.org/
-\lyxformat 271
+#LyX 1.5.0svn created this file. For more info see http://www.lyx.org/
+\lyxformat 274
 \begin_document
 \begin_header
 \textclass book
@@ -38,7 +38,6 @@
 \tracking_changes false
 \output_changes false
 \author "usti" 
-\author "Richard Heck" 
 \end_header
 
 \begin_body
@@ -17901,7 +17900,7 @@
 If the document is of any literate class LyX will then use 

Re: [Fwd: Re: [Cvslog] r18692 - /lyx-devel/trunk/src/LaTeXFeatures.cpp]

2007-06-16 Thread Enrico Forestieri
On Sat, Jun 16, 2007 at 11:08:19AM -0400, Richard Heck wrote:

> > - There are two more places where a floating point division may be 
> > useful. 
> Yes. Surprising no bug reports about that one, as it'll give the same 
> problem. But anyway, 
> we should just have: 

Yes. Possibly, limiting the precision to two decimal digits, as in the
other case.

-- 
Enrico


Re: UTF8->UCS4 failure on FreeBSD 6.2-RELEASE

2007-06-16 Thread Koji Yokota

Jean-Marc Lasgouttes wrote:

"Koji" == Koji Yokota <[EMAIL PROTECTED]> writes:



Koji> Then, is a sort of modification as the attached patch
Koji> acceptable? It seems it solved the problem and is working fine!

This particular patch does not look good, but we'll find one around
this idea. Isn't there some define that we can test against to detect
the faulty freebsd versions?
  
I'm not quite sure whether _GLIBCPP_USE_WCHAR_T is set in forthcoming 
7.0-release, but as far as judging from the documentation which comes 
with the newest gcc-4.2 which 7.0-release will adopt, it probably is 
not. If it is the case, all versions of FreeBSD at this moment do not 
support it. So simply look at the define __FreeBSD__?


Koji


Re: [Cvslog] r18692 - /lyx-devel/trunk/src/LaTeXFeatures.cpp

2007-06-16 Thread Michael Gerz

Hi,

Based on Enrico's comment, here comes a shorter patch.

I need one more OK.

Michael

Index: LaTeXFeatures.cpp
===
--- LaTeXFeatures.cpp	(Revision 18800)
+++ LaTeXFeatures.cpp	(Arbeitskopie)
@@ -499,7 +499,7 @@
 		//in InsetNote::validate().
 		int const stmSize = packages.precision(2);
 		packages << "\\definecolor{shadecolor}{rgb}{"
-			<< c.r/255.0 << ',' << c.g/255.0 << ',' << c.b/255.0 << "}\n";
+			<< c.r / 255.0 << ',' << c.g / 255.0 << ',' << c.b / 255.0 << "}\n";
 		packages.precision(stmSize);
 	}
 
@@ -664,11 +664,11 @@
 	if (mustProvide("ct-xcolor-soul")) {
 		RGBColor cadd = RGBColor(lcolor.getX11Name(Color::addedtext));
 		macros << "\\providecolor{lyxadded}{rgb}{"
-		   << cadd.r/255 << ',' << cadd.g/255 << ',' << cadd.b/255 << "}\n";
+		   << cadd.r / 255.0 << ',' << cadd.g / 255.0 << ',' << cadd.b / 255.0 << "}\n";
 
 		RGBColor cdel = RGBColor(lcolor.getX11Name(Color::deletedtext));
 		macros << "\\providecolor{lyxdeleted}{rgb}{"
-		   << cdel.r/255 << ',' << cdel.g/255 << ',' << cdel.b/255 << "}\n";
+		   << cdel.r / 255.0 << ',' << cdel.g / 255.0 << ',' << cdel.b / 255.0 << "}\n";
 
 		macros << "\\newcommand{\\lyxadded}[3]{{\\color{lyxadded}#3}}\n"
 		   << "\\newcommand{\\lyxdeleted}[3]{{\\color{lyxdeleted}\\st{#3}}}\n";


Re: [Cvslog] r18692 - /lyx-devel/trunk/src/LaTeXFeatures.cpp

2007-06-16 Thread Michael Gerz

Sorry, folks :-(

Here comes a better patch.

Still one more OK needed.

Michael

Index: LaTeXFeatures.cpp
===
--- LaTeXFeatures.cpp	(Revision 18800)
+++ LaTeXFeatures.cpp	(Arbeitskopie)
@@ -499,7 +499,7 @@
 		//in InsetNote::validate().
 		int const stmSize = packages.precision(2);
 		packages << "\\definecolor{shadecolor}{rgb}{"
-			<< c.r/255.0 << ',' << c.g/255.0 << ',' << c.b/255.0 << "}\n";
+			<< c.r / 255.0 << ',' << c.g / 255.0 << ',' << c.b / 255.0 << "}\n";
 		packages.precision(stmSize);
 	}
 
@@ -662,14 +662,18 @@
 		macros << changetracking_dvipost_def;
 	}
 	if (mustProvide("ct-xcolor-soul")) {
+		int const prec = macros.precision(2);
+	
 		RGBColor cadd = RGBColor(lcolor.getX11Name(Color::addedtext));
 		macros << "\\providecolor{lyxadded}{rgb}{"
-		   << cadd.r/255 << ',' << cadd.g/255 << ',' << cadd.b/255 << "}\n";
+		   << cadd.r / 255.0 << ',' << cadd.g / 255.0 << ',' << cadd.b / 255.0 << "}\n";
 
 		RGBColor cdel = RGBColor(lcolor.getX11Name(Color::deletedtext));
 		macros << "\\providecolor{lyxdeleted}{rgb}{"
-		   << cdel.r/255 << ',' << cdel.g/255 << ',' << cdel.b/255 << "}\n";
+		   << cdel.r / 255.0 << ',' << cdel.g / 255.0 << ',' << cdel.b / 255.0 << "}\n";
 
+		macros.precision(prec);
+
 		macros << "\\newcommand{\\lyxadded}[3]{{\\color{lyxadded}#3}}\n"
 		   << "\\newcommand{\\lyxdeleted}[3]{{\\color{lyxdeleted}\\st{#3}}}\n";
 	}


Re: [Cvslog] r18692 - /lyx-devel/trunk/src/LaTeXFeatures.cpp

2007-06-16 Thread Richard Heck

Michael Gerz wrote:

Hi,

Based on Enrico's comment, here comes a shorter patch.

I need one more OK.

As Enrico mentioned, you probably want the limiting-precision bit here, too:

if (mustProvide("ct-xcolor-soul")) {
RGBColor cadd = RGBColor(lcolor.getX11Name(Color::addedtext));
+   int const stmSize = macros.precision(2);

macros << "\\providecolor{lyxadded}{rgb}{"
-  << cadd.r/255 << ',' << cadd.g/255 << ',' << cadd.b/255 << 
"}\n";
+  << cadd.r / 255.0 << ',' << cadd.g / 255.0 << ',' << cadd.b / 255.0 
<< "}\n";

RGBColor cdel = RGBColor(lcolor.getX11Name(Color::deletedtext));
macros << "\\providecolor{lyxdeleted}{rgb}{"
-  << cdel.r/255 << ',' << cdel.g/255 << ',' << cdel.b/255 << 
"}\n";
+  << cdel.r / 255.0 << ',' << cdel.g / 255.0 << ',' << cdel.b / 255.0 
<< "}\n";

+   marcos.precision(stmSize);

macros << "\\newcommand{\\lyxadded}[3]{{\\color{lyxadded}#3}}\n"
   << 
"\\newcommand{\\lyxdeleted}[3]{{\\color{lyxdeleted}\\st{#3}}}\n";


With that, I say OK, too.

Richard



Michael



  



--
==
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



Re: [Cvslog] r18692 - /lyx-devel/trunk/src/LaTeXFeatures.cpp

2007-06-16 Thread Richard Heck


Beat me to it. Definitely OK, then.

Michael Gerz wrote:

Sorry, folks :-(

Here comes a better patch.

Still one more OK needed.

Michael



Index: LaTeXFeatures.cpp
===
--- LaTeXFeatures.cpp   (Revision 18800)
+++ LaTeXFeatures.cpp   (Arbeitskopie)
@@ -499,7 +499,7 @@
//in InsetNote::validate().
int const stmSize = packages.precision(2);
packages << "\\definecolor{shadecolor}{rgb}{"
-   << c.r/255.0 << ',' << c.g/255.0 << ',' << c.b/255.0 << 
"}\n";
+   << c.r / 255.0 << ',' << c.g / 255.0 << ',' << c.b / 255.0 << 
"}\n";
packages.precision(stmSize);
}
 
@@ -662,14 +662,18 @@

macros << changetracking_dvipost_def;
}
if (mustProvide("ct-xcolor-soul")) {
+   int const prec = macros.precision(2);
+   
RGBColor cadd = RGBColor(lcolor.getX11Name(Color::addedtext));
macros << "\\providecolor{lyxadded}{rgb}{"
-  << cadd.r/255 << ',' << cadd.g/255 << ',' << cadd.b/255 << 
"}\n";
+  << cadd.r / 255.0 << ',' << cadd.g / 255.0 << ',' << cadd.b / 255.0 
<< "}\n";
 
 		RGBColor cdel = RGBColor(lcolor.getX11Name(Color::deletedtext));

macros << "\\providecolor{lyxdeleted}{rgb}{"
-  << cdel.r/255 << ',' << cdel.g/255 << ',' << cdel.b/255 << 
"}\n";
+  << cdel.r / 255.0 << ',' << cdel.g / 255.0 << ',' << cdel.b / 255.0 
<< "}\n";
 
+		macros.precision(prec);

+
macros << "\\newcommand{\\lyxadded}[3]{{\\color{lyxadded}#3}}\n"
   << 
"\\newcommand{\\lyxdeleted}[3]{{\\color{lyxdeleted}\\st{#3}}}\n";
}
  



--
==
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



Shaded note => Colored Note???

2007-06-16 Thread Michael Gerz

Hi,

why is a "shaded note" called "shaded"? AFAICS, a shaded note is in fact 
a colored note both on screen and in LaTeX output!


I suggest renaming the menu item and the underlying code. If you agree, 
I will prepare a patch.


Michael


Re: Edit->Table Settings dialog

2007-06-16 Thread Michael Gerz

José Matos schrieb:

On Tuesday 15 May 2007 10:51:47 Abdelrazak Younes wrote:
  

Nothing. "Close" would be better though... Or maybe no button at all.



 I prefer "Done" but "Close" is OK. "Cancel" is indeed confusing. :-)
  

What was the reason that nobody fixed this?

Michael


Re: Shaded note => Colored Note???

2007-06-16 Thread Richard Heck

Michael Gerz wrote:

Hi,

why is a "shaded note" called "shaded"? AFAICS, a shaded note is in 
fact a colored note both on screen and in LaTeX output!
I have no idea. When I added that menu entry, I stuck with the existing 
terminology.
I suggest renaming the menu item and the underlying code. If you 
agree, I will prepare a patch.

I agree.

Richard

--
==
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



Re: RC2 coming soon

2007-06-16 Thread Georg Baum
Am Samstag, 16. Juni 2007 16:12 schrieb Uwe Stöhr:
> > Is there anything else that I am missing before RC2?
> 
> This bug is in my opinion a blocker because it makes tex2lyx nearly
> unusable:
> http://bugzilla.lyx.org/show_bug.cgi?id=3750

Annoying? Yes. Should be fixed? Yes. Unusable? No. It will simply translate 
captions to ERT, that is all.

> Hangzai Luo has sent a patch but besides general statements nobody
> really provided a better patch for LyX 1.5:
> http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg120560.html

This patch generates an invalid file. If you apply it you will rpeat the 
relyx mistakes. I wrote in http://bugzilla.lyx.org/show_bug.cgi?id=3750#c3 
what could be done alternatively.


Georg


[PATCH] Child TOC Crash, Again

2007-06-16 Thread Richard Heck


The attached patch builds on Abdel's earlier work and, I think, solves 
the remaining problems. Whether this is the best way to do it, I'm not 
sure. Abdel was talking about a more major re-organization of the code, 
but maybe that could wait.


What I've done is add an optional argument to LFUN_BUFFER_CHILD_OPEN 
indicating whether the file is being auto-loaded. (Contrary to what I 
said before, this is ok, since we're expecting a valid LyX filename, and 
one isn't going to end with "|true".) There are also corresponding 
booleans in LyXView::loadLyXFile and BufferView::loadLyXFile.


Abdel, I'll leave it up to you to decide what's best here. But either 
way, please see the long FIXME at the end of LyXView::loadLyXFile(). It 
looks to me as if we're doing a lot of things twice.


Richard

--
==
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

Index: src/Buffer.cpp
===
--- src/Buffer.cpp	(revision 18803)
+++ src/Buffer.cpp	(working copy)
@@ -1616,7 +1616,11 @@
 
 void Buffer::setParentName(string const & name)
 {
-	params().parentname = name;
+	if (name == pimpl_->filename.absFilename())
+		// Avoids recursive include.
+		params().parentname.clear();
+	else
+		params().parentname = name;
 }
 
 
Index: src/BufferView.cpp
===
--- src/BufferView.cpp	(revision 18803)
+++ src/BufferView.cpp	(working copy)
@@ -233,8 +233,8 @@
 		graphics::Previews::get().generateBufferPreviews(*buffer_);
 }
 
-
-bool BufferView::loadLyXFile(FileName const & filename, bool tolastfiles)
+// FIXME: all of this should go in a helper file in buffer_func.
+Buffer * BufferView::loadLyXFile(FileName const & filename, bool auto_open)
 {
 	// File already open?
 	if (theBufferList().exists(filename.absFilename())) {
@@ -246,12 +246,13 @@
 			text, 0, 1,  _(""), _(" to document"));
 
 		if (ret != 0) {
-			setBuffer(theBufferList().getBuffer(filename.absFilename()));
-			return true;
+  Buffer * buf = theBufferList().getBuffer(filename.absFilename());
+			setBuffer(buf);
+			return buf;
 		}
 		// FIXME: should be LFUN_REVERT
 		if (!theBufferList().close(theBufferList().getBuffer(filename.absFilename()), false))
-			return false;
+			return 0;
 		// Fall through to new load. (Asger)
 		buffer_ = 0;
 	}
@@ -262,7 +263,7 @@
 		b = theBufferList().newBuffer(filename.absFilename());
 		if (!lyx::loadLyXFile(b, filename)) {
 			theBufferList().release(b);
-			return false;
+			return 0;
 		}
 	} else {
 		docstring text = bformat(_("The document %1$s does not yet "
@@ -274,34 +275,15 @@
 		if (ret == 0) {
 			b = newFile(filename.absFilename(), string(), true);
 			if (!b)
-return false;
+return 0;
 		} else
-			return false;
+			return 0;
 	}
 
-	setBuffer(b);
-	// Send the "errors" signal in case of parsing errors
-	b->errors("Parse");
+  if (!auto_open)
+  	setBuffer(b);
 
-	// Update the labels and section numbering.
-	updateLabels(*buffer_);
-	// scroll to the position when the file was last closed
-	if (lyxrc.use_lastfilepos) {
-		pit_type pit;
-		pos_type pos;
-		boost::tie(pit, pos) = LyX::ref().session().lastFilePos().load(filename);
-		// if successfully move to pit (returned par_id is not zero), update metrics and reset font
-		if (moveToPosition(pit, pos, 0, 0).get<1>()) {
-			if (fitCursor())
-updateMetrics(false);
-			buffer_->text().setCurrentFont(cursor_);
-		}
-	}
-
-	if (tolastfiles)
-		LyX::ref().session().lastFiles().add(FileName(b->fileName()));
-
-	return true;
+	return b;
 }
 
 
Index: src/BufferView.h
===
--- src/BufferView.h	(revision 18803)
+++ src/BufferView.h	(working copy)
@@ -94,7 +94,8 @@
 	void resize();
 
 	/// load a buffer into the view.
-	bool loadLyXFile(support::FileName const & name, bool tolastfiles = true);
+  /// returns the buffer or 0 if not loaded
+	Buffer * loadLyXFile(support::FileName const & name, bool auto_open = false);
 
 	/// perform pending metrics updates.
 	/** \c Update::FitCursor means first to do a FitCursor, and to
Index: src/LyX.cpp
===
--- src/LyX.cpp	(revision 18803)
+++ src/LyX.cpp	(working copy)
@@ -613,7 +613,7 @@
 	if (!pimpl_->files_to_load_.empty()) {
 		for_each(pimpl_->files_to_load_.begin(),
 			pimpl_->files_to_load_.end(),
-			bind(::loadLyXFile, view, _1, true));
+			bind(::loadLyXFile, view, _1, true, false, false));
 		// clear this list to save a few bytes of RAM
 		pimpl_->files_to_load_.clear();
 		pimpl_->session_->lastOpened().clear();
@@ 

Re: Sample test files and improved patch Re: [patch] Enable tex2lyx read back lyx exported .tex as much as possible

2007-06-16 Thread Georg Baum
Am Samstag, 16. Juni 2007 06:31 schrieb hzluo:

> 2. I also dislike current tex2lyx structure. But I also
>dislike the idea of python script. If let me make the
>choice, I will choose flex, or flex+bison. Flex syntax
>is extremely suitable for parsers, for both programming
>and maintenance. I don't see any advantage of python
>at this point. Certainly, flex in it's original state
>is not suitable to be used to develop tex2lyx. We need
>several distict features that are not supported by
>original flex. But we can make our improved flex.
>And it's not difficult at all. I believe we just need
>to have a new template for the code generation. I have
>used flex as this way, and I have a template that is
>able to support true C++ lexer, abstract input/output,
>etc. If needed, I can distribute my work to this community
>and make some improvements to satisfy the tex2lyx needs.
>And, another benefit of flex is speed. I assure it will
>be much faster than current C++ code.

I have used flex in the past, and it is really a great tool for writing 
parsers. The problem is that you need a grammar for these tools, and it is 
impossible to construct one for TeX/LaTeX.
Believe me, the basic TeX parser in tex2lyx is quite good, and if you can 
use a tool like flex at all you will still need to add a lot of manual 
code.
Improving the speed of the existing code should be easy, speed issues have 
been almost ignored for now.

> 4. As of incorrect file format, my idea is, if "tex2lyx+lyx2lyx"
>produces correct output, we can think it's OK.

IMO no. This approach has caused troubles with relyx in the past.

>Because we always 
>go "tex2lyx+lyx2lyx". If needed, we can call lyx2lyx in tex2lyx,
>so that the final output of tex2lyx is absolutely valid.

That would be an interesting intermediate option, but it would need to be 
well documented at the places where future stuff is written to the file.

>And in 
>this way, the encoding problem is also solved.

The encoding problem is not solved, because tex2lyx implicitly assumes 
latin1 encoding in a few places and can only convert some files in other 
encodings.


Georg


Re: [PATCH] Strip unused originaldir flag from Converters.{cpp,h}

2007-06-16 Thread Georg Baum
Am Samstag, 16. Juni 2007 17:20 schrieb Richard Heck:
> 
> Jose, JMarc, Georg,
> 
> Views about whether this should now go in?

I think so, but why this return statement?

>+   // We're not waiting for the result, so we 
can't do anything
>+   // else here.
>+   return true; 

AFAICS this is not equivalent to the old code.


Georg


Toolbar status - Translation Problem

2007-06-16 Thread Michael Gerz

Hi,

this patch fixes a problem with an untranslated toolbar name.

OK?

Michael
Index: src/LyXFunc.cpp
===
--- src/LyXFunc.cpp	(Revision 18805)
+++ src/LyXFunc.cpp	(Arbeitskopie)
@@ -1758,20 +1758,19 @@
 		case LFUN_TOOLBAR_TOGGLE: {
 			BOOST_ASSERT(lyx_view_);
 			string const name = cmd.getArg(0);
-			bool const allowauto = cmd.getArg(1) == "allowauto";
+			bool const allowauto = (cmd.getArg(1) == "allowauto");
 			lyx_view_->toggleToolbarState(name, allowauto);
-			ToolbarInfo::Flags const flags = 
-lyx_view_->getToolbarState(name);
+			ToolbarInfo const & tbi = lyx_view_->getToolbarInfo(name);
 			docstring state;
-			if (flags & ToolbarInfo::ON)
+			if (tbi.flags & ToolbarInfo::ON)
 state = _("on");
-			else if (flags & ToolbarInfo::OFF)
+			else if (tbi.flags & ToolbarInfo::OFF)
 state = _("off");
-			else if (flags & ToolbarInfo::AUTO)
+			else if (tbi.flags & ToolbarInfo::AUTO)
 state = _("auto");
 
 			setMessage(bformat(_("Toolbar \"%1$s\" state set to %2$s"), 
-		   from_ascii(name), state));
+			   _(tbi.gui_name), state));
 			break;
 		}
 
Index: src/frontends/Toolbars.cpp
===
--- src/frontends/Toolbars.cpp	(Revision 18805)
+++ src/frontends/Toolbars.cpp	(Arbeitskopie)
@@ -169,21 +169,22 @@
 }
 
 
-ToolbarInfo::Flags Toolbars::getToolbarState(string const & name)
+ToolbarInfo const & Toolbars::getToolbarInfo(string const & name)
 {
 	ToolbarBackend::Toolbars::const_iterator cit = toolbarbackend.begin();
 	ToolbarBackend::Toolbars::const_iterator end = toolbarbackend.end();
 
 	for (; cit != end; ++cit) {
 		if (cit->name == name)
-			return cit->flags;
+			return *cit;
 	}
 
 	LYXERR(Debug::GUI) << "Toolbar::display: no toolbar named "
 		<< name << endl;
 
 	// return dummy for msvc
-	return ToolbarInfo::OFF;
+	static ToolbarInfo dummy;
+	return dummy;
 }
 
 
Index: src/frontends/Toolbars.h
===
--- src/frontends/Toolbars.h	(Revision 18805)
+++ src/frontends/Toolbars.h	(Arbeitskopie)
@@ -91,7 +91,7 @@
 	void display(std::string const & name, bool show);
 
 	/// get toolbar state (on/off/auto)
-	ToolbarInfo::Flags getToolbarState(std::string const & name);
+	ToolbarInfo const & getToolbarInfo(std::string const & name);
 
 	/** toggle the state of toolbars (on/off/auto). Skip "auto"
 	 * when allowauto is false.
Index: src/frontends/LyXView.cpp
===
--- src/frontends/LyXView.cpp	(Revision 18805)
+++ src/frontends/LyXView.cpp	(Arbeitskopie)
@@ -347,9 +347,9 @@
 }
 
 
-ToolbarInfo::Flags LyXView::getToolbarState(string const & name)
+ToolbarInfo const & LyXView::getToolbarInfo(string const & name)
 {
-	return toolbars_->getToolbarState(name);
+	return toolbars_->getToolbarInfo(name);
 }
 
 
Index: src/frontends/LyXView.h
===
--- src/frontends/LyXView.h	(Revision 18805)
+++ src/frontends/LyXView.h	(Arbeitskopie)
@@ -153,8 +153,8 @@
 
 	/// update the toolbar
 	void updateToolbars();
-	/// get toolbar state
-	ToolbarInfo::Flags getToolbarState(std::string const & name);
+	/// get toolbar info
+	ToolbarInfo const & getToolbarInfo(std::string const & name);
 	/// toggle toolbar state
 	void toggleToolbarState(std::string const & name, bool allowauto);
 	/// update the menubar


bad bugzilla news

2007-06-16 Thread Uwe Stöhr

I've just found another crash:
http://bugzilla.lyx.org/show_bug.cgi?id=3875

two regressions:
http://bugzilla.lyx.org/show_bug.cgi?id=3876
http://bugzilla.lyx.org/show_bug.cgi?id=3877
(3877 should be fixed for LyX 1.5.0 when we want to keep our promise to bring 
the speed back)

and in my opinion another showstopper:
http://bugzilla.lyx.org/show_bug.cgi?id=3878

Note that we already have these two crash bugs without a known patch
http://bugzilla.lyx.org/show_bug.cgi?id=3561
http://bugzilla.lyx.org/show_bug.cgi?id=3859

regards Uwe


help needed for bug 3878

2007-06-16 Thread Uwe Stöhr
Bug 3878 http://bugzilla.lyx.org/show_bug.cgi?id=3878 prevents the Userguide from beeing compiled, 
so I tried to fix this quickly.


The attahed patch fixes this bug but reintroduce bug 1942 
http://bugzilla.lyx.org/show_bug.cgi?id=1942 because the patch for bug 1942 is incorrect. The 
correct fix would be not to use the wasy symbols for \iint and \iiint. Could anybody help me how to 
do this because I've never worked on the math code of LyX yet.


thanks and regards
Uwe
Index: LaTeXFeatures.cpp
===
--- LaTeXFeatures.cpp	(revision 18805)
+++ LaTeXFeatures.cpp	(working copy)
@@ -431,37 +431,27 @@
 	ostringstream packages;
 	TextClass const & tclass = params_.getTextClass();
 
+	// some packages redefine amsmath commands e.g. waswasym redefines \iint,
+	// therefore amsmath must be the first loaded package
+	// see http://bugzilla.lyx.org/show_bug.cgi?id=3878
+	if (mustProvide("amsmath")
+	&& params_.use_amsmath != BufferParams::package_off) {
+		packages << "\\usepackage{amsmath}\n";
+	}
+
+	// These are all the 'simple' includes. i.e
+	// packages which we just \usepackage{package}
 	//
-	//  These are all the 'simple' includes.  i.e
-	//  packages which we just \usepackage{package}
-	//
 	for (int i = 0; i < nb_simplefeatures; ++i) {
 		if (mustProvide(simplefeatures[i]))
 			packages << "\\usepackage{"
  << simplefeatures[i] << "}\n";
 	}
 
-	//
 	// The rest of these packages are somewhat more complicated
 	// than those above.
 	//
 
-	if (mustProvide("amsmath")
-	&& params_.use_amsmath != BufferParams::package_off) {
-		packages << "\\usepackage{amsmath}\n";
-	}
-
-	// wasysym is a simple feature, but it must be after amsmath if both
-	// are used
-	// wasysym redefines some integrals (e.g. iint) from amsmath. That
-	// leads to inconsistent integrals. We only load this package if
-	// esint is used, since esint redefines all relevant integral
-	// symbols from wasysym and amsmath.
-	// See http://bugzilla.lyx.org/show_bug.cgi?id=1942
-	if (mustProvide("wasysym") && isRequired("esint") &&
-	params_.use_esint != BufferParams::package_off)
-		packages << "\\usepackage{wasysym}\n";
-
 	// color.sty
 	if (mustProvide("color")) {
 		if (params_.graphicsDriver == "default")


Re: Shaded note => Colored Note???

2007-06-16 Thread Uwe Stöhr

>> I suggest renaming the menu item and the underlying code. If you agree, I 
will prepare a patch.
> I agree.

Me too.

Uwe


Re: Meaning of Outline

2007-06-16 Thread Ramon Flores
Richard Heck wrote:

> Alfredo Braunstein wrote:
>>>  07. A summary of a written work or speech, usually analyzed in headings
>>>and subheadings.
>>>
>>7, 12, 15 (your dictionary is a bit redundant) ;-)

>In this sense, an outline might look like this:
>I. Introduction
>A. First Topic
>B. Second Topic
>II. Section One
>A. First Issue
>i. First sub-issue
>
>etc. I'm not sure any of the definitions, other than (7), quite get at this
>meaning. But maybe one would call that a "formal outline" or something of the 
>sort.  

And what is the difference between "Outline" and "TOC" ?

Thanks

Ramon


Re: Meaning of Outline

2007-06-16 Thread Mael Hilléreau

Le 16 juin 07 à 20:26, Ramon Flores a écrit :


Richard Heck wrote:


Alfredo Braunstein wrote:
 07. A summary of a written work or speech, usually analyzed in  
headings

   and subheadings.


   7, 12, 15 (your dictionary is a bit redundant) ;-)



In this sense, an outline might look like this:
I. Introduction
A. First Topic
B. Second Topic
II. Section One
A. First Issue
i. First sub-issue

etc. I'm not sure any of the definitions, other than (7), quite  
get at this
meaning. But maybe one would call that a "formal outline" or  
something of the

sort.


And what is the difference between "Outline" and "TOC" ?


Outline is probably more general: you can display TOC, LOF, LOT, or LOA.

Mael.




Re: [PATCH] Child TOC Crash, Again

2007-06-16 Thread Abdelrazak Younes

Richard Heck wrote:


The attached patch builds on Abdel's earlier work and, I think, solves 
the remaining problems. Whether this is the best way to do it, I'm not 
sure. Abdel was talking about a more major re-organization of the code, 
but maybe that could wait.


Maybe yes.



What I've done is add an optional argument to LFUN_BUFFER_CHILD_OPEN 
indicating whether the file is being auto-loaded. (Contrary to what I 
said before, this is ok, since we're expecting a valid LyX filename, and 
one isn't going to end with "|true".) There are also corresponding 
booleans in LyXView::loadLyXFile and BufferView::loadLyXFile.


At this point BufferView::loadLyXFile() do not need to be a member of 
BufferView so please put that in buffer_func.cpp along the other 
loadLyXFile().




Abdel, I'll leave it up to you to decide what's best here.


I am fine with your addition and as it looks like I won't have time to 
do more work on this before RC2, I'd say put it in (Jose and Stefan 
already gave their OK). Please re-use my SVN log posted with the patch.



But either 
way, please see the long FIXME at the end of LyXView::loadLyXFile(). It 
looks to me as if we're doing a lot of things twice.


Yes and that's what I was going to cleanup but you're probably right, 
this can wait :-)


Thanks,
Abdel.



XPM images --- a thought

2007-06-16 Thread Angus Leeming
LyX still uses XPM images in lib/images. The XPM format is plain text, 
so it still makes sense to store XPM files in the SVN repository 
because we get versioning history for free. Clearly, that's not the 
case if we were to store a binary image format like PNG.


However, in these days of a PNG-aware frontend, it does seem strange 
that we still ship these XPM files to our consumers. Here's a thought: 
why don't we make the XPM -> PNG transformation part of the build 
process and ship the resulting PNGs?


Angus (just musing)