Re: [LyX/master] Account for Qt 5.10

2018-04-15 Thread Richard Kimberly Heck
On 04/15/2018 04:32 PM, Enrico Forestieri wrote:
> On Sun, Apr 15, 2018 at 12:55:48PM -0400, Richard Kimberly Heck wrote:
>> On 04/15/2018 05:46 AM, Jürgen Spitzmüller wrote:
>>> Am Freitag, den 05.01.2018, 19:29 +0100 schrieb Enrico Forestieri:
 commit 6253cc4c51e4e36125c33a8c427e27493435ddc8
 Author: Enrico Forestieri
 Date:   Fri Jan 5 19:27:24 2018 +0100

 Account for Qt 5.10
 
 Fix regular sed expression in order to catch a second digit in
 the
 Qt minor version number.
 ---
  config/qt4.m4 |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

 diff --git a/config/qt4.m4 b/config/qt4.m4
 index 1cf557d..f53f243 100644
 --- a/config/qt4.m4
 +++ b/config/qt4.m4
 @@ -211,7 +211,7 @@ AC_DEFUN([QT_DO_IT_ALL],
QT_FIND_TOOL([QT_RCC], [rcc])
  
dnl Safety check
 -  mocqtver=`$QT_MOC -v 2>&1 | sed -e 's/.*\([[0-9]]\.[[0-
 9]]\.[[0-9]]\).*/\1/'`
 +  mocqtver=`$QT_MOC -v 2>&1 | sed -e 's/.*\([[0-9]]\.[[0-
 9]]*\.[[0-9]]\).*/\1/'`
if test "x$mocqtver" != "x$QTLIB_VERSION"; then
LYX_WARNING([The found moc compiler is for Qt
 $mocqtver but the Qt library version is $QTLIB_VERSION.])
fi
>>> Can we please backport this one?
>> Sure. Not sure why it wasn't done earlier
> Sorry. I forgot about that. Done at 03b5a080.

Thanks!

Riki



Re: [LyX/master] Account for Qt 5.10

2018-04-15 Thread Enrico Forestieri
On Sun, Apr 15, 2018 at 12:55:48PM -0400, Richard Kimberly Heck wrote:
> On 04/15/2018 05:46 AM, Jürgen Spitzmüller wrote:
> > Am Freitag, den 05.01.2018, 19:29 +0100 schrieb Enrico Forestieri:
> >> commit 6253cc4c51e4e36125c33a8c427e27493435ddc8
> >> Author: Enrico Forestieri
> >> Date:   Fri Jan 5 19:27:24 2018 +0100
> >>
> >> Account for Qt 5.10
> >> 
> >> Fix regular sed expression in order to catch a second digit in
> >> the
> >> Qt minor version number.
> >> ---
> >>  config/qt4.m4 |2 +-
> >>  1 files changed, 1 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/config/qt4.m4 b/config/qt4.m4
> >> index 1cf557d..f53f243 100644
> >> --- a/config/qt4.m4
> >> +++ b/config/qt4.m4
> >> @@ -211,7 +211,7 @@ AC_DEFUN([QT_DO_IT_ALL],
> >>QT_FIND_TOOL([QT_RCC], [rcc])
> >>  
> >>dnl Safety check
> >> -  mocqtver=`$QT_MOC -v 2>&1 | sed -e 's/.*\([[0-9]]\.[[0-
> >> 9]]\.[[0-9]]\).*/\1/'`
> >> +  mocqtver=`$QT_MOC -v 2>&1 | sed -e 's/.*\([[0-9]]\.[[0-
> >> 9]]*\.[[0-9]]\).*/\1/'`
> >>if test "x$mocqtver" != "x$QTLIB_VERSION"; then
> >>LYX_WARNING([The found moc compiler is for Qt
> >> $mocqtver but the Qt library version is $QTLIB_VERSION.])
> >>fi
> > Can we please backport this one?
> 
> Sure. Not sure why it wasn't done earlier

Sorry. I forgot about that. Done at 03b5a080.

-- 
Enrico


Re: [LyX/master] Add basic support for cprotect

2018-04-15 Thread Scott Kostyshak
On Sun, Apr 15, 2018 at 04:18:11PM +, Jürgen Spitzmüller wrote:
> Am Sonntag, den 15.04.2018, 10:45 -0400 schrieb Scott Kostyshak:
> > I think I was unclear. I mean that before your commit, if you put a
> > box
> > around a verbatim, it worked unless the box was a "simple frame". To
> > see
> > this, open the file simpleFrame_verbatim.lyx that I sent before with
> > e.g. LyX 2.3.0 and change from "simple frame" to "double frame". It
> > compiled without error.
> 
> This seems to be a feature of the framed package:
> https://tex.stackexchange.com/a/6311/19291

I see. So in this case should we remove \cprotect for situations that
don't need it?

Scott


signature.asc
Description: PGP signature


Re: [LyX/master] Account for Qt 5.10

2018-04-15 Thread Richard Kimberly Heck
On 04/15/2018 05:46 AM, Jürgen Spitzmüller wrote:
> Am Freitag, den 05.01.2018, 19:29 +0100 schrieb Enrico Forestieri:
>> commit 6253cc4c51e4e36125c33a8c427e27493435ddc8
>> Author: Enrico Forestieri
>> Date:   Fri Jan 5 19:27:24 2018 +0100
>>
>> Account for Qt 5.10
>> 
>> Fix regular sed expression in order to catch a second digit in
>> the
>> Qt minor version number.
>> ---
>>  config/qt4.m4 |2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/config/qt4.m4 b/config/qt4.m4
>> index 1cf557d..f53f243 100644
>> --- a/config/qt4.m4
>> +++ b/config/qt4.m4
>> @@ -211,7 +211,7 @@ AC_DEFUN([QT_DO_IT_ALL],
>>  QT_FIND_TOOL([QT_RCC], [rcc])
>>  
>>  dnl Safety check
>> -mocqtver=`$QT_MOC -v 2>&1 | sed -e 's/.*\([[0-9]]\.[[0-
>> 9]]\.[[0-9]]\).*/\1/'`
>> +mocqtver=`$QT_MOC -v 2>&1 | sed -e 's/.*\([[0-9]]\.[[0-
>> 9]]*\.[[0-9]]\).*/\1/'`
>>  if test "x$mocqtver" != "x$QTLIB_VERSION"; then
>>  LYX_WARNING([The found moc compiler is for Qt
>> $mocqtver but the Qt library version is $QTLIB_VERSION.])
>>  fi
> Can we please backport this one?

Sure. Not sure why it wasn't done earlier

Riki



Re: [LyX/master] Add basic support for cprotect

2018-04-15 Thread Jürgen Spitzmüller
Am Sonntag, den 15.04.2018, 10:45 -0400 schrieb Scott Kostyshak:
> I think I was unclear. I mean that before your commit, if you put a
> box
> around a verbatim, it worked unless the box was a "simple frame". To
> see
> this, open the file simpleFrame_verbatim.lyx that I sent before with
> e.g. LyX 2.3.0 and change from "simple frame" to "double frame". It
> compiled without error.

This seems to be a feature of the framed package:
https://tex.stackexchange.com/a/6311/19291

> > Please test with the attached patch after my recent commits. I did
> > not
> > commit the patch since I cannot test whether it works (no R
> > installed
> > here).
> 
> Tested and works well. Thank you!

Committed.

Jürgen

> 
> Scott

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


Re: [LyX/master] Add basic support for cprotect

2018-04-15 Thread Scott Kostyshak
On Sun, Apr 15, 2018 at 10:35:32AM +, Jürgen Spitzmüller wrote:
> Am Samstag, den 14.04.2018, 13:15 -0400 schrieb Scott Kostyshak:
> > Did we need to add \cprotect also for the other box modes? For the
> > example file, all of the options besides simple frame compiled
> > without
> > error. Was that just by luck?
> 
> No, because I added the calls. Since the Box latex routine is really
> ugly, chances are high, though, that I missed cases. So thanks for
> checking.

I think I was unclear. I mean that before your commit, if you put a box
around a verbatim, it worked unless the box was a "simple frame". To see
this, open the file simpleFrame_verbatim.lyx that I sent before with
e.g. LyX 2.3.0 and change from "simple frame" to "double frame". It
compiled without error.

> The reason was that knitr chunk has the LaTeXType "none" which was
> treated equivalently to "command" (which only needs cprotect for
> specific content), rather than "environment" (which needs cprotect
> always). Thus cprotect would have chimed in if you entered one of the
> crucial chars in the chunk (e.g., #).

Ah that makes sense.

> Please test with the attached patch after my recent commits. I did not
> commit the patch since I cannot test whether it works (no R installed
> here).

Tested and works well. Thank you!

Scott


signature.asc
Description: PGP signature


Re: [LyX/master] Add basic support for cprotect

2018-04-15 Thread Jürgen Spitzmüller
Am Samstag, den 14.04.2018, 13:15 -0400 schrieb Scott Kostyshak:
> Did we need to add \cprotect also for the other box modes? For the
> example file, all of the options besides simple frame compiled
> without
> error. Was that just by luck?

No, because I added the calls. Since the Box latex routine is really
ugly, chances are high, though, that I missed cases. So thanks for
checking.

> > > This issue also affects putting a simple frame around a knitr
> > > chunk,
> > > because knitr uses verbatim.
> > 
> > Try if adding
> > 
> > NeedsCProtect 1
> > to the respective knitr layouts helps.
> 
> It does not seem to change LaTeX output for me (I used
> "NeedsCProtect").
> Perhaps it is because the LaTeX code has also a minipage?
> 
> \fbox{\begin{minipage}[t]{

The reason was that knitr chunk has the LaTeXType "none" which was
treated equivalently to "command" (which only needs cprotect for
specific content), rather than "environment" (which needs cprotect
always). Thus cprotect would have chimed in if you entered one of the
crucial chars in the chunk (e.g., #).

Please test with the attached patch after my recent commits. I did not
commit the patch since I cannot test whether it works (no R installed
here).

Jürgendiff --git a/lib/layouts/litinsets.inc b/lib/layouts/litinsets.inc
index 11dd2d16af..7e1e9f00d7 100644
--- a/lib/layouts/litinsets.inc
+++ b/lib/layouts/litinsets.inc
@@ -51,4 +51,5 @@ InsetLayout "Flex:Chunk"
 EndArgument
 ResetsFontfalse
 ForceOwnlines true
+NeedCProtect  true
 End


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


Re: [LyX/master] Account for Qt 5.10

2018-04-15 Thread Jürgen Spitzmüller
Am Freitag, den 05.01.2018, 19:29 +0100 schrieb Enrico Forestieri:
> commit 6253cc4c51e4e36125c33a8c427e27493435ddc8
> Author: Enrico Forestieri
> Date:   Fri Jan 5 19:27:24 2018 +0100
> 
> Account for Qt 5.10
> 
> Fix regular sed expression in order to catch a second digit in
> the
> Qt minor version number.
> ---
>  config/qt4.m4 |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/config/qt4.m4 b/config/qt4.m4
> index 1cf557d..f53f243 100644
> --- a/config/qt4.m4
> +++ b/config/qt4.m4
> @@ -211,7 +211,7 @@ AC_DEFUN([QT_DO_IT_ALL],
>   QT_FIND_TOOL([QT_RCC], [rcc])
>  
>   dnl Safety check
> - mocqtver=`$QT_MOC -v 2>&1 | sed -e 's/.*\([[0-9]]\.[[0-
> 9]]\.[[0-9]]\).*/\1/'`
> + mocqtver=`$QT_MOC -v 2>&1 | sed -e 's/.*\([[0-9]]\.[[0-
> 9]]*\.[[0-9]]\).*/\1/'`
>   if test "x$mocqtver" != "x$QTLIB_VERSION"; then
>   LYX_WARNING([The found moc compiler is for Qt
> $mocqtver but the Qt library version is $QTLIB_VERSION.])
>   fi

Can we please backport this one?

Jürgen

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