Re: missing ;

2002-07-12 Thread Andre Poenitz

On Thu, Jul 11, 2002 at 07:45:01PM +0200, Edwin Leuven wrote:
 I had to do this in frontends/DialogBase.h in order to compile:
 
 -   virtual ~DialogBase() {}
 +   virtual ~DialogBase() {};

This semicolon is not necessary. What compiler is that?

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)



Re: Preview: request for testers

2002-07-12 Thread Andre Poenitz

On Thu, Jul 11, 2002 at 07:04:03PM +0100, Angus Leeming wrote:
   // top_y is not const because it's reset by getRowNearY.
   int top_y = bv.text-first_y;
   Row const * row = bv.text-getRowNearY(top_y);
 
   int const bv_height = bv.painter().paperHeight();
   int height = row-height();
   rows.push_back(row);
 
   while (height  bv_height) {
   row = row-next();
 + if (!row)
 + break;
   height += row-height();
   rows.push_back(row);
   }
 
   return rows;
 }

What about writing this as 

for (int height = 0; row  height  bv_height; row = row-next()) {
height += row-height();
rows.push_back(row);
}

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)



Re: Graphics Inset: what determines the resolution of LyX-View of the figures?

2002-07-12 Thread Herbert Voss

Garst R. Reese wrote:

Garst, I forgot to ask, if your images are scanned from
an original or saved from an application?


 They were saved from Cadsoft Eagle which uses old ps, then converted
 with ps2ps, but with your new scheme that step is no longer needed.


but they are saved in color mode, right?

Herbert



-- 
http://www.lyx.org/help/




Re: font_loader singletons (ping Andre)

2002-07-12 Thread Andre Poenitz

On Fri, Jul 12, 2002 at 03:42:09AM +0100, John Levon wrote:
 Currently qt2 has to manually edit the frontends/font_loader.h
 to include the right one. So I need to change this. I think
 bool lyx_gui::font_available() and lyx_gui::update_fonts() is the best
 solution.
 
 Seeing as mathed is one of the two users of fontloader in the core,
 would you be happy with this Andre ?

Since I don't know what you are talking about: Go ahead and let's see what
happens.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)



Re: Preview: request for testers

2002-07-12 Thread Juergen Vigna

Angus Leeming wrote:

 One other point (for Jürgen?): I think that a (working) isInsetVisible could 
 be used to advantage by BufferView::updateInset. Seems intelligent to only 
 redraw insets that are visible...

I think you didn't understand the Row::pos() variable/function. The pos
returning from a row is the _first_ position of the first character of
this row inside the Row::par(). You understand that in the visible rows
you may have more than one paragraph and so the use of the start/end pos
cannot work as you use it because most probably the lastrow is inside a
different paragraph then the firstrow.

Capito ;)

Jug

-- 
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen VignaE-Mail:  [EMAIL PROTECTED]
Mitterstrich 151/A  Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39050 SteineggWeb: http://www.lyx.org/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._




Make default converter accessible in preferences

2002-07-12 Thread R. Lahaye


Hi,

Since I need to modify slightly the default converter,
I thought of the following to be useful:

It would be nice if the default converter is also visible
as an entry in the preferences/converters list, e.g. as:

  From  $$fformat
To  $$tformat
 Converter  convert $$fformat:$$i $$tformat:$$o

Or something the like.

Rob.



Re: Make default converter accessible in preferences

2002-07-12 Thread Herbert Voss

R. Lahaye wrote:

 
 Since I need to modify slightly the default converter,
 I thought of the following to be useful:
 
 It would be nice if the default converter is also visible
 as an entry in the preferences/converters list, e.g. as:
 
   From  $$fformat
 To  $$tformat
  Converter  convert $$fformat:$$i $$tformat:$$o


A shellscript is the best way, where the user can write

any stuff for a default conversion. Maybe that someone
like different steps in from-to, which cannot be handled
in a useful way in the preferences.

And this script can be called with the above four parameters

Herbert



-- 
http://www.lyx.org/help/




Re: Is this the right preview info for LyX?

2002-07-12 Thread Angus Leeming

On Thursday 11 July 2002 11:10 pm, David Kastrup wrote:
 That regexp looks _slow_.  And I am surprised that the + should not
 be interpreted specially.  How about
 ended\.(\(-?[0-9]*\)\+\(-?[0-9]+\)x\(-?[0-9]+\))/\1 \2 \3 \4/p;d  
1lyxpreview.log  1lyxpreview.metrics

;-) I just want something quickly. But thanks. I'll modify the script.

 Anyhow: if you need your entries in a different format, there is no
 sane reason why I should not write them out immediately in the format
 you desire: this is a LyX-specific option, no need to make it more
 complicated for LyX to parse it than necessary.

Great. If you output
Preview Snippet 1: 492688 0 744653
Preview Snippet 2: 1441792 163840 16026923
Preview Snippet 3: 282168 0 377591
Preview Snippet 4: 1619363 449545 16026923
I'd dump that straight into the .metrics file with
set -e /Preview Snippet/p;d  1lyxpreview.log  1lyxpreview.metrics

Regards,
Angus



Re: could not locate file

2002-07-12 Thread Herbert Voss

Garst R. Reese wrote:

 ps view Error -- could not locate file with any of these extensions ...
 ps.gz


I'm sorry, but I have no running 1.2.1cvs, but with 1.3 it's no problem.

 -rw-r--r--1 garstusers6969 Jul 12 03:53 example.ps.gz


can you give it a try when renaming the file to

example.eps.gz

HErbert



-- 
http://www.lyx.org/help/




Re: Preview: request for testers

2002-07-12 Thread Angus Leeming

On Thursday 11 July 2002 7:43 pm, Kornel Benko wrote:
 On Thursday 11 July 2002 20:21, Angus Leeming wrote:
  Ok. Thanks. I'll have a look tomorrow.

 One more thing: my labels are now redefined, so that the referencies no
 longer match. (You know, underlines in labels, see attached)

Some strange interation with underline.sty? This isn't preview-specific 
however. File a bug report and badger Herbert ;-)

Angus



Re: Make default converter accessible in preferences

2002-07-12 Thread R. Lahaye

Herbert Voss wrote:
 
 R. Lahaye wrote:
 
  It would be nice if the default converter is also visible
  as an entry in the preferences/converters list, e.g. as:

 A shellscript is the best way, where the user can write

Hmmm, a unix guru certainly loves such kind of shell script
solutions, but does the average user?

Questions as Where is that script? and How to write that
shell script?, may arise (first question is also mine!).
Covering it up in the preferences, would partially take care
of all that.

But I agree that the Converter entry in preferences is
nevertheless a sort of shell script.

Regards,
Rob.



Re: Preview: request for testers

2002-07-12 Thread Angus Leeming

On Thursday 11 July 2002 9:04 pm, Herbert Voss wrote:
 Another small problem:


 attached are the mathbox and the preview,
 it's still a bit too deep.

 Herbert

You mean Original doesn't line up with fürht? Then modify your copy of 
lyxpreview2ppm.sh. That's why it's a shell script after all. You should need 
to just set REMOVE_WS=1.

Angus



Preferences font zoom/dpi needs reload of document !?!

2002-07-12 Thread R. Lahaye


Hi,

Changes in Preferences-LookFeel-ScreenFonts-Zoom and/or ScreenDPI,
are immediately visible when clicking on apply in 1.2.0.

However, in 1.3.0cvs this is not so. I need to close and reopen
the document in order to have these changes to take effect.

Is this broken feature known?

Rob.



Re: minibuffer design problems

2002-07-12 Thread Juergen Vigna

John Levon wrote:

 I guess we also need something to get the information string
 (I assume this is the keyboard shortcut list string ?)
 
 It's quite wrong IMHO for the core code to push /anything/ to the
 MiniBuffer: it should only push to the StatusBar
 
 Note such a scheme still alllows the xforms-style commingling
 
 Does anybody have any comments / objections ? Jug ? Asger ?

I don't understand really what problems you have with this?
Why do you need two different objects? Isn't it possible to
do this internal to the Minibuffer-Object? Why should the core
care to change between a StatusBar and a Minibuffer. What real
problem do you have to make this internal to the object?
You just have to define a Input object and a display object and
change between them when needed. That shouldn't be that big of
a problem (just show/hide calls to the objects which have the same
size/position). IMO that for the core it should be just one object
to not complicate the stuff to much and for the frontend it should
be really easy to implement this as such. But obviously you are
the qt expert (I only made such small projects as

publicity
KSendFax, KGoodStuff
/publicity

which I recently ported to qt3 ;)

   Jug

-- 
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen VignaE-Mail:  [EMAIL PROTECTED]
Mitterstrich 151/A  Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39050 SteineggWeb: http://www.lyx.org/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._




Re: Preview: request for testers

2002-07-12 Thread Angus Leeming

On Thursday 11 July 2002 8:57 pm, Herbert Voss wrote:
 Angus Leeming wrote:
   Attached is a smart loader for the previews. I'd really, really like
   interested users --- that's the mathematicians out there who use

 /lots/ of

   equations to test it out.
  
   It's meant to enable you to generate and display the previews with no
   discernible effect on LyX's responsiveness.

 nice work :-)

 I loaded one of my books with a lot of mathstuff. Only some
 problems:
 - it starts only when I walk with the cursor through some
 mathboxes

Yes. For some reason the first page doesn't think it's visible until the 
entire document is loaded. Or something.

If I can't track this down properly (quite possible) the work around is to 
load insets for the first page anyway. Should be easy enough.

 - in tabulars with matstuff in every cell, I have some
 in preview and some not, not so good
 sed: Couldn't open file bbox.sed
 extracting metrics failed.
 is the message, when I walk from cell to cell
 - now I see, that tabulars are totally ignored???

Really? Small example doument please.

 - stere is still the problem with the not ignored
 geometry settings - eqno is unvisible

You're asking the wrong man. Ask a LaTeX expert ;-)

 - the eqno is f.ex: 0.21 but it's the third chapter
 and it should be 3.5, a minor problem ...

Alternatively, you could hack preview.sty so that it outputs (eq:label) 
rather than (0.21) [eq:label

David said he'd be willing to accept a patch...

 - equations in floats (caption) are not previewed
 maybe all insets???

It's possible that my isInsetVisible function won't work on these. Same 
problem as the tabulars and something that Jürgen might be able to help with.

 - scrolling quickly to the end - peng

Fixed.

 - restart and imidiately scrolling to the end was ok,
 but now only the formulas through which I walked
 were previewed, no the one before or behind

I don't understand what you mean here. 

 Statistics:
 285 numbered equations
 732 pages in the metrics file
 57 MBytes for the ppm-files

Experiment with gs -sDEVICE=pnmraw. Does that reduce disk footprint much?

Maybe now is the time to write/use lyxpreview2png.sh.
On loading, the xforms loader will have to run a conversion to ppm step 
first, so loading will take a little longer but not much. Disk footprint 
would then be O(1MB). Moreover the Qt loader will just load ;-)

Angus



Re: Preview: request for testers

2002-07-12 Thread Herbert Voss

Angus Leeming wrote:

 On Thursday 11 July 2002 9:04 pm, Herbert Voss wrote:
 
Another small problem:


attached are the mathbox and the preview,
it's still a bit too deep.

Herbert

 
 You mean Original doesn't line up with fürht? Then modify your copy of 
 lyxpreview2ppm.sh. That's why it's a shell script after all. You should need 
 to just set REMOVE_WS=1.


sure, but this looks a bit ugly ... the preview stuff is very
nice so that it should be 100% to the output which I also attached.

Herbert



-- 
http://www.lyx.org/help/





Re: Preview: request for testers

2002-07-12 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Friday 12 July 2002 09:00, Angus Leeming wrote:
 On Thursday 11 July 2002 7:43 pm, Kornel Benko wrote:
  On Thursday 11 July 2002 20:21, Angus Leeming wrote:
   Ok. Thanks. I'll have a look tomorrow.
 
  One more thing: my labels are now redefined, so that the referencies no
  longer match. (You know, underlines in labels, see attached)

 Some strange interation with underline.sty? This isn't preview-specific
 however. File a bug report and badger Herbert ;-)

Well, I don't think so. underline.sty may have to do something with display
after the latex-call, but here it is the display of an internal table in lyx.
(The lyx-file itself is not corrupted, lyx-1.2 is working ok)

Kornel

- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPS6G/rewfbDGmeqhAQHPOAP9GZluTPcuuOubc4OeCMXPzYj93vkq9EMS
nxeGUxVaqCmPH/YjiedcQsitCOSSc7n+RIFcEMzjsJRk8Uw8pvZj2RRs5I0CH17x
vpRwSAP73hb6q4yWQSO7z/tI9iaoxLw9yO9ipuDoOPs9fiVkNamNYT1nNuBrFyzR
POZa/VSeIlg=
=55vw
-END PGP SIGNATURE-




Re: Graphics Qt

2002-07-12 Thread Angus Leeming

On Friday 12 July 2002 1:21 am, John Levon wrote:
 Angus what should we do about getPixmap() of Image class ?

 Can't xforms code do the standard static_cast to xformsImage
 so Image doesn't need to ahve getPixmap() ? A bit ugly ...

I didn't try and think about an elegant solution at the time.

Why not:
class grfx::Pixmap {
};

class grfx::Image {
public:
grfx::Pixmap  getPixmap();
};

where grfx::Pixmap is an abstract base class. Daughter classes would contain 
the Pixmap proper (X) or QPixmap?

I have no real ideas to be honest.

 Also, is boost::bind() idempotent ? lyx_gui::init_graphics() gets
 called a lot

It shouldn't. Once is enough:

Cache  Cache::get()
{
static bool start = true;
if (start) {
start = false;
lyx_gui::init_graphics();
}

// Now return the cache
static Cache singleton;
return singleton;
}

Maybe you could track that down?
Angus



Re: Qt image loader

2002-07-12 Thread Angus Leeming

On Friday 12 July 2002 2:50 am, John Levon wrote:
 Well, it's hobbling along now. 

Oh well done!

 So far it's been very simple and easy to do. 

 Angus, please have a look around. Why doesn't LyX like the jpg format ? or
 pbm or gif etc. ?

I never bothered to track this down. Feel free.

 Perhaps this will convince the sceptics that the TODO list really isn't
 that long :)

No, I think you've made remarkable progress. Wish I had more time to help.
Angus



Re: GraphicsImageXpm

2002-07-12 Thread Angus Leeming

On Friday 12 July 2002 3:15 am, John Levon wrote:
 should these files be moved to frontends/xforms/ ? I say yea

I say nay. xforms has its own image loader. Once xforms 1.0 comes out and we 
insist that people use it GraphicsImageXpm can go into the attic. Till then, 
stop meddling.

A



Re: init_graphics()

2002-07-12 Thread Angus Leeming

On Friday 12 July 2002 3:44 am, John Levon wrote:
 Angus, why is this a separate method anyway ? Can't
 lyx_gui::start() deal with setting up the signals itself ?

Sigh. Possibly. Experiment.



Re: Exit confirmation preference

2002-07-12 Thread Angus Leeming

On Friday 12 July 2002 4:07 am, John Levon wrote:
 What would people think of making this pref default to /off/

 (Remember it is really additional exit confirmation - you
 still get a cancel available if you haven't saved a document)

 regards
 john

Why? I don't understand why you are trying to impose such /unnecessary/ stuff 
on the wider world. Defaults should /never/ change without /ver/ good reason. 
This isn't one of them.

A



Re: Preview: request for testers

2002-07-12 Thread Herbert Voss

Angus Leeming wrote:


Statistics:
285 numbered equations
732 pages in the metrics file
57 MBytes for the ppm-files

 
 Experiment with gs -sDEVICE=pnmraw. Does that reduce disk footprint much?


yes, up 14.5 MBytes

Herbert


-- 
http://www.lyx.org/help/




Re: Preview: request for testers

2002-07-12 Thread Herbert Voss

Herbert Voss wrote:

 Angus Leeming wrote:
 
 
 Statistics:
 285 numbered equations
 732 pages in the metrics file
 57 MBytes for the ppm-files


 Experiment with gs -sDEVICE=pnmraw. Does that reduce disk footprint much?
 
 
 
 yes, up 14.5 MBytes


aehm ... downto ... :-)

Herbert



-- 
http://www.lyx.org/help/




Re: Graphics Inset: what determines the resolution of LyX-View of the figures?

2002-07-12 Thread Angus Leeming

On Friday 12 July 2002 6:07 am, Garst R. Reese wrote:
 Angus Leeming wrote:
  Well then, don't use convert, use gs.
 
  Use this as a converter from /any/ PostScript type file to ppm format:
 
  gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pnm -sOutputFile=$$o $$i
 
  In addition, you should comment out the lines 422-426 in xformsImage.C
  #ifdef HAVE_FLIMAGE_ENABLE_PS
  // xforms recognises PS but not EPS
  flimage_enable_ps();
  #endif
 
  If you're using xforms 0.88, you'll need to define also a converter from
  ppm to xpm. I'd recommend ppmtoxpm.
 
  I think that this is probably the way to go anyway, as it'll let gs deal
  with nasty PostScript files and not us.
 
  Try it out and let us know.
 
  Angus

 I'm using xforms-1.0rc4 with 1.2.x CVS
 I made the above changes in preferences for Postscript-PPM, and
 commented out the code in xformsGImage.C. No affect. 

Rubbish. Huge effect. You can now load /any/ PostScript file by defining 
converters ps-ppm, eps-ppm, epsi-ppm, epsf-ppm and using the above gs 
command to perform the conversion and they'll /all/ work.

If the quality of the conversion is crap you can now state definitively that 
the original file is crap. 

 But I don't understand how it should get from pnm to xpm.

Why would you want to? xforms can load PPM direct.



Re: missing ;

2002-07-12 Thread Edwin Leuven

 This semicolon is not necessary. What compiler is that?

As I said, false alarm, sorry. I am trying to compile the qt2 frontend but 
couldn't get to compile lyxfunc.C. I got tricked into thinking it had 
something todo with the above header file. But now I think it had something 
todo with the boost signal stuff. I get errors like the one below but if I 
move the include of (q)font_loader.h to the bottom of the includes it 
compiles. But I still can't link (see below). I compile with gcc 3.1 btw.

Ed.



In file included from ../../lyx-devel/src/lyxfunc.C:62:
../../lyx-devel/src/insets/insetgraphics.h:34: parse error before `protected'
../../lyx-devel/src/insets/insetgraphics.h:39: parse error before `const'
../../lyx-devel/src/insets/insetgraphics.h:42: destructors must be member
   functions
../../lyx-devel/src/insets/insetgraphics.h:44: non-member function `int
   ascent(BufferView*, const LyXFont)' cannot have `const' method qualifier
../../lyx-devel/src/insets/insetgraphics.h:46: non-member function `int
   descent(BufferView*, const LyXFont)' cannot have `const' method qualifier
../../lyx-devel/src/insets/insetgraphics.h:48: non-member function `int
   width(BufferView*, const LyXFont)' cannot have `const' method qualifier
../../lyx-devel/src/insets/insetgraphics.h:50: non-member function `void
   draw(BufferView*, const LyXFont, int, float, bool)' cannot have `const'
   method qualifier
../../lyx-devel/src/insets/insetgraphics.h:56: parse error before `)' token
../../lyx-devel/src/insets/insetgraphics.h:58: non-member function `void
   write(const Buffer*, std::ostream)' cannot have `const' method qualifier
../../lyx-devel/src/insets/insetgraphics.h:67: non-member function `int
   latex(const Buffer*, std::ostream, bool, bool)' cannot have `const' method
   qualifier
../../lyx-devel/src/insets/insetgraphics.h:69: non-member function `int
   ascii(const Buffer*, std::ostream, int)' cannot have `const' method
   qualifier
../../lyx-devel/src/insets/insetgraphics.h:71: non-member function `int
   linuxdoc(const Buffer*, std::ostream)' cannot have `const' method 
qualifier
../../lyx-devel/src/insets/insetgraphics.h:73: non-member function `int
   docbook(const Buffer*, std::ostream, bool)' cannot have `const' method
   qualifier
../../lyx-devel/src/insets/insetgraphics.h:78: non-member function `void
   validate(LaTeXFeatures)' cannot have `const' method qualifier
../../lyx-devel/src/insets/insetgraphics.h:81: non-member function 
`Inset::Code
   lyxCode()' cannot have `const' method qualifier
../../lyx-devel/src/insets/insetgraphics.h:84: virtual outside class
   declaration
../../lyx-devel/src/insets/insetgraphics.h:84: non-member function `Inset*
   clone(const Buffer, bool)' cannot have `const' method qualifier
../../lyx-devel/src/insets/insetgraphics.h:93: non-member function `const
   InsetGraphicsParams params()' cannot have `const' method qualifier
../../lyx-devel/src/insets/insetgraphics.h:100: parse error before `private'
../../lyx-devel/src/insets/insetgraphics.h:115: non-member function `const
   std::string statusMessage()' cannot have `const' method qualifier
../../lyx-devel/src/insets/insetgraphics.h:117: non-member function `const
   std::string createLatexOptions()' cannot have `const' method qualifier
../../lyx-devel/src/insets/insetgraphics.h:119: non-member function `const
   std::string prepareFile(const Buffer*)' cannot have `const' method 
qualifier
../../lyx-devel/src/insets/insetgraphics.h:129: `friend' can only be specified
   inside a class
../../lyx-devel/src/insets/insetgraphics.h:132: parse error before `}' token
In file included from ../../lyx-devel/src/frontends/Dialogs.h:33,
 from ../../lyx-devel/src/lyxfunc.C:79:
../../lyx-devel/src/frontends/DialogBase.h:29: parse error before `protected'
../../lyx-devel/src/frontends/DialogBase.h:43: virtual outside class
   declaration
../../lyx-devel/src/frontends/DialogBase.h:43: function `void hide()' is
   initialized like a variable
../../lyx-devel/src/frontends/DialogBase.h:45: virtual outside class
   declaration
../../lyx-devel/src/frontends/DialogBase.h:47: virtual outside class
   declaration
../../lyx-devel/src/frontends/DialogBase.h:49: parse error before `}' token
In file included from ../../lyx-devel/src/lyxfunc.C:79:
../../lyx-devel/src/frontends/Dialogs.h:120: parse error before `)' token
In file included from ../../lyx-devel/src/lyxfunc.C:90:
../../lyx-devel/src/support/forkedcontr.h:34: parse error before `protected'
../../lyx-devel/src/support/forkedcontr.h:41: destructors must be member
   functions
../../lyx-devel/src/support/forkedcontr.h:44: syntax error before `' token
../../lyx-devel/src/support/forkedcontr.h:57: non-member function `const
   std::vectorpos_type, std::allocatorpos_type  getPIDs()' cannot have `
   const' method qualifier
../../lyx-devel/src/support/forkedcontr.h:60: non-member function `const
   std::string getCommand(int)' cannot have `const' method qualifier

Re: Preview: request for testers

2002-07-12 Thread Angus Leeming

On Friday 12 July 2002 7:26 am, Andre Poenitz wrote:
 On Thu, Jul 11, 2002 at 07:04:03PM +0100, Angus Leeming wrote:
  // top_y is not const because it's reset by getRowNearY.
  int top_y = bv.text-first_y;
  Row const * row = bv.text-getRowNearY(top_y);
 
  int const bv_height = bv.painter().paperHeight();
  int height = row-height();
  rows.push_back(row);
 
  while (height  bv_height) {
  row = row-next();
  +   if (!row)
  +   break;
  height += row-height();
  rows.push_back(row);
  }
 
  return rows;
  }

 What about writing this as

 for (int height = 0; row  height  bv_height; row = row-next()) {
   height += row-height();
   rows.push_back(row);
 }

 Andre'

Cheers André. I'lll think about it ;-)



Re: Preview: request for testers

2002-07-12 Thread Juergen Vigna

Angus Leeming wrote:
- equations in floats (caption) are not previewed
maybe all insets???
 
 
 It's possible that my isInsetVisible function won't work on these. Same 
 problem as the tabulars and something that Jürgen might be able to help with.

Well I think you have to inform the InsetText that some update happend
and that it has to redraw itself on the row where the insets reside.
I'll try to debug this as soon as your patch is in the main line and
I can do an update. I think this shouldn't hamper the inclusion if it
works in normal text as this surely can be fixed quite fast.

   Jug

-- 
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen VignaE-Mail:  [EMAIL PROTECTED]
Mitterstrich 151/A  Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39050 SteineggWeb: http://www.lyx.org/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._




Re: Is this the right preview info for LyX?

2002-07-12 Thread David Kastrup

Angus Leeming [EMAIL PROTECTED] writes:

 On Thursday 11 July 2002 11:10 pm, David Kastrup wrote:
  That regexp looks _slow_.  And I am surprised that the + should not
  be interpreted specially.  How about
  ended\.(\(-?[0-9]*\)\+\(-?[0-9]+\)x\(-?[0-9]+\))/\1 \2 \3 \4/p;d  
 1lyxpreview.log  1lyxpreview.metrics
 
 ;-) I just want something quickly. But thanks. I'll modify the script.
 
  Anyhow: if you need your entries in a different format, there is no
  sane reason why I should not write them out immediately in the format
  you desire: this is a LyX-specific option, no need to make it more
  complicated for LyX to parse it than necessary.
 
 Great. If you output
 Preview Snippet 1: 492688 0 744653
 Preview Snippet 2: 1441792 163840 16026923
 Preview Snippet 3: 282168 0 377591
 Preview Snippet 4: 1619363 449545 16026923
 I'd dump that straight into the .metrics file with
 set -e /Preview Snippet/p;d  1lyxpreview.log  1lyxpreview.metrics

I have moved the colon so that all diagnostics start with
Preview:

If that's ok, just use grep, which will probably be faster.

grep '^Preview: Snippet /'

And here is the corresponding prlyx.cfg:




msg40858/tex0.tex
Description: Next try.


-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: [EMAIL PROTECTED]



Re: Preview: request for testers

2002-07-12 Thread Angus Leeming

On Friday 12 July 2002 9:06 am, Juergen Vigna wrote:
 Angus Leeming wrote:
 - equations in floats (caption) are not previewed
 maybe all insets???
 
  It's possible that my isInsetVisible function won't work on these. Same
  problem as the tabulars and something that Jürgen might be able to help
  with.

 Well I think you have to inform the InsetText that some update happend
 and that it has to redraw itself on the row where the insets reside.
 I'll try to debug this as soon as your patch is in the main line and
 I can do an update. I think this shouldn't hamper the inclusion if it
 works in normal text as this surely can be fixed quite fast.

Well, another more mundane question. Where should I put it? 
bufferview_funcs.[Ch] ? Probably.



Re: missing ;

2002-07-12 Thread Andre Poenitz

On Fri, Jul 12, 2002 at 10:12:59AM +0200, Edwin Leuven wrote:
 As I said, false alarm, sorry. I am trying to compile the qt2 frontend but 
 couldn't get to compile lyxfunc.C. I got tricked into thinking it had 
 something todo with the above header file. But now I think it had something 
 todo with the boost signal stuff. I get errors like the one below but if I 
 move the include of (q)font_loader.h to the bottom of the includes it 
 compiles. But I still can't link (see below). I compile with gcc 3.1 btw.
 
 Ed.

Could it be that some #endif is missing somewhere?

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)



Re: Is this the right preview info for LyX?

2002-07-12 Thread Angus Leeming

On Friday 12 July 2002 9:08 am, David Kastrup wrote:
  Great. If you output
  Preview Snippet 1: 492688 0 744653
  Preview Snippet 2: 1441792 163840 16026923
  Preview Snippet 3: 282168 0 377591
  Preview Snippet 4: 1619363 449545 16026923
  I'd dump that straight into the .metrics file with
  set -e /Preview Snippet/p;d  1lyxpreview.log  1lyxpreview.metrics

 I have moved the colon so that all diagnostics start with
 Preview:

 If that's ok, just use grep, which will probably be faster.
 grep '^Preview: Snippet /'

Indeed. Cool.

 And here is the corresponding prlyx.cfg:

Thank you. Looks like LyX is going to have working interaction with the 
preview-latex project before your meeting. Hope you drum up some business ;-)

Angus



Re: Preview: request for testers

2002-07-12 Thread David Kastrup

Herbert Voss [EMAIL PROTECTED] writes:

 Angus Leeming wrote:
 
 
 Statistics:
 285 numbered equations
 732 pages in the metrics file
 57 MBytes for the ppm-files
 
  Experiment with gs -sDEVICE=pnmraw. Does that reduce disk footprint
  much?
 
 
 yes, up 14.5 MBytes

This is still ridiculous.  Get this PNG support going.  Of course,
this also explains why previews got slower when color support got
added: I/O time.  ppm files take up three times more space than pgm,
and when you leave off antialiasing, you get pbm, at another factor
of 8 in file size.  I/O time for 57MBytes is far from trivial.

Get this PNG support going.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: [EMAIL PROTECTED]





Re: Preview: request for testers

2002-07-12 Thread Angus Leeming

On Friday 12 July 2002 9:12 am, David Kastrup wrote:
 Herbert Voss [EMAIL PROTECTED] writes:
  Angus Leeming wrote:
  Statistics:
  285 numbered equations
  732 pages in the metrics file
  57 MBytes for the ppm-files
  
   Experiment with gs -sDEVICE=pnmraw. Does that reduce disk footprint
   much?
 
  yes, up 14.5 MBytes

 This is still ridiculous.  Get this PNG support going.  Of course,
 this also explains why previews got slower when color support got
 added: I/O time.  ppm files take up three times more space than pgm,
 and when you leave off antialiasing, you get pbm, at another factor
 of 8 in file size.  I/O time for 57MBytes is far from trivial.

 Get this PNG support going.

David, I work on LyX for fun. I do not have an infiinite amount of time to 
spend on it. Given the options of writing something reasonable for LyX or 
learning how to write a new loader for an external library, guess which one I 
choose?

On a more positive note, John Levon has an almost working Qt frontend. That 
will just work with PNG.

Angus



Re: Is this the right preview info for LyX?

2002-07-12 Thread David Kastrup

David Kastrup [EMAIL PROTECTED] writes:

 If that's ok, just use grep, which will probably be faster.
 
 grep '^Preview: Snippet /'

And do the obvious correction to the line above.  Argh.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: [EMAIL PROTECTED]





Re: Preview: request for testers

2002-07-12 Thread David Kastrup

Angus Leeming [EMAIL PROTECTED] writes:

 On Friday 12 July 2002 9:12 am, David Kastrup wrote:
  Herbert Voss [EMAIL PROTECTED] writes:
   Angus Leeming wrote:
   Statistics:
   285 numbered equations
   732 pages in the metrics file
   57 MBytes for the ppm-files
   
Experiment with gs -sDEVICE=pnmraw. Does that reduce disk footprint
much?
  
   yes, up 14.5 MBytes
 
  This is still ridiculous.  Get this PNG support going.  Of course,
  this also explains why previews got slower when color support got
  added: I/O time.  ppm files take up three times more space than pgm,
  and when you leave off antialiasing, you get pbm, at another factor
  of 8 in file size.  I/O time for 57MBytes is far from trivial.
 
  Get this PNG support going.
 
 David, I work on LyX for fun.

I did not particularly address you.  Hmmm, what was the reason I was
working on LyX (if you would call it that)?

 I do not have an infiinite amount of time to spend on it.

Well, PNG image support will mean previews will be much more fun, and
their loading will not spend an infinite amount of time...

 On a more positive note, John Levon has an almost working Qt
 frontend. That will just work with PNG.

Hmmm.  Image loading will depend on the toolkit used?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: [EMAIL PROTECTED]





Re: Is this the right preview info for LyX?

2002-07-12 Thread Angus Leeming

On Friday 12 July 2002 9:13 am, David Kastrup wrote:
 David Kastrup [EMAIL PROTECTED] writes:
  If that's ok, just use grep, which will probably be faster.
 
  grep '^Preview: Snippet /'

 And do the obvious correction to the line above.  Argh.

;-)
aleem@pneumon:tmp- grep '^Preview: Snippet' 1lyxpreview.log
Preview: Snippet 1 492688 0 744653)
Preview: Snippet 2 1441792 163840 16026923)
Preview: Snippet 3 282168 0 377591)
Preview: Snippet 4 1619363 449545 16026923)

Could you further modify prlyx.cfg to not output that final ')'. Attached.

Why has the name changed from .def to .cfg? I just pasted your .cfg file into 
your original .def file and all works well. Should I rename this as .cfg?

Angus (LaTeX ignorant...)


\ifPreview\else\expandafter\endinput\fi
\pr@loadcfg{prlyx}
\preview@delay{\typeout{Preview: Fontsize \f@size pt.}}
\ifx\PreviewBbAdjust\@undefined
\else
  \toks@{}
  \def\next{\toks@\expandafter{\the\expandafter\toks@\expandafter\space%
  \number\dimen@}\advance\count@\@ne\ifnum\count@4
 \afterassignment\next\dimen@\fi}
  \count@=\z@ \afterassignment\next \dimen@\PreviewBbAdjust
  \typeout{Preview: Tightpage \expandafter\@gobble\the\toks@.}
\fi
\g@addto@macro\pr@ship@end{\typeout{Preview:
   Snippet \number\pr@snippet\space
   \number\ht\pr@box\space \number\dp\pr@box \space\number\wd\pr@box}}



Re: Preview: request for testers

2002-07-12 Thread Angus Leeming

On Friday 12 July 2002 9:41 am, David Kastrup wrote:
  David, I work on LyX for fun.

 I did not particularly address you.  Hmmm, what was the reason I was
 working on LyX (if you would call it that)?

I remember in your introduction you mentioned that you'd like people to pay 
you for your LaTeX services... ?

  On a more positive note, John Levon has an almost working Qt
  frontend. That will just work with PNG.

 Hmmm.  Image loading will depend on the toolkit used?

Why would we re-invent the wheel and not use what is available to us in the 
toolkit? Of course image loading is done by the toolkit. The intellectual 
challenge is in writing a core that is GUI-independent yet doesn't dumn 
things down to the abilities of the stupidest toolkit.

Once you've got your head around it, it's actually a pleasure coding in this 
way. Look at mathed. Beautiful, clean code. Doesn't know what the hell it is 
writing to. That must be elegant ;-)

Angus



Re: Preview: request for testers

2002-07-12 Thread Angus Leeming

On Friday 12 July 2002 9:41 am, David Kastrup wrote:
 Well, PNG image support will mean previews will be much more fun, and
 their loading will not spend an infinite amount of time...

Incidentally, whilst total loading time will remain high, actual impact on 
the user will be negligible once I finish this smart loader stuff. The 
previews in PPM format will take a fraction of a second longer to appear than 
the ideal case of native PNG loading once they've been generated. Since we're 
only going to be loading 5 or 6 previews at a time, that's hardly important.

Angus



Re: Is this the right preview info for LyX?

2002-07-12 Thread David Kastrup

Angus Leeming [EMAIL PROTECTED] writes:

 On Friday 12 July 2002 9:13 am, David Kastrup wrote:
  David Kastrup [EMAIL PROTECTED] writes:
   If that's ok, just use grep, which will probably be faster.
  
   grep '^Preview: Snippet /'
 
  And do the obvious correction to the line above.  Argh.
 
 ;-)
 aleem@pneumon:tmp- grep '^Preview: Snippet' 1lyxpreview.log
 Preview: Snippet 1 492688 0 744653)
 Preview: Snippet 2 1441792 163840 16026923)
 Preview: Snippet 3 282168 0 377591)
 Preview: Snippet 4 1619363 449545 16026923)

Urgh.

 Could you further modify prlyx.cfg to not output that final ')'. Attached.
 
 Why has the name changed from .def to .cfg?

Because I am an idiot.  I posted from a different computer, and used
the stuff decoded from my own letter, and had to give it a name, and
gave it the wrong one.  prlyx.def will, BTW, load a file prlyx.cfg if
it happens to find one, so that the user may place configuration
stuff of their own into a local or system-wide file.

 I just pasted your .cfg file into your original .def file and all
 works well. Should I rename this as .cfg?

No, please don't, and be sure you don't have a prlyx.cfg lying around
accidentally.  When we are through with this, is it ok with you if I
place prlyx.def into the preview distribution?  It will in a later
iteration also gather color support (or rather, the color support will
generally included into preview.sty), but the current implementation
should work fine then still, I suppose.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: [EMAIL PROTECTED]





Re: Preview: request for testers

2002-07-12 Thread David Kastrup

Angus Leeming [EMAIL PROTECTED] writes:

 On Friday 12 July 2002 9:41 am, David Kastrup wrote:
  Well, PNG image support will mean previews will be much more fun, and
  their loading will not spend an infinite amount of time...
 
 Incidentally, whilst total loading time will remain high, actual
 impact on the user will be negligible once I finish this smart
 loader stuff. The previews in PPM format will take a fraction of a
 second longer to appear than the ideal case of native PNG loading
 once they've been generated.

Once they've been generated.  Writing dozens of MBs of data is even
slower than reading them.  And of course, the buffer cache gets
polluted with image data instead of keeping more important stuff.

Anyway, GhostScript takes up quite a bit of time, too.  So while you
are fiddling around with the loader, don't make decisions that would
make it awkward to eventually run GhostScript in daemon mode, telling
it what image it should be converting next.

In preview-latex, by far the slowest stage is GhostScript, and yet it
is the one least impacting responsiveness, because it can cater to
the requests in the needed order, depending on what is currently
on-screen.

dvipng offers similar functionality.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: [EMAIL PROTECTED]





Re: Is this the right preview info for LyX?

2002-07-12 Thread Angus Leeming

On Friday 12 July 2002 10:01 am, David Kastrup wrote:
 When we are through with this, is it ok with you if I
 place prlyx.def into the preview distribution?  

That would be excellent. I'd much rather tell the LyX community to go get a 
file than have to supply it myself.

 It will in a later iteration also gather color support (or rather, the
 color support will generally included into preview.sty), but the 
 current implementation should work fine then still, I suppose.

You mean invoke preview.sty with something like

\usepackage[active,delayed,DVIDEV,tightpage,lyx,fg=00,bg=ffeedd]{preview}

where DVIDEV=dvips or dvipng? We could remove the PostScript special stuff 
from LyX and it would just do the right thing?. That would be a noble goal 
indeed.

Angus



Re: Preview: request for testers

2002-07-12 Thread David Kastrup

Angus Leeming [EMAIL PROTECTED] writes:

 On Friday 12 July 2002 9:41 am, David Kastrup wrote:
   David, I work on LyX for fun.
 
  I did not particularly address you.  Hmmm, what was the reason I
  was working on LyX (if you would call it that)?
 
 I remember in your introduction you mentioned that you'd like people
 to pay you for your LaTeX services... ?

Sure thing, I am suffocating in all the money sent to me from LyX
users, and you are right to scald me for all the greed I have been
subjecting you to.

I am currently living off savings and working on TeX stuff so that I
may eventually be able to continue working on it and just sustain
myself (more would be too optimistic).  Instead of just looking now
for a well-paying job, for which I have offers.  There is no sane
reason, except that I like working on TeX better than on automotive
driver assistence systems.

So you work on LyX for fun for fun.  Your future does not depend on
the future of LyX.  I work on TeX for fun for earnest.  If you think
that this entitles you to call my motivation for working with you on
LyX greed, there is little that I can say in reply.

Shrug.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: [EMAIL PROTECTED]





Re: Do typedefs poute the global namespace?

2002-07-12 Thread Andre Poenitz

On Fri, Jul 12, 2002 at 10:25:36AM +0100, Angus Leeming wrote:
 If I have
   typedef pairRow const *, Row const * RowPair;
 in a .C file, should I wrap it inside namespace anon?

Yes.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)



Re: Do typedefs poute the global namespace?

2002-07-12 Thread Andre Poenitz

On Fri, Jul 12, 2002 at 10:25:36AM +0100, Angus Leeming wrote:
 If I have
   typedef pairRow const *, Row const * RowPair;
 in a .C file, should I wrap it inside namespace anon?

Well, on second thoughts: typedefs don't have external linkage, so it is
strictly not needed. But I think it makes the intend used only locally
clearer... But I am not religious about it.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)




Re: Do typedefs poute the global namespace?

2002-07-12 Thread Angus Leeming

On Friday 12 July 2002 10:48 am, Andre Poenitz wrote:
 On Fri, Jul 12, 2002 at 10:25:36AM +0100, Angus Leeming wrote:
  If I have
  typedef pairRow const *, Row const * RowPair;
  in a .C file, should I wrap it inside namespace anon?

 Well, on second thoughts: typedefs don't have external linkage, so it is
 strictly not needed. But I think it makes the intend used only locally
 clearer... But I am not religious about it.

Good answer. Both parts. 
Thanks,
Angus



A more elegant way of defining a loop?

2002-07-12 Thread Angus Leeming

Another coding question. Can I write this loop another, more elegant  way?
Angus

// visible contains pointers to the first and last rows visible in 
// the BufferView
std::pairRow const *, Row const * visible = ...

bool running = true;
for (Row const * row = visible.first; running; row = row-next()) {
do what you want to do...

running = row != visible.second;
}



Re: A more elegant way of defining a loop?

2002-07-12 Thread Andre Poenitz

On Fri, Jul 12, 2002 at 10:43:46AM +0100, Angus Leeming wrote:
 Another coding question. Can I write this loop another, more elegant  way?
 Angus
 
   // visible contains pointers to the first and last rows visible in 
   // the BufferView
   std::pairRow const *, Row const * visible = ...
 
   bool running = true;
   for (Row const * row = visible.first; running; row = row-next()) {
   do what you want to do...
 
   running = row != visible.second;
   }

for (Row const * row = visible.first; row != visible.second; row = row-next()) {
do what you want to do...
}

is slightly different (might have 0 loops) but depending on what you do it
could be the same. If not I'd write that as

for (Row const * row = visible.first; true; row = row-next()) {
 // do what you want to do...
   if (row != visible.second)
 break;
}

saves one global variable but uses 'break' which some people frown upon
(mostly for reasons I don't accept...)

Andre'


-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)



CVS compile breaks at formula.C:231

2002-07-12 Thread R. Lahaye


Hi,

Current CVS:

formula.C: In method `void InsetFormula::draw(BufferView *, const LyXFont ,
int, float , bool) const':
formula.C:231: no matching function for call to `grfx::PreviewImage::image
(const InsetFormula , BufferView ) const'
../../src/graphics/PreviewImage.h:49: candidates are: const class grfx::Image *
grfx::PreviewImage::image() const
formula.C: In method `bool InsetFormula::PreviewImpl::usePreview() const':
formula.C:533: no matching function for call to `grfx::PreviewImage::image
(InsetFormula , BufferView ) const'
../../src/graphics/PreviewImage.h:49: candidates are: const class grfx::Image *
grfx::PreviewImage::image() const
formula.C:534: warning: control reaches end of non-void function
`InsetFormula::PreviewImpl::usePreview() const'
gmake[3]: *** [formula.lo] Error 1

Rob.



Re: CVS compile breaks at formula.C:231

2002-07-12 Thread Andre Poenitz

On Fri, Jul 12, 2002 at 07:57:34PM +0900, R. Lahaye wrote:
 formula.C:534: warning: control reaches end of non-void function
 `InsetFormula::PreviewImpl::usePreview() const'
 gmake[3]: *** [formula.lo] Error 1

My fault. I accidentally commited parts of Angus' patch. Reverted now.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)



Re: A more elegant way of defining a loop?

2002-07-12 Thread Angus Leeming

On Friday 12 July 2002 11:14 am, Andre Poenitz wrote:

 for (Row const * row = visible.first; true; row = row-next()) {
// do what you want to do...
if (row != visible.second)
  break;
 }

Glad to see that I wasn't being ridiculously stupid. Someone should refactor 
Row so that listRow is a natural construct. Till then I thought I should 
use it as it was designed to be used ;-)

 saves one global variable but uses 'break' which some people frown upon
 (mostly for reasons I don't accept...)

 Andre'



Re: A more elegant way of defining a loop?

2002-07-12 Thread Angus Leeming

On Friday 12 July 2002 12:32 pm, Juergen Vigna wrote:
 Andre Poenitz wrote:
  I tried that once and failed as there is not alwasy a clear meaning of a
  Row * in the code. It could be a single row or a set of rows starting
  with this row. This makes things really messy.

 Would you care to explain this better? A Row * is always 1 row, as much
 as I know of that code. The rows are used _only_ in LyXText and denotes
 the whole set of rows of the entire document (visible rows on screen).
 I don't see what's messy with it?

A Row is a row. It shouldn't care or know about its next() and previous().

A listRow is a collection of Rows.

That's what the STL is /for/.

Angus



Re: A more elegant way of defining a loop?

2002-07-12 Thread Juergen Vigna

Angus Leeming wrote:
 A Row is a row. It shouldn't care or know about its next() and previous().
 
 A listRow is a collection of Rows.

Ok explanation understood and accepted!

  Jug

-- 
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen VignaE-Mail:  [EMAIL PROTECTED]
Mitterstrich 151/A  Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39050 SteineggWeb: http://www.lyx.org/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._





Making personal lyx.mo files with 1.2.0

2002-07-12 Thread Philipp Sasse

Hello,

(sorry I didn't find where this is documented ...)

I'm used to applying lots of changes to my po/xx.po file before building 
lyx. But as with 1.2.0 the changes are ignored. It seems, the xx.gmo 
file provided with the source is used even if the xx.po file is 
changed. If the xx.gmo file is removed before building lyx, it is only 
recreated as a zero-length file by touch.

Earlier versions didn't show this behaviour. Is this a bug or is there 
something about my System (Solaris 7, gcc 2.95.2, gmake)? Could someone 
tell me how to find information on making lyx.mo files?

Thanks alot,

Philipp.



Re: A more elegant way of defining a loop?

2002-07-12 Thread Andre Poenitz

On Fri, Jul 12, 2002 at 01:32:26PM +0200, Juergen Vigna wrote:
 I tried that once and failed as there is not alwasy a clear meaning of a
 Row * in the code. It could be a single row or a set of rows starting with
 this row. This makes things really messy.
 
 Would you care to explain this better? A Row * is always 1 row, as much
 as I know of that code. The rows are used _only_ in LyXText and denotes
 the whole set of rows of the entire document (visible rows on screen).

Maybe I am mistaken and it was Paragraph * that acted that way. It has been
a while since I tried that.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)



Re: A more elegant way of defining a loop?

2002-07-12 Thread Andre Poenitz

On Fri, Jul 12, 2002 at 12:21:15PM +0100, Angus Leeming wrote:
 A Row is a row. It shouldn't care or know about its next() and previous().
 
 A listRow is a collection of Rows.
 
 That's what the STL is /for/.

Indeed^3.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)



lyxlenght::inBP

2002-07-12 Thread Andre Poenitz


Angus (as CVS annotate blames you):

Why does lyxlength::inBP return positive values even for negative
lengths? Wouldn't it easier to call abs() on the result when needed?

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)



Re: lyxlenght::inBP

2002-07-12 Thread Angus Leeming

On Friday 12 July 2002 4:03 pm, Andre Poenitz wrote:
 Angus (as CVS annotate blames you):

 Why does lyxlength::inBP return positive values even for negative
 lengths? Wouldn't it easier to call abs() on the result when needed?

 Andre'

I have no idea.
A



Re: lyxlenght::inBP

2002-07-12 Thread Angus Leeming

On Friday 12 July 2002 4:20 pm, Andre Poenitz wrote:
 On Fri, Jul 12, 2002 at 03:53:20PM +0100, Angus Leeming wrote:
  I have no idea.

 It is your code...

... just had a quick look.

This is Herbert's baby actually. I just committed it. It is/was used only 
when setting the graphics params

I see you've added some uses. 

Feel free to change and have a good w/e.

Angus

graphics/GraphicsParams.C:  // inBP returns the length in Postscript 
pointgraphics/GraphicsParams.C:  int const xl_tmp = LyXLength(a).inBP();
graphics/GraphicsParams.C:  int const yb_tmp = LyXLength(b).inBP();
graphics/GraphicsParams.C:  int const xr_tmp = LyXLength(c).inBP();
graphics/GraphicsParams.C:  int const yt_tmp = LyXLength(d).inBP();
mathed/math_gridinset.C:return crskip_.inBP();
mathed/math_kerninset.C:dim_.w = wid_.inBP();
mathed/math_parboxinset.C:  lyx_width_ = LyXLength(w).inBP();
aleem@pneumon:src-



Re: lyxlenght::inBP

2002-07-12 Thread Andre Poenitz

On Fri, Jul 12, 2002 at 04:08:27PM +0100, Angus Leeming wrote:
 I see you've added some uses. 

That's why I noticed that negative lengths are wrong...
 
 Feel free to change and have a good w/e.

Done and thanks.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)



Re: lyxlenght::inBP

2002-07-12 Thread Herbert Voss

Andre Poenitz wrote:

 Angus (as CVS annotate blames you):
 
 Why does lyxlength::inBP return positive values even for negative
 lengths? Wouldn't it easier to call abs() on the result when needed?


who said that this function would ever be called with
negative length? ;-)

Herbert



-- 
http://www.lyx.org/help/




Re: lyxlenght::inBP

2002-07-12 Thread Herbert Voss

Andre Poenitz wrote:

 On Fri, Jul 12, 2002 at 03:53:20PM +0100, Angus Leeming wrote:
 
Why does lyxlength::inBP return positive values even for negative
lengths? Wouldn't it easier to call abs() on the result when needed?

 
 I'll just remove that multiplication and I think it should be done for
 'inPixels' as well...


then you will be the man for bugfixing in the graphics stuff ...

Herbert



-- 
http://www.lyx.org/help/




Re: missing ;

2002-07-12 Thread John Levon

On Fri, Jul 12, 2002 at 10:12:59AM +0200, Edwin Leuven wrote:

 As I said, false alarm, sorry. I am trying to compile the qt2 frontend but 
 couldn't get to compile lyxfunc.C. I got tricked into thinking it had 
 something todo with the above header file. But now I think it had something 
 todo with the boost signal stuff. I get errors like the one below but if I 
 move the include of (q)font_loader.h to the bottom of the includes it 
 compiles. But I still can't link (see below). I compile with gcc 3.1 btw.

Please cvs up.

 ../../lyx-devel/src/insets/insetgraphics.h:34: parse error before `protected'
 ../../lyx-devel/src/insets/insetgraphics.h:39: parse error before `const'
 ../../lyx-devel/src/insets/insetgraphics.h:42: destructors must be member

This is the Qt headers included too early signature tune.

There is also the X headers included before Qt's signature tune,
involving qevent.h.

They are fun

 
frontends/.libs/libfrontends.a(qttableview_moc.o):/usr/local/cvs/lyx-qt2/src/frontends/qt2/moc/qttableview_moc.C:103:
 
 undefined reference to `QPaintDevice::fontMet(QFont*, int, char const*, int) 
 const'

This looks like you haven't made cleanly. What Qt version ?

john

-- 
I hope you will find the courage to keep on living 
 despite the existence of this feature.
- Richard Stallman



Re: lyxlenght::inBP

2002-07-12 Thread Andre Poenitz

On Fri, Jul 12, 2002 at 05:42:07PM +0200, Herbert Voss wrote:
 Why does lyxlength::inBP return positive values even for negative
 lengths? Wouldn't it easier to call abs() on the result when needed?
 
 who said that this function would ever be called with
 negative length? ;-)

Its name.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)



Re: lyx-devel src/: ChangeLog bufferlist.C lyxfunc.C lyxfunc.h lyx ...

2002-07-12 Thread John Levon

On Fri, Jul 12, 2002 at 04:25:36PM +1000, Allan Rae wrote:

  remove file-new asks for name
 
 Goodbye little feature, you served us well all these years.

I gave you a last chance to complain.

\bind C-n command-sequence buffer-new ; buffer-write-as ;

(do same in default.ui menu)

and I defy you to tell me the difference ...

regards
john

-- 
I hope you will find the courage to keep on living 
 despite the existence of this feature.
- Richard Stallman



Re: lyxlenght::inBP

2002-07-12 Thread Andre Poenitz

On Fri, Jul 12, 2002 at 05:43:14PM +0200, Herbert Voss wrote:
 then you will be the man for bugfixing in the graphics stuff ...

It simply does not belong there. The function is called inBP() and not
inBPandDoWhatEverYouWant()...

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)



Re: Preferences font zoom/dpi needs reload of document !?!

2002-07-12 Thread John Levon

On Fri, Jul 12, 2002 at 04:24:38PM +0900, R. Lahaye wrote:

 Changes in Preferences-LookFeel-ScreenFonts-Zoom and/or ScreenDPI,
 are immediately visible when clicking on apply in 1.2.0.
 
 However, in 1.3.0cvs this is not so. I need to close and reopen
 the document in order to have these changes to take effect.
 
 Is this broken feature known?

I fixed part of it last night. Next part (missing refresh) coming soon.

john

-- 
I hope you will find the courage to keep on living 
 despite the existence of this feature.
- Richard Stallman



Re: missing ;

2002-07-12 Thread Andre Poenitz

On Fri, Jul 12, 2002 at 04:53:02PM +0100, John Levon wrote:
 This is the Qt headers included too early signature tune.

Headers depending on otheres are not exactly a good sign...

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)



Re: lyxlenght::inBP

2002-07-12 Thread Herbert Voss

Andre Poenitz wrote:

 On Fri, Jul 12, 2002 at 05:43:14PM +0200, Herbert Voss wrote:
 
then you will be the man for bugfixing in the graphics stuff ...

 
 It simply does not belong there. The function is called inBP() and not
 inBPandDoWhatEverYouWant()...


I know that we can have negative bounding boxes and it took
month to get it run in the right way...
And I hate it when you change the code, without waiting
for a reply from the one who wrote it ...
there was absolutely no need to change it this time!

I no more interested in this area.

Herbert



-- 
http://www.lyx.org/help/




Re: minibuffer design problems

2002-07-12 Thread John Levon

On Fri, Jul 12, 2002 at 09:28:56AM +0200, Juergen Vigna wrote:

 I don't understand really what problems you have with this?
 Why do you need two different objects?

Mainly because commingling (oooh yeah) two different purposes into the
one buffer is really bad UI

 Isn't it possible to
 do this internal to the Minibuffer-Object?

No. What do I return for isEditingMode() ? Yes AND no ?

 Why should the core
 care to change between a StatusBar and a Minibuffer.

The core doesn't know about /either/ of these things in my design. It
just has a LyXView::statusMessage(string), and it us up tothe frontend
to do what it likes.

 What real
 problem do you have to make this internal to the object?

Just look at the methods I have to implement and the code in
MiniBuffer.C ! e.g. MiniBuffer::message()

Rather I would turn it round and ask: what is your problem with my
changes ?

 You just have to define a Input object and a display object and
 change between them when needed. That shouldn't be that big of
 a problem (just show/hide calls to the objects which have the same
 size/position).

I don't think you understand: they are two entirely separate UI objects,
both visible at once.

 IMO that for the core it should be just one object
 to not complicate the stuff to much

What is copmlicated about the 3 or 4 methods I have outlined ? It
couldn't get much simpler :

showMessage(string)
showMessagePush(string)
vectorstring showCompletions(string prefix)
string showShortcuts(string cmd)
void dispatch(string cmd)

is what the core implements. The frontend may now do as it chooses.

 and for the frontend it should
 be really easy to implement this as such.

My design is /far/ simpler to implement.

 But obviously you are the qt expert

Well I don't know zip about Qt, but that's not really relevant anyway.
This is a sane design regardless of toolkit IMHO. Why do you prefer to
conflate two entirely separate concepts into one set of code ? It seems
to me that it's only because xforms has happened to do the same
previously.

regards
john

-- 
I hope you will find the courage to keep on living 
 despite the existence of this feature.
- Richard Stallman



Re: Graphics Qt

2002-07-12 Thread John Levon

On Fri, Jul 12, 2002 at 08:26:39AM +0100, Angus Leeming wrote:

 Why not:
 class grfx::Pixmap {
 };
 
 class grfx::Image {
 public:
   grfx::Pixmap  getPixmap();
 };
 
 where grfx::Pixmap is an abstract base class. Daughter classes would contain 
 the Pixmap proper (X) or QPixmap?

This still requires a static_downcast though, does it not ?

  Also, is boost::bind() idempotent ? lyx_gui::init_graphics() gets
  called a lot
 
 It shouldn't. Once is enough:

I was confused with another method called init_graphics()

Another thing: how hard would it be to try and load an image via the
toolkit converter /before/ doing any conversion stuff, to see if it
succeeds ? Only if it fails would it then need to try converting an
image

regards
john
-- 
I hope you will find the courage to keep on living 
 despite the existence of this feature.
- Richard Stallman



Re: lyxlenght::inBP

2002-07-12 Thread Andre Poenitz

On Fri, Jul 12, 2002 at 06:03:44PM +0200, Herbert Voss wrote:
 I know that we can have negative bounding boxes and it took
 month to get it run in the right way...
 And I hate it when you change the code, without waiting
 for a reply from the one who wrote it ...
 there was absolutely no need to change it this time!

I just moved the 'abs' from the called function to the caller.
There is _no_ difference.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)



Re: lyxlenght::inBP

2002-07-12 Thread Andre Poenitz

On Fri, Jul 12, 2002 at 06:03:44PM +0200, Herbert Voss wrote:
 And I hate it when you change the code, without waiting
 for a reply from the one who wrote it ...

'cvs annotate' said it was Angus and I changed it after he replied.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)



Re: missing ;

2002-07-12 Thread John Levon

On Fri, Jul 12, 2002 at 05:57:24PM +0200, Andre Poenitz wrote:

 Headers depending on otheres are not exactly a good sign...

Welcome to the world of Qt.

john

-- 
I hope you will find the courage to keep on living 
 despite the existence of this feature.
- Richard Stallman



Re: init_graphics()

2002-07-12 Thread John Levon

On Fri, Jul 12, 2002 at 08:34:20AM +0100, Angus Leeming wrote:

  Angus, why is this a separate method anyway ? Can't
  lyx_gui::start() deal with setting up the signals itself ?
 
 Sigh. Possibly. Experiment.

OK committed (I only asked ...)

john

-- 
I hope you will find the courage to keep on living 
 despite the existence of this feature.
- Richard Stallman



Re: missing ;

2002-07-12 Thread Edwin Leuven

  Headers depending on otheres are not exactly a good sign...

 Welcome to the world of Qt.

would this be better with Qt3?



Re: missing ;

2002-07-12 Thread John Levon

On Fri, Jul 12, 2002 at 06:46:24PM +0200, Edwin Leuven wrote:

 would this be better with Qt3?

No.

http://doc.trolltech.com/3.0/templates.html

john

-- 
Be sure of this, O young ambition, all mortal greatness is but disease. 
- Hermann Melville



Re: missing ;

2002-07-12 Thread Edwin Leuven

btw linking fails with gcc-3.1 
but I am able to buid with gcc-2.96
kickstarting lyx fails however :-(

(gdb) bt
#0  0x40783025 in __libc_free (mem=0x8459f20) at malloc.c:3155
#1  0x406c41f6 in __builtin_delete (ptr=0x8459f20)
   from /usr/lib/libstdc++-libc6.2-2.so.3
#2  0x082cd24a in boost::any::holderboost::function3void, int, int, 
mouse_butt
on::state, boost::empty_function_policy, boost::empty_function_mixin, 
allocator
boost::function_base  ::~holder (this=0x8459f20, __in_chrg=3)
at ../../lyx-devel/boost/boost/signals/trackable.hpp:75
#3  0x082c74b3 in boost::signals::detail::signal_base_impl::connect_slot (
this=0x84580a8, slot=@0xbfffdaf0, name=@0xbfffdb00, 
bound_objects=@0xbfffdce0)
at ../../../../../lyx-devel/boost/boost/any.hpp:40
#4  0x082caa77 in boost::signal3void, int, int, mouse_button::state, 
boost::las
t_valuevoid, int, lessint, boost::function3void, int, int, 
mouse_button::st
ate, boost::empty_function_policy, boost::empty_function_mixin, 
allocatorboost:
:function_base  ::connect (this=0x8457e18, in_slot=@0xbfffdce0)
at ../../lyx-devel/boost/boost/shared_ptr.hpp:199
#5  0x0805a5ee in BufferView::Pimpl::Pimpl (this=0x8457ce8, b=0x8457be8, 
o=0xbfffdec8, xpos=0, ypos=0, width=690, height=510)
at ../../lyx-devel/boost/boost/signals/slot.hpp:97
#6  0x08055b9c in BufferView::BufferView (this=0x8457be8, o=0xbfffdec8, 
xpos=0, ypos=0, width=690, height=510)
at ../../lyx-devel/src/BufferView.C:26
#7  0x08240879 in QtView::QtView (this=0xbfffde50, width=690, height=510)
---Type return to continue, or q return to quit--- 
at ../../../../lyx-devel/boost/boost/scoped_ptr.hpp:49
#8  0x0821e8b6 in lyx_gui::start (batch=@0xbfffe004, files=0xbfffdf70)
at ../../../../lyx-devel/src/frontends/qt2/lyx_gui.C:84
#9  0x080e7155 in LyX::LyX (this=0xbfffe000, argc=@0xbfffe040, 
argv=0xbfffe0a4)
at /usr/include/g++-3/stl_vector.h:235
#10 0x0812a93d in main (argc=1, argv=0xbfffe0a4)
at ../../lyx-devel/src/main.C:31
#11 0x4071e627 in __libc_start_main (main=0x812a7fc main, argc=1, 
ubp_av=0xbfffe0a4, init=0x80533c4 _init, fini=0x83771e0 _fini, 
rtld_fini=0x4000dcc4 _dl_fini, stack_end=0xbfffe09c)
at ../sysdeps/generic/libc-start.c:129



Re: missing ;

2002-07-12 Thread John Levon

On Fri, Jul 12, 2002 at 10:09:30PM +0200, Edwin Leuven wrote:

 btw linking fails with gcc-3.1 

Som,e more info would be good. Are you sure you've built a Qt with gcc
3.1 ?

 but I am able to buid with gcc-2.96
 kickstarting lyx fails however :-(

Again, please investigate further. What version of gcc-2.96 ? Everything
works for me.

john

-- 
Be sure of this, O young ambition, all mortal greatness is but disease. 
- Hermann Melville



Re: missing ;

2002-07-12 Thread Andre Poenitz

On Thu, Jul 11, 2002 at 07:45:01PM +0200, Edwin Leuven wrote:
> I had to do this in frontends/DialogBase.h in order to compile:
> 
> -   virtual ~DialogBase() {}
> +   virtual ~DialogBase() {};

This semicolon is not necessary. What compiler is that?

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)



Re: Preview: request for testers

2002-07-12 Thread Andre Poenitz

On Thu, Jul 11, 2002 at 07:04:03PM +0100, Angus Leeming wrote:
>   // top_y is not const because it's reset by getRowNearY.
>   int top_y = bv.text->first_y;
>   Row const * row = bv.text->getRowNearY(top_y);
> 
>   int const bv_height = bv.painter().paperHeight();
>   int height = row->height();
>   rows.push_back(row);
> 
>   while (height < bv_height) {
>   row = row->next();
> + if (!row)
> + break;
>   height += row->height();
>   rows.push_back(row);
>   }
> 
>   return rows;
> }

What about writing this as 

for (int height = 0; row && height < bv_height; row = row->next()) {
height += row->height();
rows.push_back(row);
}

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)



Re: Graphics Inset: what determines the resolution of LyX-View of the figures?

2002-07-12 Thread Herbert Voss

Garst R. Reese wrote:

>>Garst, I forgot to ask, if your images are scanned from
>>an original or saved from an application?
>>
>>
> They were saved from Cadsoft Eagle which uses old ps, then converted
> with ps2ps, but with your new scheme that step is no longer needed.


but they are saved in color mode, right?

Herbert



-- 
http://www.lyx.org/help/




Re: font_loader singletons (ping Andre)

2002-07-12 Thread Andre Poenitz

On Fri, Jul 12, 2002 at 03:42:09AM +0100, John Levon wrote:
> Currently qt2 has to manually edit the frontends/font_loader.h
> to include the right one. So I need to change this. I think
> bool lyx_gui::font_available() and lyx_gui::update_fonts() is the best
> solution.
> 
> Seeing as mathed is one of the two users of fontloader in the core,
> would you be happy with this Andre ?

Since I don't know what you are talking about: Go ahead and let's see what
happens.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)



Re: Preview: request for testers

2002-07-12 Thread Juergen Vigna

Angus Leeming wrote:

> One other point (for Jürgen?): I think that a (working) isInsetVisible could 
> be used to advantage by BufferView::updateInset. Seems intelligent to only 
> redraw insets that are visible...

I think you didn't understand the Row::pos() variable/function. The pos
returning from a row is the _first_ position of the first character of
this row inside the Row::par(). You understand that in the visible rows
you may have more than one paragraph and so the use of the start/end pos
cannot work as you use it because most probably the lastrow is inside a
different paragraph then the firstrow.

Capito ;)

Jug

-- 
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen VignaE-Mail:  [EMAIL PROTECTED]
Mitterstrich 151/A  Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39050 SteineggWeb: http://www.lyx.org/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._




Make default converter accessible in preferences

2002-07-12 Thread R. Lahaye


Hi,

Since I need to modify slightly the default converter,
I thought of the following to be useful:

It would be nice if the default converter is also visible
as an entry in the preferences/converters list, e.g. as:

  From  $$fformat
To  $$tformat
 Converter  convert $$fformat:$$i $$tformat:$$o

Or something the like.

Rob.



Re: Make default converter accessible in preferences

2002-07-12 Thread Herbert Voss

R. Lahaye wrote:

> 
> Since I need to modify slightly the default converter,
> I thought of the following to be useful:
> 
> It would be nice if the default converter is also visible
> as an entry in the preferences/converters list, e.g. as:
> 
>   From  $$fformat
> To  $$tformat
>  Converter  convert $$fformat:$$i $$tformat:$$o


A shellscript is the best way, where the user can write

any stuff for a default conversion. Maybe that someone
like different steps in from->to, which cannot be handled
in a useful way in the preferences.

And this script can be called with the above four parameters

Herbert



-- 
http://www.lyx.org/help/




Re: Is this the right preview info for LyX?

2002-07-12 Thread Angus Leeming

On Thursday 11 July 2002 11:10 pm, David Kastrup wrote:
> That regexp looks _slow_.  And I am surprised that the + should not
> be interpreted specially.  How about
> ended\.(\(-?[0-9]*\)\+\(-?[0-9]+\)x\(-?[0-9]+\))/\1 \2 \3 \4/p;d" < 
1lyxpreview.log > 1lyxpreview.metrics

;-) I just want something quickly. But thanks. I'll modify the script.

> Anyhow: if you need your entries in a different format, there is no
> sane reason why I should not write them out immediately in the format
> you desire: this is a LyX-specific option, no need to make it more
> complicated for LyX to parse it than necessary.

Great. If you output
Preview Snippet 1: 492688 0 744653
Preview Snippet 2: 1441792 163840 16026923
Preview Snippet 3: 282168 0 377591
Preview Snippet 4: 1619363 449545 16026923
I'd dump that straight into the .metrics file with
set -e "/Preview Snippet/p;d" < 1lyxpreview.log > 1lyxpreview.metrics

Regards,
Angus



Re: could not locate file

2002-07-12 Thread Herbert Voss

Garst R. Reese wrote:

> ps view Error -- could not locate file with any of these extensions ...
> ps.gz


I'm sorry, but I have no running 1.2.1cvs, but with 1.3 it's no problem.

> -rw-r--r--1 garstusers6969 Jul 12 03:53 example.ps.gz


can you give it a try when renaming the file to

example.eps.gz

HErbert



-- 
http://www.lyx.org/help/




Re: Preview: request for testers

2002-07-12 Thread Angus Leeming

On Thursday 11 July 2002 7:43 pm, Kornel Benko wrote:
> On Thursday 11 July 2002 20:21, Angus Leeming wrote:
> > Ok. Thanks. I'll have a look tomorrow.
>
> One more thing: my labels are now redefined, so that the referencies no
> longer match. (You know, "underlines" in labels, see attached)

Some strange interation with underline.sty? This isn't preview-specific 
however. File a bug report and badger Herbert ;-)

Angus



Re: Make default converter accessible in preferences

2002-07-12 Thread R. Lahaye

Herbert Voss wrote:
> 
> R. Lahaye wrote:
> 
> > It would be nice if the default converter is also visible
> > as an entry in the preferences/converters list, e.g. as:
>
> A shellscript is the best way, where the user can write

Hmmm, a unix guru certainly loves such kind of shell script
solutions, but does the average user?

Questions as "Where is that script?" and "How to write that
shell script?", may arise (first question is also mine!).
Covering it up in the preferences, would partially take care
of all that.

But I agree that the Converter entry in preferences is
nevertheless a sort of shell script.

Regards,
Rob.



Re: Preview: request for testers

2002-07-12 Thread Angus Leeming

On Thursday 11 July 2002 9:04 pm, Herbert Voss wrote:
> Another small problem:
>
>
> attached are the mathbox and the preview,
> it's still a bit too deep.
>
> Herbert

You mean "Original" doesn't line up with "fürht"? Then modify your copy of 
lyxpreview2ppm.sh. That's why it's a shell script after all. You should need 
to just set REMOVE_WS=1.

Angus



Preferences font zoom/dpi needs reload of document !?!

2002-07-12 Thread R. Lahaye


Hi,

Changes in Preferences-Look and/or ScreenDPI,
are immediately visible when clicking on apply in 1.2.0.

However, in 1.3.0cvs this is not so. I need to close and reopen
the document in order to have these changes to take effect.

Is this broken feature known?

Rob.



Re: minibuffer design problems

2002-07-12 Thread Juergen Vigna

John Levon wrote:

> I guess we also need something to get the "information" string
> (I assume this is the keyboard shortcut list string ?)
> 
> It's quite wrong IMHO for the core code to push /anything/ to the
> MiniBuffer: it should only push to the StatusBar
> 
> Note such a scheme still alllows the xforms-style commingling
> 
> Does anybody have any comments / objections ? Jug ? Asger ?

I don't understand really what problems you have with this?
Why do you need two different objects? Isn't it possible to
do this internal to the Minibuffer-Object? Why should the core
care to change between a StatusBar and a Minibuffer. What real
problem do you have to make this internal to the object?
You just have to define a Input object and a display object and
change between them when needed. That shouldn't be that big of
a problem (just show/hide calls to the objects which have the same
size/position). IMO that for the core it should be just one object
to not complicate the stuff to much and for the frontend it should
be really easy to implement this as such. But obviously you are
the qt expert (I only made such small projects as


KSendFax, KGoodStuff


which I recently ported to qt3 ;)

   Jug

-- 
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen VignaE-Mail:  [EMAIL PROTECTED]
Mitterstrich 151/A  Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39050 SteineggWeb: http://www.lyx.org/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._




Re: Preview: request for testers

2002-07-12 Thread Angus Leeming

On Thursday 11 July 2002 8:57 pm, Herbert Voss wrote:
> Angus Leeming wrote:
>  > Attached is a "smart loader" for the previews. I'd really, really like
>  > interested users --- that's the mathematicians out there who use
>
> /lots/ of
>
>  > equations to test it out.
>  >
>  > It's meant to enable you to generate and display the previews with no
>  > discernible effect on LyX's responsiveness.
>
> nice work :-)
>
> I loaded one of my books with a lot of mathstuff. Only some
> problems:
> - it starts only when I walk with the cursor "through" some
> mathboxes

Yes. For some reason the first page doesn't think it's visible until the 
entire document is loaded. Or something.

If I can't track this down properly (quite possible) the work around is to 
load insets for the first page anyway. Should be easy enough.

> - in tabulars with matstuff in every cell, I have some
> in preview and some not, not so good
> sed: Couldn't open file bbox.sed
> extracting metrics failed.
> is the message, when I walk from cell to cell
> - now I see, that tabulars are totally ignored???

Really? Small example doument please.

> - stere is still the problem with the not ignored
> geometry settings -> eqno is unvisible

You're asking the wrong man. Ask a LaTeX expert ;-)

> - the eqno is f.ex: 0.21 but it's the third chapter
> and it should be 3.5, a minor problem ...

Alternatively, you could hack preview.sty so that it outputs (eq:label) 
rather than (0.21) [eq:label

David said he'd be willing to accept a patch...

> - equations in floats (caption) are not previewed
> maybe all insets???

It's possible that my isInsetVisible function won't work on these. Same 
problem as the tabulars and something that Jürgen might be able to help with.

> - scrolling quickly to the end -> peng

Fixed.

> - restart and imidiately scrolling to the end was ok,
> but now only the formulas through which I "walked"
> were previewed, no the one before or behind

I don't understand what you mean here. 

> Statistics:
> 285 numbered equations
> 732 pages in the metrics file
> 57 MBytes for the ppm-files

Experiment with gs -sDEVICE=pnmraw. Does that reduce disk footprint much?

Maybe now is the time to write/use lyxpreview2png.sh.
On loading, the xforms loader will have to run a conversion to ppm step 
first, so loading will take a little longer but not much. Disk footprint 
would then be O(1MB). Moreover the Qt loader will just load ;-)

Angus



Re: Preview: request for testers

2002-07-12 Thread Herbert Voss

Angus Leeming wrote:

> On Thursday 11 July 2002 9:04 pm, Herbert Voss wrote:
> 
>>Another small problem:
>>
>>
>>attached are the mathbox and the preview,
>>it's still a bit too deep.
>>
>>Herbert
>>
> 
> You mean "Original" doesn't line up with "fürht"? Then modify your copy of 
> lyxpreview2ppm.sh. That's why it's a shell script after all. You should need 
> to just set REMOVE_WS=1.


sure, but this looks a bit ugly ... the preview stuff is very
nice so that it should be 100% to the output which I also attached.

Herbert



-- 
http://www.lyx.org/help/





Re: Preview: request for testers

2002-07-12 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Friday 12 July 2002 09:00, Angus Leeming wrote:
> On Thursday 11 July 2002 7:43 pm, Kornel Benko wrote:
> > On Thursday 11 July 2002 20:21, Angus Leeming wrote:
> > > Ok. Thanks. I'll have a look tomorrow.
> >
> > One more thing: my labels are now redefined, so that the referencies no
> > longer match. (You know, "underlines" in labels, see attached)
>
> Some strange interation with underline.sty? This isn't preview-specific
> however. File a bug report and badger Herbert ;-)

Well, I don't think so. "underline.sty" may have to do something with display
after the latex-call, but here it is the display of an internal table in lyx.
(The lyx-file itself is not corrupted, lyx-1.2 is working ok)

Kornel

- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPS6G/rewfbDGmeqhAQHPOAP9GZluTPcuuOubc4OeCMXPzYj93vkq9EMS
nxeGUxVaqCmPH/YjiedcQsitCOSSc7n+RIFcEMzjsJRk8Uw8pvZj2RRs5I0CH17x
vpRwSAP73hb6q4yWQSO7z/tI9iaoxLw9yO9ipuDoOPs9fiVkNamNYT1nNuBrFyzR
POZa/VSeIlg=
=55vw
-END PGP SIGNATURE-




Re: Graphics & Qt

2002-07-12 Thread Angus Leeming

On Friday 12 July 2002 1:21 am, John Levon wrote:
> Angus what should we do about getPixmap() of Image class ?
>
> Can't xforms code do the standard static_cast to xformsImage
> so Image doesn't need to ahve getPixmap() ? A bit ugly ...

I didn't try and think about an elegant solution at the time.

Why not:
class grfx::Pixmap {
};

class grfx::Image {
public:
grfx::Pixmap & getPixmap();
};

where grfx::Pixmap is an abstract base class. Daughter classes would contain 
the Pixmap proper (X) or QPixmap?

I have no real ideas to be honest.

> Also, is boost::bind() idempotent ? lyx_gui::init_graphics() gets
> called a lot

It shouldn't. Once is enough:

Cache & Cache::get()
{
static bool start = true;
if (start) {
start = false;
lyx_gui::init_graphics();
}

// Now return the cache
static Cache singleton;
return singleton;
}

Maybe you could track that down?
Angus



Re: Qt image loader

2002-07-12 Thread Angus Leeming

On Friday 12 July 2002 2:50 am, John Levon wrote:
> Well, it's hobbling along now. 

Oh well done!

> So far it's been very simple and easy to do. 

> Angus, please have a look around. Why doesn't LyX like the jpg format ? or
> pbm or gif etc. ?

I never bothered to track this down. Feel free.

> Perhaps this will convince the sceptics that the TODO list really isn't
> that long :)

No, I think you've made remarkable progress. Wish I had more time to help.
Angus



Re: GraphicsImageXpm

2002-07-12 Thread Angus Leeming

On Friday 12 July 2002 3:15 am, John Levon wrote:
> should these files be moved to frontends/xforms/ ? I say "yea"

I say nay. xforms has its own image loader. Once xforms 1.0 comes out and we 
insist that people use it GraphicsImageXpm can go into the attic. Till then, 
stop meddling.

A



Re: init_graphics()

2002-07-12 Thread Angus Leeming

On Friday 12 July 2002 3:44 am, John Levon wrote:
> Angus, why is this a separate method anyway ? Can't
> lyx_gui::start() deal with setting up the signals itself ?

Sigh. Possibly. Experiment.



  1   2   >