Re: New (?) ct bug
Martin Vermeer wrote: > My previous fix for the numberless crashing bug reported by Jean-Marc > was a little too simple ;-/ Attached a better one. works, thanks! I didn't check if it fixes the other bug (your original patch fixed), though. Jürgen
Re: Towards LyX 1.4.2 [status update #1]
Enrico Forestieri wrote: Hmm, this should not be necessary (just checked). Please, can you try the binary I am currently successfully using? You can find it in the attached gzipped tar archive. gives the same result as the executable i compiled using your patch (thanks for that one!!) the problem is not with pplatex.exe, it produces the correct dvi, but although configure finds it, it doesn't pass the test and instead uses regular latex.exe...
Re: Towards LyX 1.4.2 [status update #1]
On Wed, May 24, 2006 at 10:16:51AM +0200, Edwin Leuven wrote: > Enrico Forestieri wrote: > > Hmm, this should not be necessary (just checked). Please, can you try > > the binary I am currently successfully using? You can find it in the > > attached gzipped tar archive. > > gives the same result as the executable i compiled using your patch > (thanks for that one!!) > > the problem is not with pplatex.exe, it produces the correct dvi, but > although configure finds it, it doesn't pass the test and instead uses > regular latex.exe... This is weird as the test succeeds for me, but then I am not surprised by anything on Windows... Anyway, you can test if it is able to produce correct output by manually setting pplatex in place of latex in preferences. You have to change the "LaTeX (plain)->DraftDVI" or "LaTeX (plain)->DVI" entry, depending on whether you are using or not clean_dvi.py. -- Enrico
Re: Towards LyX 1.4.2 [status update #1]
> "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: Enrico> On Tue, May 23, 2006 at 02:25:53PM +0200, Jean-Marc Lasgouttes Enrico> wrote: >> What else is on the plate for 1.4.2? Enrico> It would be a real bonus to backport the fixed delimiters Enrico> patch. It is really a shame having all those red bigl and Enrico> company in math insets in 1.4.x when this is already fixed in Enrico> trunk. Enrico> If you object about testing, I have been testing it in 1.4 Enrico> since its inception in trunk and it works like a charm. I am not against backporting it, but not for 1.4.2. Now we should just fix regressions and finish the work on autoopen and new configuration scheme. JMarc
Re: Towards LyX 1.4.2 [status update #1]
> "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: Enrico> It works perfectly for me. Remember that you have to install Enrico> the .exe using two different names (symlinks are beyond Enrico> Windows capabilities) the first one should be named Enrico> pplatex.exe and the second one dvipost.exe. Why two names? What does this program do exactly? Could you expand on how it works? JMarc
Re: [patch] Windows: Add clean_dvi support to configure.py
Joost Verburg wrote: > Angus Leeming wrote: >> Looks good. One quibble: the usual way to test if running on Windows is: >> >>if os.name == 'nt': >> >> Works irrespective of Windows flavour, apparently. > > OK. I changed that in the attached patch, makes no difference but looks > better. Jean-Marc, I think this one should go in. Shall I do it? I will send a revised version of my "autoview-logic" patch after this one is in, because it conflicts with this one. I really think that the "autoview-logic" patch should go in 1.4.2. Georg
Re: [PATCH] CT 13
> "Michael" == Michael Gerz <[EMAIL PROTECTED]> writes: Michael> Hi, the attached patch adds trackChanges flags to various Michael> methods and includes some minor cleanups. Michael> The overall idea is that whenever you insert or erase text, Michael> you have to tell the corresponding method(s) whether you are Michael> in a change tracking buffer or not. I do not see why you remove isDeletedText and isInsertedText. These are typically helper functions and do not need to be methods at all. JMarc
Re: Towards LyX 1.4.2 [status update #1]
On Wed, May 24, 2006 at 11:24:53AM +0200, Jean-Marc Lasgouttes wrote: > > "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: > > Enrico> It works perfectly for me. Remember that you have to install > Enrico> the .exe using two different names (symlinks are beyond > Enrico> Windows capabilities) the first one should be named > Enrico> pplatex.exe and the second one dvipost.exe. > > Why two names? What does this program do exactly? Could you expand on > how it works? Sorry, my mistake. It simply looks at its name and does different things depending on it. If the program is renamed or linked to pplatex/pptex, it runs latex/tex and post processes the dvi output, otherwise it directly acts upon the dvi file it gets passed. It provides coloring, overstriking and change bars in the dvi/postscript output, such that you have much the same output you see in LyX when activating change tracking. Without pplatex, the dvi/ps output would be as if you had accepted all changes. -- Enrico
Re: [patch] Windows: Add clean_dvi support to configure.py
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Jean-Marc, I think this one should go in. Shall I do it? I will Georg> send a revised version of my "autoview-logic" patch after this Georg> one is in, because it conflicts with this one. I really think Georg> that the "autoview-logic" patch should go in 1.4.2. Yes, go ahead. JMarc
Re: Towards LyX 1.4.2 [status update #1]
On Wed, May 24, 2006 at 11:43:19AM +0200, Enrico Forestieri wrote: > Without pplatex, the dvi/ps > output would be as if you had accepted all changes. Correction: without pplatex, the dvi/ps output would be a mess. What I said above is true when you uncheck "Show Changes in Output" *and* you have pplatex. -- Enrico
Re: Towards LyX 1.4.2 [status update #1]
On Wed, May 24, 2006 at 12:00:12PM +0200, Enrico Forestieri wrote: > On Wed, May 24, 2006 at 11:43:19AM +0200, Enrico Forestieri wrote: > > > Without pplatex, the dvi/ps > > output would be as if you had accepted all changes. > > Correction: without pplatex, the dvi/ps output would be a mess. > What I said above is true when you uncheck "Show Changes in Output" > *and* you have pplatex. Grrr... disregard the correction. This morning I am still sleeping... -- Enrico
Re: [patch] Windows: Add clean_dvi support to configure.py
Joost Verburg <[EMAIL PROTECTED]> writes: > +if checkProg('DVI to DTL converter', ['dv2dt']) != ['', 'none'] and checkProg('DTL to DVI converter', > ['dt2dv']) != ['', 'none']: > + converter_entry = r'''\converter latex dvi2 "%%" "latex" > +\converter dvi2 dvi "python $$s/scripts/clean_dvi.py $$i $$o" ""''' I forget rapidly this \converter syntax, so bear with me if I display my ignorance. What is the final "latex" entry in the converter \converter latex dvi2 "%%" "latex" ? If it's the name of latex.exe, then that's presumably wrong, as evidenced by the subsequent check for "a Latex2e program". (Which should, presumably be spelt "LaTeX2e"...) As I say, I may well be talking nonsense... Angus
Re: [patch] Windows: Add clean_dvi support to configure.py
On Wed, May 24, 2006 at 10:09:04AM +, Angus Leeming wrote: > What is the final "latex" entry in the converter > \converter latex dvi2 "%%" "latex" That's the extra flag thing. -- Enrico
Re: [patch] Windows: Add clean_dvi support to configure.py
Enrico Forestieri <[EMAIL PROTECTED]> writes: > > What is the final "latex" entry in the converter > > \converter latex dvi2 "%%" "latex" > That's the extra flag thing. Thanks, Enrico. Angus
Re: [Patch] Qt font caching fix
Andre Poenitz wrote: On Tue, May 23, 2006 at 12:41:33PM +0200, Abdelrazak Younes wrote: So the trick was the '* &' instead of a simple '*'. Erm. Yes. I didn't know about that indeed and I actually _asked_ to the list what is the reason for the additional '&' but nobody answered. I've noticed the question but was not quite sure what exactly you were asking. No PB. I am maybe stupid but this trick is not obvious to me. Besides, are you sure that this will work everywhere? It seems that there is an improvement under windows... As I said: I seriously doubt so. The new code is functionally equivalent, yet it evaluates the array access twice. The 'trick' you mentioned was used to specifically avoid the second access. This was 'recommended' by gprof (all operations there were inlined, yet the function as whole ate considerable time) I just noticed that I changed at the same time the paintEvent routines to use QPixmap only so that's maybe the reason for the speedup.
Re: [Patch] Qt font caching fix
Andre Poenitz wrote: On Tue, May 23, 2006 at 12:52:14PM +0200, Jean-Marc Lasgouttes wrote: I see no reason it would not work. If you want to check you could add a lyxerr statement everytime a new QLFontInfo has to be created. I think you will see by yourself what happens. Seeing the confusion adding a comment seems to be in order. I'll do that. Abdel.
Re: [Patch] Qt font caching fix
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Andre Poenitz wrote: >> On Tue, May 23, 2006 at 12:52:14PM +0200, Jean-Marc Lasgouttes >> wrote: >>> I see no reason it would not work. If you want to check you could >>> add a lyxerr statement everytime a new QLFontInfo has to be >>> created. I think you will see by yourself what happens. >> Seeing the confusion adding a comment seems to be in order. Abdelrazak> I'll do that. Thanks. JMarc
Re: [patch] Windows: Add clean_dvi support to configure.py
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> What is the final "latex" entry in the converter \converter It is a special flag telling to use the internal latex machinery. MJarc
Re: [PATCH] CT 13
Hi Jean-Marc, I do not see why you remove isDeletedText and isInsertedText. These are typically helper functions and do not need to be methods at all. IIRC, isInsertedText() is not used at all. isDeletedText has been changed into a method of class Paragraph (where it belongs). This is also more OO-like. Michael
Re: [PATCH] CT 13
> "Michael" == Michael Gerz <[EMAIL PROTECTED]> writes: Michael> Hi Jean-Marc, >> I do not see why you remove isDeletedText and isInsertedText. These >> are typically helper functions and do not need to be methods at >> all. Michael> IIRC, isInsertedText() is not used at all. Do you know why? It is strange. Michael> isDeletedText has been changed into a method of class Michael> Paragraph (where it belongs). This is also more OO-like. I think Lars prefers to have these kind of helper functions outside of classes. We tend to have too many methods now, so moving functions to methods is backwards, I think. JMarc
Re: [PATCH] CT 13
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: > Michael> isDeletedText has been changed into a method of class > Michael> Paragraph (where it belongs). This is also more OO-like. > I think Lars prefers to have these kind of helper functions outside of > classes. We tend to have too many methods now, so moving functions to > methods is backwards, I think. Right. Scott Meyers, Effective C++, item 18: Strive for class interfaces that are complete and minimal. bool isDeletedText(Paragraph const &); does not require access to anything that isn't public, so keep it out of the class. Having said that, he also argues (some other item) that non-member functions that are declared in the same header as the class itself should be considered as part of the class interface... ;-) Angus
Re: Towards LyX 1.4.2 [status update #1]
On May 23, 2006, at 7:35 PM, Enrico Forestieri wrote: On Tue, May 23, 2006 at 11:07:37AM -0400, Bennett Helm wrote: I have noticed that I can't see CT stuff in the output on Mac, though I haven't had time to figure out why. (I also have dvipost installed and can get it to work manually in LaTeX.) I'll look again ... perhaps tomorrow. You have to check "Document->Change Tracking->Show Changes in Output" OK. Simple stupidity, I guess: I had the dvi converter defined as latex rather than pplatex. Is this a change I should make to the default distribution? What implications does it have for reverse DVI search? Using pplatex --src $$i doesn't seem to work: it fails silently, without producing a .dvi file. Using \usepackage[active]{srcltx} in the preamble works, but that requires more effort/knowledge from the user. Solutions? Bennett
Re: [PATCH] CT 13
Michael> Hi Jean-Marc, I do not see why you remove isDeletedText and isInsertedText. These are typically helper functions and do not need to be methods at all. Michael> IIRC, isInsertedText() is not used at all. Do you know why? It is strange. I don't know. A lot of complicated things happen in the CT code. (At least they are not intuitive.) To me it looks like we put some logic on top of some logic to get things right. As you can see, I removed a lot of code already. And the code removal will continue (at a slower pace). I think Lars prefers to have these kind of helper functions outside of classes. We tend to have too many methods now, so moving functions to methods is backwards, I think. Well, my attempt is to hide as much of the CT logic as possible behind class Paragraph. Having a method rather than a helper function makes things a bit more clearer to me. Michael
Re: New (?) ct bug
On Wed, 2006-05-24 at 10:14 +0200, Juergen Spitzmueller wrote: > Martin Vermeer wrote: > > > My previous fix for the numberless crashing bug reported by Jean-Marc > > was a little too simple ;-/ Attached a better one. > > works, thanks! > I didn't check if it fixes the other bug (your original patch fixed), > though. But I did. It does. Jean-Marc, can this go into 1.4? - Martin signature.asc Description: This is a digitally signed message part
Re: Towards LyX 1.4.2 [status update #1]
On May 23, 2006, at 10:33 AM, Jean-Marc Lasgouttes wrote: OK, I read the documentation and came up with the following patch, which is probably partly bogus. I think this is supposed to do what we need. Could you try to turn it into working code? JMarc After playing around a bit, I get the following errors, which I don't know enough to make sense of. os_unix.C: In function 'bool lyx::support::os::autoOpenFile(const std::string&, lyx::support::os::auto_open_mode)': os_unix.C:152: error: invalid conversion from 'size_t' to 'FSRef*' os_unix.C:152: error: initializing argument 2 of 'OSStatus FSPathMakeRef(const UInt8*, FSRef*, Boolean*)' os_unix.C:152: error: conversion from 'OSStatus' to non-scalar type 'FSRef' requested os_unix.C:157: error: cannot convert 'FSRef' to 'FSRef*' for argument '3' to 'OSStatus LSGetApplicationForItem(const FSRef*, LSRolesMask, FSRef*, const __CFURL**)' os_unix.C:162: error: cannot convert 'FSRef' to 'const FSRef*' in assignment For reference, here are lines 151-170: FSRef fileref = FSPathMakeRef((UInt8 *) filename.c_str(), filename.length(), NULL); LSRolesMask role = (mode == VIEW) ? kLSRolesViewer : kLSRolesEditor; FSRef outAppRef; OSStatus status = LSGetApplicationForItem(&fileref, role, outAppRef, NULL); if (status == kLSApplicationNotFoundErr) return false; LSLaunchFSRefSpec inLaunchSpec; inLaunchSpec.appRef = outAppRef; inLaunchSpec.numDocs = 1; inLaunchSpec.itemRefs = &fileref; inLaunchSpec.passThruParams = NULL; inLaunchSpec.launchFlags = kLSLaunchDefaults; inLaunchSpec.asyncRefCon = NULL; status = LSOpenFromRefSpec(&inLaunchSpec, NULL); return status != kLSApplicationNotFoundErr; Suggestions? Bennett
Another ct bug, or 2600 redux?
Hi, Not sure if this is another manifestation of bug 2600 or a new CT bug. Someone on the user list posted a beamer file (containing CT markup) that no longer opens. More specifically (using LyX 1.4.1): 1. Try to open the doc either by File->Open or drag-and-drop. Status line changes to "Opening document ...", then eventually changes back to "Welcome to LyX!", with the splash screen still showing. The View menu shows no open documents. 2a. Repeat step 1 and get a "Revert to saved document?" dialog claiming the doc is already open. The revert option fails to accomplish anything, but the switch to document option partially opens the document (everything up to the first \change verb shows up, but nothing thereafter). OR 2b. Open something else (say, one of the help docs) and both the new doc and the beamer file open (the latter again displaying only up to the first \change verb). The file opens correctly if all \change directives are first stripped out. Should this go into bugzilla as a new bug, an extension of 2600, or not at all? /Paul
Re: Towards LyX 1.4.2 [status update #1]
Bennett Helm <[EMAIL PROTECTED]> writes: > After playing around a bit, I get the following errors, which I don't > know enough to make sense of. I cannot help with the error on line 152, but the other two will almost certainly be resolved by prepending outAppRef on lines 157, 162 with "&". LSGetApplicationForItem(&fileref, role, &outAppRef, NULL); inLaunchSpec.appRef = &outAppRef; Angus
Re: compress
> "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: Enrico> Why not adding it as an option when choosing "File->Save Enrico> As..."? A "Compressed LyX Document" could be added to the Enrico> "File type" combobox. Not really, since it is not another file we want to produce. It is the file that is currently edited that should be in compressed format. Jmarc
Re: Towards LyX 1.4.2 [status update #1]
Bennett Helm <[EMAIL PROTECTED]> writes: > After playing around a bit, I get the following errors, which I don't > know enough to make sense of. > > FSRef fileref = FSPathMakeRef((UInt8 *) filename.c_str(), > filename.length(), NULL); http://developer.apple.com/documentation/Carbon/Reference/ File_Manager/Reference/reference.html#//apple_ref/c/func/FSPathMakeRef tells me that the signature of this function is OSStatus FSPathMakeRef ( const UInt8 * path, FSRef * ref, Boolean * isDirectory ); I think that the line should be rewritten as something like: FSRef fileref; OSStatus status = FSPathMakeRef((UInt8 *) filename.c_str(), &fileref, NULL); if (status != 0) return false; Angus
Re: Towards LyX 1.4.2 [status update #1]
> "Bennett" == Bennett Helm <[EMAIL PROTECTED]> writes: Bennett> After playing around a bit, I get the following errors, which Bennett> I don't know enough to make sense of. The code was really bogus. Try this one instead. JMarc Index: src/support/os_unix.C === --- src/support/os_unix.C (revision 13919) +++ src/support/os_unix.C (working copy) @@ -14,6 +14,11 @@ #include "support/os.h" +#ifdef __APPLE__ +#include +#include +#endif + using std::string; @@ -115,19 +120,58 @@ char path_separator() void cygwin_path_fix(bool) {} -bool canAutoOpenFile(string const & /*ext*/, auto_open_mode const /*mode*/) +bool canAutoOpenFile(string const & ext, auto_open_mode const mode) { +#ifdef __APPLE__ +// Reference: http://developer.apple.com/documentation/Carbon/Reference/LaunchServicesReference/ + CFStringRef cfs_ext = CFStringCreateWithBytes(kCFAllocatorDefault, + (UInt8 *) ext.c_str(), ext.length(), + kCFStringEncodingISOLatin1, false); + LSRolesMask role = (mode = VIEW) ? kLSRolesViewer : kLSRolesEditor; + FSRef outAppRef; + OSStatus status = + LSGetApplicationForInfo(kLSUnknownType, kLSUnknownCreator, + cfs_ext, role, &outAppRef, NULL); + CFRelease(cfs_ext); + + return status != kLSApplicationNotFoundErr; +#else // currently, no default viewer is tried for non-windows system // support for KDE/Gnome/Macintosh may be added later return false; +#endif } -bool autoOpenFile(string const & /*filename*/, auto_open_mode const /*mode*/) +bool autoOpenFile(string const & filename, auto_open_mode const mode) { +#ifdef __APPLE__ +// Reference: http://developer.apple.com/documentation/Carbon/Reference/LaunchServicesReference/ + FSRef fileref; + OSStatus status = + FSPathMakeRef((UInt8 *) filename.c_str(), &fileref, NULL); + LSRolesMask role = (mode = VIEW) ? kLSRolesViewer : kLSRolesEditor; + FSRef outAppRef; + + status = LSGetApplicationForItem(&fileref, role, outAppRef, NULL); + if (status == kLSApplicationNotFoundErr) + return false; + + LSLaunchFSRefSpec inLaunchSpec; + inLaunchSpec.appRef = outAppRef; + inLaunchSpec.numDocs = 1; + inLaunchSpec.itemRefs = &fileref; + inLaunchSpec.passThruParams = NULL; + inLaunchSpec.launchFlags = kLSLaunchDefaults; + inLaunchSpec.asyncRefCon = NULL; + status = LSOpenFromRefSpec(&inLaunchSpec, NULL); + + return status != kLSApplicationNotFoundErr; +#else // currently, no default viewer is tried for non-windows system // support for KDE/Gnome/Macintosh may be added later return false; +#endif } } // namespace os
Re: New (?) ct bug
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: Martin> On Wed, 2006-05-24 at 10:14 +0200, Juergen Spitzmueller wrote: >> Martin Vermeer wrote: >> >> > My previous fix for the numberless crashing bug reported by >> Jean-Marc > was a little too simple ;-/ Attached a better one. >> >> works, thanks! I didn't check if it fixes the other bug (your >> original patch fixed), though. Martin> But I did. It does. Martin> Jean-Marc, can this go into 1.4? Yes. JMarc
Re: Towards LyX 1.4.2 [status update #1]
On May 24, 2006, at 11:35 AM, Angus Leeming wrote: Bennett Helm <[EMAIL PROTECTED]> writes: After playing around a bit, I get the following errors, which I don't know enough to make sense of. I cannot help with the error on line 152, but the other two will almost certainly be resolved by prepending outAppRef on lines 157, 162 with "&". LSGetApplicationForItem(&fileref, role, &outAppRef, NULL); inLaunchSpec.appRef = &outAppRef; Angus Yep -- thanks. Bennett
Re: Towards LyX 1.4.2 [status update #1]
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Bennett Helm <[EMAIL PROTECTED]> writes: >> After playing around a bit, I get the following errors, which I >> don't know enough to make sense of. Angus> I cannot help with the error on line 152, but the other two Angus> will almost certainly be resolved by prepending outAppRef on Angus> lines 157, 162 with "&". Angus> LSGetApplicationForItem(&fileref, role, &outAppRef, NULL); Angus> inLaunchSpec.appRef = &outAppRef; Yes of course. Thanks. JMArc
Re: Towards LyX 1.4.2 [status update #1]
On May 24, 2006, at 11:46 AM, Angus Leeming wrote: Bennett Helm <[EMAIL PROTECTED]> writes: After playing around a bit, I get the following errors, which I don't know enough to make sense of. FSRef fileref = FSPathMakeRef((UInt8 *) filename.c_str(), filename.length(), NULL); http://developer.apple.com/documentation/Carbon/Reference/ File_Manager/Reference/reference.html#//apple_ref/c/func/FSPathMakeRef tells me that the signature of this function is OSStatus FSPathMakeRef ( const UInt8 * path, FSRef * ref, Boolean * isDirectory ); I think that the line should be rewritten as something like: FSRef fileref; OSStatus status = FSPathMakeRef((UInt8 *) filename.c_str(), &fileref, NULL); if (status != 0) return false; That at least compiles (thanks again!). What do I need to do to test to see if it's working correctly? Bennett
[PATCH] CT - Toolbar
Hello, I would like to add a tool bar for tracking changes (in the personal branch at first). Do you agree with the attached patch? Michael ct-toolbar.patch Description: Binary data
Re: [PATCH] CT - Toolbar
On Wed, May 24, 2006 at 06:13:58PM +0200, Michael Gerz wrote: > I would like to add a tool bar for tracking changes (in the personal branch > at first). Do you agree with the attached patch? Looks OK. I wonder if it could be made to pop up automatically if loading a document with changes to merge... john
Re: Towards LyX 1.4.2 [status update #1]
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: > Bennett> After playing around a bit, I get the following errors, which > Bennett> I don't know enough to make sense of. > The code was really bogus. Try this one instead. This one will also fail to compile but I guess you know that now ;-) Leaving that to one side, however, I note that you're not testing that the call to FSPathMakeRef succeeded and you're testing only for a specific kLSApplicationNotFoundErr error elsewhere. I wonder if you'd not be better off bailing on any error at all. Would if (status != 0) return false; not do the job? Angus
Question on InsetText::setAutoBreakRows
Hello, could somebody please tell me the purpose of method InsetText::setAutoBreakRows? I am asking because setAutoBreakRows calls Paragraph::erase() which requires a trackChanges flags in the new CT code. I guess that the buffer parameter (ct on/off) has to be passed to setAutoBreakRows but I would like to know your opinion first. Michael
Re: Towards LyX 1.4.2 [status update #1]
That at least compiles (thanks again!). What do I need to do to test to see if it's working correctly? Under windows, 1. if gsview and acrobad readers are available, you should see pdf (three of them) and ghostscript (dvi, html, update, view source) under view menu. 2. if gsview is uninstalled (or hidden), view -> ghostscript should disappear. 3. if the associated viewer for pdf etc is changed, lyx should use the new one. These might or might not be easy to verify under mac. Cheers, Bo
Re: [PATCH] CT - Toolbar
On Wed, May 24, 2006 at 06:13:58PM +0200, Michael Gerz wrote: I would like to add a tool bar for tracking changes (in the personal branch at first). Do you agree with the attached patch? Looks OK. Great. I wonder if it could be made to pop up automatically if loading a document with changes to merge... One step after the other, John :-) Michael
Re: New (?) ct bug
Mea culpa. My previous fix for the numberless crashing bug reported by Jean-Marc was a little too simple ;-/ Attached a better one. I propose to only apply this to 1.4.x and leave 1.5 to Michael. Good idea :-) The above-mentioned.
Re: Question on InsetText::setAutoBreakRows
Michael Gerz wrote: > Hello, > > could somebody please tell me the purpose of method > InsetText::setAutoBreakRows? It sets the corresponding flag of LyXText, but I guess you knew that. > I am asking because setAutoBreakRows calls Paragraph::erase() which > requires a trackChanges flags in the new CT code. I guess that the buffer > parameter (ct on/off) has to be passed to setAutoBreakRows but I would > like to know your opinion first. Yes, it has to be passed. LyXText::autoBreakRows_ tells whether linebreaks are allowed (LyXText::autoBreakRows_ == true) or not (LyXText::autoBreakRows_ == false). This means that InsetText::setAutoBreakRows needs to delete existing line breaks if the flag is set to false. Of course LyXText::autoBreakRows_ is misnamed, and it should be documented. Georg
Re: Question on InsetText::setAutoBreakRows
On Wed, May 24, 2006 at 06:26:18PM +0200, Michael Gerz wrote: > Hello, > > could somebody please tell me the purpose of method > InsetText::setAutoBreakRows? > > I am asking because setAutoBreakRows calls Paragraph::erase() which requires > a trackChanges flags in the new CT code. I guess that the buffer parameter > (ct on/off) has to be passed to setAutoBreakRows but I would like to know > your opinion first. What this appears to do is make sure that in a tabular cell of non-fixed width, there will only be one row. It does this by removing the newline insets (representing \\, or \tabularnewline IIRC) that can be inserted into a fixed width cell to make it multi-row. In non-ct mode, you irreversibly lose the newlines. It would be nice to mark them "blue" under ct. - Martin pgpqyyUf00QDM.pgp Description: PGP signature
Re: Question on InsetText::setAutoBreakRows
I am asking because setAutoBreakRows calls Paragraph::erase() which requires a trackChanges flags in the new CT code. I guess that the buffer parameter (ct on/off) has to be passed to setAutoBreakRows but I would like to know your opinion first. Yes, it has to be passed. LyXText::autoBreakRows_ tells whether linebreaks are allowed (LyXText::autoBreakRows_ == true) or not (LyXText::autoBreakRows_ == false). This means that InsetText::setAutoBreakRows needs to delete existing line breaks if the flag is set to false. Of course LyXText::autoBreakRows_ is misnamed, and it should be documented. Does it make sense that setAutoBreakRows marks linebreaks as (logically) deleted if they are disallowed? Is the user allowed to revert the deletion later? This may lead to inconsistent states. Michael
Re: Question on InsetText::setAutoBreakRows
Michael Gerz wrote: > Does it make sense that setAutoBreakRows marks linebreaks as (logically) > deleted if they are disallowed? Is the user allowed to revert the deletion > later? No, he is not. Actually I did not think about that case. > This may lead to inconsistent states. Yes. It should only be possible to revert the whole action, i.e. put back the newlines and at the same time revert the autoBreakRows_ flag. Is it possible to implement such a behaviour? I guess it would not be easy. Georg
Re: Question on InsetText::setAutoBreakRows
On Wed, May 24, 2006 at 08:19:33PM +0300, Martin Vermeer wrote: > On Wed, May 24, 2006 at 06:26:18PM +0200, Michael Gerz wrote: ... > In non-ct mode, you irreversibly lose the newlines. It would be nice to > mark them "blue" under ct. s/blue/red/ - martin pgp4c4CqndxJe.pgp Description: PGP signature
Re: A debate topic: What can LyX still learn from scientific workplace?
Jan> Just my 2 cents: The LyX toolbars should be not repeats Word's Jan> mistakes but include nice equation editing feature like SWP or Jan> Mathtype which are currently "hidden" in the math panel (which Jan> either costs me half my screen or has to be activated every Jan> time). Practical math toolbars would really be a MAJOR Jan> improvement. Do you know that we already have a math toolbar. It is disabled by default, and enabling it currently means editing the ui/default.ui file. It can be made to pop up automatically in maths, for those who like these kind of things. Yes, but here come two points: 1) it should be possible to activate these without going into the text files, why is there not View->Toolbars->Math,Extra,MiniBuffer,etc menu which allows this? 2) Why is it still a less pleasant experience to edit an equation in LyX than in either MathType (oh horror) or Scientific Workplace? Moving *everything* from the math panel into reconfigurable toolbars is a must for user friendliness. Again, since 1.4, I am persuaded that LyX is technically completely there and few new real features are needed (search and replace of equations parts; more symbolic math, e.g., see my comparison http://wiki.lyx.org/LyX/LyxVersusScientificWorkplace). What LyX mainly needs is some *polishing* so that users stay with it after trying it. Math editing which beats SWP or MathType would be a very important step. === Jan Peters, Graduate Research Assistant, Dipl.Inf., Dipl.Ing., M.Sc. (CS,ME) University of Southern California (USC) Computational Learning and Motor Control Laboratories (CLMC) 3461 Watt Way, Los Angeles, CA 90089 Phone: +1-213-740-6717, Fax: +1-213-740-1510 email: [EMAIL PROTECTED], web: www.jan-peters.net ===
Re: Question on InsetText::setAutoBreakRows
Martin, given the fact that you are not allowed to revert logical deletions within the inset (otherwise you run into an inconsistent state), I am tempted to remove linebreaks without CT marking. I.e. setAutoBreakRow does not consider the buffer's change tracking mode. Does this make sense to you? Michael
Re: Question on InsetText::setAutoBreakRows
On Wed, May 24, 2006 at 07:45:25PM +0200, Michael Gerz wrote: > Martin, > > given the fact that you are not allowed to revert logical deletions within > the inset (otherwise you run into an inconsistent state), I am tempted to > remove linebreaks without CT marking. I.e. setAutoBreakRow does not > consider the buffer's change tracking mode. Does this make sense to you? That is one option. Another one would be to disable the flipping of the fixed width flag of tabular cells (the only place where this happens?) as long as you are in CT mode. This would force the user to recognize that this is a non-change-trackable, irreversible operation, and the erase code in the inset won't even be called. But I don't know how easy that is to do. - Martin pgp1OSNWJ6aep.pgp Description: PGP signature
Re: A debate topic: What can LyX still learn from scientific workplace?
Jan Peters wrote: > 1) it should be possible to activate these without going into the text > files, why is there not View->Toolbars->Math,Extra,MiniBuffer,etc > menu which allows this? Because nobody implemented it. > 2) Why is it still a less pleasant experience to edit an equation in > LyX than in either MathType (oh horror) or Scientific Workplace? > Moving *everything* from the math panel into reconfigurable toolbars > is a must for user friendliness. Maybe because the developers don't use the math panel? I either use shortcuts or type in directly the LaTeX code. I use the math panel only for constructs I need so seldom that I can not remember the short cut. I personally would not want to have these waisting space in a toolbar. This does not mean that there is no room for improvement, it is only an attempt to explain the current situation. > Again, since 1.4, I am persuaded that LyX is technically completely > there and few new real features are needed (search and replace > of equations parts; more symbolic math, e.g., see my comparison > http://wiki.lyx.org/LyX/LyxVersusScientificWorkplace). > What LyX mainly needs is some *polishing* so that users stay with it > after trying it. Math editing which beats SWP or MathType would > be a very important step. >From your posts it looks like you are not aware that LyX has a developer man power problem: There are several useful polishing tasks that would be desirable, but there are not enough developers available who do the work. And of course (since this is a volunteer project) everybody implements what he wants to implement, which does not need to be what the majority of users wants). That explains the strange mix of highly developed areas (e.g. graphics handling) and other parts that are missing basic features (e.g. math macros) in LyX. Georg
Re: Towards LyX 1.4.2 [status update #1]
On Wed, May 24, 2006 at 09:39:00AM -0400, Bennett Helm wrote: > OK. Simple stupidity, I guess: I had the dvi converter defined as > latex rather than pplatex. Perhaps you are another victim of the way path_prefix is (not) handled. > Is this a change I should make to the default distribution? The configure.py script should already pick up pplatex, but it seems to fail when pplatex is in the path_prefix specified in preferences (at least on Windows the path_prefix specified in lyxrc.dist seems to work). > What implications does it have for reverse DVI search? Using pplatex > --src $$i doesn't seem to work: it fails silently, without producing > a .dvi file. Using \usepackage[active]{srcltx} in the preamble works, > but that requires more effort/knowledge from the user. Solutions? Sorry, cannot help here. I can only say that pplatex should call latex passing to it any specified argument. Here is what I obtain using miktex (note that everything starting at the line "Usage: latex [OPTION...] [COMMAND...]" really is the output of "latex --help", so it may be different for you): $ pplatex --help Usage: pplatex [-debug] [TEXARGS] Run latex and process DVI file with dvipost. The following options are interpreted by pplatex: -debugincrease dvipost debug level All other options and arguments are passed to latex. Usage: latex [OPTION...] [COMMAND...] -alias=APP Pretend to be APP. This affects both the format used and the search path. -aux-directory=DIR Define the directory for auxiliary files. -buf-size=N Set buf_size to N. -c-style-errors Print file:line:error style messages. -disable-installer Don't install missing packages on-the-fly. -enable-installer Install missing packages on-the-fly. -enable-write18 Enable the \write18 construct. -error-line=N Set error_line to N. -font-max=N Set font_max to N. -font-mem-size=NSet font_mem_size to N. -half-error-line=N Set half_error_line to N. -halt-on-error Stop after the first error. -help Show this help screen and exit. -hhelp Show the manual page in an HTMLHelp window and exit when the window is closed. -include-directory=DIR Prepend DIR to the input search path. -initialize Be the INI variant of the program. This is implicitly true if the program name is ini*. -interaction=MODE Set the interaction mode; MODE must be one of: batchmode, nonstopmode, scrollmode, errorstopmode. -job-name=NAME Set the job name and hence the name(s) of the output file(s). -job-time=FILE Set the job time. Take FILE's timestamp as the reference. -max-in-open=N Set max_in_open to N. -max-print-line=N Set max_print_line to N. -max-strings=N Set max_strings to N. -mem-bot=N Set mem_bot to N. -mem-max=N Set mem_max to N. -mem-min=N Set mem_min to N. -mem-top=N Set mem_top to N. -nest-size=NSet nest_size to N. -output-directory=DIR Define the directory for output files. -param-size=N Set param_size to N. -pool-size=NSet pool_size to N. -quiet Suppress all output (except errors). -record-package-usages=FILE Record package usages and write them into FILE. -recorder Record file names. -save-size=NSet save_size to N. -src-specials Insert source specials in certain places of the DVI file. -stack-size=N Set stack_size to N. -string-vacancies=N Set string_vacancies to N. -tcx=TCXNAMEUse the TCX file TCXNAME. -terminal=oem Use the DOS codepage for console output. -time-statisticsShow processing time statistics. -trace=OPTIONS Turn tracing on. OPTIONS is a comma-separated list of trace options. -hhelp gives more information. -trie-op-size=N Set trie_op_size to N. -trie-size=NSet trie_size to N. -undump=NAMEUse NAME instead of program name when loading internal tables. -versionPrint version information and exi
Re: Towards LyX 1.4.2 [status update #1]
On May 24, 2006, at 3:04 PM, Enrico Forestieri wrote: On Wed, May 24, 2006 at 09:39:00AM -0400, Bennett Helm wrote: OK. Simple stupidity, I guess: I had the dvi converter defined as latex rather than pplatex. Perhaps you are another victim of the way path_prefix is (not) handled. No. As it turns out, the dvi converter was defined as latex in my preferences file, overriding the default. Once I took that out, everything works. Is this a change I should make to the default distribution? The configure.py script should already pick up pplatex, but it seems to fail when pplatex is in the path_prefix specified in preferences (at least on Windows the path_prefix specified in lyxrc.dist seems to work). (And that it works automatically means I don't need to make any changes.) What implications does it have for reverse DVI search? Using pplatex --src $$i doesn't seem to work: it fails silently, without producing a .dvi file. Using \usepackage[active]{srcltx} in the preamble works, but that requires more effort/knowledge from the user. Solutions? Sorry, cannot help here. I can only say that pplatex should call latex passing to it any specified argument. Using "pplatex -src-specials $$i" as the LaTeX -> DVI converter doesn't seem to work. Neither does "pplatex -src" or "pplatex --src". What am I doing wrong? Bennett
Re: Towards LyX 1.4.2 [status update #1]
On May 24, 2006, at 12:28 PM, Bo Peng wrote: That at least compiles (thanks again!). What do I need to do to test to see if it's working correctly? Under windows, 1. if gsview and acrobad readers are available, you should see pdf (three of them) and ghostscript (dvi, html, update, view source) under view menu. 2. if gsview is uninstalled (or hidden), view -> ghostscript should disappear. 3. if the associated viewer for pdf etc is changed, lyx should use the new one. These might or might not be easy to verify under mac. OK. Things seem to be working pretty well. I've made a few changes to Jean-Marc's patch. In addition to following Angus' suggestions, I made two changes: (a) #include instead of and : these couldn't be found when compiling. (b) For LSRolesMask role = (mode = VIEW) ? kLSRolesViewer : kLSRolesEditor; I substituted LSRolesMask role = (mode == VIEW) ? kLSRolesViewer : kLSRolesEditor; ^ in two places. (Isn't that right?) The result is that in the Preferences dialog, the right viewers/ editors show up as "auto" -- at least for the most part. However, there are some oddities, which lead me to question whether it's actually working as it should. 1. The generated lyxrc.defaults file has odd values, which leads me to think reconfigure is not paying attention to Mac native apps but is only looking at unix apps. Thus, gimp (not Mac native) shows up as the viewer/editor for all image formats, even though the default on my system is something else (mostly Preview.app). (In fact, the only change between the old lyxrc.defaults and the new one is the substitution of "gimp" for "none" in these cases.) Are these the values that should be showing up there? 2. LaTeX, Plain text, EPS, Postscript, PDF (all varieties), and HTML all show up as either "" "none" or "none" "" for viewer/editor. Is this what it should be? -- .pdf files open properly (and show up in LyX's Preferences dialog as "auto"). 3. The LaTeX -> HTML converter shows up as: \converter latex html "htlatex $$i""originaldir,needaux" However, with "originaldir" in there, no .html file is produced in the temp directory when choosing View -> HTML. Some additional notes: There are two file formats for which I would have thought we'd want a viewer/editor but for which none show up: .txt and .tex files. Can these be added to the auto-open code? I wonder whether we ought to add rtf <-> latex converters as standard. Finally, I'm attaching a lyxrc.dist file that ought to replace the preferences file now located at development/MacOSX/LyX.app/Contents/ Resources/. Bennett auto_open_mac.diff Description: Binary data lyxrc.dist Description: Binary data
Re: Towards LyX 1.4.2 [status update #1]
On Wed, May 24, 2006 at 03:27:13PM -0400, Bennett Helm wrote: > On May 24, 2006, at 3:04 PM, Enrico Forestieri wrote: > > Sorry, cannot help here. I can only say that pplatex should call > > latex passing to it any specified argument. > > Using "pplatex -src-specials $$i" as the LaTeX -> DVI converter > doesn't seem to work. Neither does "pplatex -src" or "pplatex --src". Please try "pplatex --help" in a terminal and see what is the output for you. I think that -src-specials is peculiar to miktex and possibly you have to use another option. > What am I doing wrong? I really don't know, but I think that simply replacing latex with pplatex should have worked... -- Enrico
Re: Towards LyX 1.4.2 [status update #1]
The result is that in the Preferences dialog, the right viewers/ editors show up as "auto" -- at least for the most part. However, there are some oddities, which lead me to question whether it's actually working as it should. Yes. This means canAutoOpenFile is working. 1. The generated lyxrc.defaults file has odd values, which leads me to think reconfigure is not paying attention to Mac native apps but is only looking at unix apps. Thus, gimp (not Mac native) shows up as the viewer/editor for all image formats, even though the default on my system is something else (mostly Preview.app). (In fact, the only change between the old lyxrc.defaults and the new one is the substitution of "gimp" for "none" in these cases.) With this patch (if working correctly), these values do not matter at all. Associated applications will be called regardless of detected ones. 2. LaTeX, Plain text, EPS, Postscript, PDF (all varieties), and HTML all show up as either "" "none" or "none" "" for viewer/editor. Is this what it should be? -- .pdf files open properly (and show up in LyX's Preferences dialog as "auto"). I am not quite sure. I am confused by the use of "", "auto", "none" and later format conversions. There are two file formats for which I would have thought we'd want a viewer/editor but for which none show up: .txt and .tex files. Can these be added to the auto-open code? You should be able to set their viewer to auto or an application. Bo
1.4.2svn crash with view->postscript/dvi (export to latex?)
Dear list, lyx 1.4.2 cvs crashes when I try to view a file with eps figure. Here is the gdb trace: Assertion triggered in void ExportData::addExternalFile(const std::string&, const std::string&, const std::string&) by failing check "lyx::support::AbsolutePath(sourceName)" in file exporter.C:322 Program received signal SIGABRT, Aborted. [Switching to Thread -1208076064 (LWP 14569)] 0x00afd7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 (gdb) bt #0 0x00afd7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 #1 0x00b3d7f5 in raise () from /lib/tls/libc.so.6 #2 0x00b3f199 in abort () from /lib/tls/libc.so.6 #3 0x0833d91b in lyx::support::abort () at abort.C:22 #4 0x080af4f8 in boost::assertion_failed ( expr=0x83935f4 "lyx::support::AbsolutePath(sourceName)", function=0x8393620 "void ExportData::addExternalFile(const std::string&, const std::string&, const std::string&)", file=0x839350a "exporter.C", line=322) at boost.C:56 #5 0x080e8e6a in ExportData::addExternalFile (this=0x94626e0, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) at exporter.C:322 #6 0x081ee909 in InsetGraphics::prepareFile (this=0x95da380, [EMAIL PROTECTED], [EMAIL PROTECTED]) at insetgraphics.C:700 #7 0x081ef373 in InsetGraphics::latex (this=0x95da380, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) at insetgraphics.C:799 #8 0x08152339 in Paragraph::Pimpl::simpleTeXSpecialChars (this=0x95da128, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], c=1 '\001') at paragraph_pimpl.C:582 #9 0x08149fa4 in Paragraph::simpleTeXOnePar (this=0x95da1e8, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) at paragraph.C:1017 #10 0x081442ab in (anonymous namespace)::TeXOnePar ([EMAIL PROTECTED], [EMAIL PROTECTED], pit= {_M_node = 0x95da1e0}, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) at output_latex.C:337 #11 0x08144dd4 in latexParagraphs ([EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) at output_latex.C:512 #12 0x08206a0f in InsetText::latex (this=0x95d9f20, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) at insettext.C:287 ---Type to continue, or q to quit---q Attached is the offending lyx file. Bo try.lyx Description: Binary data
Re: 1.4.2svn crash with view->postscript/dvi (export to latex?)
The problem is at line 683, insetgraphics.C // source file is now full path /tmp/lyx_tmpdir20237FyBZGA/lyx_tmpbuf0/4_home_bpeng_simuPOP_doc_log_LDdecay.eps if (!runparams.nice && GetExtension(temp_file) != ext) { // The LaTeX compiler will not be able to determine // the file format from the extension, so we must // change it. string const new_file = ChangeExtension(temp_file, ext); // change extension to /tmp/lyx_tmpdir20237FyBZGA/lyx_tmpbuf0/4_home_bpeng_simuPOP_doc_log_LDdecay.ps if (lyx::support::rename(temp_file, new_file)) { temp_file = new_file; output_file = ChangeExtension(output_file, ext); source_file = ChangeExtension(output_file, ext); // source_file is no longer full path name, since output_file is not full path } else lyxerr[Debug::GRAPHICS] << "Could not rename file `" << temp_file << "' to `" << new_file << "'." << endl; } // The extension of temp_file might be != ext! // source file is no longer full path name runparams.exportdata->addExternalFile(tex_format, source_file, output_file); OK, the problem is then turned to line 606, string output_file = os::external_path(runparams.nice ? params().filename.outputFilename(m_buffer->filePath()) : OnlyFilename(temp_file)); Obviously, the OnlyFilename() call is in doubt here. I do not know why it is used, when I remove it, the crash stops. Bo