RE: [patch] ampersand + shortcut leaves an underscore in menu

2012-05-21 Thread Scott Kostyshak
From: Jean-Marc Lasgouttes [lasgout...@lyx.org]
Sent: Sunday, May 20, 2012 1:36 PM

I think that some code (qt? our own?) assumes that   means that  
is a shortcut and is thus underlined. I thought we were supposed to
repalce  with  automatically to avoid that. It might be that the
rules for using  have changed in recent qt versions.

I think you are right. When I use Qt Designer and I enter  it is translated 
to amp;.

If needed we could automatically replace  with amp;. It would be
better than Scott's patch IMO.

This does sound better.

In any case, it doesn't look like anyone has reproduced this and no one has 
complained about it before so I guess we should not do anything about it?

Thanks,

Scott

Re: no GUI error when configure fails on first configure

2012-05-21 Thread Richard Heck

On 05/21/2012 01:57 AM, Scott Kostyshak wrote:

*From:* Richard Heck [rgh...@comcast.net]
*Sent:* Sunday, May 20, 2012 9:53 AM

I think the GUI is accessible at this point---if use_gui is true. So 
you might just try something like:

if (use_gui)
frontend::Alert(...);
else
LYXERR0(...);
at the relevant point. If not, then we need more complex return 
values from init().


The attached patch issues a GUI message if configure fails. I wasn't 
sure about where to put the code. It is unfortunately spread out 
because I couldn't issue a GUI message at the time of checking if 
configure succeeded.


The patch also includes two minor changes to the reconfigure code in 
GuiApplication::reconfigure:


(1) I consted the return value and (2) I added a line break to the 
message.



OK, I see the problem.

That said, the error message is wrong. If there were no text classes, 
then we would have told the user this at the beginning of 
LyX:execCommands(). I guess the question, then, is: If initial 
configuration failed, what do we have or not have?


Richard



Re: Feature request: Latex file in Lyx archive

2012-05-21 Thread Max Funk

Thanks for help;

If this feature will be implemented, my request is already done.

It's not the same as my suggestion (put a latex file into every lyx 
archive, in the format used for the compilation) but certainly also a 
good way.


Regards, Max



On 11.05.2012 02:37,  Tommaso Cucinotta wrote:

On 09/05/12 14:09, Max Funk wrote:

Hallo,

I wanted to suggest, that it would be great if Lyx would store not
only the lyx file and the graphics in an exported lyx archive (tar.gz
or zip), but also the created latex file.

In my understanding, one of the major functions of the archive is
to give away the document to another user or to a journal in a
single file. If this other user does not prefer lyx, he / she can
optionally use also the latex source after unzip.

Also, if the exported archive is used as backup, the exported
latex file would be useful in case of any long-time compatibility
issues.


Hi,

in the upcoming releases of LyX, you can export to latex using a 
custom destination, e.g., from the command-line


lyx -E [--export-to] fmt filename
  fmt is the export format of choice (see --export),
  and filename is the destination filename.

This causes the export of all the needed dependency files. So, if you 
export to latex, then you'll get in the same folder also all the 
images, .bib, etc After the export, all you need to do is to 
compress the folder with your favourite tool and send it to whoever 
you wish.


I hope this helps,

Tommaso




buffer-reload when using LyX as a viewer

2012-05-21 Thread Andrew Parsloe
Working on editing bibliographies in LyX, I've arrived at this 
situation: it's convenient to attach to each bibliographic record a 
yellow note containing a (cross-reference) label e.g. a bib record 
beginning (say) @book{knuth, would have a yellow note containing the 
label book-knuth. For a large already existing bibliography, it's a 
substantial labour attaching such notes and labels to each entry and 
I've created a Python converter that does the job: it exports the LyX 
file containing the original bibliography to another LyX file, but this 
time with yellow notes containing labels. It means defining another LyX 
file format which I've called LyX (bib yl). Obviously LyX is the natural 
viewer for this file format. Now when I click on the View Other Formats 
button and select LyX (bib yl), in due course a second instance of LyX 
appears displaying the bibliography but this time with yellow notes and 
labels attached to the records. (The sorted labels provide a way of 
searching for duplicate records.)


But if I edit and change the original bibliography and click on the 
Update Other Formats button and select LyX (bib yl), although the status 
line tells me that a successful export has been made, the second LyX 
instance doesn't update. It's not a significant problem because I've 
assigned the L-FUN buffer-reload to a shortcut key combination, and 
simply pressing that key combination in the viewer-LyX updates the 
display, but it would be nice if, when LyX is used as a *viewer*, 
buffer-reload were automatically invoked. Overwriting the existing file 
displayed is not a concern in this case -- in fact it's exactly what one 
wants.


Andrew


RE: [patch] ampersand + shortcut leaves an underscore in menu

2012-05-21 Thread Scott Kostyshak
From: Jean-Marc Lasgouttes [lasgout...@lyx.org]
Sent: Sunday, May 20, 2012 1:36 PM

>I think that some code (qt? our own?) assumes that "& " means that " "
>is a shortcut and is thus underlined. I thought we were supposed to
>repalce & with && automatically to avoid that. It might be that the
>rules for using & have changed in recent qt versions.

I think you are right. When I use Qt Designer and I enter "&&" it is translated 
to "".

>If needed we could automatically replace "&" with "". It would be
>better than Scott's patch IMO.

This does sound better.

In any case, it doesn't look like anyone has reproduced this and no one has 
complained about it before so I guess we should not do anything about it?

Thanks,

Scott

Re: no GUI error when configure fails on first configure

2012-05-21 Thread Richard Heck

On 05/21/2012 01:57 AM, Scott Kostyshak wrote:

*From:* Richard Heck [rgh...@comcast.net]
*Sent:* Sunday, May 20, 2012 9:53 AM

>I think the GUI is accessible at this point---if use_gui is true. So 
you might just try something like:

>if (use_gui)
>frontend::Alert(...);
>else
>LYXERR0(...);
>at the relevant point. If not, then we need more complex return 
values from init().


The attached patch issues a GUI message if configure fails. I wasn't 
sure about where to put the code. It is unfortunately spread out 
because I couldn't issue a GUI message at the time of checking if 
configure succeeded.


The patch also includes two minor changes to the reconfigure code in 
GuiApplication::reconfigure:


(1) I "consted" the return value and (2) I added a line break to the 
message.



OK, I see the problem.

That said, the error message is wrong. If there were no text classes, 
then we would have told the user this at the beginning of 
LyX:execCommands(). I guess the question, then, is: If initial 
configuration failed, what do we have or not have?


Richard



Re: Feature request: Latex file in Lyx archive

2012-05-21 Thread Max Funk

Thanks for help;

If this feature will be implemented, my request is already done.

It's not the same as my suggestion (put a latex file into every lyx 
archive, in the format used for the compilation) but certainly also a 
good way.


Regards, Max



On 11.05.2012 02:37,  Tommaso Cucinotta wrote:

On 09/05/12 14:09, Max Funk wrote:

Hallo,

I wanted to suggest, that it would be great if Lyx would store not
only the lyx file and the graphics in an exported lyx archive (tar.gz
or zip), but also the created latex file.

In my understanding, one of the major functions of the archive is
to give away the document to another user or to a journal in a
single file. If this other user does not prefer lyx, he / she can
optionally use also the latex source after unzip.

Also, if the exported archive is used as backup, the exported
latex file would be useful in case of any long-time compatibility
issues.


Hi,

in the upcoming releases of LyX, you can export to latex using a 
custom destination, e.g., from the command-line


lyx -E [--export-to] fmt filename
  fmt is the export format of choice (see --export),
  and filename is the destination filename.

This causes the export of all the needed dependency files. So, if you 
export to latex, then you'll get in the same folder also all the 
images, .bib, etc After the export, all you need to do is to 
compress the folder with your favourite tool and send it to whoever 
you wish.


I hope this helps,

Tommaso




buffer-reload when using LyX as a viewer

2012-05-21 Thread Andrew Parsloe
Working on editing bibliographies in LyX, I've arrived at this 
situation: it's convenient to attach to each bibliographic record a 
yellow note containing a (cross-reference) label e.g. a bib record 
beginning (say) @book{knuth, would have a yellow note containing the 
label book-knuth. For a large already existing bibliography, it's a 
substantial labour attaching such notes and labels to each entry and 
I've created a Python converter that does the job: it exports the LyX 
file containing the original bibliography to another LyX file, but this 
time with yellow notes containing labels. It means defining another LyX 
file format which I've called LyX (bib yl). Obviously LyX is the natural 
viewer for this file format. Now when I click on the View Other Formats 
button and select LyX (bib yl), in due course a second instance of LyX 
appears displaying the bibliography but this time with yellow notes and 
labels attached to the records. (The sorted labels provide a way of 
searching for duplicate records.)


But if I edit and change the original bibliography and click on the 
Update Other Formats button and select LyX (bib yl), although the status 
line tells me that a successful export has been made, the second LyX 
instance doesn't update. It's not a significant problem because I've 
assigned the L-FUN buffer-reload to a shortcut key combination, and 
simply pressing that key combination in the viewer-LyX updates the 
display, but it would be nice if, when LyX is used as a *viewer*, 
buffer-reload were automatically invoked. Overwriting the existing file 
displayed is not a concern in this case -- in fact it's exactly what one 
wants.


Andrew