Re: [Patch] nb.po update for lyx-1.5.x

2007-11-12 Thread Jürgen Spitzmüller
Helge Hafting wrote:
> An update for nb.po for 1.5

The patch doesn't apply cleanly here.

Jürgen


wish: parallel build

2007-11-12 Thread Mikhail Teterin
Hello!

I tried to do a parallel build of lyx-1.4.5.1 with

gmake -j4

but it failed due to some race condition. With more and more computers having 
multiple processors, it would be extremely useful to have all dependencies 
properly listed in the makefile so that make could perform such builds 
without tripping over...

Thanks,

-mi


Re: crash when scrolling through the userguide

2007-11-12 Thread Richard Heck

Tommaso Cucinotta wrote:
Just want to signal a assert/crash when opening EmbeddedObjects.lyx 
(actually, I have to
say when computing metrics of some paragraph within that document -- 
this happens

while opening, in my patch).

The assert seems to fade away by patching insets/InsetInclude.cpp 
adding a "break"
statement when apparently missing right before line 280 of the file 
(don't know if

Andre' already patched that on svn).

  case LISTINGS:
  temp = listings_label_;
[280]   case NONE:
  BOOST_ASSERT(false);

   T.

My fault. Dumb mistake. Sorry. Fixed.

rh


Stefan Schimanski ha scritto:

Stefan, it mentions attachMacroParameters()... Could you have a look?


Sure, will do it tomorrow. Can you reproduce it? Where does it happen?


Just  through the UserGuide triggers it at some point of 
time.


Ok, with stdlib-debug I get the crash as well. Looking into it now.

Stefan



--
==
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] Support spreadsheets as external insets (1.6svn)

2007-11-12 Thread Helge Hafting

Tommaso Cucinotta wrote:

Helge Hafting ha scritto:

Patches attached,
Helge Hafting

it seems there is a "diff.LaTeXFeatures" attached file, but
I cannot read and save it from Thunderbird. Can you please
send it separately ? Thanks,

Sorry about that, I accidentally made a empty file.
A correct one is attached.

Helge Hafting
Index: LaTeXFeatures.cpp
===
--- LaTeXFeatures.cpp	(revisjon 21553)
+++ LaTeXFeatures.cpp	(arbeidskopi)
@@ -438,6 +438,10 @@
 	"mathrsfs",
 	"ascii",
 	"url",
+	"multirow",
+	"hhline",
+	"ifthen",
+
 };
 
 int const nb_simplefeatures = sizeof(simplefeatures) / sizeof(char const *);


Re: crash when scrolling through the userguide

2007-11-12 Thread Tommaso Cucinotta
Just want to signal a assert/crash when opening EmbeddedObjects.lyx 
(actually, I have to
say when computing metrics of some paragraph within that document -- 
this happens

while opening, in my patch).

The assert seems to fade away by patching insets/InsetInclude.cpp adding 
a "break"
statement when apparently missing right before line 280 of the file 
(don't know if

Andre' already patched that on svn).

  case LISTINGS:
  temp = listings_label_;
[280]   case NONE:
  BOOST_ASSERT(false);

   T.

Stefan Schimanski ha scritto:

Stefan, it mentions attachMacroParameters()... Could you have a look?


Sure, will do it tomorrow. Can you reproduce it? Where does it happen?


Just  through the UserGuide triggers it at some point of time.


Ok, with stdlib-debug I get the crash as well. Looking into it now.

Stefan




Re: Scrollfix patch

2007-11-12 Thread Tommaso Cucinotta

Andre Poenitz ha scritto:

I mean, something like GuiView::doWhenIdle(this, &myMethod):

 template static GuiView::doWhenIdle(T *, bool (T::*)(void))


[I am not sure about the utility of this approach. No need to
proactively introduce funny template constructs ;-}]
  
The utility comes if the mechanism is potentially useful for other 
classes, for other purposes
(not only for BufferView for my specific purpose). Any class that needs 
to be called
back could use it with a simple call like the one of above, confined in 
the implementation
file (basically it's a functor approach, and, yes, probably there's 
smth. in STL that does that).


The alternative to templates, of course, is introduction of a common 
base interface (class),
what is also "invasive" in that it forces the user class to inherit from 
the interface.


   T.
  

Any drawbacks with such an approach (I know there
is a support/timer.h class,



Yes, that's the thirteenth wheel of our cart...

  

but guess it cannot know when the GUI is idle).




Andre'
  




Re: [PATCH] Support spreadsheets as external insets (1.6svn)

2007-11-12 Thread Pavel Sanda
> I cannot read and save it from Thunderbird. Can you please
> send it separately ? Thanks,

it has nothing to do with thunderbird. if you look onto raw message,
the file is empty.
pavel


Re: French translations

2007-11-12 Thread Uwe Stöhr

Hello Siegfried,

thanks for your contributions. I added you to our credits and committed your translation work. It 
will be part of the upcoming LyX 1.5.3.


regards Uwe


Re: [Cvslog] r21556 - /lyx-devel/trunk/src/mathed/MathData.cpp

2007-11-12 Thread Andre Poenitz
On Mon, Nov 12, 2007 at 10:12:40PM -, [EMAIL PROTECTED] wrote:
> - 
> - // fix cursor if right of p
> - if (thisPos >= int(p))
> - cur[thisSlice].pos() -= p - (macroPos + 1);
> - 
> - // was the macro inset just inserted and was now folded?
> - if (cur[thisSlice].pos() == int(macroPos + 1)
> - && fromInitToNormalMode
> - && macroInset->arity() > 0
> - && thisSlice + 1 == int(cur.depth())) {
> - // then enter it if the cursor was just behind
> - cur[thisSlice].pos() = macroPos;
> - cur.push_back(CursorSlice(*macroInset));
> - macroInset->idxFirst(cur);
> +
> + // fix up cursor
> + if (thisSlice != -1) {
> + // fix cursor if right of p
> + if (thisPos >= int(p))
> + cur[thisSlice].pos() -= p - (macroPos + 1);
> + 
> + // was the macro inset just inserted and was now folded?
> + if (cur[thisSlice].pos() == int(macroPos + 1)
> + && fromInitToNormalMode
> + && macroInset->arity() > 0
> + && thisSlice + 1 == int(cur.depth())) {
> + // then enter it if the cursor was just behind
> + cur[thisSlice].pos() = macroPos;
> + cur.push_back(CursorSlice(*macroInset));
> + macroInset->idxFirst(cur);
> + }
>   }
>  }

Could we return early? I.e. 'if (thisSlice == -1)\n\t\treturn;' ?

Andre'


Re: crash when scrolling through the userguide

2007-11-12 Thread Stefan Schimanski
Stefan, it mentions attachMacroParameters()... Could you have a  
look?


Sure, will do it tomorrow. Can you reproduce it? Where does it  
happen?


Just  through the UserGuide triggers it at some point of  
time.


Ok, with stdlib-debug I get the crash as well. Looking into it now.

Stefan


Re: compiling svn

2007-11-12 Thread sebastian guttenberg
> Is this a filesystem that's mounted with 'noexec' (or something similar
> prohibiting execution)?
> 
> Andre'

Oh! Sorry. I did not think that the filesystem could matter. I wanted to
save space on my linux partition and saved the stuff in my
vfat-partition. This is listed in fstab as

# /dev/sda6
UUID=4696-53F2  /home/basti/dos   vfatuser,utf8,umask=007,gid=46
0   1

I did not know that it does not allow executing programs...

This also answers Pavels question:
Without sudo I had permission problems: Everything on this partition
belongs to root...

Anyway. I think I have to change my partitions sooner or later. But for
now there was still enough space and I put it now on the
Linux-partition.
So at least the ./configure went through now. Make is still running...
Thanks a lot!
Sebastian


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



Re: Scrollfix patch

2007-11-12 Thread Andre Poenitz
On Mon, Nov 12, 2007 at 08:11:38PM +0100, Tommaso Cucinotta wrote:
> Helge Hafting ha scritto:
>> He offered to do the calculation in the background. That gives the
> I'm already on the way ... almost working, but need further debugging.
> After that, guess my last change will be to make Abdel happy and
> confine the nice-scrolling behaviour within the BufferView class, so to
> avoid too many changes to TextMetrics (and the ParMetricsCache class).
>
> On a related note, in order to call a method when the GUI is "idle",
> I'm using the QTimer::singleShot() method, with a delta_time of 0.

There's also bool QCoreApplication::hasPendingEvents(). The visible
effect should be more or less ok.

> Do you think that would turn to be useful for other things as well ?
> I mean, something like GuiView::doWhenIdle(this, &myMethod):
>
>  template static GuiView::doWhenIdle(T *, bool (T::*)(void))
>
> (with something like myMethod() returning true or false meaning call
> me again or not). 

[I am not sure about the utility of this approach. No need to
proactively introduce funny template constructs ;-}]

> Any drawbacks with such an approach (I know there
> is a support/timer.h class,

Yes, that's the thirteenth wheel of our cart...

> but guess it cannot know when the GUI is idle).


Andre'


Re: [PATCH] Support spreadsheets as external insets (1.6svn)

2007-11-12 Thread Tommaso Cucinotta

Helge Hafting ha scritto:

Patches attached,
Helge Hafting

it seems there is a "diff.LaTeXFeatures" attached file, but
I cannot read and save it from Thunderbird. Can you please
send it separately ? Thanks,

   T.


Re: compiling svn

2007-11-12 Thread Andre Poenitz
On Mon, Nov 12, 2007 at 04:32:14PM +0200, sebastian guttenberg wrote:
> Hi all
> Sorry for bothering you with beginners' questions. But I want to test
> especially Stefan Schimanski's new math-macro implementation and
> therefore I tried to compile the svn repositories - and failed.
> As I am a beginner in compiling, I just followed the instructions. So
> what I did was the following:
> 
> - Getting the source code via
> svn co svn://svn.lyx.org/lyx/lyx-devel/trunk lyx-devel
> 
> - Switching to lyx-devel directory and execute:
> ./autogen.sh
> 
> - running then ./configure gives the error message:
> configure error: cannot run C compiled programs
> 
> The full output was:
> "sudo sh ./configure
> configuring LyX version 1.6.0svn
> WARNING: This is a development version. Expect bugs.
> checking for version suffix... 
> checking build system type... i686-pc-linux-gnu
> checking host system type... i686-pc-linux-gnu
> checking target system type... i686-pc-linux-gnu
> checking what packaging should be used... posix
> checking whether to enable maintainer-specific portions of Makefiles...
> yes
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for a thread-safe mkdir -p... /bin/mkdir -p
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> checking whether make sets $(MAKE)... (cached) yes
> checking for a BSD-compatible install... /usr/bin/install -c
> checking for gawk... (cached) gawk
> checking for kpsewhich... kpsewhich
> checking for gm4... no
> checking for gnum4... no
> checking for m4... m4
> checking for a Python interpreter with version >= 2.3... python
> checking for python... /usr/bin/python
> checking for python version... 2.5
> checking for python platform... linux2
> checking for python script directory...
> ${prefix}/lib/python2.5/site-packages
> checking for python extension module directory...
> ${exec_prefix}/lib/python2.5/site-packages
> checking for gcc... gcc
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... configure: error: cannot run C
> compiled programs.
> If you meant to cross compile, use `--host'.
> See `config.log' for more details."
> 
> Can someone give me a hint what I did wrong? Thanks, 

Is this a filesystem that's mounted with 'noexec' (or something similar
prohibiting execution)?

Andre'


Re: Scrollfix patch

2007-11-12 Thread Tommaso Cucinotta

Helge Hafting ha scritto:

He offered to do the calculation in the background. That gives the

I'm already on the way ... almost working, but need further debugging.
After that, guess my last change will be to make Abdel happy and
confine the nice-scrolling behaviour within the BufferView class, so to
avoid too many changes to TextMetrics (and the ParMetricsCache class).

On a related note, in order to call a method when the GUI is "idle",
I'm using the QTimer::singleShot() method, with a delta_time of 0.
Do you think that would turn to be useful for other things as well ?
I mean, something like GuiView::doWhenIdle(this, &myMethod):

 template
 static GuiView::doWhenIdle(T *, bool (T::*)(void))

(with something like myMethod() returning true or false meaning call me
again or not).
Any drawbacks with such an approach (I know there is a support/timer.h
class, but guess it cannot know when the GUI is idle).

   T.

best of both worlds - You can start editing as soon as the .lyx file is
parsed. You can scroll immediately, and the scrolling will be "perfect"
after a few seconds.

Speed sure is nice, but the current scrolling that breaks on common
corner cases is not good.

Helge Hafting





Re: www

2007-11-12 Thread Andre Poenitz
On Mon, Nov 12, 2007 at 01:59:31AM +0100, Pavel Sanda wrote:
>  This will make a directory lyx-devel and download lots of 
> files
> -into that directory. (A fresh copy will need about 270MB. However, depending 
> on which frontends you are compiling, you will need a lot more space for the 
> compiled version, up to 1.1GB if you built in all three frontends). 
> +into that directory. (A fresh copy will need about 150MB. However, depending 
> on which frontends you are compiling, you will need a lot more space for the 
> compiled version, up to 1.1GB if you built in all three frontends). 

Only one survivor. A debug build is ~700MB, non-debug ~150MB extra.

>  The following is a matrix indicating which things still need
>  porting to which GUIs. It does not include the "main window" itself
>  and associated classes, other than the toolbar and menubar. The GUII

I wouldn't mind dropping that part altogether or moving it to some kind
of attic.

> --- download/related.php  (revision 21547)
> +++ download/related.php  (working copy)
> @@ -23,37 +23,15 @@
>may be a braindead version. Please check before you go download the
>lot.
>  
> -  Note that you will either need Qt or XForms, not both.
> -  
>Required stuff
>
>http://www.trolltech.com/";>Qt - the well-known
>toolkit from Trolltech, which is also used in the KDE project.
> -  Both versions 2.3.x and 3.x are supported.
> -  http://world.std.com/~xforms/";>XForms
> -   - The toolkit used historically by LyX. 
> -   
> -   [Note: at the time of this writing, this home page is
> -really out of date, and in particular does not mention the latest 1.0
> -release. There is also a 
> - http://www.nongnu.org/xforms/";>developers page.]
> -   You'll need to 
> -   https://savannah.nongnu.org/files/?group=xforms";>grab
> -  the source, if you want
> -   to compile your own version of LyX. You can also find binary and 
> source
> -   RPMs at
> -   ftp://ftp.lyx.org/pub/lyx/contrib/";>the LyX contrib/ FTP 
> site.
> -   
>  
> -   Note that this is not the trendy  -   href="http://www.w3.org/TR/xforms/";>XForms W3C
> -   recommandation, but a good old boring GUI toolit.
> -   
> http://koala.ilog.fr/lehors/xpm.html";>
> libXpm - a library used to display pixmaps. 
> 
> -   If you want to compile LyX yourself with the xforms frontend,
> -   you'll also need libXpm. You'll have to get version 4.7 or
> +   You'll have to get version 4.7 or
> newer, but it is very probable that you already have it

Do we need libxpm?

Andre'


Re: crash when scrolling through the userguide

2007-11-12 Thread Andre Poenitz
On Mon, Nov 12, 2007 at 12:27:16AM +0100, Stefan Schimanski wrote:
>> #0  0xe410 in __kernel_vsyscall ()
>> #1  0xb7123875 in raise () from /lib/tls/i686/cmov/libc.so.6
>> #2  0xb7125201 in abort () from /lib/tls/i686/cmov/libc.so.6
>> #3  0xb72c09e6 in __gnu_debug::_Error_formatter::_M_error ()
>>   from /usr/lib/libstdc++.so.6
>> #4  0x083a4c42 in __gnu_debug_def::vector> std::allocator >::operator[] (this=0x917e264,
>> __n=4294967295)
>>at /usr/include/c++/4.1.3/debug/vector:192
>> #5  0x084d6859 in lyx::MathData::attachMacroParameters (this=0x93ae6f0,
>>[EMAIL PROTECTED], macroPos=0, macroNumArgs=3, macroOptionals=0,
>>fromInitToNormalMode=false, greedy=true)
>>at ../../trunk/src/DocIterator.h:48
>> #6  0x084d6d54 in lyx::MathData::updateMacros (this=0x93ae6f0,
>> [EMAIL PROTECTED])
>>at ../../trunk/src/mathed/MathData.cpp:392
>>
>> Stefan, it mentions attachMacroParameters()... Could you have a look?
>
> Sure, will do it tomorrow. Can you reproduce it? Where does it happen?

Just  through the UserGuide triggers it at some point of time.

Andre'


Re: Scrollfix patch

2007-11-12 Thread Helge Hafting

Abdelrazak Younes wrote:

Andre Poenitz wrote:

On Sun, Nov 11, 2007 at 04:39:22PM +0100, Tommaso Cucinotta wrote:



If you have serious concerns about this (probably due to the
past experience on developing LyX), the best solution would
be a "summing (balanced) tree", that would exhibit O(log n)
complexity for little updates like needed in 1) [not sure about
1.a], but probably you won't avoid the O(n) updates in case of
2) or 3).


I think loading/resizing in 4 second is ok.


I disagree with that. Loading should be as fast as possible and 
resizing should be instantaneous. Or we just switch to implement a 
WISIWIG processor. There are a lot of good things in Tommaso's patch 
but the initial calculation of all ParMetrics is not one of those. The 
TextMetrics API additions are nice but are orthogonal to our scrolling 
problem.



20 is rather not.
I know, it's not that bad, I am exaggerating. And of course
one could provide some more versose status message (as in 23/5490
paragraphs done) giving the impression that 'something' happens...


That's the thing I hate most about MSWords: continuously waiting for 
the re-pagination to complete. We don't need a *perfect* scrolling 
behaviour, just a sensible one. A simple cache of paragraph height 
would do the job and I wish Tommaso had followed this direction instead.

He offered to do the calculation in the background. That gives the
best of both worlds - You can start editing as soon as the .lyx file is
parsed. You can scroll immediately, and the scrolling will be "perfect"
after a few seconds.

Speed sure is nice, but the current scrolling that breaks on common
corner cases is not good.

Helge Hafting



[PATCH] Support spreadsheets as external insets (1.6svn)

2007-11-12 Thread Helge Hafting

After looking at the spreadsheet->latex converter "ssconvert",
I made an external inset for gnumeric spreadsheets.
Turns out that the converter works for openoffice & excel too.
Tested with a gnumeric file, an excel file, and a oocalc file,
including page breaking in the middle of a spreadsheet.

Note that gnumeric is necessary even for the excel and
openoffice spreadsheets, because ssconvert is distributed
with gnumeric only.

A recompile is necessary, this only because
ssconvert requires several latex packages
that wasn't in the feature list already.
Rotation/scaling is not supported, I couldn't get that working.

The patch may work for 1.5.x - I have not tested that.  But I guess that is
a format change anyway - a LyX file with a embedded spreadsheet
won't work with an older LyX that don't have this external template.

A demo pdf:
http://www.aitel.hist.no/~helgehaf/extgnumeric.pdf

Patches attached,
Helge Hafting
Index: configure.py
===
--- configure.py	(revisjon 21516)
+++ configure.py	(arbeidskopi)
@@ -273,6 +273,11 @@
 \Format text3  txt"Plain text (ps2ascii)" "" ""	"%%"	"document"
 \Format text4  txt"Plain text (catdvi)"   "" ""	"%%"	"document"
 \Format textparagraph txt "Plain Text, Join Lines" "" ""	"%%"	"document"''' ])
+#Spreadsheets using ssconvert from gnumeric
+checkViewer('gnumeric spreadsheet software', ['gnumeric'],
+rc_entry = [r'''\Format gnumeric gnumeric "Gnumeric spreadsheet" "" """%%"   "document"
+\Format excel  xls"Excel spreadsheet"  "" "" "%%""document"
+\Format oocalc ods"OpenOffice spreadsheet" "" "" "%%""document"'''])
 #
 #checkProg('a Postscript interpreter', ['gs'],
 #  rc_entry = [ r'\ps_command "%%"' ])
@@ -453,6 +458,14 @@
 ''])
 #
 #
+
+# gnumeric/xls/ods to tex
+checkProg('a spreadsheet -> latex converter', ['ssconvert'],
+rc_entry = [ r'''\converter gnumeric latex "ssconvert --export-type=Gnumeric_html:latex $$i $$o" ""
+\converter ods latex "ssconvert --export-type=Gnumeric_html:latex $$i $$o" ""
+\converter xls latex "ssconvert --export-type=Gnumeric_html:latex $$i $$o" ""''',
+	''])
+
 path, lilypond = checkProg('a LilyPond -> EPS/PDF/PNG converter', ['lilypond'])
 if (lilypond != ''):
 version_string = cmdOutput("lilypond --version")
Index: external_templates
===
--- external_templates  (revisjon 21516)
+++ external_templates  (arbeidskopi)
@@ -2,7 +2,7 @@
 # file external_templates
 # This file is part of LyX, the document processor.
 # Licence details can be found in the file COPYING.
-#
+# 
 # author Asger Alstrup Nielsen
 # author Angus Leeming
 # author Johnathan Burchill
@@ -33,6 +33,45 @@
\IfFileExists{#1}{\input{#1}}{\warnNotFound{#1}}}
 PreambleDefEnd
 
+Template GnumericSpreadsheet
+   GuiName "Spreadsheet"
+   HelpText
+   A spreadsheet made with gnumeric, openoffice or excel.
+   It imports as a long table, so any length
+   is ok. Excessive width could be a problem.
+   The gnumeric software is necessary for conversion,
+   both for gnumeric and excel files.
+   HelpTextEnd
+   InputFormat "gnumeric"
+   FileFilter "*.{gnumeric,ods,xls}"
+   AutomaticProduction true
+   Format LaTeX
+   Product 
"\\def\\inputGnumericTable{}\\input{$$AbsOrRelPathMaster$$Basename.tex}"
+   UpdateFormat latex
+   UpdateResult "$$AbsPath$$Basename.tex"
+   Requirement "color"
+   Requirement "array"
+   Requirement "longtable"
+   Requirement "calc"
+   Requirement "multirow"
+   Requirement "hhline"
+   Requirement "ifthen"
+   ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.tex"
+   FormatEnd
+   Format PDFLaTeX
+   Product 
"\\def\\inputGnumericTable{}\\input{$$AbsOrRelPathMaster$$Basename.tex}"
+   UpdateFormat latex
+   UpdateResult "$$AbsPath$$Basename.tex"
+   Requirement "color"
+   Requirement "array"
+   Requirement "longtable"
+   Requirement "calc"
+   Requirement "multirow"
+   Requirement "hhline"
+   Requirement "ifthen"
+   ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.tex"
+   FormatEnd
+TemplateEnd
 
 Template RasterImage
# By default, InsetExternal is displayed as a grey button


Re: LaTeX in-table computations.

2007-11-12 Thread Tommaso Cucinotta

Tommaso Cucinotta ha scritto:

Just tried, but doesn't work. I patched lib/configure.py as in the
attachment, where the converter is the attached script. When
I use "Insert->graphics...", and I specify a ".gn" file, it crashes.

Probably there is (also) a problem in trunk. LyX 1.5.2 does not crash,
but reports an error in converting into a loadable format. Instead,
on trunk, I get (-dbg any):

Token: 'filename'
Token: 'inzipName'
Token: 'embed'
Token: '\end_inset'
Setting controller ro: 0
Transition from state INITIAL to state INITIAL after input SMI_READ_WRITE
Calling BC refresh()
Recognised Fileformat: gzip
Assertion triggered in lyx::support::FileName::FileName(const 
std::string&) by failing check "empty() || absolutePath(name_)" in file 
FileName.cpp:152


Trying with 1.5.2, instead, does not crash, but on the log I see it says
"format recognized: gzip", then it unzips the file etc, is there a way
to prevent this to happen, and having LyX trust me and call my own
filter for the ->eps conversion ?

Thanks, bye,

   T.



Re: www

2007-11-12 Thread Pavel Sanda
> I think you can go ahead. 

its in with few fixes.

> I think the SGML page can be removed; 

not sure about this. was it definitely dropped ?
still see ./src/sgml.cpp in our sources.

pavel


Re: Insets (un)collapsing, was: Approaching LyX 1.5.3 [status update #2]

2007-11-12 Thread Pavel Sanda
> Two solutions:
> 1) for each and every "visual" action verify that this action is triggered 
> the same way if this inset is also displayed in another view.
>
> 2) understand that "visual" action is *visual* and do not try to modify the 
> other view to behave the same. This means that insets should be opened or 
> close independently in each view.

imho 2 is a saner solution.

pavel


Re: LaTeX in-table computations.

2007-11-12 Thread Tommaso Cucinotta

Helge Hafting ha scritto:

You get the preview "for free" if we set up conversion all the way
from .gnumeric to .eps (via .tex).

Just tried, but doesn't work. I patched lib/configure.py as in the
attachment, where the converter is the attached script. When
I use "Insert->graphics...", and I specify a ".gn" file, it crashes.

(of course I'm in an attempt to build-up something usable for the
very next papers I'm going to write, waiting for LyX 1.6.+ with
some Insert-support for such things).

I was thinking of only converting to .tex, and have LyX include
the generated .tex file directly. This has several advantages:

Perfectly agree. This is absolutely the way to do it.

   T.

* gnumeric exports the spreadsheet as a longtable. If you make
  a .eps, then this is limited to a single page. And you'll get
  one big figure that cannot be broken across pages. (This is
  sometimes a problem when there are more figures than text).

  A longtable imported as .tex have no such problems. It can
  start anywhere on the page because it will be broken, and
  it can go on for many pages - again because it supports
  page breaking.

* Importing gnumeric as a longtable means that style choices in
  LyX (font etc.) can affect the longtable layout. Using eps means
  LyX cannot affect the output in any way.

* Finally, longtables work equally well with all the latex exporters,
  i.e. both latex and pdflatex.

"No automatic preview" seems to be the only disadvantage of importing 
.tex
Now, of course a preview is possible anyway because we can specify a 
different

converter for previewing.

Helge Hafting


Index: lib/configure.py
===
--- lib/configure.py	(revisione 21533)
+++ lib/configure.py	(copia locale)
@@ -241,6 +241,9 @@
 checkViewer('a FEN viewer and editor', ['xboard -lpf $$i -mode EditPosition'],
 rc_entry = [r'\Format fenfen FEN"" "%%"	"%%"	""'])
 #
+checkViewer('a Gnumeric viewer and editor', ['gnumeric'],
+rc_entry = [r'\Format gn gn  gn "" "%%"	"%%"	"vector"'])
+#
 path, iv = checkViewer('a raster image viewer', ['xv', 'kview', 'gimp-remote', 'gimp'])
 path, ie = checkViewer('a raster image editor', ['gimp-remote', 'gimp'])
 addToRC(r'''\Format bmpbmp BMP"" "%s"	"%s"	""
@@ -409,6 +412,9 @@
 addToRC(r'\converter lyxpreview png"python -tt $$s/scripts/lyxpreview2bitmap.py"	""')
 else:
 addToRC(r'\converter lyxpreview png""	""')
+#
+checkProg('a Gnumeric to EPS converter', ['gnumeric2eps.sh $$i $$o'],
+rc_entry = [ r'\converter gn eps"%%"	""' ])
 #  
 checkProg('a fax program', ['kdeprintfax $$i', 'ksendfax $$i'],
 rc_entry = [ r'\converter ps fax"%%"	""'])


gnumeric2eps.sh
Description: application/shellscript


Re: Approaching LyX 1.5.3 [status update #2]

2007-11-12 Thread Abdelrazak Younes

Helge Hafting wrote:

Abdelrazak Younes wrote:


This patch (for trunk) mostly fixes the problem. The downside is that 
the inset is not automatically "uncollapsed" when you leave the inset 
after an automatic opening. The inset might also refuse to collapse if 
the cursor is within it in another view.

The user probably have a reason for uncollapsing, and will not object to
the inset getting collapsed in the other view as well.


As a user I am objecting. I uncollapse an inset when I want to view 
what's inside or when I want to edit it. If this same buffer is opened 
in another window it's because I generally want to edit another part of 
the same buffer and I don't want that view to change just because I am 
editing some other inset in the other view.



Why not do that?


That's what we are doing actually.


If another view has a cursor inside - do the same thing as we do when
the user close an inset where the first view has the cursor. That is,
move the cursor outside, then close. Or is this hard to program?


It is not very hard but it is bad behavior IMO: I don't want to lose my 
cursor position just because I closed the inset in the other view.


Abdel.



Re: compiling svn

2007-11-12 Thread Pavel Sanda
> "sudo sh ./configure

this probably has nothing to do with the bug,
but why you run it with sudo ?
pavel


Re: any known problems with gcc-4.2?

2007-11-12 Thread Mikhail Teterin
On понеділок 12 листопад 2007, Helge Hafting wrote:
= Hard to say. I use gcc-4.2 to compile lyx-1.6svn on linux.
= Lyx-1.6svn segfaults occationally, but that is expected for
= development versions.
= 
= If you want a stable LyX, consider 1.5.2 which is newer than 1.4.4

Thanks, we have a separate port of 1.5.2, which is believed to still be 
experimental (and it requires Qt4).

I'll try to update the port of the stable 1.4 branch to 1.4.5.1 and see, if 
this resolves Dmitriy's problem.

-mi 




Re: 1.6svn module URL in use, but doesn't show up in charstyle menu :-(

2007-11-12 Thread Martin Vermeer
On Mon, 12 Nov 2007 14:48:24 +0100
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> wrote:

> Martin Vermeer <[EMAIL PROTECTED]> writes:
> 
> > But I also think URL should show up in the Custom menu, and Strong in
> > the Charstyles.
> 
> I am not sure that it is interesting for the user to know that URL is
> a custom inset? What does it mean to him. A Character Style is
> something clear, but I do not think that any standard LyX inset should
> be in Custom menu.
> 
> JMarc


OK, I suppose we could apply the attached patch (which more generally
allows us to put vanilla Flex insets on the menu tree wherever we feel
like). Works for me.

- Martin
Index: src/Text3.cpp
===
--- src/Text3.cpp	(revision 21475)
+++ src/Text3.cpp	(working copy)
@@ -1906,7 +1906,8 @@
 		InsetLayout il =  cur.buffer().params().getTextClass().insetlayout(from_utf8(s));
 		if (il.lyxtype != "charstyle" &&
 		il.lyxtype != "custom" &&
-		il.lyxtype != "element")
+		il.lyxtype != "element" &&
+		il.lyxtype != "standard")
 			enable = false;
 		break;
 		}
Index: lib/layouts/stdinsets.inc
===
--- lib/layouts/stdinsets.inc	(revision 21402)
+++ lib/layouts/stdinsets.inc	(working copy)
@@ -202,3 +203,24 @@
 	MultiPar  true
 End
 
+InsetLayout URL
+	LyXType   standard
+	LatexName url
+	Decorationminimalistic
+	LabelString   URL
+	PassThru  true
+	ForceLTR  true
+	Font
+	  Family  Typewriter
+	  Color   Blue
+	EndFont
+	LabelFont
+	  Family  Typewriter
+	  Color   Blue
+	  SizeSmall
+	EndFont
+	Preamble
+	  \usepackage{url}
+	EndPreamble
+End
+
Index: lib/ui/stdmenus.inc
===
--- lib/ui/stdmenus.inc	(revision 21402)
+++ lib/ui/stdmenus.inc	(working copy)
@@ -328,6 +328,7 @@
 		Separator
 		Item "Table...|T" "tabular-insert"
 		Item "Graphics...|G" "dialog-show-new-inset graphics"
+		Item "URL" "flex-insert URL"
 		Item "Hyperlink|k" "href-insert"
 		Item "Footnote|F" "footnote-insert"
 		Item "Marginal Note|M" "marginalnote-insert"


compiling svn

2007-11-12 Thread sebastian guttenberg
Hi all
Sorry for bothering you with beginners' questions. But I want to test
especially Stefan Schimanski's new math-macro implementation and
therefore I tried to compile the svn repositories - and failed.
As I am a beginner in compiling, I just followed the instructions. So
what I did was the following:

- Getting the source code via
svn co svn://svn.lyx.org/lyx/lyx-devel/trunk lyx-devel

- Switching to lyx-devel directory and execute:
./autogen.sh

- running then ./configure gives the error message:
configure error: cannot run C compiled programs

The full output was:
"sudo sh ./configure
configuring LyX version 1.6.0svn
WARNING: This is a development version. Expect bugs.
checking for version suffix... 
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking what packaging should be used... posix
checking whether to enable maintainer-specific portions of Makefiles...
yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for gawk... (cached) gawk
checking for kpsewhich... kpsewhich
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for a Python interpreter with version >= 2.3... python
checking for python... /usr/bin/python
checking for python version... 2.5
checking for python platform... linux2
checking for python script directory...
${prefix}/lib/python2.5/site-packages
checking for python extension module directory...
${exec_prefix}/lib/python2.5/site-packages
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C
compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details."

Can someone give me a hint what I did wrong? Thanks, 
Sebastian



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



Re: 1.6svn module URL in use, but doesn't show up in charstyle menu :-(

2007-11-12 Thread Helge Hafting

Jean-Marc Lasgouttes wrote:

Martin Vermeer <[EMAIL PROTECTED]> writes:

  

But I also think URL should show up in the Custom menu, and Strong in
the Charstyles.



I am not sure that it is interesting for the user to know that URL is
a custom inset? What does it mean to him. A Character Style is
something clear, but I do not think that any standard LyX inset should
be in Custom menu.
  

Sure - a "standard" thing is not custom. There are no
menu for "standard insets" though. The old standard insets
(minipage, ERT, index entry, ...) are all directly in the crowded
insert menu.  This is also where the old URL was.

So - put the URL inset (and any other "standard" module) on
the insert menu, or is it time for tidying up the insert menu
a bit? I gave up assigning unique keyboard keys for the
translated insert menu - there are too many short strings
so it cannot be done any more.

Helge Hafting


Re: Approaching LyX 1.5.3 [status update #2]

2007-11-12 Thread Helge Hafting

Abdelrazak Younes wrote:

Abdelrazak Younes wrote:

Abdelrazak Younes wrote:

Jürgen Spitzmüller wrote:
We are already pretty close to a release: we have fixed the 
regressions introduced with 1.5.2 (pixmap cache, AMS classes) and 
several other things, including 9 critical bugs. So 1.5.3svn is 
significantly ahead of 1.5.2, IMHO.


Therefore, I don't want to hold back the release very much longer. 
However, there are still some things left to do.


On bugzilla, there are five open critical bugs. I think at least 
these two should be fixed:


4333   cri   lyx crashes when opening 1.4.3. file with index 
containin... 4346   cri   Synchronizing insets crash when two 
windows open


I hope that Abdel and José, as the experts in the respective area, 
will find time to have a look.


I had a look to 4346. It's due to the autoOpen flag which is decided 
at metrics time. It basically decides to open the inset if the 
cursor is inside. This is not bad in itself but it is bad that this 
decision happens at metrics time. Even if I don't like this, the 
collapsible status is a content and everything that is content 
should never be decided at metrics.


I'll try to fix that in trunk and backport the fix afterwards.


Hum, not so easy... autoOpen_ was introduced in rev 10495 to fix bug 
1921:


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

This obviously doesn't work well with multiview and is (again) a 
strong hint that the collapsable status is *not* contents and should 
not be saved in the LyX file.


Anyway, I am not sure this is easily fixable...


This patch (for trunk) mostly fixes the problem. The downside is that 
the inset is not automatically "uncollapsed" when you leave the inset 
after an automatic opening. The inset might also refuse to collapse if 
the cursor is within it in another view.

The user probably have a reason for uncollapsing, and will not object to
the inset getting collapsed in the other view as well. Why not do that?
If another view has a cursor inside - do the same thing as we do when
the user close an inset where the first view has the cursor. That is,
move the cursor outside, then close. Or is this hard to program?

Helge Hafting




Opinions?

Abdel.


Index: insets/InsetCollapsable.cpp
===
--- insets/InsetCollapsable.cpp (revision 21550)
+++ insets/InsetCollapsable.cpp (working copy)
@@ -46,7 +46,7 @@
 
 InsetCollapsable::CollapseStatus InsetCollapsable::status() const

 {
-   return autoOpen_ ? Open : status_;
+   return status_;
 }
 
 
@@ -54,7 +54,7 @@

 {
switch (decoration()) {
case Classic:
-   if (status() == Open) {
+   if (status_ == Open) {
if (openinlined_)
return LeftButton;
else
@@ -78,7 +78,7 @@
 InsetCollapsable::InsetCollapsable(BufferParams const & bp,
CollapseStatus status, InsetLayout const * il)
: InsetText(bp), layout_(il), status_(status),
- openinlined_(false), autoOpen_(false), mouse_hover_(false)
+ openinlined_(false), mouse_hover_(false)
 {
setAutoBreakRows(true);
setDrawFrame(true);
@@ -93,7 +93,6 @@
labelstring_(rhs.labelstring_),
status_(rhs.status_),
openinlined_(rhs.openinlined_),
-   autoOpen_(rhs.autoOpen_),
// the sole purpose of this copy constructor
mouse_hover_(false)
 {
@@ -192,8 +191,6 @@
 {
BOOST_ASSERT(layout_);
 
-	autoOpen_ = mi.base.bv->cursor().isInside(this);

-
FontInfo tmpfont = mi.base.font;
mi.base.font = layout_->font;
mi.base.font.realize(tmpfont);
@@ -258,7 +255,6 @@
 {
BOOST_ASSERT(layout_);
 
-	autoOpen_ = pi.base.bv->cursor().isInside(this);

ColorCode const old_color = pi.background_color;
pi.background_color = backgroundColor();
 
@@ -450,6 +446,7 @@

//lyxerr << "InsetCollapsable: edit left/right" << endl;
cur.push(*this);
InsetText::edit(cur, left);
+   status_ = Open;
 }
 
 
Index: insets/InsetCollapsable.h

===
--- insets/InsetCollapsable.h   (revision 21550)
+++ insets/InsetCollapsable.h   (working copy)
@@ -176,8 +176,6 @@
mutable CollapseStatus status_;
/// a substatus of the Open status, determined automatically in metrics
mutable bool openinlined_;
-   /// the inset will automatically open when the cursor is inside
-   mutable bool autoOpen_;
/// changes color when mouse enters/leaves this inset
bool mouse_hover_;
 };
  




Re: LaTeX in-table computations.

2007-11-12 Thread Helge Hafting

Tommaso Cucinotta wrote:

Tommaso Cucinotta ha scritto:

to what I was needing. Probably a simple gnumeric->LaTeX
"filter" that uses "ssconvert" is sufficient:

Just tried and seems to work. You just need to export with
"ssconvert -T Gnumeric_html:latex in.gnumeric out.tex", so

Great - that was the missing piece. An external inset can
be written using ssconvert then!

to get also the table formatting that you set-up in gnumeric,
then import in LyX through the "Insert->File->Child Document",
specifying as "Type" of import the voice "Input".

So, probably the only "functionality" that might be added to LyX
could be an in-line preview of the file (isn't it automagic if you
set-up the entire .gnumeric->.tex->.eps filetrs chain ?), plus the
automatic opening of gnumeric when you click or double-click
on the preview.

You get the preview "for free" if we set up conversion all the way
from .gnumeric to .eps (via .tex).

I was thinking of only converting to .tex, and have LyX include
the generated .tex file directly. This has several advantages:
* gnumeric exports the spreadsheet as a longtable. If you make
  a .eps, then this is limited to a single page. And you'll get
  one big figure that cannot be broken across pages. (This is
  sometimes a problem when there are more figures than text).

  A longtable imported as .tex have no such problems. It can
  start anywhere on the page because it will be broken, and
  it can go on for many pages - again because it supports
  page breaking.

* Importing gnumeric as a longtable means that style choices in
  LyX (font etc.) can affect the longtable layout. Using eps means
  LyX cannot affect the output in any way.

* Finally, longtables work equally well with all the latex exporters,
  i.e. both latex and pdflatex.

"No automatic preview" seems to be the only disadvantage of importing .tex
Now, of course a preview is possible anyway because we can specify a 
different

converter for previewing.

Helge Hafting 



Re: LaTeX in-table computations.

2007-11-12 Thread Tommaso Cucinotta

Tommaso Cucinotta ha scritto:

to what I was needing. Probably a simple gnumeric->LaTeX
"filter" that uses "ssconvert" is sufficient:

Just tried and seems to work. You just need to export with
"ssconvert -T Gnumeric_html:latex in.gnumeric out.tex", so
to get also the table formatting that you set-up in gnumeric,
then import in LyX through the "Insert->File->Child Document",
specifying as "Type" of import the voice "Input".

So, probably the only "functionality" that might be added to LyX
could be an in-line preview of the file (isn't it automagic if you
set-up the entire .gnumeric->.tex->.eps filetrs chain ?), plus the
automatic opening of gnumeric when you click or double-click
on the preview.

   T.



Re: LaTeX in-table computations.

2007-11-12 Thread Tommaso Cucinotta

Tommaso Cucinotta ha scritto:

to what I was needing. Probably a simple gnumeric->LaTeX
"filter" that uses "ssconvert" is sufficient:

Just tried and seems to work. You just need to export with
"ssconvert -T Gnumeric_html:latex in.gnumeric out.tex", so
to get also the table formatting that you set-up in gnumeric,
then import in LyX through the "Insert->File->Child Document",
specifying as "Type" of import the voice "Input".

So, probably the only "functionality" that might be added to LyX
could be an in-line preview of the file (isn't it automagic if you
set-up the entire .gnumeric->.tex->.eps filetrs chain ?), plus the
automatic opening of gnumeric when you click or double-click
on the preview.

   T.



Re: 1.6svn module URL in use, but doesn't show up in charstyle menu :-(

2007-11-12 Thread Jean-Marc Lasgouttes
Martin Vermeer <[EMAIL PROTECTED]> writes:

> But I also think URL should show up in the Custom menu, and Strong in
> the Charstyles.

I am not sure that it is interesting for the user to know that URL is
a custom inset? What does it mean to him. A Character Style is
something clear, but I do not think that any standard LyX inset should
be in Custom menu.

JMarc


Re: LaTeX in-table computations.

2007-11-12 Thread Tommaso Cucinotta

Helge Hafting ha scritto:

Embedding a gnumeric spreadsheet:
http://www.aitel.hist.no/~helgehaf/gnumeric.lyx
http://www.aitel.hist.no/~helgehaf/spreadsheet.gnumeric
http://www.aitel.hist.no/~helgehaf/spreadsheet.tex

Turning this into a external inset is easy, and gets rid of
the latex commands in the preamble. But there will be
one thing missing - I see no way of forcing gnumeric
to export a .tex file, other than to use the gnumeric GUI.

Ok, I never used gnumeric, so it is probably a solution
to what I was needing. Probably a simple gnumeric->LaTeX
"filter" that uses "ssconvert" is sufficient:

[EMAIL PROTECTED]:~$ ssconvert --list-exporters
ID   | Description
...
Gnumeric_html:latex_table| LaTeX 2e (*.tex) table fragment
Gnumeric_html:latex  | LaTeX 2e (*.tex)
...

plus a very simple Inset that displays a preview of the latex-ified
table on the screen, and exports the converted LaTeX when asked for.

   T.



Re: Approaching LyX 1.5.3 [status update #2]

2007-11-12 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote:
> With this patch yes. But we can also move the opening/closing to the
> LFUN themselves which would be easy.

I see.

> > If I had the choice (and it boils down to an either/or), I'd rather do
> > without mouse hover.
>
> No, mouse hover is just a symptom. Multiple views synchronization of the
> inset status is the real problem.

OK.

Jürgen


Re: Approaching LyX 1.5.3 [status update #2]

2007-11-12 Thread Abdelrazak Younes

Jürgen Spitzmüller wrote:

Abdelrazak Younes wrote:

This patch (for trunk) mostly fixes the problem. The downside is that
the inset is not automatically "uncollapsed" when you leave the inset
after an automatic opening. The inset might also refuse to collapse if
the cursor is within it in another view.


So we end up again with all footnotes open after spell checking or 
find&replace?


With this patch yes. But we can also move the opening/closing to the 
LFUN themselves which would be easy.




If I had the choice (and it boils down to an either/or), I'd rather do without 
mouse hover.


No, mouse hover is just a symptom. Multiple views synchronization of the 
inset status is the real problem.


Abdel.



Re: Insets (un)collapsing, was: Approaching LyX 1.5.3 [status update #2]

2007-11-12 Thread Abdelrazak Younes

Pavel Sanda wrote:
This patch (for trunk) mostly fixes the problem. The downside is that the 
inset is not automatically "uncollapsed" when you leave the inset after an 


i'm still puzzled by the way lyx opens insets when more windows are involved.
how it should ideally behave ?
for example (in 1.5.2):

1. launch lyx, new file, insert box
2. new window 2
3. collapse in window 2

now strange things happen - when hoovering with mouse over inset alternately in
window 2 and 1 it gets open, but its wrongly redrawed in window 2.  then when
i'm editing in window 2 for a while - collapsing, uncollapsing, typing etc,
painting gets right and i'm not able to force it to behave the same way -
hoover with mouse does not nothing. 


another strange thing - i cant uncollapse the inset in window 2 when wrongly
repainted. when i move over window 1 to uncollapse, all collapsing disappears
before i reach the inset.

so it seems that the insets are not in synchro - window 2 thinks it should be
opened and when moving over window 2 it gets opened, but it does not recalculate
apprpriately height of document - hence the paint problem.  in contrary window 1
thinks it shouldt be closed and when moving with mouse over window 1 both
insets get closed.


Some but not all of these problem will be solved by my patch.



i dont desire to fix this in 1.5 series, but i would like to know, whats the 
intended behaviour in order to know what is bug and what is correct.


Two solutions:
1) for each and every "visual" action verify that this action is 
triggered the same way if this inset is also displayed in another view.


2) understand that "visual" action is *visual* and do not try to modify 
the other view to behave the same. This means that insets should be 
opened or close independently in each view.


1 is more or less what we do now minus the bugs. I personally prefer 2: 
we should move the "mouse hover" and "collapsable" statuses to a 
BufferView dependant repository.


Abdel.



Re: Approaching LyX 1.5.3 [status update #2]

2007-11-12 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote:
> This patch (for trunk) mostly fixes the problem. The downside is that
> the inset is not automatically "uncollapsed" when you leave the inset
> after an automatic opening. The inset might also refuse to collapse if
> the cursor is within it in another view.

So we end up again with all footnotes open after spell checking or 
find&replace?

If I had the choice (and it boils down to an either/or), I'd rather do without 
mouse hover.

Jürgen


pdf preview is clipped

2007-11-12 Thread Neal Becker
lyx-1.5.2 (linux).  I'm inserting a pdf graphic.  It looks fine in the final
pdf output, but the preview is clipped on the right.  For no good reason. 
There is room to show the rest, but nonetheless, it's clipped off.




Re: Insets (un)collapsing, was: Approaching LyX 1.5.3 [status update #2]

2007-11-12 Thread Pavel Sanda
> This patch (for trunk) mostly fixes the problem. The downside is that the 
> inset is not automatically "uncollapsed" when you leave the inset after an 

i'm still puzzled by the way lyx opens insets when more windows are involved.
how it should ideally behave ?
for example (in 1.5.2):

1. launch lyx, new file, insert box
2. new window 2
3. collapse in window 2

now strange things happen - when hoovering with mouse over inset alternately in
window 2 and 1 it gets open, but its wrongly redrawed in window 2.  then when
i'm editing in window 2 for a while - collapsing, uncollapsing, typing etc,
painting gets right and i'm not able to force it to behave the same way -
hoover with mouse does not nothing. 

another strange thing - i cant uncollapse the inset in window 2 when wrongly
repainted. when i move over window 1 to uncollapse, all collapsing disappears
before i reach the inset.

so it seems that the insets are not in synchro - window 2 thinks it should be
opened and when moving over window 2 it gets opened, but it does not recalculate
apprpriately height of document - hence the paint problem.  in contrary window 1
thinks it shouldt be closed and when moving with mouse over window 1 both
insets get closed.

i dont desire to fix this in 1.5 series, but i would like to know, whats the 
intended behaviour in order to know what is bug and what is correct.

pavel


Re: LaTeX in-table computations.

2007-11-12 Thread Pavel Sanda
> The latex roundtrip problem can be fixed another way:

this is worth to put somewhere in wiki if its not already there.
pavel


Re: Approaching LyX 1.5.3 [status update #2]

2007-11-12 Thread Abdelrazak Younes

Abdelrazak Younes wrote:

Abdelrazak Younes wrote:

Jürgen Spitzmüller wrote:
We are already pretty close to a release: we have fixed the 
regressions introduced with 1.5.2 (pixmap cache, AMS classes) and 
several other things, including 9 critical bugs. So 1.5.3svn is 
significantly ahead of 1.5.2, IMHO.


Therefore, I don't want to hold back the release very much longer. 
However, there are still some things left to do.


On bugzilla, there are five open critical bugs. I think at least 
these two should be fixed:


4333   cri   lyx crashes when opening 1.4.3. file with index 
containin... 4346   cri   Synchronizing insets crash when two windows 
open


I hope that Abdel and José, as the experts in the respective area, 
will find time to have a look.


I had a look to 4346. It's due to the autoOpen flag which is decided 
at metrics time. It basically decides to open the inset if the cursor 
is inside. This is not bad in itself but it is bad that this decision 
happens at metrics time. Even if I don't like this, the collapsible 
status is a content and everything that is content should never be 
decided at metrics.


I'll try to fix that in trunk and backport the fix afterwards.


Hum, not so easy... autoOpen_ was introduced in rev 10495 to fix bug 1921:

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

This obviously doesn't work well with multiview and is (again) a strong 
hint that the collapsable status is *not* contents and should not be 
saved in the LyX file.


Anyway, I am not sure this is easily fixable...


This patch (for trunk) mostly fixes the problem. The downside is that 
the inset is not automatically "uncollapsed" when you leave the inset 
after an automatic opening. The inset might also refuse to collapse if 
the cursor is within it in another view.


Opinions?

Abdel.
Index: insets/InsetCollapsable.cpp
===
--- insets/InsetCollapsable.cpp (revision 21550)
+++ insets/InsetCollapsable.cpp (working copy)
@@ -46,7 +46,7 @@
 
 InsetCollapsable::CollapseStatus InsetCollapsable::status() const
 {
-   return autoOpen_ ? Open : status_;
+   return status_;
 }
 
 
@@ -54,7 +54,7 @@
 {
switch (decoration()) {
case Classic:
-   if (status() == Open) {
+   if (status_ == Open) {
if (openinlined_)
return LeftButton;
else
@@ -78,7 +78,7 @@
 InsetCollapsable::InsetCollapsable(BufferParams const & bp,
CollapseStatus status, InsetLayout const * il)
: InsetText(bp), layout_(il), status_(status),
- openinlined_(false), autoOpen_(false), mouse_hover_(false)
+ openinlined_(false), mouse_hover_(false)
 {
setAutoBreakRows(true);
setDrawFrame(true);
@@ -93,7 +93,6 @@
labelstring_(rhs.labelstring_),
status_(rhs.status_),
openinlined_(rhs.openinlined_),
-   autoOpen_(rhs.autoOpen_),
// the sole purpose of this copy constructor
mouse_hover_(false)
 {
@@ -192,8 +191,6 @@
 {
BOOST_ASSERT(layout_);
 
-   autoOpen_ = mi.base.bv->cursor().isInside(this);
-
FontInfo tmpfont = mi.base.font;
mi.base.font = layout_->font;
mi.base.font.realize(tmpfont);
@@ -258,7 +255,6 @@
 {
BOOST_ASSERT(layout_);
 
-   autoOpen_ = pi.base.bv->cursor().isInside(this);
ColorCode const old_color = pi.background_color;
pi.background_color = backgroundColor();
 
@@ -450,6 +446,7 @@
//lyxerr << "InsetCollapsable: edit left/right" << endl;
cur.push(*this);
InsetText::edit(cur, left);
+   status_ = Open;
 }
 
 
Index: insets/InsetCollapsable.h
===
--- insets/InsetCollapsable.h   (revision 21550)
+++ insets/InsetCollapsable.h   (working copy)
@@ -176,8 +176,6 @@
mutable CollapseStatus status_;
/// a substatus of the Open status, determined automatically in metrics
mutable bool openinlined_;
-   /// the inset will automatically open when the cursor is inside
-   mutable bool autoOpen_;
/// changes color when mouse enters/leaves this inset
bool mouse_hover_;
 };


Re: any known problems with gcc-4.2?

2007-11-12 Thread Helge Hafting

Mikhail Teterin wrote:

Hello!

A user of FreeBSD-7.0-BETA2 has just reported a problem with lyx seg-faulting 
at start-up:


http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/117963

(the crash is inside calloc() suggesting a memory corruption).

It seems to work for me here, on FreeBSD-6.2. The most pronounced difference 
between the OS-releases is the version of the compiler tool-chain. On 7.x we 
use gcc-4.2 and on 6.x it is still 3.4.6.


Were there any known problems with lyx-1.4.4 and gcc-4.2 or do I need to dig 
deeper into it? Thanks!
  

Hard to say. I use gcc-4.2 to compile lyx-1.6svn on linux.
Lyx-1.6svn segfaults occationally, but that is expected for
development versions.

If you want a stable LyX, consider 1.5.2 which is newer than 1.4.4

Helge Hafting


Re: LaTeX in-table computations.

2007-11-12 Thread Helge Hafting

Tommaso Cucinotta wrote:

Darren Freeman ha scritto:

just in the generated output, you would be suggesting a basic embedded
spreadsheet within LyX..

Exactly. I was of course thinking of a way to latexify the connections
among numbers, rather than simply calculating them in LyX. So that,
after export LaTeX -> reimport, the spreadsheet would still work.

I don't know if latex have much spreadsheet capability.
The latex roundtrip problem can be fixed another way:
Have the "simple spreadsheet" implemented in LyX,
export calculated numbers to latex,
and put the formulas in latex comments. The latex import can then
get the formulas back from such comments.


And, needless to say, I felt so stupid when, while writing my last paper,
I was so afraid of having not only to update a few numbers within a
couple of tables, but also to update some totals around (both in the
table, and in the text). I confess I missed the spreadsheet embedding
feature of other editors.

Embedding a gnumeric spreadsheet:
http://www.aitel.hist.no/~helgehaf/gnumeric.lyx
http://www.aitel.hist.no/~helgehaf/spreadsheet.gnumeric
http://www.aitel.hist.no/~helgehaf/spreadsheet.tex

Turning this into a external inset is easy, and gets rid of
the latex commands in the preamble. But there will be
one thing missing - I see no way of forcing gnumeric
to export a .tex file, other than to use the gnumeric GUI.
So LyX can't convert gnumeric to tex automatically, the
user still have to "Save As..."  whenever he updates the spreadsheet.
Actually, gnumeric supports plugins, so there _may_ be a way
of auto-exporting latex.

The openoffice spreadsheet can save a pdf file, which also
is easy to import in LyX. Openoffice also have an API for
"remote control" so I guess it is possible to make LyX
control oocalc in order to update the PDF automatically.
The one problem here is that
oocalc exports a whole page, so you have to experiment
with the graphichs clipping in LyX in order to  trim off
the excess whitespace. Example:
http://www.aitel.hist.no/~helgehaf/spreadsheet.ods
http://www.aitel.hist.no/~helgehaf/oocalc.lyx

Helge Hafting


Re: 1.6svn module URL in use, but doesn't show up in charstyle menu :-(

2007-11-12 Thread Martin Vermeer

...

> With 1.6, it seems like the writer not only need to set the type of
> a new document, but also pick a selection of modules. This is the
> problem, one must pick the modules before they are useable.
> That makes sense for specialized stuff, but "strong" and "URL"
> is generic stuff that lots of people uses now and then.


Yes, I agree with this. 

But I also think URL should show up in the Custom menu, and Strong in
the Charstyles.

- Martin


Re: [Cvslog] r21533 - /lyx-devel/trunk/lib/layouts/url.module

2007-11-12 Thread Helge Hafting

Richard Heck wrote:

Martin Vermeer wrote:

On Fri, Nov 09, 2007 at 05:18:34PM +, [EMAIL PROTECTED] wrote:
 

Author: rgheck
Date: Fri Nov  9 18:18:32 2007
New Revision: 21533

URL: http://www.lyx.org/trac/changeset/21533
Log:
Fix URL module.

Modified:
lyx-devel/trunk/lib/layouts/url.module

Modified: lyx-devel/trunk/lib/layouts/url.module
URL: 
http://www.lyx.org/trac/file/lyx-devel/trunk/lib/layouts/url.module?rev=21533 

== 


--- lyx-devel/trunk/lib/layouts/url.module (original)
+++ lyx-devel/trunk/lib/layouts/url.module Fri Nov  9 18:18:32 2007
@@ -3,7 +3,7 @@
 Format 4
 
 InsetLayout URL

-  LyXType custom
+  LyXType charstyle



I don't think this is right. It is not a charstyle.
  
Oh, I see, this has changed in other ways. Originally, I had it as a 
charstyle. But now we have "decoration minimalistic", so it's not a 
charstyle. In any event, that means the source of Helge's confusion 
was that it doesn't appear under character styles but under 
Insert>Custom Inset. 

Thanks, I found it under "custom inset"
The help text for the URL module still says it "adds a character style
for the \url command." , though, which is misleading now.

Helge Hafting


Re: 1.6svn module URL in use, but doesn't show up in charstyle menu :-(

2007-11-12 Thread Helge Hafting

Martin Vermeer wrote:

On Fri, Nov 09, 2007 at 12:19:39PM -0500, Richard Heck wrote:
  

 Dov Feldstern wrote:


Helge Hafting wrote:
  

But I can't make more URL's, except by copy+pasting the existing ones.
Edit->charstyle offers "code" and such from "logical markup",
URL is not offered.


URL is in a separate module (not in logical markup). I'm not sure why this 
is, though...
  
 If it seems better to put it into logical markup, we can do that. The URL 
 module existed, though, before the logical markup module did.


 That said, the lyx2lyx for converting URLs adds the URL module, since the 
 url styles won't print properly without it. The problem was that some change 
 somewhere along the way broke the URL module. I've just committed a fix. So 
 if we did add URL to logicalmkup.module, we'd need to change the lyx2lyx.


 Richard




Eh, shouldn't URL rather be in stdinsets? If it's a standard 
feature..
  

This is important.
1.6svn has a lot of interesting modules, but how is the writer expected
to find them?

With 1.5, anything you want to use (boxes, emph, color,...) is available
always. You use it, and then LyX add whatever \usepackage it takes.

With 1.6, it seems like the writer not only need to set the type of
a new document, but also pick a selection of modules. This is the
problem, one must pick the modules before they are useable.
That makes sense for specialized stuff, but "strong" and "URL"
is generic stuff that lots of people uses now and then.

Helge Hafting




Re: 1.6svn module URL in use, but doesn't show up in charstyle menu :-(

2007-11-12 Thread Helge Hafting

Dov Feldstern wrote:

Helge Hafting wrote:

I opened an old document with yesterdays 1.6svn.
Old URL insets were converted to URL charstyle - nice.

But I can't make more URL's, except by copy+pasting the existing ones.
Edit->charstyle offers "code" and such from "logical markup",
URL is not offered.




URL is in a separate module (not in logical markup). I'm not sure why 
this is, though...

Yes, I know that URL and the other markup are separate modules.
The problem is this: my document uses both, but only one appears
in the charstyle menu. This makes it hard to write more URLs.


Helge Hafting


Re: Approaching LyX 1.5.3 [status update #2]

2007-11-12 Thread Abdelrazak Younes

Jürgen Spitzmüller wrote:

Abdelrazak Younes wrote:

I had a look to 4346. It's due to the autoOpen flag which is decided at
metrics time. It basically decides to open the inset if the cursor is
inside.


Does autoOpen interact with mouse hover, or why does it have an impact here?


Mouse hover triggers a redraw but the status might not be in line with 
what's on screen, hence the drawing and metrics problems.


Abdel.



Re: www

2007-11-12 Thread Jean-Marc Lasgouttes
Pavel Sanda <[EMAIL PROTECTED]> writes:

> hi,
>
> i have been searching something in our web and its like visiting 
> archaeological
> museum.
>
> i'd like to to put few things back into more fresh outlook, see attachment.
> the current version (background and other pictures can be broken) is on
> http://195.113.31.123/~sanda/junk/wwlyx/www/
>
> because i understand many changes are matter of taste, i'm waiting
> for your comments or objections. also native speaker can look it over ;)

I think you can go ahead. A few comments on the "related software"
page: you can make clear that at least Qt 4.1 is required; libXpm can
be removed; teTeX should be replaced by TeXLive (and MikTex and
MacTeX); Python is now used for _all_ scripting; I think the SGML page
can be removed; Perl is not needed anymore; The link to freetype can
be removed too I think.

JMarc


French translations

2007-11-12 Thread Siegfried MEUNIER-GUTTIN-CLUZEL

I hereby grant permission to licence my contributions to LyX under the Gnu
General Public Licence, version 2 or later.

Siegfried MEUNIER-GUTTIN-CLUZEL


Re: Approaching LyX 1.5.3 [status update #2]

2007-11-12 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote:
> I had a look to 4346. It's due to the autoOpen flag which is decided at
> metrics time. It basically decides to open the inset if the cursor is
> inside.

Does autoOpen interact with mouse hover, or why does it have an impact here?

Jürgen


Re: CVS/SVN logs

2007-11-12 Thread Jean-Marc Lasgouttes
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

> [EMAIL PROTECTED] (Jürgen Spitzmüller) writes:
>
>> Michael Gerz wrote:
>>> Pavel's commits do not appear in the cvs log mailing list.
>>
>> He's not subscribed yet (only Lars can accept the subscription).
>
> Moreover, Pavel, you should try to subscribe your new [EMAIL PROTECTED]
> address not the other one.

And now that it is done, we have to hope that Lars will validate the
subscription. I am not list owner...

JMarc


Re: Approaching LyX 1.5.3 [status update #2]

2007-11-12 Thread Abdelrazak Younes

Abdelrazak Younes wrote:

Jürgen Spitzmüller wrote:
We are already pretty close to a release: we have fixed the 
regressions introduced with 1.5.2 (pixmap cache, AMS classes) and 
several other things, including 9 critical bugs. So 1.5.3svn is 
significantly ahead of 1.5.2, IMHO.


Therefore, I don't want to hold back the release very much longer. 
However, there are still some things left to do.


On bugzilla, there are five open critical bugs. I think at least these 
two should be fixed:


4333   cri   lyx crashes when opening 1.4.3. file with index 
containin... 4346   cri   Synchronizing insets crash when two windows 
open


I hope that Abdel and José, as the experts in the respective area, 
will find time to have a look.


I had a look to 4346. It's due to the autoOpen flag which is decided at 
metrics time. It basically decides to open the inset if the cursor is 
inside. This is not bad in itself but it is bad that this decision 
happens at metrics time. Even if I don't like this, the collapsible 
status is a content and everything that is content should never be 
decided at metrics.


I'll try to fix that in trunk and backport the fix afterwards.


Hum, not so easy... autoOpen_ was introduced in rev 10495 to fix bug 1921:

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

This obviously doesn't work well with multiview and is (again) a strong 
hint that the collapsable status is *not* contents and should not be 
saved in the LyX file.


Anyway, I am not sure this is easily fixable...

Abdel.



Re: Approaching LyX 1.5.3 [status update #2]

2007-11-12 Thread Abdelrazak Younes

Jürgen Spitzmüller wrote:
We are already pretty close to a release: we have fixed the regressions 
introduced with 1.5.2 (pixmap cache, AMS classes) and several other things, 
including 9 critical bugs. So 1.5.3svn is significantly ahead of 1.5.2, IMHO.


Therefore, I don't want to hold back the release very much longer. However, 
there are still some things left to do.


On bugzilla, there are five open critical bugs. I think at least these two 
should be fixed:


4333   cri   lyx crashes when opening 1.4.3. file with index containin... 
4346   cri   Synchronizing insets crash when two windows open


I hope that Abdel and José, as the experts in the respective area, will find 
time to have a look.


I had a look to 4346. It's due to the autoOpen flag which is decided at 
metrics time. It basically decides to open the inset if the cursor is 
inside. This is not bad in itself but it is bad that this decision 
happens at metrics time. Even if I don't like this, the collapsible 
status is a content and everything that is content should never be 
decided at metrics.


I'll try to fix that in trunk and backport the fix afterwards.

Abdel.