Bug #10295

2017-05-16 Thread Richard Heck
Can anyone test the fix for this bug posted at

http://www.lyx.org/trac/ticket/10295

It'd be nice to have a decent version for beta1.

Richard




Re: [LyX/master] rename buffer parameter math_number_before to math_numbering_side

2017-05-16 Thread Uwe Stöhr

El 16.05.2017 a las 00:20, José Abílio Matos escribió:


+document.warning("Malformed LyX document: Missing '\\end_inset' of
Float inset.")


As Guillaume suggested I think that this warning is incorrect.


Yes, it makes no sense here. Seems to be a copy paste mistake that I 
made. I removed it now.



+regexp = re.compile(r'^.*reqno.*')
+i = find_re(document.header, regexp, 0)


IMHO we should left this option to the user as we do in all the other cases.
In this case that would mean removing the last part of the function.


But I was requested to handle leqno/reqno and not leaving it to the user.

I assured now that reqno is only handled if it is a document class 
option. I think it is now OK.


regards Uwe


Re: Blank buttons

2017-05-16 Thread Andrew Parsloe


On 16/05/2017 10:17 p.m., Guillaume MM wrote:

Le 14/05/2017 à 23:25, Andrew Parsloe a écrit :

I was testing compilation of files with apostrophes in the filename.
When I had finished I deleted the files on disk forgetting they were
still open in LyX. The attached screenshot shows the choices LyX
presented me with (a difficult choice).

(alpha1-1, windows 7)

Andrew




This should be fixed now. Testing appreciated.



I will have to wait for alpha2 or beta to test, although I've emailed 
Peter Kuemmel wondering if he might reactivate his bleeding-edge site 
(its stuck at 2.2.0) which I've used in the past to test LyX during the 
alpha/beta phase.


Andrew


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



Re: Exporting docs with cross-refs to LyX 2.2.x fails in alpha1-1

2017-05-16 Thread Andrew Parsloe



On 17/05/2017 4:35 a.m., Richard Heck wrote:

On 05/15/2017 06:06 PM, Andrew Parsloe wrote:

(alpha1-1, windows 7)

When I export a document containing cross-refs to LyX 2.2.x format &
then try to open it in LyX 2.2.2, I get the error message

Unknown parameter name: noprefix

and the document doesn't open. If I try to open it a second time, the
document does open but is truncated at the first reference.

I've attached a MWE.


Thanks, Andrew. Bad thinko in the lyx2lyx conversion. I've fixed it, I
believe. If you want to test, just change the lyx_2_3.py file as
indicated here:
http://git.lyx.org/?p=lyx.git;a=commitdiff;h=d75c0ec8b11797cd5fa652ec2820bfdc3737a37a

Richard


I made the change. Export works as expected now. Thank you.

Andrew

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



Re: Exporting master-child docs to LyX 2.2.x fails in alpha1-1

2017-05-16 Thread Richard Heck
On 05/16/2017 04:14 AM, Scott Kostyshak wrote:
> On Tue, May 16, 2017 at 06:12:55PM +1200, Andrew Parsloe wrote:
>> On 16/05/2017 1:04 p.m., Richard Heck wrote:
>>> On 05/15/2017 06:34 PM, Andrew Parsloe wrote:
 (alpha1-1, windows 7)

 When I try exporting a simple master document to LyX 2.2.2 I get an
 error message saying lyx2lyx failed to convert it. Clicking the
 message away, the document does open but doesn't compile. (Message:
 Could not load included file ...)
>>> I do not think we have ever handled this situation simply. You need to
>>> export both the master and the child, separately, and then change the
>>> included file name in the master, since the exported child is now called
>>> TestChild.22.lyx.
>>>
>>> It would presumably be possible to try to deal with this, probably in
>>> lyx2lyx itself.
>>>
>>> Richard
>>>
>> My post was prompted by comparison with what happens in 2.2.3 (just upgraded
>> from 2.2.2, thank you) when exporting to 2.1.x format.
>>
>> I have a complex document, perhaps 150 pages, a master & 3 child documents,
>> masses of equations, a wealth of figures, a plethora of cross-references to
>> both, footnotes, and even mini-tocs (with the minitoc package) for each
>> chapter. I exported the master from 2.2.x format to 2.1.x format. Note: I
>> didn't separately export the child documents as you suggest. The master
>> opened in 2.1.5. The inclusion statements in master display in LyX 2.1.5 as
>> "Include: child.lyx" rather than "Include: child.21.lyx" yet the master
>> compiles to a pdf which appears correct as far as I can see from a quick
>> scan.
> I think the only reason this worked with 2.1.5 is that 2.1.5 can read
> the 2.2.x format (since it was released after 2.2.0). If you opened with
> 2.1.4, I think you would get an error.

Yes, I was going to make the same suggestion. You could of course open
the 2.2.x master in 2.1.5, as well, without exporting, and it would work.

Richard




signature.asc
Description: OpenPGP digital signature


Re: [ANNOUNCE] LyX 2.2.3 Released

2017-05-16 Thread Richard Heck
On 05/16/2017 03:34 AM, Cor Blom wrote:
> Op 16-05-17 om 04:45 schreef Nandor Sieben:
>> The source files for 2.2.3 seem to be missing.
>
> Yes, they seem not to be copied to
> ftp://ftp.lyx.org/pub/lyx/stable/2.2.x/
>
> Can this be corrected? 

I will investigate when I get home. They were there

Richard



Re: [LyX/master] rename buffer parameter math_number_before to math_numbering_side

2017-05-16 Thread Richard Heck
On 05/15/2017 06:20 PM, José Abílio Matos wrote:
> On Saturday, 13 May 2017 19.39.55 WEST Uwe Stöhr wrote:
>> commit 0dd3311dd42996f9aede7d8c58b27937ebb48b54
>> Author: Uwe Stöhr 
>> Date:   Sat May 13 20:39:45 2017 +0200
>>
>> rename buffer parameter math_number_before to math_numbering_side
>>
>> this is a fileformat change
>>
>> also try to fix an UI issue that JMarc gets
>>
>> +def convert_mathnumberingname(document):
>> +" rename the \\math_number_before tag to \\math_numbering_side "
>> +document.warning("Malformed LyX document: Missing '\\end_inset' of
>> Float inset.")
> As Guillaume suggested I think that this warning is incorrect. The function 
> does not check for insets since it works on the header and also this call is 
> unconditional...
>
>> +regexp = re.compile(r'(\\math_number_before 1)')
>> +i = find_re(document.header, regexp, 0)
>> +if i != -1:
>> +document.header[i] = "\\math_numbering_side left"
>> +regexp = re.compile(r'(\\math_number_before 0)')
>> +i = find_re(document.header, regexp, 0)
>> +if i != -1:
>> +document.header[i] = "\\math_numbering_side default"
>> +# check if the document uses the class option "reqno"
>> +k = find_token(document.header, "\\math_numbering_side", 0)
> This part of the code is OK:
>
>> +regexp = re.compile(r'^.*reqno.*')
>> +i = find_re(document.header, regexp, 0)
>> +if i != -1:
>> +document.header[k] = "\\math_numbering_side right"
>> +# delete the found option
>> +document.header[i] = document.header[i].replace(",reqno", "")
>> +document.header[i] = document.header[i].replace(", reqno", "")
>> +document.header[i] = document.header[i].replace("reqno,", "")
>> +j = find_re(document.header, regexp, 0)
>> +if i == j:
>> +# then we have reqno as the only option
>> +del document.header[i]
>> +
>> +
> My objection are on this part of the code. Basically we search for a 
> reference 
> to reqno in the lyx header, that in this case means the latex preamble or the 
> class options to equate the reqno reference to using the reqno option.
>
> It is very easy to produce a false positive by placing in the latex preamble 
> of the document:
>
> % it would be interesting to use reqno for all or some of the equations
>
> Just the mention of reqno is interpreted as transforming the document to use 
> the equation number on the right.
>
> IMHO we should left this option to the user as we do in all the other cases. 
> In this case that would mean removing the last part of the function.

I trust your judgement on this, José.

Richard



Re: Exporting docs with cross-refs to LyX 2.2.x fails in alpha1-1

2017-05-16 Thread Richard Heck
On 05/15/2017 06:06 PM, Andrew Parsloe wrote:
> (alpha1-1, windows 7)
>
> When I export a document containing cross-refs to LyX 2.2.x format &
> then try to open it in LyX 2.2.2, I get the error message
>
> Unknown parameter name: noprefix
>
> and the document doesn't open. If I try to open it a second time, the
> document does open but is truncated at the first reference.
>
> I've attached a MWE.

Thanks, Andrew. Bad thinko in the lyx2lyx conversion. I've fixed it, I
believe. If you want to test, just change the lyx_2_3.py file as
indicated here:
http://git.lyx.org/?p=lyx.git;a=commitdiff;h=d75c0ec8b11797cd5fa652ec2820bfdc3737a37a

Richard



Re: Blank buttons

2017-05-16 Thread Guillaume MM

Le 14/05/2017 à 23:25, Andrew Parsloe a écrit :

I was testing compilation of files with apostrophes in the filename.
When I had finished I deleted the files on disk forgetting they were
still open in LyX. The attached screenshot shows the choices LyX
presented me with (a difficult choice).

(alpha1-1, windows 7)

Andrew




This should be fixed now. Testing appreciated.





Re: Regression in child document referencing (alpha1-1)

2017-05-16 Thread Guillaume MM

Le 14/05/2017 à 00:59, Andrew Parsloe a écrit :

I've attached a mwe consisting of a master and two child documents.
References in Child-1 to Child-2 are labelled BROKEN. References in the
other direction are OK. Reversing the order in which Child-1 and Child-2
are inserted in Master shows refs in Child-2 to Child-1 are now BROKEN
while the Child-1 refs to Child-2 are OK.

Summarising: refs from one child doc to a *later* child doc are BROKEN.

I created a similar trio of documents in 2.2.2 and the problem is not
present, so this is a regression (at least with my installation on
windows 7).



This is fixed now.





influencing inset-info generation and inline graphics for body text

2017-05-16 Thread mn
Looking into the docs I noticed a seemingly general issue: that graphics
included inline in the body text suffer from different problems that
negatively influence the overall appearance.

In the attached screenshot from fr Tutorial.lyx:
– the default line-spacing is used (which might be considered a bit too
small for Palatino anyway)
– the picture is offset from the baseline
– it's too big to be in the borders set by font-size and line-height
– therefore breaking the uniformity of the baselines

Now for the docs this example could be partially fixed by scaling this
normal picture to a smaller size an/or increasing the line-spacing
value. The optical misalignment to the baseline cannot be fixed now
(without ERT)?

However inset-info generated graphics do not allow to be scaled
separately? Are there ways to force them to scale?

Even if this scaling is indeed not wanted for the official LyX docs, and
therefore less of a problem for the inset-infos, it would be nice to
have have two things, at least for 'normal' graphics that should go into
inline-text:
– letting them align with the baseline of the text (visually – means
they might also need to go slightly below!)
- having an option to scale them to % of line-height
(settings>Graphics>Set_Height)

greetings
Mike


Re: Visible version id

2017-05-16 Thread Jean-Marc Lasgouttes

Le 16/05/2017 à 10:37, Andrew Parsloe a écrit :

The version is displayed in the main window when no document is open,
but if I understand correctly you would like for the version to be
displayed even if documents are open.

Scott


Yes. Particularly at an alpha or beta stage where one may want to check
how things worked in an earlier version.


I'd rather not add that in general, but it could be added when 
DEVEL_VERSION is set. Actually, we should have a togglable "devel-mode" 
(more details in status bar, etc.) that is remembered in session 
information but has a default value that depends on DEVEL_VERSION, not a 
compile-time one.


JMarc



Re: Visible version id

2017-05-16 Thread Andrew Parsloe



On 16/05/2017 8:22 p.m., Scott Kostyshak wrote:

On Mon, May 15, 2017 at 07:27:18PM -0600, Joel Kulesza wrote:

On Mon, May 15, 2017 at 4:43 PM, Andrew Parsloe 
wrote:


Perhaps rather than just the logo followed by LyX on the title bar, also
include the version number?



Given what I had to do for screenshot 2 here (
https://www.lyx.org/trac/ticket/10671), I'd be supportive of this change.


The version is displayed in the main window when no document is open,
but if I understand correctly you would like for the version to be
displayed even if documents are open.

Scott

Yes. Particularly at an alpha or beta stage where one may want to check 
how things worked in an earlier version. However, I realise I can do 
this hackishly by adding a toolbar button. For instance I've just added


Item "2.3.0a" repeat 0

to the start of the View toolbar in stdtoolbars.inc. I've got used to 
fixing this toolbar vertically at the right of the screen. This means 
2.3.0a displays just to the top right of the main LyX window and I can 
see at a glance, with a document open, which LyX I'm in.


Andrew

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



Re: Visible version id

2017-05-16 Thread Scott Kostyshak
On Mon, May 15, 2017 at 07:27:18PM -0600, Joel Kulesza wrote:
> On Mon, May 15, 2017 at 4:43 PM, Andrew Parsloe 
> wrote:
> 
> > Perhaps rather than just the logo followed by LyX on the title bar, also
> > include the version number?
> 
> 
> Given what I had to do for screenshot 2 here (
> https://www.lyx.org/trac/ticket/10671), I'd be supportive of this change.

The version is displayed in the main window when no document is open,
but if I understand correctly you would like for the version to be
displayed even if documents are open.

Scott


signature.asc
Description: PGP signature


Re: Exporting master-child docs to LyX 2.2.x fails in alpha1-1

2017-05-16 Thread Scott Kostyshak
On Tue, May 16, 2017 at 06:12:55PM +1200, Andrew Parsloe wrote:
> On 16/05/2017 1:04 p.m., Richard Heck wrote:
> > On 05/15/2017 06:34 PM, Andrew Parsloe wrote:
> > > (alpha1-1, windows 7)
> > > 
> > > When I try exporting a simple master document to LyX 2.2.2 I get an
> > > error message saying lyx2lyx failed to convert it. Clicking the
> > > message away, the document does open but doesn't compile. (Message:
> > > Could not load included file ...)
> > 
> > I do not think we have ever handled this situation simply. You need to
> > export both the master and the child, separately, and then change the
> > included file name in the master, since the exported child is now called
> > TestChild.22.lyx.
> > 
> > It would presumably be possible to try to deal with this, probably in
> > lyx2lyx itself.
> > 
> > Richard
> > 
> My post was prompted by comparison with what happens in 2.2.3 (just upgraded
> from 2.2.2, thank you) when exporting to 2.1.x format.
> 
> I have a complex document, perhaps 150 pages, a master & 3 child documents,
> masses of equations, a wealth of figures, a plethora of cross-references to
> both, footnotes, and even mini-tocs (with the minitoc package) for each
> chapter. I exported the master from 2.2.x format to 2.1.x format. Note: I
> didn't separately export the child documents as you suggest. The master
> opened in 2.1.5. The inclusion statements in master display in LyX 2.1.5 as
> "Include: child.lyx" rather than "Include: child.21.lyx" yet the master
> compiles to a pdf which appears correct as far as I can see from a quick
> scan.

I think the only reason this worked with 2.1.5 is that 2.1.5 can read
the 2.2.x format (since it was released after 2.2.0). If you opened with
2.1.4, I think you would get an error.

Does that explain things or do you still think there was a regression?

Scott


signature.asc
Description: PGP signature


Re: [ANNOUNCE] LyX 2.2.3 Released

2017-05-16 Thread Cor Blom

Op 16-05-17 om 04:45 schreef Nandor Sieben:

The source files for 2.2.3 seem to be missing.


Yes, they seem not to be copied to ftp://ftp.lyx.org/pub/lyx/stable/2.2.x/

Can this be corrected? Thanks,

Cor




Re: Exporting master-child docs to LyX 2.2.x fails in alpha1-1

2017-05-16 Thread Andrew Parsloe

On 16/05/2017 1:04 p.m., Richard Heck wrote:

On 05/15/2017 06:34 PM, Andrew Parsloe wrote:

(alpha1-1, windows 7)

When I try exporting a simple master document to LyX 2.2.2 I get an
error message saying lyx2lyx failed to convert it. Clicking the
message away, the document does open but doesn't compile. (Message:
Could not load included file ...)


I do not think we have ever handled this situation simply. You need to
export both the master and the child, separately, and then change the
included file name in the master, since the exported child is now called
TestChild.22.lyx.

It would presumably be possible to try to deal with this, probably in
lyx2lyx itself.

Richard

My post was prompted by comparison with what happens in 2.2.3 (just 
upgraded from 2.2.2, thank you) when exporting to 2.1.x format.


I have a complex document, perhaps 150 pages, a master & 3 child 
documents, masses of equations, a wealth of figures, a plethora of 
cross-references to both, footnotes, and even mini-tocs (with the 
minitoc package) for each chapter. I exported the master from 2.2.x 
format to 2.1.x format. Note: I didn't separately export the child 
documents as you suggest. The master opened in 2.1.5. The inclusion 
statements in master display in LyX 2.1.5 as "Include: child.lyx" rather 
than "Include: child.21.lyx" yet the master compiles to a pdf which 
appears correct as far as I can see from a quick scan.


That is what I was expecting with alpha1-1 exporting to 2.2.x but there, 
export of even the simplest master document to 2.2.x format produces 
errors. This feels like a significant regression.


Andrew

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus