Re: Fix for vertical table border for added column

2017-08-23 Thread Kornel Benko
Am Donnerstag, 24. August 2017 um 12:34:47, schrieb racoon 
...
> I am selecting (row 3, column 1) to (row 4, column 4).
> 
> > 3.) add the bottom of the row
> 
> In the dialog I click on the bottom of the previewed cell.
> 
> > 4.) use apply ==> the bottom line disappears
> 
> Use Apply ==> I get double lines below each cell within the selection. 
> But what is weird is that double lines to the left (except for the last) 
> are added too.

Now, this is weird, I don't get _any_ double lines here.

> Did I miss something?
> 
> > Now try the same with the menu bar, this time it works.
> 
> I guess you mean tool bar? This time I get only double lines below each 
> cell.

Yes, I meant the tool bar.

> Now, is there a relation to the patch I posted? Or maybe to something 
> else I said about adding a separate function for double lines? I still 
> don't see the relation.

I don't remember I made the relation. Merely seeing discrepancies in handling 
of borders.
And since you were at this, I felt I may as well mention it.
Sorry if that feels inappropriate.

> Daniel

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: Fix for vertical table border for added column

2017-08-23 Thread racoon

On 23.08.2017 20:39, Kornel Benko wrote:

Am Mittwoch, 23. August 2017 um 20:20:46, schrieb racoon 

On 22.08.2017 18:20, Kornel Benko wrote:

Am Dienstag, 22. August 2017 um 09:30:48, schrieb racoon 

On 21.08.2017 23:32, Kornel Benko wrote:

Am Montag, 21. August 2017 um 22:24:10, schrieb racoon 

Playing with the new settings now ...
It is somehow requiring getting used to ... but I like it.


I am not sure I follow. What "new settings"?

Daniel


I am able to set arbitrary borders with the table toolbar, but
with the tabular settings dialog it is often not possible.

Kornel



Sorry, I am slow. I still don't know what you mean. Is that something
related to my patch of the add row/column or set all borders table toolbar?

Daniel


I mean the dialog you get with
right-click in a table -> Settings... -> Borders


Okay, so what about it? I am still lost in how this is related to my
patch, if it is.

Also, you say that you are able to set some borders with the toolbar
that you cannot with the dialog. Do you have an example?

And, you say that you can set arbitrary borders with the table toolbar.
Can you set double borders on the outermost border of the table?


I am still not getting it.


No, I was referring to the inner borders.

For instance, in the attached example:


The attached example has a 5x4 table with single border lines set.


1.) Open the dialog border


So I click second click into the table and choose

* Settings... -> Borders


2.) select fields 3.1 ..4.4


I am selecting (row 3, column 1) to (row 4, column 4).


3.) add the bottom of the row


In the dialog I click on the bottom of the previewed cell.


4.) use apply ==> the bottom line disappears


Use Apply ==> I get double lines below each cell within the selection. 
But what is weird is that double lines to the left (except for the last) 
are added too.


Did I miss something?


Now try the same with the menu bar, this time it works.


I guess you mean tool bar? This time I get only double lines below each 
cell.


Now, is there a relation to the patch I posted? Or maybe to something 
else I said about adding a separate function for double lines? I still 
don't see the relation.


Daniel



Re: Complaints about LyX on Mac

2017-08-23 Thread Stephan Witt
Am 23.08.2017 um 09:47 schrieb Jean-Pierre Chrétien 
:
> 
> Le 14/08/2017 à 09:43, Jean-Pierre Chrétien a écrit :
> 
>> A French user complains sadly about a couple of problems with LyX (first
>> experience).
> 
> Thanks for your answers, here is a summary.

Hi Jean-Pierre,

thank you for the summary.

>> His problems:
>> 1) opening splash.lyx, gets a message
>> 
>>  No information for converting svgz format files to pdf6.\n
>>  Define a converter in the preferences.
>> 
> 
> If a MacOS user has not inskscape nor librsvg installed, he will get this in 
> splash.lyx but also in the manuals (e.g. UserGuide where there are a lot of 
> similar icons in the text). This is not a good welcome page for fresh users.
> 
> Solutions:
> 1/ remove the image in splash.lyx. Welcome is better, but the problem will 
> reappear soon when the manuals are navigated.
> 2/ leave the image as a warning of further problems and add a note for Mac 
> Users to give a hint about librsvg installation, like
> 
> http://macappstore.org/librsvg/

Personally, I think its weird to refer to additional software to read the user 
guide of LyX.
We’re using Qt5 on Mac with included SVG plugin and it’s possible to present 
the SVG images as toolbar icons.
It should be possible to convert the SVGZ files without another tool chain. The 
toolbox is already there.

> 3/ include rsvg-convert in the mac OS LyX bundle.

This is not easy as the tool has many dependencies. I’ve build it from source 
to give it a try.
The dependency list is long, one library I’d accept but it references 11 
additional Gnome libraries:

=
$ otool -L rsvg-convert 
rsvg-convert:

/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 
(compatibility version 150.0.0, current version 1259.11.0)
/usr/local/lib/librsvg-2.2.dylib (compatibility version 43.0.0, current 
version 43.18.0)
/opt/local/lib/libpng16.16.dylib (compatibility version 47.0.0, current 
version 47.0.0)
/opt/local/lib/libcroco-0.6.3.dylib (compatibility version 4.0.0, 
current version 4.1.0)
/opt/local/lib/libxml2.2.dylib (compatibility version 12.0.0, current 
version 12.4.0)
/opt/local/lib/libgio-2.0.0.dylib (compatibility version 5201.0.0, 
current version 5201.3.0)
/opt/local/lib/libgdk_pixbuf-2.0.0.dylib (compatibility version 
3601.0.0, current version 3601.6.0)
/opt/local/lib/libpangocairo-1.0.0.dylib (compatibility version 
4001.0.0, current version 4001.6.0)
/opt/local/lib/libpango-1.0.0.dylib (compatibility version 4001.0.0, 
current version 4001.6.0)
/opt/local/lib/libgobject-2.0.0.dylib (compatibility version 5201.0.0, 
current version 5201.3.0)
/opt/local/lib/libglib-2.0.0.dylib (compatibility version 5201.0.0, 
current version 5201.3.0)
/opt/local/lib/libintl.8.dylib (compatibility version 10.0.0, current 
version 10.5.0)
/opt/local/lib/libcairo.2.dylib (compatibility version 11403.0.0, 
current version 11403.10.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current 
version 1226.10.1)
=

> For 2.3.0, 2/ seems best unless Stephan can manage 3/
> For 2.2.x, 2/ seems best either.
> 
> As far as other systems are concerned:
> * with linux, conversion is made either by qt5 (libqt5svg5), or by 
> rsvg-convert (librsvg2-bin) or inkscape. Can all of these be missing
> (with Debian, libqt5svg5 is a lyx dependency so the answer is no)?
> * with Windows, is librsvg bundled with the Windows installer, Uwe?
> Can qt5 perform the conversion?

I think, yes. But both libraries - Qt5 and librsvg - don’t implement the full 
SVG-standard.

>> 2) Opening the Tutorial, section 2.1, he fiddles about a lot to find the
>> installation folder where are the examples, As he does not find it in the Mac
>> directories, he finally opens the lyx package and uncompresses it in a local 
>> place.
> 
> This is a long term issue on macOS and maybe on Windows.
> 1/ On MacOS and Windows there is no 'Examples button' in the File>Open dialog
> 2/ on MacOS, the LyX bundle cannot be navigated with File>Open (greyed out)
> 
> The only current solution to access the examples folders is a symlink created 
> by the user. It can also be created at runtime in a similar manner as what 
> was done for the templates folder (at e4fada8c/lyxgit) or by the creation of 
> a specific LFUN.
> 
> 
> On 08/14/2017 09:08 AM, Stephan Witt wrote:
>> 
>> Another option I’d like to propose would be a dedicated LFUN for opening
>> the example file  to be opened like the help files which
>> can be used to point the file open dialog to the system examples folder
>> when fired without argument. This LFUN may be bound to a special
>> „Open Example...“ menu item. Perhaps a special one on Mac or Windows…
> 
> 
> Adding the example files to be accessed from the Help menu like the specific 
> manuals has also been proposed.
> 
> For 2.3.0 (and 2.2.x), the best seems to add 

Re: #8908: Instant preview does not work if package `minted` is used

2017-08-23 Thread Allan Leal

Hi Scott,

I had to change `Converter` from its default `pdflatex $$i` to `pdflatex 
-shell-escape $$i`.


Yes, I would gladly support LyX development by testing the new minted 
support.


Nice job!

Allan

On 23/08/17 03:38, Scott Kostyshak wrote:

On Mon, Aug 21, 2017 at 09:25:43PM +0200, Allan Leal wrote:

Sorry for not responding earlier. LyX works just great with minted since
version 2.2 (maybe even 2.1).

Thanks, Allan! If you look at your converter under Tools > Preferences >
File Handling > Converters under e.g. LaTeX (pdflated) -> PDF
(pdflatex), or whichever flavor you usually use, in the box "converter"
what does it currently say?

2.3.0 will have more native minted support. Would you be interested in
doing us the favor of testing LyX 2.3.0beta1?  We changed the way users
use minted, and would really appreciate testing from a minted user. If
you are interested, I can give you more instructions.

Thanks!

Scott




Re: Fix for vertical table border for added column

2017-08-23 Thread Kornel Benko
Am Mittwoch, 23. August 2017 um 20:20:46, schrieb racoon 
> On 22.08.2017 18:20, Kornel Benko wrote:
> > Am Dienstag, 22. August 2017 um 09:30:48, schrieb racoon 
> >> On 21.08.2017 23:32, Kornel Benko wrote:
> >>> Am Montag, 21. August 2017 um 22:24:10, schrieb racoon 
> > Playing with the new settings now ...
> > It is somehow requiring getting used to ... but I like it.
> 
>  I am not sure I follow. What "new settings"?
> 
>  Daniel
> >>>
> >>> I am able to set arbitrary borders with the table toolbar, but
> >>> with the tabular settings dialog it is often not possible.
> >>>
> >>>   Kornel
> >>>
> >>
> >> Sorry, I am slow. I still don't know what you mean. Is that something
> >> related to my patch of the add row/column or set all borders table toolbar?
> >>
> >> Daniel
> >
> > I mean the dialog you get with
> > right-click in a table -> Settings... -> Borders
>
> Okay, so what about it? I am still lost in how this is related to my
> patch, if it is.
>
> Also, you say that you are able to set some borders with the toolbar
> that you cannot with the dialog. Do you have an example?
>
> And, you say that you can set arbitrary borders with the table toolbar.
> Can you set double borders on the outermost border of the table?

No, I was referring to the inner borders.

For instance, in the attached example:
1.) Open the dialog border
2.) select fields 3.1 ..4.4
3.) add the bottom of the row
4.) use apply ==> the bottom line disappears

Now try the same with the menu bar, this time it works.

> Daniel

Kornel

signature.asc
Description: This is a digitally signed message part.


border-test.lyx
Description: application/lyx


Re: Fix for vertical table border for added column

2017-08-23 Thread racoon

On 22.08.2017 18:20, Kornel Benko wrote:

Am Dienstag, 22. August 2017 um 09:30:48, schrieb racoon 

On 21.08.2017 23:32, Kornel Benko wrote:

Am Montag, 21. August 2017 um 22:24:10, schrieb racoon 

Playing with the new settings now ...
It is somehow requiring getting used to ... but I like it.


I am not sure I follow. What "new settings"?

Daniel


I am able to set arbitrary borders with the table toolbar, but
with the tabular settings dialog it is often not possible.

Kornel



Sorry, I am slow. I still don't know what you mean. Is that something
related to my patch of the add row/column or set all borders table toolbar?

Daniel


I mean the dialog you get with
right-click in a table -> Settings... -> Borders


Okay, so what about it? I am still lost in how this is related to my 
patch, if it is.


Also, you say that you are able to set some borders with the toolbar 
that you cannot with the dialog. Do you have an example?


And, you say that you can set arbitrary borders with the table toolbar. 
Can you set double borders on the outermost border of the table?


Daniel



Re: LyX truncates spacing in Local Layout and in Listings

2017-08-23 Thread Jean-Marc Lasgouttes

Le 23/08/2017 à 11:55, Jean-Marc Lasgouttes a écrit :

This is what the code tries to do, but there are bugs (see notes below).

[...]
[*] the original code only considered spaces, which is of course wrong 
and should be corrected.
[**] a further random change was added to remove all leading tabs 
(6bba977f42), which is probably the bug you are seeing.


I would add the amusing
[***] the code removes all the spaces of the prefix except one.

All in all, I would propose to apply the following âtch, although I am 
not completely sure I understood what issues Haim was encountering.


Richard, could you test it a bit?

JMarc

From 5d9ddfd5b3611fdc2d8b46109c1b08d1ae0aa2af Mon Sep 17 00:00:00 2001
From: Jean-Marc Lasgouttes 
Date: Wed, 23 Aug 2017 12:25:29 +0200
Subject: [PATCH] Fix Lexer::getLongString prefix pruning logic

This fixes 3 bugs:
1/ only spaces are considered as part of the prefix
2/ leading tabs are removed unconditionally
3/ off-by-one error in the removal

The new intended behavior is:

1/ find the prefix (sequence of spaces and tabs) before the first
   line; remove this prefix from the line
2/ on the next lines, check whether they start with the same prefix,
  and if they do, strip this prefix
---
 src/Lexer.cpp | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/Lexer.cpp b/src/Lexer.cpp
index becd157..098faa9 100644
--- a/src/Lexer.cpp
+++ b/src/Lexer.cpp
@@ -738,7 +738,7 @@ docstring Lexer::getLongString(docstring const & endtoken)
 			break;
 
 		if (firstline) {
-			size_t i = tmpstr.find_first_not_of(char_type(' '));
+			size_t i = tmpstr.find_first_not_of(from_ascii(" \t"));
 			if (i != string::npos)
 prefix = tmpstr.substr(0, i);
 			firstline = false;
@@ -747,10 +747,10 @@ docstring Lexer::getLongString(docstring const & endtoken)
 
 		// further lines in long strings may have the same
 		// whitespace prefix as the first line. Remove it.
-		if (prefix.length() && prefixIs(tmpstr, prefix))
-			tmpstr.erase(0, prefix.length() - 1);
+		if (!prefix.empty() && prefixIs(tmpstr, prefix))
+			tmpstr.erase(0, prefix.length());
 
-		str += ltrim(tmpstr, "\t") + '\n';
+		str += tmpstr + '\n';
 	}
 
 	if (!pimpl_->is)
-- 
2.7.4



Re: LyX truncates spacing in Local Layout and in Listings

2017-08-23 Thread Jean-Marc Lasgouttes

Le 31/07/2017 à 04:27, Richard Heck a écrit :
All the leading tabs are deleted by the validation. This disturbs the 
reading of this content. Is there any solution for this?




It works with spaces, but not with tabs. Same problem with the preamble, 
actually.


JMarc, this seems to be because Lexer::getLongString trips leading tabs. 
Is there an easy way around that?


The way getLongString (added in LyX 0.11.27) was supposed to operate 
when I wrote it is
1/ find the prefix (sequence of spaces and tabs[*]) before the first 
line; remove this prefix from the line
2/ on the next lines, check whether they start with the same prefix, and 
if they do, strip this prefix [**]


The intent was the following: if I have a layout file with the code

Style Aaa

  Preamble
% define macro
\def\aaa{foo}
  EndPreamble

End

I want the preamble to be
% define macro
\def\aaa{foo}
instead of
% define macro
\def\aaa{foo}

This is what the code tries to do, but there are bugs (see notes below).

One problem beside these bugs is that the method has later been used in 
BufferParams to read some other settings. I do not know whether  the 
space-removing feature is wanted in this case.


Hope the helps.

JMarc

[*] the original code only considered spaces, which is of course wrong 
and should be corrected.
[**] a further random change was added to remove all leading tabs 
(6bba977f42), which is probably the bug you are seeing.


Re: Complaints about LyX on Mac

2017-08-23 Thread Jean-Pierre Chrétien

Le 14/08/2017 à 09:43, Jean-Pierre Chrétien a écrit :


A French user complains sadly about a couple of problems with LyX (first
experience).


Thanks for your answers, here is a summary.


His problems:
 1) opening splash.lyx, gets a message

   No information for converting svgz format files to pdf6.\n
   Define a converter in the preferences.



If a MacOS user has not inskscape nor librsvg installed, he will get this in 
splash.lyx but also in the manuals (e.g. UserGuide where there are a lot of 
similar icons in the text). This is not a good welcome page for fresh users.


Solutions:
 1/ remove the image in splash.lyx. Welcome is better, but the problem will 
reappear soon when the manuals are navigated.
 2/ leave the image as a warning of further problems and add a note for Mac 
Users to give a hint about librsvg installation, like


http://macappstore.org/librsvg/

 3/ include rsvg-convert in the mac OS LyX bundle.

For 2.3.0, 2/ seems best unless Stephan can manage 3/
For 2.2.x, 2/ seems best either.

As far as other systems are concerned:
 * with linux, conversion is made either by qt5 (libqt5svg5), or by 
rsvg-convert (librsvg2-bin) or inkscape. Can all of these be missing

(with Debian, libqt5svg5 is a lyx dependency so the answer is no)?
 * with Windows, is librsvg bundled with the Windows installer, Uwe?
Can qt5 perform the conversion?



 2) Opening the Tutorial, section 2.1, he fiddles about a lot to find the
installation folder where are the examples, As he does not find it in the Mac
directories, he finally opens the lyx package and uncompresses it in a local 
place.


This is a long term issue on macOS and maybe on Windows.
 1/ On MacOS and Windows there is no 'Examples button' in the File>Open dialog
 2/ on MacOS, the LyX bundle cannot be navigated with File>Open (greyed out)

The only current solution to access the examples folders is a symlink created by 
the user. It can also be created at runtime in a similar manner as what was done 
for the templates folder (at e4fada8c/lyxgit) or by the creation of a specific 
LFUN.



On 08/14/2017 09:08 AM, Stephan Witt wrote:
>
> Another option I’d like to propose would be a dedicated LFUN for opening
> the example file  to be opened like the help files which
> can be used to point the file open dialog to the system examples folder
> when fired without argument. This LFUN may be bound to a special
> „Open Example...“ menu item. Perhaps a special one on Mac or Windows…


Adding the example files to be accessed from the Help menu like the specific 
manuals has also been proposed.


For 2.3.0 (and 2.2.x), the best seems to add a note to MacOS users in section 
2.1 of the Tutorial (section where it is suggested to play with example_raw.lyx 
and example_lyxified.lyx), explaining how to create the symlink or copy the 
files in a navigable location, e.g.

~/Library/Application Support/LyX-2.0/examples/
(see ticket #9301). Unless of course a symlink can be added in the code...

Uwe, what is the status of the access to the example folders on Windows?



 3) Trying another document class, he selects Docbook (not a good choice for a
beginner IMHO). And when he wants to open it, this triggers the firefox of his
windows virtual box. Then he goes to Tools>Preferences>Converters and is quite
sarcastic about the dialog window about LyXHTML, which he does not understand.
It's a bit curious in fact (no viewer defined), see attached.


Dr Eberhard Lisse has a similar Virtual box installed and has no problems, I 
think that the user has a problem with his setup.


I can take care of a note in splash.lyx.

--
Jean-Pierre





Re: LyX version 2.3.0 (beta 1)

2017-08-23 Thread Enrico Forestieri
On Tue, Aug 22, 2017 at 10:33:51PM -0400, Scott Kostyshak wrote:
> On Fri, Aug 18, 2017 at 01:47:59AM -0400, Scott Kostyshak wrote:
> > On Thu, Aug 17, 2017 at 09:06:06PM +0200, Tommaso Cucinotta wrote:
> > > On 17/08/2017 20:25, Scott Kostyshak wrote:
> > > > An overview of the new features can be found here:
> > > > 
> > > >http://wiki.lyx.org/LyX/NewInLyX23
> > > 
> > > AFAICR, the new shell-escape [+minted] support made it to the 2.3, but 
> > > it's not mentioned (yet).
> > 
> > Indeed, please feel free to put it. Or if you prefer that I do it that's
> > fine too.
> 
> We do have the entry
> 
> "Option to use the LaTeX package minted for the typesetting of code
> listings."
> 
> We could add the shell-escape feature as a separate entry, but I'm not
> sure what we would put as the description. Something like the following?
> 
> -shell-escape can now be enabled only for specific documents, rather
> than having to enable it globally in preferences.
> 
> Which category should we put it? Miscellaneous or "Image formats and
> conversion"?

Miscellaneous, I would say.

-- 
Enrico


Re: alternatives for dashes (please vote)

2017-08-23 Thread Enrico Forestieri
On Wed, Aug 23, 2017 at 12:42:56AM -0400, Scott Kostyshak wrote:
> On Fri, Jul 28, 2017 at 03:45:28PM +0200, Pavel Sanda wrote:
> 
> > I tend to agree with f). It's not nice that we have such option in the 
> > prefs,
> > but since we screw the situation already we at least give user some power to
> > fix things onwards from 2.3 in his own way. 
> > 
> > And some exclamation mark in RELEASE_NOTES.
> 
> Can someone who understands the consequences please add an appropriate
> note to RELEASE-NOTES ?

This is already documented there, AFAIK.

-- 
Enrico