Re: bug 1656
Jean-Marc Lasgouttes wrote: Stephan == Stephan Witt [EMAIL PROTECTED] writes: Stephan as promised yesterday I did some testing today. Thanks. Stephan With the patch the unsaved changes remains unsaved. Without Stephan the patch I was asked to save the changes. So far seems all Stephan well, Is this really what we want?? Yes, I meant to say: the behaviour is ok without the patch. The program should ask for saving the changes. And it shouldn't terminate. Stephan but after playing a while with gnome-save-session I now have Stephan the same behaviour as in Paris, the qt-library is unable to Stephan open the question box anymore! Even worse, I have to kill the Stephan lyx process to be able to do any work. All gnome applications Stephan are locked. It seems this is caused by the running Stephan gnome-save-session which is waiting for lyx returning from Stephan user response - what never happens. From reading the Qt doc about QSession, I do not see clearly how it is supposed to work... Last weekend I did some further investigation. 1. Checking the behaviour of kwrite it opens a question box to save the changes when it gets the focus... Hm... when it is iconized or on another desktop it doesn't ask? Really strange. 2. Checking the patched lyx it blocks the process of saving sessions completely. Really bad. The backtrace when interrupted from inside the debugger looks like the following: Program received signal SIGINT, Interrupt. 0xe410 in ?? () No breakpoints or watchpoints. #0 0xe410 in ?? () #1 0xbfffd648 in ?? () #2 0x085193f4 in ?? () #3 0x08519270 in ?? () #4 0x40b4af9d in ___newselect_nocancel () from /lib/tls/libc.so.6 #5 0x401dee8a in QEventLoop::processEvents () from /usr/lib/qt3/lib/libqt-mt.so.3 #6 0x40249e51 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3 #7 0x402338bf in QApplication::enter_loop () from /usr/lib/qt3/lib/libqt-mt.so.3 #8 0x40f99bef in DCOPClient::callInternal () from /opt/kde3/lib/libDCOP.so.4 #9 0x40f99edc in DCOPClient::callInternal () from /opt/kde3/lib/libDCOP.so.4 #10 0x40f9a137 in DCOPClient::call () from /opt/kde3/lib/libDCOP.so.4 #11 0x40f9a198 in DCOPClient::call () from /opt/kde3/lib/libDCOP.so.4 #12 0x40f5f044 in initializeIntegration () from /opt/kde3/lib/kde3/plugins/integration/libqtkde.so #13 0x401bc86f in QKDEIntegration::initLibrary () from /usr/lib/qt3/lib/libqt-mt.so.3 #14 0x401bc8d5 in QKDEIntegration::enabled () from /usr/lib/qt3/lib/libqt-mt.so.3 #15 0x40451e95 in QMessageBox::information () from /usr/lib/qt3/lib/libqt-mt.so.3 #16 0x08216e2f in prompt_pimpl ([EMAIL PROTECTED], [EMAIL PROTECTED], default_button=0, cancel_butto n=2, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) at Alert_pimpl.C:44 #17 0x0820db82 in Alert::prompt ([EMAIL PROTECTED], [EMAIL PROTECTED], default_button=0, escape_bu tton=2, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) at Alert.C:44 #18 0x080bcad9 in BufferList::quitWriteBuffer (this=0x83f0ac4, buf=0x853e648) at bufferlist.C:83 #19 0x080bcca6 in BufferList::quitWriteAll (this=0x83f0ac4) at bufferlist.C:122 #20 0x08251e7e in LQApplication::commitData (this=0x83f4320, [EMAIL PROTECTED]) at lyx_gui.C:151 #21 0x401bef8c in QSessionManager::QSessionManager () from /usr/lib/qt3/lib/libqt-mt.so.3 #22 0x401bf061 in QSessionManager::QSessionManager () from /usr/lib/qt3/lib/libqt-mt.so.3 #23 0x4094ccc1 in _SmcProcessMessage () from /usr/X11R6/lib/libSM.so.6 #24 0x4095b26e in IceProcessMessages () from /usr/X11R6/lib/libICE.so.6 #25 0x401bf3b4 in QSmSocketReceiver::socketActivated () from /usr/lib/qt3/lib/libqt-mt.so.3 #26 0x401bf425 in QSmSocketReceiver::qt_invoke () from /usr/lib/qt3/lib/libqt-mt.so.3 #27 0x40294e7e in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #28 0x402954ad in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #29 0x405e91f0 in QSocketNotifier::activated () from /usr/lib/qt3/lib/libqt-mt.so.3 #30 0x402b4a70 in QSocketNotifier::event () from /usr/lib/qt3/lib/libqt-mt.so.3 #31 0x40231d5f in QApplication::internalNotify () from /usr/lib/qt3/lib/libqt-mt.so.3 #32 0x40233a83 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3 #33 0x40225e76 in QEventLoop::activateSocketNotifiers () from /usr/lib/qt3/lib/libqt-mt.so.3 #34 0x401df242 in QEventLoop::processEvents () from /usr/lib/qt3/lib/libqt-mt.so.3 #35 0x40249e51 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3 #36 0x40249c96 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3 #37 0x4023394f in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3 #38 0x082524a0 in lyx_gui::start ([EMAIL PROTECTED], [EMAIL PROTECTED]) at lyx_gui.C:265 #39 0x081051f0 in LyX::priv_exec (this=0x8426ce8, [EMAIL PROTECTED], argv=0xbfffe8f4) at lyx_main.C:28 6 #40 0x08104931 in LyX::exec ([EMAIL PROTECTED], argv=0xbfffe8f4) at lyx_main.C:143 #41 0x08064437 in main (argc=1, argv=0xbfffe8f4) at main.C:47 It seems to be
Re: bug 1656
Stephan Witt wrote: Jean-Marc Lasgouttes wrote: Last weekend I did some further investigation. 1. Checking the behaviour of kwrite it opens a question box to save the changes when it gets the focus... Hm... when it is iconized or on another desktop it doesn't ask? Really strange. 2. Checking the patched lyx [...] It seems to be another problem with processEvents... I forgot to say it doesn't differ from unpatched lyx! Stephan --
Re: In which shell does LyX run latex ?
Jose' Matos [EMAIL PROTECTED] writes: On Friday 25 November 2005 18:30, Jean-Pierre Chrétien wrote: Hello, [...] LyX does not seem recognize my PATH env variable on Debian/KDE I've seen a general wrapper in the scripts dir: could it explain why my PATH env variable seems not seen by the LyX internals ? /usr/share/lyx/configure is the one to blame, I think, never looked to it carefully. Thanks for your answer, but I discovered that my question should have been In which shell does kicker run LyX (which is clealy OT here) as the problem happens when I run LyX from the LyX start Icon in the control panel instead of running it from a terminal. Sorry for this false alarm about LyX. -- Jean-Pierre
Re: The baby algorithm
On Wed, Nov 23, 2005 at 08:52:23AM +0100, Asger Ottar Alstrup wrote: Dear Angus, Congratulations to you and your family! I can only say that he really does look a lot like you. Normally, babies all look the same, but in this case, there is no doubt that you are the father! I'm sure you are already know the algorithm by now: while (age 3 months) { If baby cries, - want milk? - change diper? - need sleep? if age 1 month, want to play? } Any decent compiler will optimize away that first 'if'... Andre'
Re: [patch] fix setDefaultParagraph in insettabular
Andre == Andre Poenitz [EMAIL PROTECTED] writes: Andre Inset Cell Paragraph Chars or Insets Cell Paragraph ... Andre is the target structureo of IU. It's pretty much the thing Andre that's currently used (with an 'implicit' single paragraph per Andre cell in mathed and an 'implicit' single cell for text inset Andre with exception of tabular inset. I guess the problem is that there is no easy way to get the cell in a uniform way outside of mathed. Jmarc
Re: [PATCH] Remove/fix messages
Michael == Michael Gerz [EMAIL PROTECTED] writes: Michael I don't have a formal proof that they are useless but all Michael other *.ui files don't have a caption anymore, too. Michael OK to commit? Yes. JMarc
Re: [PATCH] bug 2089: Touching Navigate menu crashes Lyx when a TOC inset is in a section layout
Georg == Georg Baum [EMAIL PROTECTED] writes: Georg The tabular dialog is so broken that I fear we'd open a can of Georg worms if we touched it. Yes. Georg I have attached a patch that restores 1.3 behaviour. Once I Georg found out the reason for the crash (it was the recUndo call in Georg LyXText::setLayout), it was really easy. I do not like much the new setLayoutWithoutUndo and would have preferred an optional bool argument to setLayout or maybe even the removal of the undo step from setLayout: I suspect that there are other cases where we want to avoid undo (when we switch classes?) and it is not difficult to do undo by hand. Other than that the patch looks OK. JMarc
Re: vectorParagraph considered harmful.
Andre == Andre Poenitz [EMAIL PROTECTED] writes: Andre I think paragraph ids are an anachrnism. We have stable(!) doc Andre iterators nowadays, so positions could be indicated by those. That would make Bookmarks pretty useless as soon as you add/remove a paragraph. The same would hold for the error list. JMarc
Re: [Patch in bugzilla] for 1966, and others
Martin Vermeer wrote: On Sun, 2005-11-27 at 23:11 +0100, Helge Hafting wrote: On Sat, Nov 26, 2005 at 10:30:08PM +0200, Martin Vermeer wrote: On Thu, Nov 24, 2005 at 04:54:23PM +0100, Jean-Marc Lasgouttes wrote: 's see if we get any user experiences on this. It is certainly not too fast. Ideally, I'd like to get the same speed but with smaller steps, perhaps half the jump and 0.1s delays. But no reason to delay 1.4 for that of course. And the fewer but bigger jumps may be an important performance issue for those with weak machines anyway. Do you get any irregular scrolling behaviour, or page scrolls that you didn't ask for? Can you select and scroll with precision, without overshooting and having to page scroll back? Testing some more, I see that I often overshoot by one jump, sometimes two. The problem then is that the jumps are so big - two jumps is a whole page, while one jump too much is manageable without scrolling back. I guess more delay would make it easier, but at the big price of slowness when selecting many pages. Big selections are slow enough as they are already. Smaller jumps, such as 1/4 or 1/5 of a page would make it easier, even if the delay is reduced further to keep the same scrolling speed as now. Seeing where I am in the document is no problem with the current speed, the problem is more one of reaction time. I have to move the mouse a little up to stop the scrolling. Helge Hafting
Re: vectorParagraph considered harmful.
Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes: Lars Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: | Lars Now, in DocumentSettings, change the textclass to article. This Lars gives | 3 errors, since the chapter headings have been changed Lars to Standard. | But the error list does not work: it searches for Lars id 994 (which was | 266 before switching class: document Lars allocated three more time), but | 994 does not exist anymore, it Lars is 1258 already :) Lars We shouldn't use par id for anything... only paragraph offsets Lars (offsets into the vector...) No. Think bookmarks. Think error list. A paragraph does not change because something got inserted before it. This notion of ID is nice because it really identify the paragraph independently from its position in the text. I remember in Paris you wanted to keep the par IDs in the document format itself. Lars By going back to std::list now would mean more months of hacking Lars ... I am pretty sure about that... So what do we do in the meantime to have things like error lists almost work? A question: in SwitchBetweenClasses, there is code like InsetText in; std::swap(in.paragraphs(), pars); [...] std::swap(in.paragraphs(), pars); If I understand correctly, this causes the whole document to be cloned twice. Is there any practical use to this? JMarc
Re: [Patch] Re: 1.4cvs bug 2117, matrix inside delimiters crash recipe:
Martin == Martin Vermeer [EMAIL PROTECTED] writes: Martin The current fix looks like the attached. It fixes the same Martin problem for scriptinset too. Go ahead. JMarc
Re: [Patch] Re: 1.4cvs bug 2117, matrix inside delimiters crash recipe:
Martin Vermeer wrote: The current fix looks like the attached. It fixes the same problem for scriptinset too. Nice - I can now insert a matrix into the delimiters, as well as selecting a matrix and then apply delimiters around it. Well done! Helge Hafting
mathed script oddity
Mathed can be brought into a strange state where the keys ^ and _ doesn't work as expected. 1. Activate math, type the word test 2. Press ^ to get superscript 3. Press space, this ought to cancel superscript 4. Press ^ again, note that instead of a superscript, the last t in test get those pink corners, suggesting that it has been turned into an entity of its own. If, instead of step 4 you move out of the math inset and come back later, it will still act strange. Saving and reloading the document fixes this, no permanent damage. Only the in-memory document is affected. If all you want is to get the exponent, press ^ again and it will work on the second try. The subscript has the same problem. The problem seems minor, as the user has to do something unnecessary to get stuck in the first place, and then it is easily solved. Still, do you want a bugzilla entry? Helge Hafting
Re: Grammar Checker for LyX.
On Wednesday 23 November 2005 23:51, Angus Leeming wrote: Asger Ottar Alstrup wrote: John C. McCabe-Dansted wrote: I am working on a grammar checker for LyX. It outputs the errors to LaTeX .log format so it can integrate itself into LyX without need for any modification to existing LyX binary. Hi, John. This is really nice and at 722 lines long (including copious commentary) is really small. That's great because it means that it'll be maintainable in the future. Thanks, though I expect it will be 1500+ lines of code and 50+ KB of data files for the English language when feature complete. I'd second Asger's suggestion that you investigate chktex. Most of the hooks are there already to able you to get on-screen notification of grammar problems, essentially for free. Yes, at this point I think I should write it as chktex v2, and ignore anything LyX specific for the meanwhile, particularly while there is feature freeze. Ultimately I would want to add hooks to LyX to support new features like This is not a grammatical error, because..., but there is no point in adding these hooks until my code is robust. The final version will be at least 50KB uncompressed including data files for the English language. If I don't try to integrate the core into LyX I won't have to worry about keeping it small enough to be a patch. Interested? Yes. Asger's suggestion that you rewrite this thing in C++ is also worthy of serious consideration. We know C++. We don't know Perl. That means If I was aiming it as a replacement for chktex, I may want to write it as ANSI C (as with chktex), but then it probably wouldn't be the LyX programmers I would be asking to maintain the code. that you'll get little or no help in maintaining your creation ATM, for purely practical reasons. Given that the heart of your beast is a bunch of regexes, you should have no problems moving to C++. (Boost.Regex which we use already provides a drop in replacement for your Perl regexes.) I had a look at Boost.Regex. I am not sure if I need or want regexes in the final release anyway. -- John C. McCabe-Dansted Masters Student
Re: [Patch] Re: 1.4cvs bug 2117, matrix inside delimiters crash recipe:
On Mon, 2005-11-28 at 10:47 +0100, Jean-Marc Lasgouttes wrote: Martin == Martin Vermeer [EMAIL PROTECTED] writes: Martin The current fix looks like the attached. It fixes the same Martin problem for scriptinset too. Go ahead. Thanks, it's in. - Martin signature.asc Description: This is a digitally signed message part
Re: [Patch in bugzilla] for 1966, and others
On Mon, 2005-11-28 at 10:47 +0100, Helge Hafting wrote: ... Do you get any irregular scrolling behaviour, or page scrolls that you didn't ask for? Can you select and scroll with precision, without overshooting and having to page scroll back? Testing some more, I see that I often overshoot by one jump, sometimes two. The problem then is that the jumps are so big - two jumps is a whole page, while one jump too much is manageable without scrolling back. If you were a faster human being, do you think you would still get these overshoots? (What I am asking is, is there a remaining problem in the software?) I guess more delay would make it easier, but at the big price of slowness when selecting many pages. Big selections are slow enough as they are already. Smaller jumps, such as 1/4 or 1/5 of a page would make it easier, even if the delay is reduced further to keep the same scrolling speed as now. Yes... but hard to do within the current paradigm. Actually scroll speed dependence on where you keep the mouse would be best, but not doable in my understanding without major change. (I actually tried to make the 200 ms delay into a variable that could be tuned at runtime, but failed miserably. Does anyone know if that can be done, and how?) Seeing where I am in the document is no problem with the current speed, the problem is more one of reaction time. I have to move the mouse a little up to stop the scrolling. Yes, that's by design. - Martin signature.asc Description: This is a digitally signed message part
Re: [Patch in bugzilla] for 1966, and others
Martin Vermeer wrote: I guess more delay would make it easier, but at the big price of slowness when selecting many pages. Big selections are slow enough as they are already. Smaller jumps, such as 1/4 or 1/5 of a page would make it easier, even if the delay is reduced further to keep the same scrolling speed as now. Yes... but hard to do within the current paradigm. Actually scroll speed dependence on where you keep the mouse would be best, but not doable in my understanding without major change. (I actually tried to make the 200 ms delay into a variable that could be tuned at runtime, but failed miserably. Does anyone know if that can be done, and how?) What emacs does, IIRC, is make scrolling speed dependent on mouse position above or below the window. It the mouse is only just outside the window then scrolling speed is slow. If it's a long way above (below) the window, then scrolling is fast. Is it difficult to use such an idea here? -- Angus
Re: [PATCH] bug 2089: Touching Navigate menu crashes Lyx when a TOC inset is in a section layout
Jean-Marc Lasgouttes wrote: I do not like much the new setLayoutWithoutUndo and would have preferred an optional bool argument to setLayout or maybe even the removal of the undo step from setLayout: I suspect that there are other cases where we want to avoid undo (when we switch classes?) and it is not difficult to do undo by hand. Good point. It turned out that setLayout was only called once (from the other LyXText::setLayout method), so I moved the undo stuff there. OK to commit? GeorgIndex: src/ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v retrieving revision 1.2328 diff -u -p -r1.2328 ChangeLog --- src/ChangeLog 25 Nov 2005 14:40:33 - 1.2328 +++ src/ChangeLog 28 Nov 2005 10:54:56 - @@ -1,3 +1,11 @@ +2005-11-28 Georg Baum [EMAIL PROTECTED] + + * text2.C (setLayout): move recUndo call to other setLayout method + * tabular.C (toggleFixedWidth): new, handle cell width changes + * tabular.C (setColumnPWidth): move some code from insettabular.C here + and use toggleFixedWidth + * tabular.C (setMColumnPWidth): ditto + 2005-11-25 Jürgen Spitzmüller [EMAIL PROTECTED] * paragraph.C (asString): use new inset-textString method (fix bug 2089) Index: src/lyxtext.h === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxtext.h,v retrieving revision 1.329 diff -u -p -r1.329 lyxtext.h --- src/lyxtext.h 25 Oct 2005 09:14:11 - 1.329 +++ src/lyxtext.h 28 Nov 2005 10:54:56 - @@ -75,7 +75,7 @@ public: void breakParagraph(LCursor cur, bool keep_layout = false); /// set layout over selection - pit_type setLayout(pit_type start, pit_type end, + void setLayout(pit_type start, pit_type end, std::string const layout); /// void setLayout(LCursor cur, std::string const layout); Index: src/tabular.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/tabular.C,v retrieving revision 1.227 diff -u -p -r1.227 tabular.C --- src/tabular.C 7 Sep 2005 10:37:00 - 1.227 +++ src/tabular.C 28 Nov 2005 10:54:57 - @@ -21,11 +21,14 @@ #include buffer.h #include bufferparams.h +#include BufferView.h +#include cursor.h #include debug.h #include LaTeXFeatures.h #include lyxlex.h #include outputparams.h #include paragraph.h +#include paragraph_funcs.h #include insets/insettabular.h @@ -872,7 +875,36 @@ void LyXTabular::setVAlignment(idx_type } -void LyXTabular::setColumnPWidth(idx_type cell, LyXLength const width) +namespace { + +/** + * Allow line and paragraph breaks for fixed width cells or disallow them, + * merge cell paragraphs and reset layout to standard for variable width + * cells. + */ +void toggleFixedWidth(LCursor cur, InsetText * inset, bool fixedWidth) +{ + inset-setAutoBreakRows(fixedWidth); + if (fixedWidth) + return; + + // merge all paragraphs to one + BufferParams const bp = + inset-getText(0)-bv_owner-buffer()-params(); + while (inset-paragraphs().size() 1) + mergeParagraph(bp, inset-paragraphs(), 0); + + // reset layout + cur.push(*inset); + inset-getText(0)-setLayout(0, cur.lastpit() + 1, Standard); + cur.pop(); +} + +} + + +void LyXTabular::setColumnPWidth(LCursor cur, idx_type cell, + LyXLength const width) { col_type const j = column_of_cell(cell); @@ -880,18 +912,32 @@ void LyXTabular::setColumnPWidth(idx_typ for (row_type i = 0; i rows_; ++i) { idx_type const cell = getCellNumber(i, j); // because of multicolumns - getCellInset(cell)-setAutoBreakRows(!getPWidth(cell).zero()); + toggleFixedWidth(cur, getCellInset(cell).get(), + !getPWidth(cell).zero()); } + // cur paragraph can become invalid after paragraphs were merged + if (cur.pit() cur.lastpit()) + cur.pit() = cur.lastpit(); + // cur position can become invalid after newlines were removed + if (cur.pos() cur.lastpos()) + cur.pos() = cur.lastpos(); } -bool LyXTabular::setMColumnPWidth(idx_type cell, LyXLength const width) +bool LyXTabular::setMColumnPWidth(LCursor cur, idx_type cell, + LyXLength const width) { if (!isMultiColumn(cell)) return false; cellinfo_of_cell(cell).p_width = width; - getCellInset(cell)-setAutoBreakRows(!width.zero()); + toggleFixedWidth(cur, getCellInset(cell).get(), !width.zero()); + // cur paragraph can become invalid after paragraphs were merged + if (cur.pit() cur.lastpit()) + cur.pit() = cur.lastpit(); + // cur position can become invalid after newlines were removed + if (cur.pos() cur.lastpos()) + cur.pos() = cur.lastpos(); return true; } Index: src/tabular.h === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/tabular.h,v retrieving revision 1.97 diff -u -p -r1.97 tabular.h --- src/tabular.h 9 Jun 2005 09:58:05 - 1.97 +++ src/tabular.h 28 Nov 2005 10:54:57 - @@ -24,6 +24,7 @@ #include vector class
Re: The baby algorithm
Andre Poenitz wrote: I'm sure you are already know the algorithm by now: while (age 3 months) { If baby cries, - want milk? - change diper? - need sleep? if age 1 month, want to play? } Any decent compiler will optimize away that first 'if'... H. In physical terms doesn't that mean that your compiler is pre-empting the baby's opinion by forcing it to accept milk, diper, sleep, play even though it isn't crying? Of course, this may just show how ignorant I am and how much I have to learn. -- Angus
Re: Grammar Checker for LyX.
John C. McCabe-Dansted wrote: On Wednesday 23 November 2005 23:51, Angus Leeming wrote: Asger Ottar Alstrup wrote: John C. McCabe-Dansted wrote: I am working on a grammar checker for LyX. It outputs the errors to LaTeX .log format so it can integrate itself into LyX without need for any modification to existing LyX binary. Hi, John. This is really nice and at 722 lines long (including copious commentary) is really small. That's great because it means that it'll be maintainable in the future. Thanks, though I expect it will be 1500+ lines of code and 50+ KB of data files for the English language when feature complete. I'd second Asger's suggestion that you investigate chktex. Most of the hooks are there already to able you to get on-screen notification of grammar problems, essentially for free. Yes, at this point I think I should write it as chktex v2, and ignore anything LyX specific for the meanwhile, particularly while there is feature freeze. Ultimately I would want to add hooks to LyX to support new features like This is not a grammatical error, because..., but there is no point in adding these hooks until my code is robust. The final version will be at least 50KB uncompressed including data files for the English language. If I don't try to integrate the core into LyX I won't have to worry about keeping it small enough to be a patch. Interested? Yes. What you write reads to me as a well thought out proposal. LyX has the potential for excellent support for communication with an external process such as yours, albeit one that is currently rather clunky and which works only on unix (and as far as the fifo pipes are concerned, only on some flavours of unix at that). I'm sure that any requests from you to add extra LFUNs to improve the communication between LyX and your tool will be received warmly ;-) Asger's suggestion that you rewrite this thing in C++ is also worthy of serious consideration. We know C++. We don't know Perl. That means If I was aiming it as a replacement for chktex, I may want to write it as ANSI C (as with chktex), but then it probably wouldn't be the LyX programmers I would be asking to maintain the code. Fair enough. that you'll get little or no help in maintaining your creation ATM, for purely practical reasons. Given that the heart of your beast is a bunch of regexes, you should have no problems moving to C++. (Boost.Regex which we use already provides a drop in replacement for your Perl regexes.) I had a look at Boost.Regex. I am not sure if I need or want regexes in the final release anyway. If you don't use regexes to parse the latex log file, then presumably you're looking at a formal parser of the log file language, no? That seems a little heavy for what you're trying to achieve. If I've read you correctly then you may find the docs of the Boost.Spirit library an interesting read. -- Angus
Re: [PATCH] bug 2089: Touching Navigate menu crashes Lyx when a TOC inset is in a section layout
Georg == Georg Baum [EMAIL PROTECTED] writes: Georg Jean-Marc Lasgouttes wrote: I do not like much the new setLayoutWithoutUndo and would have preferred an optional bool argument to setLayout or maybe even the removal of the undo step from setLayout: I suspect that there are other cases where we want to avoid undo (when we switch classes?) and it is not difficult to do undo by hand. Georg Good point. It turned out that setLayout was only called once Georg (from the other LyXText::setLayout method), so I moved the undo Georg stuff there. Georg OK to commit? Yes. JMarc
Possible cure to a pdf generation anomaly
Guys, I just wanted to draw your attention to this message on the lyx-users list: http://permalink.gmane.org/gmane.editors.lyx.general/26064 IIRC correctly, we have had problems throughout the ages with files converted to pdf by different routes (latex-dvi-ps-pdf, pdflatex) producing different output. One cause of such differences has been rotation of .eps figures. If the solution is simply to define a converter as ps2pdf13 -dAutoRotatePages=/None $$i then I think that we should do it, no? -- Angus
Re: [Patch in bugzilla] for 1966, and others
On Mon, 2005-11-28 at 11:01 +, Angus Leeming wrote: Martin Vermeer wrote: I guess more delay would make it easier, but at the big price of slowness when selecting many pages. Big selections are slow enough as they are already. Smaller jumps, such as 1/4 or 1/5 of a page would make it easier, even if the delay is reduced further to keep the same scrolling speed as now. Yes... but hard to do within the current paradigm. Actually scroll speed dependence on where you keep the mouse would be best, but not doable in my understanding without major change. (I actually tried to make the 200 ms delay into a variable that could be tuned at runtime, but failed miserably. Does anyone know if that can be done, and how?) What emacs does, IIRC, is make scrolling speed dependent on mouse position above or below the window. It the mouse is only just outside the window then scrolling speed is slow. If it's a long way above (below) the window, then scrolling is fast. Is it difficult to use such an idea here? Yes. Or perhaps not, if it would be an easy way to change the timeout parameter on the fly. - Martin signature.asc Description: This is a digitally signed message part
Re: [PATCH] bug 2096: LyX file inserting is broken
Georg == Georg Baum [EMAIL PROTECTED] writes: Georg The advantage of my patch is that it uses the existing cut and Georg paste code and that it will automatically benefit from future Georg changes to that code. I thought again about it during the week-end and came up with the following version of the cut-and-paste idea, that I like a lot more. This is from my version of the idea, so there may be some problems I overlooked (and that you fixed in your version). What do you think? JMarc Index: src/BufferView_pimpl.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView_pimpl.C,v retrieving revision 1.599 diff -u -p -r1.599 BufferView_pimpl.C --- src/BufferView_pimpl.C 7 Nov 2005 15:06:41 - 1.599 +++ src/BufferView_pimpl.C 28 Nov 2005 11:35:03 - @@ -875,13 +875,9 @@ void BufferView::Pimpl::MenuInsertLyXFil string const disp_fn = MakeDisplayPath(filename); owner_-message(bformat(_(Inserting document %1$s...), disp_fn)); - cursor_.clearSelection(); - bv_-getLyXText()-breakParagraph(cursor_); - - BOOST_ASSERT(cursor_.inTexted()); - string const fname = MakeAbsPath(filename); - bool const res = buffer_-readFile(fname, cursor_.pit()); + bool const res = insertLyXFile(cursor_, fname); + cursor_.clearSelection(); resizeCurrentBuffer(); string s = res ? _(Document %1$s inserted.) Index: src/ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v retrieving revision 1.2328 diff -u -p -r1.2328 ChangeLog --- src/ChangeLog 25 Nov 2005 14:40:33 - 1.2328 +++ src/ChangeLog 28 Nov 2005 11:35:04 - @@ -1,6 +1,25 @@ +2005-11-28 Jean-Marc Lasgouttes [EMAIL PROTECTED] + + Fix bug 2096. + + * buffer.C (readDocument): remove pit argument and code releated + to it; set the inset owner correctly (unrelated, but useful). + (readFile): get rid of pit argument. + + * CutAndPaste.C (pasteSelectionHelper): use a ParagraphList and a + textclass instead of a selection index. + (pasteParagraphList): new function. + (pasteSelection): make it a wrapper around pasteParagraphList. + + * BufferView_pimpl.C (MenuInsertLyXFile): use insertLyXFile. + + * buffer_funcs.C (insertLyXFile): new method, which uses + cap::pasteParagraphList to insert a file. + 2005-11-25 Jürgen Spitzmüller [EMAIL PROTECTED] - * paragraph.C (asString): use new inset-textString method (fix bug 2089) + * paragraph.C (asString): use new inset-textString method (fix + bug 2089) 2005-11-24 Jean-Marc Lasgouttes [EMAIL PROTECTED] Index: src/CutAndPaste.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/CutAndPaste.C,v retrieving revision 1.159 diff -u -p -r1.159 CutAndPaste.C --- src/CutAndPaste.C 25 Nov 2005 09:27:08 - 1.159 +++ src/CutAndPaste.C 28 Nov 2005 11:35:04 - @@ -105,18 +105,19 @@ bool checkPastePossible(int index) pairPitPosPair, pit_type -pasteSelectionHelper(Buffer const buffer, ParagraphList pars, - pit_type pit, int pos, - textclass_type tc, size_t cut_index, ErrorList errorlist) +pasteSelectionHelper(Buffer const buffer, + ParagraphList pars, pit_type pit, int pos, + ParagraphList const parlist, textclass_type textclass, + ErrorList errorlist) { - if (!checkPastePossible(cut_index)) + if (parlist.empty()) return make_pair(PitPosPair(pit, pos), pit); BOOST_ASSERT (pos = pars[pit].size()); // Make a copy of the CaP paragraphs. - ParagraphList insertion = theCuts[cut_index].first; - textclass_type const textclass = theCuts[cut_index].second; + ParagraphList insertion = parlist; + textclass_type const tc = buffer.params().textclass; // Now remove all out of the pars which is NOT allowed in the // new environment and set also another font if that is required. @@ -608,13 +609,9 @@ std::string getSelection(Buffer const } -void pasteSelection(LCursor cur, size_t sel_index) +void pasteParagraphList(LCursor cur, ParagraphList const parlist, +textclass_type textclass) { - // this does not make sense, if there is nothing to paste - lyxerr pasteSelection sel_index endl; - if (!checkPastePossible(sel_index)) - return; - if (cur.inTexted()) { LyXText * text = cur.text(); BOOST_ASSERT(text); @@ -630,8 +627,8 @@ void pasteSelection(LCursor cur, size_ pasteSelectionHelper(cur.buffer(), text-paragraphs(), cur.pit(), cur.pos(), - cur.buffer().params().textclass, - sel_index, el); + parlist, textclass, + el); bufferErrors(cur.buffer(), el); cur.bv().showErrorList(_(Paste)); @@ -643,6 +640,18 @@ void pasteSelection(LCursor cur, size_
Re: Possible cure to a pdf generation anomaly
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus Guys, I just wanted to draw your attention to this message on Angus the lyx-users list: Angus http://permalink.gmane.org/gmane.editors.lyx.general/26064 Angus IIRC correctly, we have had problems throughout the ages with Angus files converted to pdf by different routes Angus (latex-dvi-ps-pdf, pdflatex) producing different output. One Angus cause of such differences has been rotation of .eps figures. Angus If the solution is simply to define a converter as Angus ps2pdf13 -dAutoRotatePages=/None $$i Angus then I think that we should do it, no? Hmm, it seems from here http://casper.ghostscript.com/~ghostgum/pdftips.htm that this syntax may not work with windows... So we may have to be careful... JMarc
Re: Possible cure to a pdf generation anomaly
Angus Leeming wrote: If the solution is simply to define a converter as ps2pdf13 -dAutoRotatePages=/None $$i then I think that we should do it, no? This is indeed the solution and we should set this option. (Besides this, what is the reason that we use ps2pdf13 instead of ps2pdf14? pdf14 is used by Acroread 5 and later and I don't think that anybody uses acroread 4 that was released in June 1999.) regards Uwe
Re: Possible cure to a pdf generation anomaly
Jean-Marc Lasgouttes writes: Hmm, it seems from here http://casper.ghostscript.com/~ghostgum/pdftips.htm that this syntax may not work with windows... Yes one has to use the # char instead of the =. Isn't it possible to have a Win-subbranch to cover such specialities? thanks for the hint and regards Uwe
Re: Possible cure to a pdf generation anomaly
Uwe == Uwe Stöhr [EMAIL PROTECTED] writes: Uwe Jean-Marc Lasgouttes writes: Hmm, it seems from here http://casper.ghostscript.com/~ghostgum/pdftips.htm that this syntax may not work with windows... Uwe Yes one has to use the # char instead of the =. Isn't it Uwe possible to have a Win-subbranch to cover such specialities? What about trying out the other syntax instead (direct postscript)? JMarc
Re: Possible cure to a pdf generation anomaly
Uwe == Uwe Stöhr [EMAIL PROTECTED] writes: Uwe (Besides this, what is the reason that we use ps2pdf13 instead of Uwe ps2pdf14? pdf14 is used by Acroread 5 and later and I don't think Uwe that anybody uses acroread 4 that was released in June 1999.) What do we gain?
Re: Installing LyX 1.3.7pre4 (Win XP)
Angus Leeming wrote: Uwe, I really, really wish you lots and lots of luck with your new installer. It's going to have to cope with some weird and wonderful adventures, not just mild ones. ;-) (I have many stress testers now who help me a lot of fixing wierd problems.) I avoid these problems by deleting LyX's old config folders in ~\Application Data when my installer starts. OK this is not the fine way but there is no real reason why this could harm. (The default working directory is a different folder) I've just tested your new version and mentioned the following things: - Nobody updated the 1.3 CVS-branch of the lyx2lyx files. Could you do this please? - The Credits file is also not updated in the 1.3 CVS-branch. - The new qt-mt3.dll is 2MB larger than the one that is shipped with LyXWin 1.3.6-1. What's the reason? - LyX 1.3.7 comes with new hungarian translations but you can't choose this language in your installer version. I'll send you a patch soon. - I changed the checks for installed programs like Adobe Reader and GSview to fix some user reported bugs. Should I send you the changes to be included to your installer? - It seems that the TeXLive distribution doesn't include epstopdf so that we need to change to ps2pdf14 also for Windows. I'll inform you what exactly needs to be done. - I got a bug report that LyXWin don't work when the computer user name contains umlauts or accents (dv2dt erors). Perhaps we will never fix this but we should mention it in the official readmes. Happily, the new qt module correctly identifies screen fonts. Indeed, but is is OK when I set the default typewriter font manually to Courier New instead of Courier? This was requested by Asger because Courier New is not a bitmap font like Courier. I'll pack your actual LyX 1.3.7pre4 version to a new installer release. best regards Uwe
Re: Possible cure to a pdf generation anomaly
Jean-Marc Lasgouttes writes: Uwe (Besides this, what is the reason that we use ps2pdf13 instead of Uwe ps2pdf14? pdf14 is used by Acroread 5 and later and I don't think Uwe that anybody uses acroread 4 that was released in June 1999.) What do we gain? pdftex older than version 1.3 produces PDF1.4 so that the user gets a consistent PDF. (If the image is included as PDF1.3 it is internally converted which might take some extra time). As far as I know is the change between PDF1.4 and PDF1.5 much bigger concerning the graphics. I don't know if the change to ps2pdf14 is a big advantage and somebody must verify that it works together with teTex 2.x (I can't do this). regards Uwe
Re: [experimental patch] fix bug 1973
Helge Hafting wrote: The output is now correct, but instead we sort of have the exact opposite problem: 1. Select _more_ than the table and apply a font change. Everything is correct, on screen and in output. 2. Select a few cells inside the changed table, and change the font to something different again. Note that there is now no font change on the screen, but the output (view dvi) is correct. I can't do this: Assertion triggered in void unnamed::recordUndo(Undo::undo_kind, LCursor, int, int, limited_stackUndo) by failing check first_pit = cur.lastpit() in file ../../src/undo.C:125 (both with and without the patch) Can you give a precise recipe? I suspect that this problem is also present without my patch. Is that true? Georg
Re: Installing LyX 1.3.7pre4 (Win XP)
Uwe == Uwe Stöhr [EMAIL PROTECTED] writes: Uwe - The Credits file is also not updated in the 1.3 CVS-branch. Who is missing? The file is maintained separately, since it covers people who contributed to 1.3 only. Looking over, I think this one should be added. I'll do it. @bUwe Stöhr @iE-mail: [EMAIL PROTECTED] German translation of the Windows installer JMarc
Re: [patch] 1.3: Index insertion
Juergen == Juergen Spitzmueller [EMAIL PROTECTED] writes: Juergen Jean-Marc Lasgouttes wrote: The patch is wrong, because the index is not populated by LFUN_PASTE (there is no underlying text inset). Try this one instead. Juergen It works indeed. Would you like to include it? I am not sure the patch is really right: if I insert a TOC inset, it will mean that the selection is not replaced anymore, but it stays here. Actually, only INDEX requires to use the selection without deleting it. What about this different version? JMarc Index: src/text3.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text3.C,v retrieving revision 1.29.2.3 diff -u -p -r1.29.2.3 text3.C --- src/text3.C 29 Dec 2003 13:27:26 - 1.29.2.3 +++ src/text3.C 28 Nov 2005 13:44:53 - @@ -1614,6 +1614,17 @@ Inset::RESULT LyXText::dispatch(FuncRequ break; } + case LFUN_INDEX_INSERT: { + Inset * inset = createInset(cmd); + if (inset) { + BufferView * bv = cmd.view(); + if (bv-insertInset(inset)) +inset-edit(bv); + else +delete inset; + } + break; + } #if 0 case LFUN_INSET_LIST: @@ -1637,7 +1648,6 @@ Inset::RESULT LyXText::dispatch(FuncRequ case LFUN_INSERT_URL: case LFUN_INSET_EXTERNAL: - case LFUN_INDEX_INSERT: // Just open the inset doInsertInset(this, cmd, true, false); break;
Re: [Patch in bugzilla] for 1966, and others
Martin Vermeer wrote: On Mon, 2005-11-28 at 10:47 +0100, Helge Hafting wrote: ... Do you get any irregular scrolling behaviour, or page scrolls that you didn't ask for? Can you select and scroll with precision, without overshooting and having to page scroll back? Testing some more, I see that I often overshoot by one jump, sometimes two. The problem then is that the jumps are so big - two jumps is a whole page, while one jump too much is manageable without scrolling back. If you were a faster human being, do you think you would still get these overshoots? (What I am asking is, is there a remaining problem in the software?) Well, if I were faster, then I wouldn't get them. So slowing things down would make it easier. But then, making a big selection would take forever. I guess more delay would make it easier, but at the big price of slowness when selecting many pages. Big selections are slow enough as they are already. Smaller jumps, such as 1/4 or 1/5 of a page would make it easier, even if the delay is reduced further to keep the same scrolling speed as now. Yes... but hard to do within the current paradigm. So, a distance shorter than 1/2 screen is hard then? Actually scroll speed dependence on where you keep the mouse would be best, but not doable in my understanding without major change. And a scrolling speed that starts out slow and increase after, say, 4 screenfulls is equally impossible? (I actually tried to make the 200 ms delay into a variable that could be tuned at runtime, but failed miserably. Does anyone know if that can be done, and how?) Seeing where I am in the document is no problem with the current speed, the problem is more one of reaction time. I have to move the mouse a little up to stop the scrolling. Yes, that's by design. Sure. :-) After recognizing the desired end of selection, one must stop the scrolling somehow. This takes time, and overshoot happens. Slowness can fix that, but then fixed-speed scrolling will be too slow. The reason I think a shorter jump would be better, is thatI then get a chance to look for the desired end of selection lower down on the screen. Now I have to monitor half of the main window - what I am looking for can appear anywhere in the lower half. Monitoring a big area takes time. If I could look only at the lowest part of the main window then I can see what I'm looking for faster - and thereby stop the scrolling quicker. But if speed is the only thing that isn't very hard to adjust, feel free to slow it down a bit to get 1.4 out. :-) Helge Hafting
Re: The baby algorithm
Congratulations! Angus Leeming wrote: Andre Poenitz wrote: I'm sure you are already know the algorithm by now: while (age 3 months) { If baby cries, - want milk? - change diper? - need sleep? if age 1 month, want to play? } Any decent compiler will optimize away that first 'if'... H. In physical terms doesn't that mean that your compiler is pre-empting the baby's opinion by forcing it to accept milk, diper, sleep, play even though it isn't crying? Of course, this may just show how ignorant I am and how much I have to learn. Isn't this a interrupt-driven algorithm? If you're awake, then it is because the baby cried. If he didn't, you'd be sleeping. :-) Which is why the test is unnecessary . . . Helge Hafting
Re: Installing LyX 1.3.7pre4 (Win XP)
Jean-Marc Lasgouttes wrote: Looking over, I think this one should be added. I'll do it. at bUwe Stöhr I missed the other translators of the installer: Jean-Pierre Chrétien, Christian Ridderström etc., see http://www.lyx.org/cgi-bin/viewcvs.cgi/lyx-devel/lib/CREDITS regards Uwe
Re: [PATCH] bug 2096: LyX file inserting is broken
Jean-Marc Lasgouttes wrote: Georg The advantage of my patch is that it uses the existing cut and Georg paste code and that it will automatically benefit from future Georg changes to that code. I thought again about it during the week-end and came up with the following version of the cut-and-paste idea, that I like a lot more. This is from my version of the idea, so there may be some problems I overlooked (and that you fixed in your version). I could only find one: The error list is not shown if the file is corrupt. This could probably be fixed by handing the temp buffer to InsertLyXFile: Buffer buf(, false); boost::signals::connection errorConnection = buf.error.connect(boost::bind(BufferView::Pimpl::addError, this, _1)); bool const res = insertLyXFile(cursor_, fname, buf); errorConnection.disconnect(); bv_-showErrorList(_(Parse)); What do you think? Looks good apart from the errorlist thing. Everything else works as my version did, plus it does not have the problem with the empty paragraph after undo. Georg
Re: Installing LyX 1.3.7pre4 (Win XP)
Uwe Stöhr wrote: Uwe, I really, really wish you lots and lots of luck with your new installer. It's going to have to cope with some weird and wonderful adventures, not just mild ones. ;-) (I have many stress testers now who help me a lot of fixing wierd problems.) I avoid these problems by deleting LyX's old config folders in ~\Application Data when my installer starts. OK this is not the fine way but there is no real reason why this could harm. (The default working directory is a different folder) Your solution just masks the real problem. Why are things failing now? What's the stumbling block? Personally, things have never failed for me. I don't like your solution (deleting Applications Data\LyX) because it means that all modifications to my own setup get thrown out when I upgrade from 1.3.6 to 1.3.7-preX. At the very least your installer should ask if it should delete the Applications Data\LyX folder. I've just tested your new version and mentioned the following things: - Nobody updated the 1.3 CVS-branch of the lyx2lyx files. Could you do this please? Georg has been doing this periodically. Georg? - The Credits file is also not updated in the 1.3 CVS-branch. I see that Jean-Marc has just added you ;-) - The new qt-mt3.dll is 2MB larger than the one that is shipped with LyXWin 1.3.6-1. What's the reason? I've no idea. It contains a whole heap of stuff that's backported from the official Trolltech Qt4 release. - LyX 1.3.7 comes with new hungarian translations but you can't choose this language in your installer version. I'll send you a patch soon. Great! (To the list please.) - I changed the checks for installed programs like Adobe Reader and GSview to fix some user reported bugs. Should I send you the changes to be included to your installer? Sure. - It seems that the TeXLive distribution doesn't include epstopdf so that we need to change to ps2pdf14 also for Windows. I'll inform you what exactly needs to be done. Rather than *change* I think you should *add* an additional test (to see whether epstopdf/ps3pdf14 exists) to lib/configure.m4. Jean-Marc is probably the expert to ask how if you get stuck ;-) - I got a bug report that LyXWin don't work when the computer user name contains umlauts or accents (dv2dt erors). Perhaps we will never fix this but we should mention it in the official readmes. You should ascertain exactly what the problem is and where the failure occurs. File it on bugzilla.lyx.org and it might get fixed eventually. Happily, the new qt module correctly identifies screen fonts. Indeed, but is is OK when I set the default typewriter font manually to Courier New instead of Courier? This was requested by Asger because Courier New is not a bitmap font like Courier. I don't see why not. You could make the change in one of two places: 1. In the LyX sources $ grep -ir Helvetica lyx/13x/src lyx/13x/src/lyxrc.C:sans_font_name = helvetica; I guess that the code would be protected with a preprocessor block #if defined (_WIN32) sans_font_name = ...; #else sans_font_name = helvetica; #endif 2. Alternatively, add lines like \screen_font_roman Times New Roman to the lyxrc.defaults file. The place to do this would be in lyx_configure.C in the Win32/packaging/installer directory. I'll pack your actual LyX 1.3.7pre4 version to a new installer release. best regards Uwe HTH, -- Angus
Re: Installing LyX 1.3.7pre4 (Win XP)
Uwe == Uwe Stöhr [EMAIL PROTECTED] writes: Uwe Jean-Marc Lasgouttes wrote: Looking over, I think this one should be added. I'll do it. at bUwe Stöhr Uwe I missed the other translators of the installer: Uwe Jean-Pierre Chrétien, Christian Ridderström etc., see You are right, I added them. JMarc
Re: Installing LyX 1.3.7pre4 (Win XP)
Angus Leeming wrote: Uwe Stöhr wrote: - Nobody updated the 1.3 CVS-branch of the lyx2lyx files. Could you do this please? Georg has been doing this periodically. Georg? The only thing that is missing in 1.3 is José's latest fix for bug 666. I'll do a resync again, but I doubt that this missing bit caused any problems (it is for really ancient files only). Georg
Re: Installing LyX 1.3.7pre4 (Win XP)
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus 2. Alternatively, add lines like Angus \screen_font_roman Times New Roman Angus to the lyxrc.defaults file. The place to do this would be in Angus lyx_configure.C in the Win32/packaging/installer directory. I am not sure why such things are done in the windows installer. Why not ship a preference file that has the right defaults instead? This is what LyX/Mac does. JMarc
Re: Installing LyX 1.3.7pre4 (Win XP)
Jean-Marc Lasgouttes wrote: Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus 2. Alternatively, add lines like Angus \screen_font_roman Times New Roman Angus to the lyxrc.defaults file. The place to do this would be in Angus lyx_configure.C in the Win32/packaging/installer directory. I am not sure why such things are done in the windows installer. Why not ship a preference file that has the right defaults instead? This is what LyX/Mac does. So? Why would I want to repeat a mistake ;-) Each user has his own $LYX_USER_DIR/preferences file, no? If I install as Administrator, how can my users see/use my preferences file that's in C:\Documents and Settings\Admin\Application Data\LyX\preferences ? They don't even have read permission to look in that directory and, anyway, LyX currently looks only for a system-wide lyxrc.defaults file at C:\Program Files\LyX\Resources\lyx\lyxrc.defaults It's this file that should contain system-wide configuration data even though it's currently a PITA to generate/modify on Windows. -- Angus
Re: Installing LyX 1.3.7pre4 (Win XP)
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus Each user has his own $LYX_USER_DIR/preferences file, no? If I Angus install as Administrator, how can my users see/use my Angus preferences file that's in C:\Documents and Angus Settings\Admin\Application Data\LyX\preferences ? They don't Angus even have read permission to look in that directory and, Angus anyway, LyX currently looks only for a system-wide Angus lyxrc.defaults file at C:\Program Angus Files\LyX\Resources\lyx\lyxrc.defaults What I say is that you (s|c)hould distribute a C:\Program Files\LyX\Resources\lyx\preference file that would serve as default preferences for new users. Angus It's this file that should contain system-wide configuration Angus data even though it's currently a PITA to generate/modify on Angus Windows. Something I have been wanting to do is to get rid of the system-wide lyxrc.default file, so that every user only has his own one, generated the first time LyX is run by this user. I think this will simplify installation in many cases, especially when one considers that the system wide lyxrc.default is never really used :) Actually, what you need is the textclass.lst file, but it is a bug to test for it at startup. Would that help you on windows, or will it be worse? JMarc
Re: Installing LyX 1.3.7pre4 (Win XP)
Jean-Marc Lasgouttes wrote: Something I have been wanting to do is to get rid of the system-wide lyxrc.default file, so that every user only has his own one, generated the first time LyX is run by this user. I think this will simplify installation in many cases, especially when one considers that the system wide lyxrc.default is never really used :) Actually, what you need is the textclass.lst file, but it is a bug to test for it at startup. Would that help you on windows, or will it be worse? It'd simply be different. You'd have to iron out bugs in this new code too... I know that the changes to LyX 1.3.6 were huge but we did *try* to keep them to a minimum, remember? Having said that, I do think that your proposal is elegant. Presumably the order in which these files would be read would be $LYX_USER_DIR/lyxrc.defaults $LYX_SYSTEM_DIR/preferences $LYX_USER_DIR/preferences ? Ie, lyx would read three preferences files, not two as now. Note that such a change would have an impact on the package.[Ch] code as we currently test for the presence of lyxrc.defaults. -- Angus
Re: Installing LyX 1.3.7pre4 (Win XP)
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus Jean-Marc Lasgouttes wrote: Angus It'd simply be different. You'd have to iron out bugs in this Angus new code too... I know that the changes to LyX 1.3.6 were huge Angus but we did *try* to keep them to a minimum, remember? But having to run configure as install time was a big problem as I remember it. Angus Having said that, I do think that your proposal is elegant. Angus Presumably the order in which these files would be read would Angus be Angus$LYX_USER_DIR/lyxrc.defaults $LYX_SYSTEM_DIR/preferences Angus $LYX_USER_DIR/preferences Angus ? Ie, lyx would read three preferences files, not two as now. Well, my intent was to read $LYX_SYSTEM_DIR/preferences only when $LYX_USER_DIR/preferences did not exist (for new users). I think it is simpler to apprehend. Angus Note that such a change would have an impact on the Angus package.[Ch] code as we currently test for the presence of Angus lyxrc.defaults. Sure, but we could test for any random file like configure. JMarc
Re: Installing LyX 1.3.7pre4 (Win XP)
Angus Leeming wrote: Uwe Stöhr wrote: (I have many stress testers now who help me a lot of fixing wierd problems.) I avoid these problems by deleting LyX's old config folders in ~\Application Data when my installer starts. OK this is not the fine way but there is no real reason why this could harm. (The default working directory is a different folder) Your solution just masks the real problem. Why are things failing now? What's the stumbling block? Personally, things have never failed for me. That's a good question. After I sent my last post, I went home and installed 1.3.7pre4 on my home PC (Win XP Home edition -- the install that glitched was on a laptop running XP Pro). I followed the same procedure, deleting old versions of the software but leaving my Application Data tree intact. This time, the configuration script ran at the outset and everything followed with no problems. The laptop was online (PC was offline), has policies set by our network gnomes (PC has no policies), and runs a different version of the OS and a different antivirus program than the PC (but the same firewall). So there's no clue I can see to what might have caused the glitch. It's consistent, though: I tried several reinstalls on the laptop, varying things like the directory name, and it glitched in the same way every time. I don't like your solution (deleting Applications Data\LyX) because it means that all modifications to my own setup get thrown out when I upgrade from 1.3.6 to 1.3.7-preX. At the very least your installer should ask if it should delete the Applications Data\LyX folder. Concur. I have a variety of customizations (bind file, Beamer layout file, ...) that would be a pain to recreate if the application data were trashed each time I uninstalled. A hopefully minor suggestion ;-) for some future version: it would be nice if the configuration script popped up a dialog box saying something like Configuring ... please wait and closed it when the script ended. Long pauses with no activity make Windows users nervous, since things freeze so often in Windows. Cheers, Paul
Re: mathed script oddity
Helge Hafting wrote: Mathed can be brought into a strange state where the keys ^ and _ doesn't work as expected. 1. Activate math, type the word test 2. Press ^ to get superscript 3. Press space, this ought to cancel superscript 4. Press ^ again, note that instead of a superscript, the last t in test get those pink corners, suggesting that it has been turned into an entity of its own. Blocking the last letter is normal behavior, isn't it? In math ed, 'test' is not a word, it's the product of four symbols, and the superscript applies only to the last one (unless you enter it as \textrm{test} or \mathrm{test}). Are you saying that in step 4 you get 't' blocked but _not_ the superscript box? (Or that in step 2 't' is _not_ blocked?) If so, which in which version of LyX? Paul
Re: Installing LyX 1.3.7pre4 (Win XP)
Jean-Marc Lasgouttes wrote: Angus Jean-Marc Lasgouttes wrote: Angus It'd simply be different. You'd have to iron out bugs in this Angus new code too... I know that the changes to LyX 1.3.6 were huge Angus but we did *try* to keep them to a minimum, remember? But having to run configure as install time was a big problem as I remember it. Right. That's the PITA I was referring to in my original response. However, the fact is that we need a unix shell environment to be available to use LyX ATM. People who fail to install LyX properly because it can't be found are still going to be people who can't use LyX in your proposal. What I'm trying to say is that some code currently exists that appears to work for most people most of the time. I just don't know how much work it would be to get a new system up and running in a robust manner. My feeling is that it's not something that the LyX 1.3 series should be too worried about. Angus Having said that, I do think that your proposal is elegant. Angus Presumably the order in which these files would be read would Angus be Angus$LYX_USER_DIR/lyxrc.defaults $LYX_SYSTEM_DIR/preferences Angus $LYX_USER_DIR/preferences Angus ? Ie, lyx would read three preferences files, not two as now. Well, my intent was to read $LYX_SYSTEM_DIR/preferences only when $LYX_USER_DIR/preferences did not exist (for new users). I think it is simpler to apprehend. Comprehend. Apprehend is what policemen do when they catch a criminal. It always makes me laugh when I read the French ;-) (What follows is probably the ramblings of a sleep-deprived new father. If you think it'll be trivial to implement your suggestion that's great. Personally, I see things to think about.) I can see how to read data with your suggestion. Something like: boost::filesystem::path const lyxrc_defaults = lyx::package::user_support_dir() / lyxrc.defaults; if (!exists(lyxrc_defaults)) exit(1); LyXRC system_lyxrc; read_lyxrc(lyxrc_defaults, system_lyxrc); LyXRC user_lyxrc = system_lyxrc; boost::filesystem::path preferences = lyx::package::user_support_dir() / preferences; if (exists(preferences)) read_lyxrc(preferences, user_lyxrc); else { preferences = lyx::package::system_support_dir() / preferences; if (exists(preferences)) read_lyxrc(preferences, user_lyxrc); } However, it's less clear how to write out a user preferences file only if it differs from some combination of lyx::package::user_support_dir() / lyxrc.defaults; and lyx::package::system_support_dir() / preferences In fact you'll probably need a third LyXRC variable: LyXRC system_prefs = system_lyxrc; boost::filesystem::path system_preferences = lyx::package::system_support_dir() / preferences; if (exists(system_preferences)) read_lyxrc(system_preferences, system_prefs); Now you can compare system_prefs and user_lyxrc when writing out lyx::package::user_support_dir() / preferences; Angus Note that such a change would have an impact on the Angus package.[Ch] code as we currently test for the presence of Angus lyxrc.defaults. Sure, but we could test for any random file like configure. Right. I'm just pointing out that there will be ripples if you throw a stone into this pond. -- Angus
Re: Installing LyX 1.3.7pre4 (Win XP)
Paul A. Rubin wrote: The laptop was online (PC was offline), has policies set by our network gnomes (PC has no policies), and runs a different version of the OS and a different antivirus program than the PC (but the same firewall). So there's no clue I can see to what might have caused the glitch. It's consistent, though: I tried several reinstalls on the laptop, varying things like the directory name, and it glitched in the same way every time. If the bug is reproducible consistently, that's great. You're half way there to diagnosing the cause. I've kinda lost track of the problem itself. The configure script isn't run, right? For reasons unknown. Or does it run but fail to complete successfully? The first would imply that either sh.exe or the configure script can't be found by the OS. The second would mean that something is going wrong in its execution. -- Angus
Re: Installing LyX 1.3.7pre4 (Win XP)
Jean-Marc Lasgouttes writes: Angus 2. Alternatively, add lines like Angus \screen_font_roman Times New Roman Angus to the lyxrc.defaults file. The place to do this would be in Angus lyx_configure.C in the Win32/packaging/installer directory. I am not sure why such things are done in the windows installer. Why not ship a preference file that has the right defaults instead? This is what LyX/Mac does. That's also what I currently do. @Angus: This works for all users because I packed the preferences ile to the subfolder ~\Resources\lyx of LyX's installation directory. regards Uwe
Re: Mysterious addition of dots after citation
Bo Peng [EMAIL PROTECTED] writes: Pay attention whether it is an email transfer problem. Dot doubling happens to me when the sender uses thunderbird. This is unlikely the case since 1. I am using mutt and one of my friends will never use things like thunderbird (he is MS/OE only). 2. the files are sent via attachments 3. if thunderbird (or other mail clients) adds dots, it will add them after all dots, not only dots after \cite. I can confirm that if the *first* character in a *text* file attachment is a dot, then it gets doubled when the mail sender client is thunderbird (this happens at least with version 1.0.7 in debian testing). In a lyx file it may easily happen that the first character on a line is a dot, so it *may* be an email transfer problem if the sender uses thunderbird. Enrico
Re: Installing LyX 1.3.7pre4 (Win XP)
Paul A. Rubin wrote: I don't like your solution (deleting Applications Data\LyX) because it means that all modifications to my own setup get thrown out when I upgrade from 1.3.6 to 1.3.7-preX. At the very least your installer should ask if it should delete the Applications Data\LyX folder. This was the case in an older version of my installer. I removed it because several users complained about this, although it was described in the Readmes. Especially newbies were confronted with a popup window as first LyX-window ever - I mean that this is inacceptable. Concur. I have a variety of customizations (bind file, Beamer layout file, ...) that would be a pain to recreate if the application data were trashed each time I uninstalled. I agree with you that it isn't very comfortable to recopy customized bind-files when you update to a new Lyx-version. Of course the problem when LyX is installed using the old Applications Data\LyX folder must be found so that it can be left when LyX is uninstalled. I wasn't able to find the problem, but I'll have again a look at this. Btw. beamer.layout is part of my installer because so many users asked for this at lyx-users. I proposed to add this to the official distribution but there are problems on unix-systems where beamer is an extra package. A hopefully minor suggestion ;-) for some future version: it would be nice if the configuration script popped up a dialog box saying something like Configuring ... please wait and closed it when the script ended. I also agree. (The last installer page of my installer informs the user that the first start of LyX could take a while.) regards Uwe
Re: plans for LyX, was: fourth release of the LyXWinInstaller
Angus Leeming wrote: I've just uploaded a new version including all changes to both Qt and to LyX up to 3pm GMT today (Sunday). But without the documentation, right? Michael
Re: Installing LyX 1.3.7pre4 (Win XP)
Uwe Stöhr wrote: Jean-Marc Lasgouttes writes: Angus 2. Alternatively, add lines like Angus \screen_font_roman Times New Roman Angus to the lyxrc.defaults file. The place to do this would be in Angus lyx_configure.C in the Win32/packaging/installer directory. I am not sure why such things are done in the windows installer. Why not ship a preference file that has the right defaults instead? This is what LyX/Mac does. That's also what I currently do. @Angus: This works for all users because I packed the preferences ile to the subfolder ~\Resources\lyx of LyX's installation directory. And what happens when the user makes changes to his preferences? Do these system-wide preferences get stored in the local preferences file? -- Angus
Re: Installing LyX 1.3.7pre4 (Win XP)
Angus Leeming wrote: Paul A. Rubin wrote: If the bug is reproducible consistently, that's great. You're half way there to diagnosing the cause. Ah, but there's the easy half and the hard half, isn't there? I've kinda lost track of the problem itself. The configure script isn't run, right? For reasons unknown. Or does it run but fail to complete successfully? The installer appears to trigger the configure script. A DOS window opens and closes too quickly to see anything (can't tell if anything was painted in it), then a message pops up saying the configuration script could not run. It's definitely not getting very far, and it may be dying instantly (problem getting sh to run, maybe?). I tried it with a process viewer open in the background (think ps with continuous updates). If the installer spawned any subprocesses, they died too quickly for me to see. In contrast, when the configuration script does run (after starting LyX from the desktop icon), I can see sh being spawned repeatedly, along with the occasional sed etc. The first would imply that either sh.exe or the configure script can't be found by the OS. The second would mean that something is going wrong in its execution. The first is more consistent with the symptoms. Is the installer running the same copy of the configuration script that's installed in the Resources folder tree? If so, maybe I can hack the script to pause right at the top, so that (maybe) I could see what if anything was painted in the DOS window that spawned (and died). Will fiddle more when time permits. Paul
Re: In which shell does LyX run latex ?
Am Freitag, 25. November 2005 19:30 schrieb Jean-Pierre Chrétien: Hello, I posted this message on the users list, but as I got no answer I think devel would have vbeen more appropriate. I read the message but forgot to reply. Sorry for the crospost. I have LyX installed on a Debian with two latex distributions: - teTeX-2.0 deb package (needed for dependencies) - TeXLive-2004 tetex 3.0 from the experimental archive works well here. I work under tcsh, and set the PATH so that TeXLive bin comes before teTeX binaries. LyX reconfigure finds TeXLive OK, and all worked fine until recently where it appeared that LyX runs teTeX in the background, the only changes I can think of is a regular apt-get upgrade and a download of the tex2lyx deb package, after which I Where did you get the tex2lyx debpackage? Do you mean the outdated tarball on the wiki from february (sdon' use that), or something else? pasted all LyX-1.4/share/lyx/lyx2lyx/*.py scripts in /usr/share/lyx/lyx2lyx. I strongly suspect this last operation to be responsible fro the problem. I don't think so. This should be a safe thing to do if your LyX 1.3.x is 1.3.6 or later. Any confirmation ? Any other clue ? This seems related to another question I posted a few weeks ago about the htlatex compilation from outside and inside LyX. I've seen a general wrapper in the scripts dir: could it explain why my PATH env variable seems not seen by the LyX internals ? I don't think so (I don't know if it is used at all). LyX uses /bin/sh as shell. Maybe some package update broke it so that it does not inherit the PATH variable from your tcsh anymore? You can easily test that by inserting some debug output in lib/configure. Georg
Re: Installing LyX 1.3.7pre4 (Win XP)
Paul A. Rubin wrote: The first would imply that either sh.exe or the configure script can't be found by the OS. The second would mean that something is going wrong in its execution. The first is more consistent with the symptoms. Is the installer running the same copy of the configuration script that's installed in the Resources folder tree? If so, maybe I can hack the script to pause right at the top, so that (maybe) I could see what if anything was painted in the DOS window that spawned (and died). It is. Try adding something like: $ cat trial.sh #! /bin/sh while true do echo Hello! done -- Angus
Changes to qconfig.cpp with MSVS.Net 2003
Christian, in order to compile and link LyX 1.4 on Windows using MSVS.Net 2003, I found that I had to modify the generated src/tools/qconfig.cpp file so that the various functions had Q_EXPORT prefixes. I attach the resulting file in the hope that the equivalent change to the stuff that generates this file is now trivial. This was compiling the QT_WIN32_3_3_BRANCH of the Qt/WinFree sources of a couple of days ago. Regards, Angus /* Install paths from configure */ #include qglobal.h static const char QT_INSTALL_PREFIX [267] = qt_nstpath=/home/Angus/Qt/3x-msvs; static const char QT_INSTALL_BINS[267] = qt_binpath=/home/Angus/Qt/3x-msvs/bin; static const char QT_INSTALL_DOCS[267] = qt_docpath=/home/Angus/Qt/3x-msvs/doc; static const char QT_INSTALL_HEADERS [267] = qt_hdrpath=/home/Angus/Qt/3x-msvs/include; static const char QT_INSTALL_LIBS[267] = qt_libpath=/home/Angus/Qt/3x-msvs/lib; static const char QT_INSTALL_PLUGINS [267] = qt_plgpath=/home/Angus/Qt/3x-msvs/plugins; static const char QT_INSTALL_DATA[267] = qt_datpath=/home/Angus/Qt/3x-msvs; static const char QT_INSTALL_TRANSLATIONS[267] = qt_trnpath=/home/Angus/Qt/3x-msvs/translations; static const char QT_INSTALL_SYSCONF [267] = qt_cnfpath=/home/Angus/Qt/3x-msvs/etc/settings; /* strlen( qt_xxxpath= ) == 11 */ Q_EXPORT const char *qInstallPath() { return QT_INSTALL_PREFIX + 11; } Q_EXPORT const char *qInstallPathDocs() { return QT_INSTALL_DOCS + 11; } Q_EXPORT const char *qInstallPathHeaders() { return QT_INSTALL_HEADERS + 11; } Q_EXPORT const char *qInstallPathLibs() { return QT_INSTALL_LIBS + 11; } Q_EXPORT const char *qInstallPathBins() { return QT_INSTALL_BINS + 11; } Q_EXPORT const char *qInstallPathPlugins() { return QT_INSTALL_PLUGINS + 11; } Q_EXPORT const char *qInstallPathData() { return QT_INSTALL_DATA + 11; } Q_EXPORT const char *qInstallPathTranslations() { return QT_INSTALL_TRANSLATIONS + 11; } Q_EXPORT const char *qInstallPathSysconf() { return QT_INSTALL_SYSCONF + 11; }
Re: Installing LyX 1.3.7pre4 (Win XP)
Am Montag, 28. November 2005 19:41 schrieb Uwe Stöhr: Paul A. Rubin wrote: I don't like your solution (deleting Applications Data\LyX) because it means that all modifications to my own setup get thrown out when I upgrade from 1.3.6 to 1.3.7-preX. At the very least your installer should ask if it should delete the Applications Data\LyX folder. This was the case in an older version of my installer. I removed it because several users complained about this, although it was described in the Readmes. Especially newbies were confronted with a popup window as first LyX-window ever - I mean that this is inacceptable. I strongly disagree. Inacceptable is if an installer deletes my preferences without asking for confirmation. The preferences can well contain several hours of work (e. g. if you have added some file formats and converters). Either leave the preferences alone if they exist already, or use the popup box, but don't delete user files without confirmation. Georg
Re: [patch] 1.3: Index insertion
Jean-Marc Lasgouttes wrote: I am not sure the patch is really right: if I insert a TOC inset, it will mean that the selection is not replaced anymore, but it stays here. Actually, only INDEX requires to use the selection without deleting it. You're right, the new behaviour should only apply to index insets (for now; maybe there will be similar cases eventually). That's why I tried to implement a new special case to doInsertInset in my first patch. What about this different version? What about moving your code there and adding another bool for the case just copy the selection and paste it inside the inset? Or do you think this is overkill? Jürgen
Re: Possible cure to a pdf generation anomaly
Uwe Stöhr [EMAIL PROTECTED] writes: pdftex older than version 1.3 produces PDF1.4 so that the user gets a consistent PDF. (If the image is included as PDF1.3 it is internally converted which might take some extra time). As far as I know is the change between PDF1.4 and PDF1.5 much bigger concerning the graphics. I don't know if the change to ps2pdf14 is a big advantage and somebody must verify that it works together with teTex 2.x (I can't do this). tetex 1.x supports PDF1.3 while tetex 2.x supports PDF1.4. I am not sure that no one uses tetex 1.x anymore. Enrico
Re: Possible cure to a pdf generation anomaly
Enrico Forestieri [EMAIL PROTECTED] writes: tetex 1.x supports PDF1.3 while tetex 2.x supports PDF1.4. I am not sure that no one uses tetex 1.x anymore. Sorry, my mistake: tetex 1.x supports PDF1.2 Enrico
Re: Possible cure to a pdf generation anomaly
Enrico Forestieri writes: tetex 1.x supports PDF1.3 while tetex 2.x supports PDF1.4. I am not sure that no one uses tetex 1.x anymore. Sorry, my mistake: tetex 1.x supports PDF1.2 That means when we want to support teTeX 1.x we need to go down to ps2pdf12 or we could directly upgrade to ps2pdf14. teTeX 2.0 was released on 20/01/2003 so it is possible that somebody is still using teTeX 1.x. I don't know if PDF 1.2 makes troubles when it is included to PDF 1.4 formats. Herbert, you know probably more about this. Currently we are using ps2pdf13. Does it harm if we use ps2pdf14 instead? thanks and regards Uwe
Re: Installing LyX 1.3.7pre4 (Win XP)
Angus Leeming wrote: It is. Try adding something like: $ cat trial.sh #! /bin/sh while true do echo Hello! done Will do. Meanwhile, I installed on my office PC (also XP Pro, same AV and firewall as the laptop), and encountered the same glitch that I saw on the laptop. Another clue, I guess. Paul
Re: Installing LyX 1.3.7pre4 (Win XP)
Angus Leeming wrote: @Angus: This works for all users because I packed the preferences ile to the subfolder ~\Resources\lyx of LyX's installation directory. And what happens when the user makes changes to his preferences? Do these system-wide preferences get stored in the local preferences file? No, the preferences file isn't copied to the ~\Application Data\LyX folder. Every user can have its own preferences. regards Uwe
Re: Possible cure to a pdf generation anomaly
Uwe Stöhr [EMAIL PROTECTED] writes: That means when we want to support teTeX 1.x we need to go down to ps2pdf12 or we could directly upgrade to ps2pdf14. teTeX 2.0 was released on 20/01/2003 so it is possible that somebody is still using teTeX 1.x. I don't know if PDF 1.2 makes troubles when it is included to PDF 1.4 formats. Herbert, you know probably more about this. Currently we are using ps2pdf13. Does it harm if we use ps2pdf14 instead? Using the pdflatex in teTeX 2.0 to compile the following: \documentclass{article} \usepackage{graphicx} \begin{document} \includegraphics{test.pdf} \end{document} where test.pdf is version 1.5, gives the following error: Error: pdflatex (file test.pdf): pdf inclusion: found pdf version 1.5, but at most version 1.4 allowed == Fatal error occurred, the output PDF file is not finished! In teTeX 1.0 you obtain the same error but with 1.4 replaced by 1.2. This means that when you include an eps file in LyX and do View-PDF (pdflatex) it succeeds with teTeX 2.0 but fails with teTeX 1.0 if ps2pdf13 is used. However, when I tried to convert test.pdf to version 1.2 (through pdftops -eps and then ps2pdf12) it seems that any bounding box information is lost and you have to set it by hand. I think that the casual user will not understand what is happening to his eps figure when he uses View-PDF (pdflatex) if ps2pdf12 is used. So, perhaps, support for teTeX 1.0 should be dropped anyway (at least as regards pdf). Enrico
Re: bug 1656
Jean-Marc Lasgouttes wrote: "Stephan" == Stephan Witt <[EMAIL PROTECTED]> writes: Stephan> as promised yesterday I did some testing today. Thanks. Stephan> With the patch the unsaved changes remains unsaved. Without Stephan> the patch I was asked to save the changes. So far seems all Stephan> well, Is this really what we want?? Yes, I meant to say: the behaviour is ok without the patch. The program should ask for saving the changes. And it shouldn't terminate. Stephan> but after playing a while with gnome-save-session I now have Stephan> the same behaviour as in Paris, the qt-library is unable to Stephan> open the question box anymore! Even worse, I have to kill the Stephan> lyx process to be able to do any work. All gnome applications Stephan> are locked. It seems this is caused by the running Stephan> gnome-save-session which is waiting for lyx returning from Stephan> user response - what never happens. From reading the Qt doc about QSession, I do not see clearly how it is supposed to work... Last weekend I did some further investigation. 1. Checking the behaviour of kwrite it opens a question box to save the changes when it gets the focus... Hm... when it is iconized or on another desktop it doesn't ask? Really strange. 2. Checking the patched lyx it blocks the process of saving sessions completely. Really bad. The backtrace when interrupted from inside the debugger looks like the following: Program received signal SIGINT, Interrupt. 0xe410 in ?? () No breakpoints or watchpoints. #0 0xe410 in ?? () #1 0xbfffd648 in ?? () #2 0x085193f4 in ?? () #3 0x08519270 in ?? () #4 0x40b4af9d in ___newselect_nocancel () from /lib/tls/libc.so.6 #5 0x401dee8a in QEventLoop::processEvents () from /usr/lib/qt3/lib/libqt-mt.so.3 #6 0x40249e51 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3 #7 0x402338bf in QApplication::enter_loop () from /usr/lib/qt3/lib/libqt-mt.so.3 #8 0x40f99bef in DCOPClient::callInternal () from /opt/kde3/lib/libDCOP.so.4 #9 0x40f99edc in DCOPClient::callInternal () from /opt/kde3/lib/libDCOP.so.4 #10 0x40f9a137 in DCOPClient::call () from /opt/kde3/lib/libDCOP.so.4 #11 0x40f9a198 in DCOPClient::call () from /opt/kde3/lib/libDCOP.so.4 #12 0x40f5f044 in initializeIntegration () from /opt/kde3/lib/kde3/plugins/integration/libqtkde.so #13 0x401bc86f in QKDEIntegration::initLibrary () from /usr/lib/qt3/lib/libqt-mt.so.3 #14 0x401bc8d5 in QKDEIntegration::enabled () from /usr/lib/qt3/lib/libqt-mt.so.3 #15 0x40451e95 in QMessageBox::information () from /usr/lib/qt3/lib/libqt-mt.so.3 #16 0x08216e2f in prompt_pimpl ([EMAIL PROTECTED], [EMAIL PROTECTED], default_button=0, cancel_butto n=2, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) at Alert_pimpl.C:44 #17 0x0820db82 in Alert::prompt ([EMAIL PROTECTED], [EMAIL PROTECTED], default_button=0, escape_bu tton=2, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) at Alert.C:44 #18 0x080bcad9 in BufferList::quitWriteBuffer (this=0x83f0ac4, buf=0x853e648) at bufferlist.C:83 #19 0x080bcca6 in BufferList::quitWriteAll (this=0x83f0ac4) at bufferlist.C:122 #20 0x08251e7e in LQApplication::commitData (this=0x83f4320, [EMAIL PROTECTED]) at lyx_gui.C:151 #21 0x401bef8c in QSessionManager::QSessionManager () from /usr/lib/qt3/lib/libqt-mt.so.3 #22 0x401bf061 in QSessionManager::QSessionManager () from /usr/lib/qt3/lib/libqt-mt.so.3 #23 0x4094ccc1 in _SmcProcessMessage () from /usr/X11R6/lib/libSM.so.6 #24 0x4095b26e in IceProcessMessages () from /usr/X11R6/lib/libICE.so.6 #25 0x401bf3b4 in QSmSocketReceiver::socketActivated () from /usr/lib/qt3/lib/libqt-mt.so.3 #26 0x401bf425 in QSmSocketReceiver::qt_invoke () from /usr/lib/qt3/lib/libqt-mt.so.3 #27 0x40294e7e in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #28 0x402954ad in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #29 0x405e91f0 in QSocketNotifier::activated () from /usr/lib/qt3/lib/libqt-mt.so.3 #30 0x402b4a70 in QSocketNotifier::event () from /usr/lib/qt3/lib/libqt-mt.so.3 #31 0x40231d5f in QApplication::internalNotify () from /usr/lib/qt3/lib/libqt-mt.so.3 #32 0x40233a83 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3 #33 0x40225e76 in QEventLoop::activateSocketNotifiers () from /usr/lib/qt3/lib/libqt-mt.so.3 #34 0x401df242 in QEventLoop::processEvents () from /usr/lib/qt3/lib/libqt-mt.so.3 #35 0x40249e51 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3 #36 0x40249c96 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3 #37 0x4023394f in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3 #38 0x082524a0 in lyx_gui::start ([EMAIL PROTECTED], [EMAIL PROTECTED]) at lyx_gui.C:265 #39 0x081051f0 in LyX::priv_exec (this=0x8426ce8, [EMAIL PROTECTED], argv=0xbfffe8f4) at lyx_main.C:28 6 #40 0x08104931 in LyX::exec ([EMAIL PROTECTED], argv=0xbfffe8f4) at lyx_main.C:143 #41 0x08064437 in main (argc=1, argv=0xbfffe8f4) at main.C:47
Re: bug 1656
Stephan Witt wrote: Jean-Marc Lasgouttes wrote: Last weekend I did some further investigation. 1. Checking the behaviour of kwrite it opens a question box to save the changes when it gets the focus... Hm... when it is iconized or on another desktop it doesn't ask? Really strange. 2. Checking the patched lyx [...] It seems to be another problem with processEvents... I forgot to say it doesn't differ from unpatched lyx! Stephan --
Re: In which shell does LyX run latex ?
Jose' Matos <[EMAIL PROTECTED]> writes: > > On Friday 25 November 2005 18:30, Jean-Pierre Chrétien wrote: > > Hello, > >[...] LyX does not seem recognize my PATH env variable on Debian/KDE > > > > I've seen a general wrapper in the scripts dir: could it explain > > why my PATH env variable seems not seen by the LyX internals ? > > /usr/share/lyx/configure is the one to blame, I think, never looked to it > carefully. Thanks for your answer, but I discovered that my question should have been "In which shell does kicker run LyX" (which is clealy OT here) as the problem happens when I run LyX from the LyX start Icon in the control panel instead of running it from a terminal. Sorry for this false alarm about LyX. -- Jean-Pierre
Re: The baby algorithm
On Wed, Nov 23, 2005 at 08:52:23AM +0100, Asger Ottar Alstrup wrote: > Dear Angus, > > Congratulations to you and your family! I can only say that he really > does look a lot like you. Normally, babies all look the same, but in > this case, there is no doubt that you are the father! > > I'm sure you are already know the algorithm by now: > > while (age < 3 months) { > If baby cries, > - want milk? > - change diper? > - need sleep? > if age > 1 month, want to play? > } Any decent compiler will optimize away that first 'if'... Andre'
Re: [patch] fix setDefaultParagraph in insettabular
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: Andre> Inset Cell Paragraph Chars or Insets Cell Paragraph ... Andre> is the target structureo of IU. It's pretty much the thing Andre> that's currently used (with an 'implicit' single paragraph per Andre> cell in mathed and an 'implicit' single cell for text inset Andre> with exception of tabular inset. I guess the problem is that there is no easy way to get the cell in a uniform way outside of mathed. Jmarc
Re: [PATCH] Remove/fix messages
> "Michael" == Michael Gerz <[EMAIL PROTECTED]> writes: Michael> I don't have a formal proof that they are useless but all Michael> other *.ui files don't have a caption anymore, too. Michael> OK to commit? Yes. JMarc
Re: [PATCH] bug 2089: Touching Navigate menu crashes Lyx when a TOC inset is in a section layout
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> The tabular dialog is so broken that I fear we'd open a can of Georg> worms if we touched it. Yes. Georg> I have attached a patch that restores 1.3 behaviour. Once I Georg> found out the reason for the crash (it was the recUndo call in Georg> LyXText::setLayout), it was really easy. I do not like much the new setLayoutWithoutUndo and would have preferred an optional bool argument to setLayout or maybe even the removal of the undo step from setLayout: I suspect that there are other cases where we want to avoid undo (when we switch classes?) and it is not difficult to do undo by hand. Other than that the patch looks OK. JMarc
Re: vector considered harmful.
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: Andre> I think paragraph ids are an anachrnism. We have stable(!) doc Andre> iterators nowadays, so positions could be indicated by those. That would make Bookmarks pretty useless as soon as you add/remove a paragraph. The same would hold for the error list. JMarc
Re: [Patch in bugzilla] for 1966, and others
Martin Vermeer wrote: On Sun, 2005-11-27 at 23:11 +0100, Helge Hafting wrote: On Sat, Nov 26, 2005 at 10:30:08PM +0200, Martin Vermeer wrote: On Thu, Nov 24, 2005 at 04:54:23PM +0100, Jean-Marc Lasgouttes wrote: 's see if we get any user experiences on this. It is certainly not too fast. Ideally, I'd like to get the same speed but with smaller steps, perhaps half the jump and 0.1s delays. But no reason to delay 1.4 for that of course. And the fewer but bigger jumps may be an important performance issue for those with weak machines anyway. Do you get any irregular scrolling behaviour, or page scrolls that you "didn't ask for"? Can you select and scroll with precision, without overshooting and having to page scroll back? Testing some more, I see that I often overshoot by one jump, sometimes two. The problem then is that the jumps are so big - two jumps is a whole page, while one jump too much is manageable without scrolling back. I guess more delay would make it easier, but at the big price of slowness when selecting many pages. Big selections are slow enough as they are already. Smaller jumps, such as 1/4 or 1/5 of a page would make it easier, even if the delay is reduced further to keep the same scrolling speed as now. Seeing where I am in the document is no problem with the current speed, the problem is more one of reaction time. I have to move the mouse a little up to stop the scrolling. Helge Hafting
Re: vector considered harmful.
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: Lars> Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | Lars> Now, in Document>Settings, change the textclass to article. This Lars> gives | 3 errors, since the chapter headings have been changed Lars> to Standard. | But the error list does not work: it searches for Lars> id 994 (which was | 266 before switching class: document Lars> allocated three more time), but | 994 does not exist anymore, it Lars> is 1258 already :) Lars> We shouldn't use par id for anything... only paragraph offsets Lars> (offsets into the vector...) No. Think bookmarks. Think error list. A paragraph does not change because something got inserted before it. This notion of ID is nice because it really identify the paragraph independently from its position in the text. I remember in Paris you wanted to keep the par IDs in the document format itself. Lars> By going back to std::list now would mean more months of hacking Lars> ... I am pretty sure about that... So what do we do in the meantime to have things like error lists almost work? A question: in SwitchBetweenClasses, there is code like InsetText in; std::swap(in.paragraphs(), pars); [...] std::swap(in.paragraphs(), pars); If I understand correctly, this causes the whole document to be cloned twice. Is there any practical use to this? JMarc
Re: [Patch] Re: 1.4cvs bug 2117, matrix inside delimiters crash recipe:
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: Martin> The current fix looks like the attached. It fixes the same Martin> problem for scriptinset too. Go ahead. JMarc
Re: [Patch] Re: 1.4cvs bug 2117, matrix inside delimiters crash recipe:
Martin Vermeer wrote: The current fix looks like the attached. It fixes the same problem for scriptinset too. Nice - I can now insert a matrix into the delimiters, as well as selecting a matrix and then apply delimiters around it. Well done! Helge Hafting
mathed script oddity
Mathed can be brought into a strange state where the keys ^ and _ doesn't work as expected. 1. Activate math, type the word test 2. Press ^ to get superscript 3. Press space, this ought to cancel superscript 4. Press ^ again, note that instead of a superscript, the last "t" in "test" get those pink corners, suggesting that it has been turned into an entity of its own. If, instead of step 4 you move out of the math inset and come back later, it will still act strange. Saving and reloading the document fixes this, no permanent damage. Only the in-memory document is affected. If all you want is to get the exponent, press ^ again and it will work on the second try. The subscript has the same problem. The problem seems minor, as the user has to do something unnecessary to get stuck in the first place, and then it is easily solved. Still, do you want a bugzilla entry? Helge Hafting
Re: Grammar Checker for LyX.
On Wednesday 23 November 2005 23:51, Angus Leeming wrote: > Asger Ottar Alstrup wrote: > > John C. McCabe-Dansted wrote: > >> I am working on a grammar checker for LyX. It outputs the errors to > >> LaTeX .log format so it can integrate itself into LyX without need > >> for any modification to existing LyX binary. > > Hi, John. This is really nice and at 722 lines long (including copious > commentary) is really small. That's great because it means that it'll > be maintainable in the future. Thanks, though I expect it will be 1500+ lines of code and 50+ KB of data files for the English language when feature complete. > I'd second Asger's suggestion that you investigate chktex. Most of the > hooks are there already to able you to get on-screen notification of > grammar problems, essentially for free. Yes, at this point I think I should write it as chktex v2, and ignore anything LyX specific for the meanwhile, particularly while there is feature freeze. Ultimately I would want to add hooks to LyX to support new features like "This is not a grammatical error, because...", but there is no point in adding these hooks until my code is robust. The final version will be at least 50KB uncompressed including data files for the English language. If I don't try to integrate the core into LyX I won't have to worry about keeping it small enough to be a patch. > Interested? Yes. > Asger's suggestion that you rewrite this thing in C++ is also worthy > of serious consideration. We know C++. We don't know Perl. That means If I was aiming it as a replacement for chktex, I may want to write it as ANSI C (as with chktex), but then it probably wouldn't be the LyX programmers I would be asking to maintain the code. > that you'll get little or no help in maintaining your creation ATM, > for purely practical reasons. Given that the heart of your beast is a > bunch of regexes, you should have no problems moving to C++. > (Boost.Regex which we use already provides a drop in replacement for > your Perl regexes.) I had a look at Boost.Regex. I am not sure if I need or want regexes in the final release anyway. -- John C. McCabe-Dansted Masters Student
Re: [Patch] Re: 1.4cvs bug 2117, matrix inside delimiters crash recipe:
On Mon, 2005-11-28 at 10:47 +0100, Jean-Marc Lasgouttes wrote: > > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > Martin> The current fix looks like the attached. It fixes the same > Martin> problem for scriptinset too. > > Go ahead. Thanks, it's in. - Martin signature.asc Description: This is a digitally signed message part
Re: [Patch in bugzilla] for 1966, and others
On Mon, 2005-11-28 at 10:47 +0100, Helge Hafting wrote: ... > >Do you get any irregular scrolling behaviour, or page scrolls that you > >"didn't ask for"? > > > >Can you select and scroll with precision, without overshooting and > >having to page scroll back? > > > > > Testing some more, I see that I often overshoot by one jump, sometimes two. > The problem then is that the jumps are so big - two jumps is a whole page, > while one jump too much is manageable without scrolling back. If you were a faster human being, do you think you would still get these overshoots? (What I am asking is, is there a remaining problem in the software?) > I guess more delay would make it easier, but at the big price of > slowness when > selecting many pages. Big selections are slow enough as they are already. > Smaller jumps, such as 1/4 or 1/5 of a page would make it easier, even > if the > delay is reduced further to keep the same scrolling speed as now. Yes... but hard to do within the current paradigm. Actually scroll speed dependence on where you keep the mouse would be best, but not doable in my understanding without major change. (I actually tried to make the 200 ms delay into a variable that could be tuned at runtime, but failed miserably. Does anyone know if that can be done, and how?) > Seeing where I am in the document is no problem with the current speed, > the problem is more one of reaction time. I have to move the mouse > a little up to stop the scrolling. Yes, that's by design. - Martin signature.asc Description: This is a digitally signed message part
Re: [Patch in bugzilla] for 1966, and others
Martin Vermeer wrote: >> I guess more delay would make it easier, but at the big price of >> slowness when >> selecting many pages. Big selections are slow enough as they are >> already. Smaller jumps, such as 1/4 or 1/5 of a page would make it >> easier, even if the >> delay is reduced further to keep the same scrolling speed as now. > > Yes... but hard to do within the current paradigm. Actually scroll > speed dependence on where you keep the mouse would be best, but not > doable in my understanding without major change. (I actually tried > to make the 200 ms delay into a variable that could be tuned at > runtime, but failed miserably. Does anyone know if that can be done, > and how?) What emacs does, IIRC, is make scrolling speed dependent on mouse position above or below the window. It the mouse is only just outside the window then scrolling speed is slow. If it's a long way above (below) the window, then scrolling is fast. Is it difficult to use such an idea here? -- Angus
Re: [PATCH] bug 2089: Touching Navigate menu crashes Lyx when a TOC inset is in a section layout
Jean-Marc Lasgouttes wrote: > I do not like much the new setLayoutWithoutUndo and would have > preferred an optional bool argument to setLayout or maybe even the > removal of the undo step from setLayout: I suspect that there are > other cases where we want to avoid undo (when we switch classes?) and > it is not difficult to do undo by hand. Good point. It turned out that setLayout was only called once (from the other LyXText::setLayout method), so I moved the undo stuff there. OK to commit? GeorgIndex: src/ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v retrieving revision 1.2328 diff -u -p -r1.2328 ChangeLog --- src/ChangeLog 25 Nov 2005 14:40:33 - 1.2328 +++ src/ChangeLog 28 Nov 2005 10:54:56 - @@ -1,3 +1,11 @@ +2005-11-28 Georg Baum <[EMAIL PROTECTED]> + + * text2.C (setLayout): move recUndo call to other setLayout method + * tabular.C (toggleFixedWidth): new, handle cell width changes + * tabular.C (setColumnPWidth): move some code from insettabular.C here + and use toggleFixedWidth + * tabular.C (setMColumnPWidth): ditto + 2005-11-25 Jürgen Spitzmüller <[EMAIL PROTECTED]> * paragraph.C (asString): use new inset->textString method (fix bug 2089) Index: src/lyxtext.h === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxtext.h,v retrieving revision 1.329 diff -u -p -r1.329 lyxtext.h --- src/lyxtext.h 25 Oct 2005 09:14:11 - 1.329 +++ src/lyxtext.h 28 Nov 2005 10:54:56 - @@ -75,7 +75,7 @@ public: void breakParagraph(LCursor & cur, bool keep_layout = false); /// set layout over selection - pit_type setLayout(pit_type start, pit_type end, + void setLayout(pit_type start, pit_type end, std::string const & layout); /// void setLayout(LCursor & cur, std::string const & layout); Index: src/tabular.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/tabular.C,v retrieving revision 1.227 diff -u -p -r1.227 tabular.C --- src/tabular.C 7 Sep 2005 10:37:00 - 1.227 +++ src/tabular.C 28 Nov 2005 10:54:57 - @@ -21,11 +21,14 @@ #include "buffer.h" #include "bufferparams.h" +#include "BufferView.h" +#include "cursor.h" #include "debug.h" #include "LaTeXFeatures.h" #include "lyxlex.h" #include "outputparams.h" #include "paragraph.h" +#include "paragraph_funcs.h" #include "insets/insettabular.h" @@ -872,7 +875,36 @@ void LyXTabular::setVAlignment(idx_type } -void LyXTabular::setColumnPWidth(idx_type cell, LyXLength const & width) +namespace { + +/** + * Allow line and paragraph breaks for fixed width cells or disallow them, + * merge cell paragraphs and reset layout to standard for variable width + * cells. + */ +void toggleFixedWidth(LCursor & cur, InsetText * inset, bool fixedWidth) +{ + inset->setAutoBreakRows(fixedWidth); + if (fixedWidth) + return; + + // merge all paragraphs to one + BufferParams const & bp = + inset->getText(0)->bv_owner->buffer()->params(); + while (inset->paragraphs().size() > 1) + mergeParagraph(bp, inset->paragraphs(), 0); + + // reset layout + cur.push(*inset); + inset->getText(0)->setLayout(0, cur.lastpit() + 1, "Standard"); + cur.pop(); +} + +} + + +void LyXTabular::setColumnPWidth(LCursor & cur, idx_type cell, + LyXLength const & width) { col_type const j = column_of_cell(cell); @@ -880,18 +912,32 @@ void LyXTabular::setColumnPWidth(idx_typ for (row_type i = 0; i < rows_; ++i) { idx_type const cell = getCellNumber(i, j); // because of multicolumns - getCellInset(cell)->setAutoBreakRows(!getPWidth(cell).zero()); + toggleFixedWidth(cur, getCellInset(cell).get(), + !getPWidth(cell).zero()); } + // cur paragraph can become invalid after paragraphs were merged + if (cur.pit() > cur.lastpit()) + cur.pit() = cur.lastpit(); + // cur position can become invalid after newlines were removed + if (cur.pos() > cur.lastpos()) + cur.pos() = cur.lastpos(); } -bool LyXTabular::setMColumnPWidth(idx_type cell, LyXLength const & width) +bool LyXTabular::setMColumnPWidth(LCursor & cur, idx_type cell, + LyXLength const & width) { if (!isMultiColumn(cell)) return false; cellinfo_of_cell(cell).p_width = width; - getCellInset(cell)->setAutoBreakRows(!width.zero()); + toggleFixedWidth(cur, getCellInset(cell).get(), !width.zero()); + // cur paragraph can become invalid after paragraphs were merged + if (cur.pit() > cur.lastpit()) + cur.pit() = cur.lastpit(); + // cur position can become invalid after newlines were removed + if (cur.pos() > cur.lastpos()) + cur.pos() = cur.lastpos(); return true; } Index: src/tabular.h === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/tabular.h,v retrieving revision 1.97 diff -u -p -r1.97 tabular.h --- src/tabular.h 9 Jun 2005 09:58:05 - 1.97 +++ src/tabular.h 28 Nov
Re: The baby algorithm
Andre Poenitz wrote: >> I'm sure you are already know the algorithm by now: >> >> while (age < 3 months) { >> If baby cries, >> - want milk? >> - change diper? >> - need sleep? >> if age > 1 month, want to play? >> } > > Any decent compiler will optimize away that first 'if'... H. In physical terms doesn't that mean that your compiler is pre-empting the baby's opinion by forcing it to accept milk, diper, sleep, play even though it isn't crying? Of course, this may just show how ignorant I am and how much I have to learn. -- Angus
Re: Grammar Checker for LyX.
John C. McCabe-Dansted wrote: > On Wednesday 23 November 2005 23:51, Angus Leeming wrote: >> Asger Ottar Alstrup wrote: >> > John C. McCabe-Dansted wrote: >> >> I am working on a grammar checker for LyX. It outputs the errors >> >> to LaTeX .log format so it can integrate itself into LyX without >> >> need for any modification to existing LyX binary. >> >> Hi, John. This is really nice and at 722 lines long (including >> copious commentary) is really small. That's great because it means >> that it'll be maintainable in the future. > > Thanks, though I expect it will be 1500+ lines of code and 50+ KB of > data files for the English language when feature complete. > >> I'd second Asger's suggestion that you investigate chktex. Most of >> the hooks are there already to able you to get on-screen >> notification of grammar problems, essentially for free. > > Yes, at this point I think I should write it as chktex v2, and > ignore anything LyX specific for the meanwhile, particularly while > there is feature freeze. > > Ultimately I would want to add hooks to LyX to support new features > like "This is not a grammatical error, because...", but there is no > point in adding these hooks until my code is robust. > > The final version will be at least 50KB uncompressed including data > files for the English language. If I don't try to integrate the core > into LyX I won't have to worry about keeping it small enough to be a > patch. > >> Interested? > > Yes. What you write reads to me as a well thought out proposal. LyX has the potential for excellent support for communication with an external process such as yours, albeit one that is currently rather clunky and which works only on unix (and as far as the fifo pipes are concerned, only on some flavours of unix at that). I'm sure that any requests from you to add extra LFUNs to improve the communication between LyX and your tool will be received warmly ;-) >> Asger's suggestion that you rewrite this thing in C++ is also >> worthy of serious consideration. We know C++. We don't know Perl. >> That means > > If I was aiming it as a replacement for chktex, I may want to write > it as ANSI C (as with chktex), but then it probably wouldn't be the > LyX programmers I would be asking to maintain the code. Fair enough. >> that you'll get little or no help in maintaining your creation ATM, >> for purely practical reasons. Given that the heart of your beast is >> a bunch of regexes, you should have no problems moving to C++. >> (Boost.Regex which we use already provides a drop in replacement >> for your Perl regexes.) > > I had a look at Boost.Regex. I am not sure if I need or want regexes > in the final release anyway. If you don't use regexes to parse the latex log file, then presumably you're looking at a formal parser of the log file language, no? That seems a little heavy for what you're trying to achieve. If I've read you correctly then you may find the docs of the Boost.Spirit library an interesting read. -- Angus
Re: [PATCH] bug 2089: Touching Navigate menu crashes Lyx when a TOC inset is in a section layout
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Jean-Marc Lasgouttes wrote: >> I do not like much the new setLayoutWithoutUndo and would have >> preferred an optional bool argument to setLayout or maybe even the >> removal of the undo step from setLayout: I suspect that there are >> other cases where we want to avoid undo (when we switch classes?) >> and it is not difficult to do undo by hand. Georg> Good point. It turned out that setLayout was only called once Georg> (from the other LyXText::setLayout method), so I moved the undo Georg> stuff there. Georg> OK to commit? Yes. JMarc
Possible cure to a pdf generation anomaly
Guys, I just wanted to draw your attention to this message on the lyx-users list: http://permalink.gmane.org/gmane.editors.lyx.general/26064 IIRC correctly, we have had problems throughout the ages with files converted to pdf by different routes (latex->dvi->ps->pdf, pdflatex) producing different output. One cause of such differences has been rotation of .eps figures. If the solution is simply to define a converter as ps2pdf13 -dAutoRotatePages=/None $$i then I think that we should do it, no? -- Angus
Re: [Patch in bugzilla] for 1966, and others
On Mon, 2005-11-28 at 11:01 +, Angus Leeming wrote: > Martin Vermeer wrote: > >> I guess more delay would make it easier, but at the big price of > >> slowness when > >> selecting many pages. Big selections are slow enough as they are > >> already. Smaller jumps, such as 1/4 or 1/5 of a page would make it > >> easier, even if the > >> delay is reduced further to keep the same scrolling speed as now. > > > > Yes... but hard to do within the current paradigm. Actually scroll > > speed dependence on where you keep the mouse would be best, but not > > doable in my understanding without major change. (I actually tried > > to make the 200 ms delay into a variable that could be tuned at > > runtime, but failed miserably. Does anyone know if that can be done, > > and how?) > > What emacs does, IIRC, is make scrolling speed dependent on mouse > position above or below the window. It the mouse is only just outside > the window then scrolling speed is slow. If it's a long way above > (below) the window, then scrolling is fast. > > Is it difficult to use such an idea here? Yes. Or perhaps not, if it would be an easy way to change the timeout parameter on the fly. - Martin signature.asc Description: This is a digitally signed message part
Re: [PATCH] bug 2096: LyX file inserting is broken
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> The advantage of my patch is that it uses the existing cut and Georg> paste code and that it will automatically benefit from future Georg> changes to that code. I thought again about it during the week-end and came up with the following version of the cut-and-paste idea, that I like a lot more. This is from my version of the idea, so there may be some problems I overlooked (and that you fixed in your version). What do you think? JMarc Index: src/BufferView_pimpl.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView_pimpl.C,v retrieving revision 1.599 diff -u -p -r1.599 BufferView_pimpl.C --- src/BufferView_pimpl.C 7 Nov 2005 15:06:41 - 1.599 +++ src/BufferView_pimpl.C 28 Nov 2005 11:35:03 - @@ -875,13 +875,9 @@ void BufferView::Pimpl::MenuInsertLyXFil string const disp_fn = MakeDisplayPath(filename); owner_->message(bformat(_("Inserting document %1$s..."), disp_fn)); - cursor_.clearSelection(); - bv_->getLyXText()->breakParagraph(cursor_); - - BOOST_ASSERT(cursor_.inTexted()); - string const fname = MakeAbsPath(filename); - bool const res = buffer_->readFile(fname, cursor_.pit()); + bool const res = insertLyXFile(cursor_, fname); + cursor_.clearSelection(); resizeCurrentBuffer(); string s = res ? _("Document %1$s inserted.") Index: src/ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v retrieving revision 1.2328 diff -u -p -r1.2328 ChangeLog --- src/ChangeLog 25 Nov 2005 14:40:33 - 1.2328 +++ src/ChangeLog 28 Nov 2005 11:35:04 - @@ -1,6 +1,25 @@ +2005-11-28 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + Fix bug 2096. + + * buffer.C (readDocument): remove pit argument and code releated + to it; set the inset owner correctly (unrelated, but useful). + (readFile): get rid of pit argument. + + * CutAndPaste.C (pasteSelectionHelper): use a ParagraphList and a + textclass instead of a selection index. + (pasteParagraphList): new function. + (pasteSelection): make it a wrapper around pasteParagraphList. + + * BufferView_pimpl.C (MenuInsertLyXFile): use insertLyXFile. + + * buffer_funcs.C (insertLyXFile): new method, which uses + cap::pasteParagraphList to insert a file. + 2005-11-25 Jürgen Spitzmüller <[EMAIL PROTECTED]> - * paragraph.C (asString): use new inset->textString method (fix bug 2089) + * paragraph.C (asString): use new inset->textString method (fix + bug 2089) 2005-11-24 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> Index: src/CutAndPaste.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/CutAndPaste.C,v retrieving revision 1.159 diff -u -p -r1.159 CutAndPaste.C --- src/CutAndPaste.C 25 Nov 2005 09:27:08 - 1.159 +++ src/CutAndPaste.C 28 Nov 2005 11:35:04 - @@ -105,18 +105,19 @@ bool checkPastePossible(int index) pair-pasteSelectionHelper(Buffer const & buffer, ParagraphList & pars, - pit_type pit, int pos, - textclass_type tc, size_t cut_index, ErrorList & errorlist) +pasteSelectionHelper(Buffer const & buffer, + ParagraphList & pars, pit_type pit, int pos, + ParagraphList const & parlist, textclass_type textclass, + ErrorList & errorlist) { - if (!checkPastePossible(cut_index)) + if (parlist.empty()) return make_pair(PitPosPair(pit, pos), pit); BOOST_ASSERT (pos <= pars[pit].size()); // Make a copy of the CaP paragraphs. - ParagraphList insertion = theCuts[cut_index].first; - textclass_type const textclass = theCuts[cut_index].second; + ParagraphList insertion = parlist; + textclass_type const tc = buffer.params().textclass; // Now remove all out of the pars which is NOT allowed in the // new environment and set also another font if that is required. @@ -608,13 +609,9 @@ std::string getSelection(Buffer const & } -void pasteSelection(LCursor & cur, size_t sel_index) +void pasteParagraphList(LCursor & cur, ParagraphList const & parlist, +textclass_type textclass) { - // this does not make sense, if there is nothing to paste - lyxerr << " pasteSelection " << sel_index << endl; - if (!checkPastePossible(sel_index)) - return; - if (cur.inTexted()) { LyXText * text = cur.text(); BOOST_ASSERT(text); @@ -630,8 +627,8 @@ void pasteSelection(LCursor & cur, size_ pasteSelectionHelper(cur.buffer(), text->paragraphs(), cur.pit(), cur.pos(), - cur.buffer().params().textclass, - sel_index, el); + parlist, textclass, + el); bufferErrors(cur.buffer(), el); cur.bv().showErrorList(_("Paste")); @@
Re: Possible cure to a pdf generation anomaly
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Guys, I just wanted to draw your attention to this message on Angus> the lyx-users list: Angus> http://permalink.gmane.org/gmane.editors.lyx.general/26064 Angus> IIRC correctly, we have had problems throughout the ages with Angus> files converted to pdf by different routes Angus> (latex->dvi->ps->pdf, pdflatex) producing different output. One Angus> cause of such differences has been rotation of .eps figures. Angus> If the solution is simply to define a converter as Angus> ps2pdf13 -dAutoRotatePages=/None $$i Angus> then I think that we should do it, no? Hmm, it seems from here http://casper.ghostscript.com/~ghostgum/pdftips.htm that this syntax may not work with windows... So we may have to be careful... JMarc
Re: Possible cure to a pdf generation anomaly
Angus Leeming wrote: If the solution is simply to define a converter as ps2pdf13 -dAutoRotatePages=/None $$i then I think that we should do it, no? This is indeed the solution and we should set this option. (Besides this, what is the reason that we use ps2pdf13 instead of ps2pdf14? pdf14 is used by Acroread 5 and later and I don't think that anybody uses acroread 4 that was released in June 1999.) regards Uwe
Re: Possible cure to a pdf generation anomaly
Jean-Marc Lasgouttes writes: Hmm, it seems from here http://casper.ghostscript.com/~ghostgum/pdftips.htm that this syntax may not work with windows... Yes one has to use the "#" char instead of the "=". Isn't it possible to have a Win-subbranch to cover such specialities? thanks for the hint and regards Uwe
Re: Possible cure to a pdf generation anomaly
> "Uwe" == Uwe Stöhr <[EMAIL PROTECTED]> writes: Uwe> Jean-Marc Lasgouttes writes: >> Hmm, it seems from here >> http://casper.ghostscript.com/~ghostgum/pdftips.htm that this >> syntax may not work with windows... Uwe> Yes one has to use the "#" char instead of the "=". Isn't it Uwe> possible to have a Win-subbranch to cover such specialities? What about trying out the other syntax instead (direct postscript)? JMarc
Re: Possible cure to a pdf generation anomaly
> "Uwe" == Uwe Stöhr <[EMAIL PROTECTED]> writes: Uwe> (Besides this, what is the reason that we use ps2pdf13 instead of Uwe> ps2pdf14? pdf14 is used by Acroread 5 and later and I don't think Uwe> that anybody uses acroread 4 that was released in June 1999.) What do we gain?
Re: Installing LyX 1.3.7pre4 (Win XP)
Angus Leeming wrote: Uwe, I really, really wish you lots and lots of luck with your new installer. It's going to have to cope with some weird and wonderful adventures, not just mild ones. ;-) (I have many stress testers now who help me a lot of fixing wierd problems.) I avoid these problems by deleting LyX's old config folders in ~\Application Data when my installer starts. OK this is not the fine way but there is no real reason why this could harm. (The default working directory is a different folder) I've just tested your new version and mentioned the following things: - Nobody updated the 1.3 CVS-branch of the lyx2lyx files. Could you do this please? - The "Credits" file is also not updated in the 1.3 CVS-branch. - The new qt-mt3.dll is 2MB larger than the one that is shipped with LyXWin 1.3.6-1. What's the reason? - LyX 1.3.7 comes with new hungarian translations but you can't choose this language in your installer version. I'll send you a patch soon. - I changed the checks for installed programs like Adobe Reader and GSview to fix some user reported bugs. Should I send you the changes to be included to your installer? - It seems that the TeXLive distribution doesn't include epstopdf so that we need to change to ps2pdf14 also for Windows. I'll inform you what exactly needs to be done. - I got a bug report that LyXWin don't work when the computer user name contains umlauts or accents (dv2dt erors). Perhaps we will never fix this but we should mention it in the official readmes. Happily, the new qt module correctly identifies screen fonts. Indeed, but is is OK when I set the default typewriter font manually to "Courier New" instead of "Courier"? This was requested by Asger because "Courier New" is not a bitmap font like "Courier". I'll pack your actual LyX 1.3.7pre4 version to a new installer release. best regards Uwe
Re: Possible cure to a pdf generation anomaly
Jean-Marc Lasgouttes writes: Uwe> (Besides this, what is the reason that we use ps2pdf13 instead of Uwe> ps2pdf14? pdf14 is used by Acroread 5 and later and I don't think Uwe> that anybody uses acroread 4 that was released in June 1999.) What do we gain? pdftex older than version 1.3 produces PDF1.4 so that the user gets a consistent PDF. (If the image is included as PDF1.3 it is internally converted which might take some extra time). As far as I know is the change between PDF1.4 and PDF1.5 much bigger concerning the graphics. I don't know if the change to ps2pdf14 is a big advantage and somebody must verify that it works together with teTex 2.x (I can't do this). regards Uwe
Re: [experimental patch] fix bug 1973
Helge Hafting wrote: > The output is now correct, but instead we sort of have the > exact opposite problem: > > 1. Select _more_ than the table and apply a font change. Everything >is correct, on screen and in output. > > 2. Select a few cells inside the changed table, and change the font to >something different again. Note that there is now no font change >on the screen, but the output (view dvi) is correct. I can't do this: Assertion triggered in void ::recordUndo(Undo::undo_kind, LCursor&, int, int, limited_stack&) by failing check "first_pit <= cur.lastpit()" in file ../../src/undo.C:125 (both with and without the patch) Can you give a precise recipe? I suspect that this problem is also present without my patch. Is that true? Georg
Re: Installing LyX 1.3.7pre4 (Win XP)
> "Uwe" == Uwe Stöhr <[EMAIL PROTECTED]> writes: Uwe> - The "Credits" file is also not updated in the 1.3 CVS-branch. Who is missing? The file is maintained separately, since it covers people who contributed to 1.3 only. Looking over, I think this one should be added. I'll do it. @bUwe Stöhr @iE-mail: [EMAIL PROTECTED] German translation of the Windows installer JMarc