Re: We will have to change our output for newest LuaTeX

2016-05-23 Thread Guenter Milde
On 2016-05-22, Scott Kostyshak wrote:
> On Sun, May 22, 2016 at 07:22:12PM +, Guenter Milde wrote:
>> On 2016-05-22, Scott Kostyshak wrote:
...
>> >> > > On 2016-05-20, Scott Kostyshak wrote:
>> >> > 
>> >> > >> There have been some changes in the luatex engine that will be
>> >> > >> shipped with TeX Live 2016 that cause many of our tests to fail
>> >> > >> (500 something instead of 100 something on TL 2015). The root
>> >> > >> issue is discussed on the LuaTeX mailing list at [1].

>> >> > >> There is a transitional package available, luatex85, that should
>> >> > >> make our current LuaTeX code work. A reasonable approach for now
>> >> > >> would be to use the package if it is available and to not use it
>> >> > >> if not, keeping the rest of our LuaTeX export code the same.
>> >> > ...
>> >> > > We could just add
>> >> > ...
>> >> >  \IfFileExists{luatex85.sty}{\usepackage{luatex85}}{}
>> >> > ...
>> >> > 
>> >> > >> Should we do this only when we use code that we think needs it? Or
>> >> > >> should we just add it to all of our LuaTeX exports?
>> >> > 
>> >> > I propose to do this with every LuaTeX export

>> After reading the luatex85 documentation I changed my mind.

>> Unless LyX uses the offending commands directly, this is a LaTeX issue.

LyX uses the offending commands directly (see below), so we have to do
something.

>> Can you specify which tests fail?

> I think the root issue for the failing tests is the following:

> 1. Start a new document.
> 2. Go to Document > Settings > Page Layout and select A4 format. Save
> settings.
> 3. Compile with LuaTeX

> An undefined control sequence error is given.

> Would you prefer the list of tests that fail or is the above MWE good
> enough?

It is fine. Even without the new luatex, I see that the offending part is
the use of:

%% LyX specific LaTeX commands.
\pdfpageheight\paperheight
\pdfpagewidth\paperwidth


in case a non-standard paper size is set.

IMO, LyX should write

%% LyX specific LaTeX commands.
\IfFileExists{luatex85.sty}{\usepackage{luatex85}}{}
\pdfpageheight\paperheight
\pdfpagewidth\paperwidth

if exporting to LuaTeX and \pdfpage* commands are required.
(With a comment in the code to change this to the new syntax next year or
so...)

Günter



Re: We will have to change our output for newest LuaTeX

2016-05-22 Thread Scott Kostyshak
On Fri, May 20, 2016 at 01:26:30PM -0700, Pavel Sanda wrote:
> Scott Kostyshak wrote:
> > There have been some changes in the luatex engine that will be shipped
> > with TeX Live 2016 that cause many of our tests to fail (500 something
> > instead of 100 something on TL 2015). The root issue is discussed on the
> > LuaTeX mailing list at [1].
> > 
> > There is a transitional package available, luatex85, that should make
> > our current LuaTeX code work. A reasonable approach for now would be to
> > use the package if it is available and to not use it if not, keeping the
> > rest of our LuaTeX export code the same. This would make sense if we
> > think that most users who use the newer LuaTeX also have the package
> > installed.
> 
> > 
> > A more robust solution would be to make the behavior dependent on the
> > version of LuaTeX that the user has.
> > 
> > I'm not worried about this for 2.2.0 for the following reasons:
> 
> Agreed. We should note whatever we know about the problem into RELEASE-NOTES,
> known issues section; it might help packagers to setup proper dependencies
> against 2016 luatex.

Done at e16018af.

Scott


signature.asc
Description: PGP signature


Re: We will have to change our output for newest LuaTeX

2016-05-22 Thread Scott Kostyshak
On Sun, May 22, 2016 at 03:35:57PM -0400, Scott Kostyshak wrote:
> On Sun, May 22, 2016 at 07:22:12PM +, Guenter Milde wrote:
> > On 2016-05-22, Scott Kostyshak wrote:
> > > On Sat, May 21, 2016 at 05:32:07PM -0400, Scott Kostyshak wrote:
> > >> On Sat, May 21, 2016 at 04:23:24PM +, Guenter Milde wrote:
> > >> > On 2016-05-20, Guillaume Munch wrote:
> > >> > > Le 20/05/2016 19:26, Scott Kostyshak a écrit :
> > >> > >> On Fri, May 20, 2016 at 04:06:22PM +, Guenter Milde wrote:
> > >> > >>> On 2016-05-20, Jean-Marc Lasgouttes wrote:
> > >> >  Le 20/05/2016 à 13:17, Guenter Milde a écrit :
> > >> > > On 2016-05-20, Scott Kostyshak wrote:
> > >> > 
> > >> > >> There have been some changes in the luatex engine that will be
> > >> > >> shipped with TeX Live 2016 that cause many of our tests to fail
> > >> > >> (500 something instead of 100 something on TL 2015). The root
> > >> > >> issue is discussed on the LuaTeX mailing list at [1].
> > 
> > >> > >> There is a transitional package available, luatex85, that should
> > >> > >> make our current LuaTeX code work. A reasonable approach for now
> > >> > >> would be to use the package if it is available and to not use it
> > >> > >> if not, keeping the rest of our LuaTeX export code the same.
> > >> > ...
> > >> > > We could just add
> > >> > ...
> > >> >  \IfFileExists{luatex85.sty}{\usepackage{luatex85}}{}
> > >> > ...
> > >> > 
> > >> > >> Should we do this only when we use code that we think needs it? Or
> > >> > >> should we just add it to all of our LuaTeX exports?
> > >> > 
> > >> > I propose to do this with every LuaTeX export
> > 
> > After reading the luatex85 documentation I changed my mind.
> > 
> > Unless LyX uses the offending commands directly, this is a LaTeX issue.
> > 
> > It can be expected, that most packages will be updated to either load
> > luatex85 or use the new commands.
> > http://mirrors.ctan.org/macros/generic/luatex85/luatex85.pdf
> > 
> > ...
> > 
> > 
> > >> The most controversial change is putting something before
> > >> \documentclass.
> > 
> > ...
> > 
> > > Apparently the \usepackage command is not even allowed before
> > > \documentclass. I must have misunderstood the recommendation in the
> > > package documentation. It was probably written assuming that any
> > > sensible LaTeX user would not dare to put anything actually before
> > > \documentclass.
> > 
> > It is written for package and class authors, not end users.
> > This is why it uses \RequirePackage{luatex85} instead of \usepackage.
> > 
> > (Still, this should be put after the package/class declaration but before
> > code loading other packages...)
> 
> Ah that makes sense.
> 
> > Can you specify which tests fail?
> 
> I think the root issue for the failing tests is the following:
> 
> 1. Start a new document.

1.5 Type "hello"

> 2. Go to Document > Settings > Page Layout and select A4 format. Save
> settings.
> 3. Compile with LuaTeX
> 
> An undefined control sequence error is given.
> 
> Would you prefer the list of tests that fail or is the above MWE good
> enough?
> 
> Scott




signature.asc
Description: PGP signature


Re: We will have to change our output for newest LuaTeX

2016-05-22 Thread Scott Kostyshak
On Sun, May 22, 2016 at 07:22:12PM +, Guenter Milde wrote:
> On 2016-05-22, Scott Kostyshak wrote:
> > On Sat, May 21, 2016 at 05:32:07PM -0400, Scott Kostyshak wrote:
> >> On Sat, May 21, 2016 at 04:23:24PM +, Guenter Milde wrote:
> >> > On 2016-05-20, Guillaume Munch wrote:
> >> > > Le 20/05/2016 19:26, Scott Kostyshak a écrit :
> >> > >> On Fri, May 20, 2016 at 04:06:22PM +, Guenter Milde wrote:
> >> > >>> On 2016-05-20, Jean-Marc Lasgouttes wrote:
> >> >  Le 20/05/2016 à 13:17, Guenter Milde a écrit :
> >> > > On 2016-05-20, Scott Kostyshak wrote:
> >> > 
> >> > >> There have been some changes in the luatex engine that will be
> >> > >> shipped with TeX Live 2016 that cause many of our tests to fail
> >> > >> (500 something instead of 100 something on TL 2015). The root
> >> > >> issue is discussed on the LuaTeX mailing list at [1].
> 
> >> > >> There is a transitional package available, luatex85, that should
> >> > >> make our current LuaTeX code work. A reasonable approach for now
> >> > >> would be to use the package if it is available and to not use it
> >> > >> if not, keeping the rest of our LuaTeX export code the same.
> >> > ...
> >> > > We could just add
> >> > ...
> >> >  \IfFileExists{luatex85.sty}{\usepackage{luatex85}}{}
> >> > ...
> >> > 
> >> > >> Should we do this only when we use code that we think needs it? Or
> >> > >> should we just add it to all of our LuaTeX exports?
> >> > 
> >> > I propose to do this with every LuaTeX export
> 
> After reading the luatex85 documentation I changed my mind.
> 
> Unless LyX uses the offending commands directly, this is a LaTeX issue.
> 
> It can be expected, that most packages will be updated to either load
> luatex85 or use the new commands.
> http://mirrors.ctan.org/macros/generic/luatex85/luatex85.pdf
> 
> ...
> 
> 
> >> The most controversial change is putting something before
> >> \documentclass.
> 
> ...
> 
> > Apparently the \usepackage command is not even allowed before
> > \documentclass. I must have misunderstood the recommendation in the
> > package documentation. It was probably written assuming that any
> > sensible LaTeX user would not dare to put anything actually before
> > \documentclass.
> 
> It is written for package and class authors, not end users.
> This is why it uses \RequirePackage{luatex85} instead of \usepackage.
> 
> (Still, this should be put after the package/class declaration but before
> code loading other packages...)

Ah that makes sense.

> Can you specify which tests fail?

I think the root issue for the failing tests is the following:

1. Start a new document.
2. Go to Document > Settings > Page Layout and select A4 format. Save
settings.
3. Compile with LuaTeX

An undefined control sequence error is given.

Would you prefer the list of tests that fail or is the above MWE good
enough?

Scott


signature.asc
Description: PGP signature


Re: We will have to change our output for newest LuaTeX

2016-05-22 Thread Guenter Milde
On 2016-05-22, Scott Kostyshak wrote:
> On Sat, May 21, 2016 at 05:32:07PM -0400, Scott Kostyshak wrote:
>> On Sat, May 21, 2016 at 04:23:24PM +, Guenter Milde wrote:
>> > On 2016-05-20, Guillaume Munch wrote:
>> > > Le 20/05/2016 19:26, Scott Kostyshak a écrit :
>> > >> On Fri, May 20, 2016 at 04:06:22PM +, Guenter Milde wrote:
>> > >>> On 2016-05-20, Jean-Marc Lasgouttes wrote:
>> >  Le 20/05/2016 à 13:17, Guenter Milde a écrit :
>> > > On 2016-05-20, Scott Kostyshak wrote:
>> > 
>> > >> There have been some changes in the luatex engine that will be
>> > >> shipped with TeX Live 2016 that cause many of our tests to fail
>> > >> (500 something instead of 100 something on TL 2015). The root
>> > >> issue is discussed on the LuaTeX mailing list at [1].

>> > >> There is a transitional package available, luatex85, that should
>> > >> make our current LuaTeX code work. A reasonable approach for now
>> > >> would be to use the package if it is available and to not use it
>> > >> if not, keeping the rest of our LuaTeX export code the same.
>> > ...
>> > > We could just add
>> > ...
>> >  \IfFileExists{luatex85.sty}{\usepackage{luatex85}}{}
>> > ...
>> > 
>> > >> Should we do this only when we use code that we think needs it? Or
>> > >> should we just add it to all of our LuaTeX exports?
>> > 
>> > I propose to do this with every LuaTeX export

After reading the luatex85 documentation I changed my mind.

Unless LyX uses the offending commands directly, this is a LaTeX issue.

It can be expected, that most packages will be updated to either load
luatex85 or use the new commands.
http://mirrors.ctan.org/macros/generic/luatex85/luatex85.pdf

...


>> The most controversial change is putting something before
>> \documentclass.

...

> Apparently the \usepackage command is not even allowed before
> \documentclass. I must have misunderstood the recommendation in the
> package documentation. It was probably written assuming that any
> sensible LaTeX user would not dare to put anything actually before
> \documentclass.

It is written for package and class authors, not end users.
This is why it uses \RequirePackage{luatex85} instead of \usepackage.

(Still, this should be put after the package/class declaration but before
code loading other packages...)


Can you specify which tests fail?


Günter



Re: We will have to change our output for newest LuaTeX

2016-05-22 Thread Scott Kostyshak
On Sat, May 21, 2016 at 05:32:07PM -0400, Scott Kostyshak wrote:
> On Sat, May 21, 2016 at 04:23:24PM +, Guenter Milde wrote:
> > On 2016-05-20, Guillaume Munch wrote:
> > > Le 20/05/2016 19:26, Scott Kostyshak a écrit :
> > >> On Fri, May 20, 2016 at 04:06:22PM +, Guenter Milde wrote:
> > >>> On 2016-05-20, Jean-Marc Lasgouttes wrote:
> >  Le 20/05/2016 à 13:17, Guenter Milde a écrit :
> > > On 2016-05-20, Scott Kostyshak wrote:
> > 
> > >> There have been some changes in the luatex engine that will be
> > >> shipped with TeX Live 2016 that cause many of our tests to fail
> > >> (500 something instead of 100 something on TL 2015). The root
> > >> issue is discussed on the LuaTeX mailing list at [1].
> > 
> > >> There is a transitional package available, luatex85, that should
> > >> make our current LuaTeX code work. A reasonable approach for now
> > >> would be to use the package if it is available and to not use it
> > >> if not, keeping the rest of our LuaTeX export code the same.
> > ...
> > > We could just add
> > ...
> >  \IfFileExists{luatex85.sty}{\usepackage{luatex85}}{}
> > ...
> > 
> > >> Should we do this only when we use code that we think needs it? Or
> > >> should we just add it to all of our LuaTeX exports?
> > 
> > I propose to do this with every LuaTeX export
> > 
> > +3 simple (no LyX-logic required)
> > +1 no risk of LyX getting it wrong
> > -1 eventually spurious package loading
> 
> I agree.
> 
> > > For 2.2 this could be shipped as a module, to be deprecated and updated
> > > into an empty module once LyX decides to adopt the new luatex syntax.
> > 
> > I'd rather keep this simple as well: insert
> > 
> >  \IfFileExists{luatex85.sty}{\usepackage{luatex85}}{}
> > 
> > with every LuaTeX export for the next years to come untill we can be safe
> > every user has the new version and can start using the new syntax in our
> > export.
> 
> Makes sense. And because LuaTeX is still beta, I don't think we should feel
> too much pressure an old LuaTeX version for a long time.
> 
> What about the attached patch? The most controversial change is putting
> something before \documentclass. In BufferParams::writeLaTeX() we have
> the following warning:
> 
> // Do not try to load any other package before the document class, unless you
> // have a thorough understanding of the LATEX internals and know exactly what 
> you
> // are doing!
> 
> I do not have a thorough understanding of the LATEX internals and I very
> rarely know exactly what I'm doing. The package documentation of
> luatex85 does suggest that it should be the first line of the document.
> 
> Any thoughts?
> 
> Jürgen, since you've done a lot of work on the LuaTeX code, do you have
> an opinion?
> 
> Scott

Apparently the \usepackage command is not even allowed before
\documentclass. I must have misunderstood the recommendation in the
package documentation. It was probably written assuming that any
sensible LaTeX user would not dare to put anything actually before
\documentclass.

Attached is my next attempt.

Scott
From 4e1dc719a4f8830db60d379594e633c08dfebe58 Mon Sep 17 00:00:00 2001
From: Scott Kostyshak 
Date: Sat, 21 May 2016 17:04:42 -0400
Subject: [PATCH] Fix LuaTeX export for TL >= 2016

If the transitional package luatex85 is available we use it.
Otherwise, we assume that an older luatex engine is being used. For
more information, see the following lyx-devel thread:
https://www.mail-archive.com/search?l=mid=20160520075810.yi3uspufehev5aln%40cotopaxi

The luatex85 manual suggests to users to load the package "as the
first line of their document", which perhaps means immediately after
\documentclass{}.
---
 src/BufferParams.cpp | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp
index 9d121cb..1ee847e 100644
--- a/src/BufferParams.cpp
+++ b/src/BufferParams.cpp
@@ -1572,6 +1572,16 @@ bool BufferParams::writeLaTeX(otexstream & os, 
LaTeXFeatures & features,
os << '{' << from_ascii(tclass.latexname()) << "}\n";
// end of \documentclass defs
 
+   // our LuaTeX export is broken with TL >= 2016. If the transitional
+   // package luatex85 is available we use it. Otherwise, we assume that
+   // an older luatex engine is being used.
+   // 
https://www.mail-archive.com/search?l=mid=20160520075810.yi3uspufehev5aln%40cotopaxi
+   // The luatex85 manual suggests to users to load the package "as the
+   // first line of their document", which perhaps means immediately after 
\documentclass{}
+   if (features.runparams().flavor == OutputParams::LUATEX ||
+   features.runparams().flavor == OutputParams::DVILUATEX)
+   os << 
"\\IfFileExists{luatex85.sty}{\\usepackage{luatex85}}{}\n";
+
// if we use fontspec or newtxmath, we have to load the AMS packages 
here
string const ams = features.loadAMSPackages();

Re: We will have to change our output for newest LuaTeX

2016-05-21 Thread Scott Kostyshak
On Sat, May 21, 2016 at 04:23:24PM +, Guenter Milde wrote:
> On 2016-05-20, Guillaume Munch wrote:
> > Le 20/05/2016 19:26, Scott Kostyshak a écrit :
> >> On Fri, May 20, 2016 at 04:06:22PM +, Guenter Milde wrote:
> >>> On 2016-05-20, Jean-Marc Lasgouttes wrote:
>  Le 20/05/2016 à 13:17, Guenter Milde a écrit :
> > On 2016-05-20, Scott Kostyshak wrote:
> 
> >> There have been some changes in the luatex engine that will be
> >> shipped with TeX Live 2016 that cause many of our tests to fail
> >> (500 something instead of 100 something on TL 2015). The root
> >> issue is discussed on the LuaTeX mailing list at [1].
> 
> >> There is a transitional package available, luatex85, that should
> >> make our current LuaTeX code work. A reasonable approach for now
> >> would be to use the package if it is available and to not use it
> >> if not, keeping the rest of our LuaTeX export code the same.
> ...
> > We could just add
> ...
>  \IfFileExists{luatex85.sty}{\usepackage{luatex85}}{}
> ...
> 
> >> Should we do this only when we use code that we think needs it? Or
> >> should we just add it to all of our LuaTeX exports?
> 
> I propose to do this with every LuaTeX export
> 
> +3 simple (no LyX-logic required)
> +1 no risk of LyX getting it wrong
> -1 eventually spurious package loading

I agree.

> > For 2.2 this could be shipped as a module, to be deprecated and updated
> > into an empty module once LyX decides to adopt the new luatex syntax.
> 
> I'd rather keep this simple as well: insert
> 
>  \IfFileExists{luatex85.sty}{\usepackage{luatex85}}{}
> 
> with every LuaTeX export for the next years to come untill we can be safe
> every user has the new version and can start using the new syntax in our
> export.

Makes sense. And because LuaTeX is still beta, I don't think we should feel
too much pressure an old LuaTeX version for a long time.

What about the attached patch? The most controversial change is putting
something before \documentclass. In BufferParams::writeLaTeX() we have
the following warning:

// Do not try to load any other package before the document class, unless you
// have a thorough understanding of the LATEX internals and know exactly what 
you
// are doing!

I do not have a thorough understanding of the LATEX internals and I very
rarely know exactly what I'm doing. The package documentation of
luatex85 does suggest that it should be the first line of the document.

Any thoughts?

Jürgen, since you've done a lot of work on the LuaTeX code, do you have
an opinion?

Scott
From 7a94d6a64919c791e49f2c3e712770d611bc2b55 Mon Sep 17 00:00:00 2001
From: Scott Kostyshak 
Date: Sat, 21 May 2016 17:04:42 -0400
Subject: [PATCH] Fix LuaTeX export for TL >= 2016

If the transitional package luatex85 is available we use it.
Otherwise, we assume that an older luatex engine is being used. For
more information, see the following lyx-devel thread:
https://www.mail-archive.com/search?l=mid=20160520075810.yi3uspufehev5aln%40cotopaxi

The luatex85 manual suggests to users to load the package "as the
first line of their document".
---
 src/BufferParams.cpp | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp
index 9d121cb..1689513 100644
--- a/src/BufferParams.cpp
+++ b/src/BufferParams.cpp
@@ -1426,6 +1426,17 @@ bool BufferParams::writeLaTeX(otexstream & os, 
LaTeXFeatures & features,
// Do not try to load any other package before the document class, 
unless you
// have a thorough understanding of the LATEX internals and know 
exactly what you
// are doing!
+
+   // our LuaTeX export is broken with TL >= 2016. If the transitional
+   // package luatex85 is available we use it. Otherwise, we assume that
+   // an older luatex engine is being used.
+   // 
https://www.mail-archive.com/search?l=mid=20160520075810.yi3uspufehev5aln%40cotopaxi
+   // The luatex85 manual suggests to users to load the package "as the
+   // first line of their document"
+   if (features.runparams().flavor == OutputParams::LUATEX ||
+   features.runparams().flavor == OutputParams::DVILUATEX)
+   os << 
"\\IfFileExists{luatex85.sty}{\\usepackage{luatex85}}{}\n";
+
if (features.mustProvide("fix-cm"))
os << "\\RequirePackage{fix-cm}\n";
// Likewise for fixltx2e. If other packages conflict with this policy,
-- 
2.1.4



signature.asc
Description: PGP signature


Re: We will have to change our output for newest LuaTeX

2016-05-21 Thread Guenter Milde
On 2016-05-20, Guillaume Munch wrote:
> Le 20/05/2016 19:26, Scott Kostyshak a écrit :
>> On Fri, May 20, 2016 at 04:06:22PM +, Guenter Milde wrote:
>>> On 2016-05-20, Jean-Marc Lasgouttes wrote:
 Le 20/05/2016 à 13:17, Guenter Milde a écrit :
> On 2016-05-20, Scott Kostyshak wrote:

>> There have been some changes in the luatex engine that will be
>> shipped with TeX Live 2016 that cause many of our tests to fail
>> (500 something instead of 100 something on TL 2015). The root
>> issue is discussed on the LuaTeX mailing list at [1].

>> There is a transitional package available, luatex85, that should
>> make our current LuaTeX code work. A reasonable approach for now
>> would be to use the package if it is available and to not use it
>> if not, keeping the rest of our LuaTeX export code the same.
...
> We could just add
...
 \IfFileExists{luatex85.sty}{\usepackage{luatex85}}{}
...

>> Should we do this only when we use code that we think needs it? Or
>> should we just add it to all of our LuaTeX exports?

I propose to do this with every LuaTeX export

+3 simple (no LyX-logic required)
+1 no risk of LyX getting it wrong
-1 eventually spurious package loading

> For 2.2 this could be shipped as a module, to be deprecated and updated
> into an empty module once LyX decides to adopt the new luatex syntax.

I'd rather keep this simple as well: insert

 \IfFileExists{luatex85.sty}{\usepackage{luatex85}}{}

with every LuaTeX export for the next years to come untill we can be safe
every user has the new version and can start using the new syntax in our
export.

Günter



Re: We will have to change our output for newest LuaTeX

2016-05-20 Thread Pavel Sanda
Scott Kostyshak wrote:
> There have been some changes in the luatex engine that will be shipped
> with TeX Live 2016 that cause many of our tests to fail (500 something
> instead of 100 something on TL 2015). The root issue is discussed on the
> LuaTeX mailing list at [1].
> 
> There is a transitional package available, luatex85, that should make
> our current LuaTeX code work. A reasonable approach for now would be to
> use the package if it is available and to not use it if not, keeping the
> rest of our LuaTeX export code the same. This would make sense if we
> think that most users who use the newer LuaTeX also have the package
> installed.

> 
> A more robust solution would be to make the behavior dependent on the
> version of LuaTeX that the user has.
> 
> I'm not worried about this for 2.2.0 for the following reasons:

Agreed. We should note whatever we know about the problem into RELEASE-NOTES,
known issues section; it might help packagers to setup proper dependencies
against 2016 luatex.

Pavel


Re: We will have to change our output for newest LuaTeX

2016-05-20 Thread Guillaume Munch

Le 20/05/2016 19:26, Scott Kostyshak a écrit :

On Fri, May 20, 2016 at 04:06:22PM +, Guenter Milde wrote:

On 2016-05-20, Jean-Marc Lasgouttes wrote:

Le 20/05/2016 à 13:17, Guenter Milde a écrit :

On 2016-05-20, Scott Kostyshak wrote:



There have been some changes in the luatex engine that will be shipped
with TeX Live 2016 that cause many of our tests to fail (500 something
instead of 100 something on TL 2015). The root issue is discussed on the
LuaTeX mailing list at [1].



There is a transitional package available, luatex85, that should make
our current LuaTeX code work. A reasonable approach for now would be to
use the package if it is available and to not use it if not, keeping the
rest of our LuaTeX export code the same.



Sounds reasonable.



We could just add



\InputIfFileExists{luatex85.sty}{}{}



to the preamble when exporting to luatex.



I'd prefer
\IfFileExists{luatex85.sty}{\usepackage{luatex85}}{}
as was suggested on the list. \usepackage avoids double loading of the
same code.


Your right, thanks for correcting.


Should we do this only when we use code that we think needs it? Or
should we just add it to all of our LuaTeX exports?



For 2.2 this could be shipped as a module, to be deprecated and updated
into an empty module once LyX decides to adopt the new luatex syntax.




Re: We will have to change our output for newest LuaTeX

2016-05-20 Thread Scott Kostyshak
On Fri, May 20, 2016 at 04:06:22PM +, Guenter Milde wrote:
> On 2016-05-20, Jean-Marc Lasgouttes wrote:
> > Le 20/05/2016 à 13:17, Guenter Milde a écrit :
> >> On 2016-05-20, Scott Kostyshak wrote:
> 
> >>> There have been some changes in the luatex engine that will be shipped
> >>> with TeX Live 2016 that cause many of our tests to fail (500 something
> >>> instead of 100 something on TL 2015). The root issue is discussed on the
> >>> LuaTeX mailing list at [1].
> 
> >>> There is a transitional package available, luatex85, that should make
> >>> our current LuaTeX code work. A reasonable approach for now would be to
> >>> use the package if it is available and to not use it if not, keeping the
> >>> rest of our LuaTeX export code the same.
> 
> >> Sounds reasonable.
> 
> >> We could just add
> 
> >>\InputIfFileExists{luatex85.sty}{}{}
> 
> >> to the preamble when exporting to luatex.
> 
> > I'd prefer
> >\IfFileExists{luatex85.sty}{\usepackage{luatex85}}{}
> > as was suggested on the list. \usepackage avoids double loading of the 
> > same code.
> 
> Your right, thanks for correcting.

Should we do this only when we use code that we think needs it? Or
should we just add it to all of our LuaTeX exports?

Scott


signature.asc
Description: PGP signature


Re: We will have to change our output for newest LuaTeX

2016-05-20 Thread Guenter Milde
On 2016-05-20, Jean-Marc Lasgouttes wrote:
> Le 20/05/2016 à 13:17, Guenter Milde a écrit :
>> On 2016-05-20, Scott Kostyshak wrote:

>>> There have been some changes in the luatex engine that will be shipped
>>> with TeX Live 2016 that cause many of our tests to fail (500 something
>>> instead of 100 something on TL 2015). The root issue is discussed on the
>>> LuaTeX mailing list at [1].

>>> There is a transitional package available, luatex85, that should make
>>> our current LuaTeX code work. A reasonable approach for now would be to
>>> use the package if it is available and to not use it if not, keeping the
>>> rest of our LuaTeX export code the same.

>> Sounds reasonable.

>> We could just add

>>\InputIfFileExists{luatex85.sty}{}{}

>> to the preamble when exporting to luatex.

> I'd prefer
>\IfFileExists{luatex85.sty}{\usepackage{luatex85}}{}
> as was suggested on the list. \usepackage avoids double loading of the 
> same code.

Your right, thanks for correcting.

Günter



Re: We will have to change our output for newest LuaTeX

2016-05-20 Thread Jean-Marc Lasgouttes

Le 20/05/2016 à 13:17, Guenter Milde a écrit :

On 2016-05-20, Scott Kostyshak wrote:


There have been some changes in the luatex engine that will be shipped
with TeX Live 2016 that cause many of our tests to fail (500 something
instead of 100 something on TL 2015). The root issue is discussed on the
LuaTeX mailing list at [1].



There is a transitional package available, luatex85, that should make
our current LuaTeX code work. A reasonable approach for now would be to
use the package if it is available and to not use it if not, keeping the
rest of our LuaTeX export code the same.


Sounds reasonable.

We could just add

   \InputIfFileExists{luatex85.sty}{}{}

to the preamble when exporting to luatex.


I'd prefer
  \IfFileExists{luatex85.sty}{\usepackage{luatex85}}{}
as was suggested on the list. \usepackage avoids double loading of the 
same code.


JMarc




Re: We will have to change our output for newest LuaTeX

2016-05-20 Thread Guenter Milde
On 2016-05-20, Scott Kostyshak wrote:

> There have been some changes in the luatex engine that will be shipped
> with TeX Live 2016 that cause many of our tests to fail (500 something
> instead of 100 something on TL 2015). The root issue is discussed on the
> LuaTeX mailing list at [1].

> There is a transitional package available, luatex85, that should make
> our current LuaTeX code work. A reasonable approach for now would be to
> use the package if it is available and to not use it if not, keeping the
> rest of our LuaTeX export code the same. 

Sounds reasonable.

We could just add

   \InputIfFileExists{luatex85.sty}{}{}

to the preamble when exporting to luatex.
No need to check availability by LyX.
Advantage: tex-documents are portable.

> This would make sense if we think that most users who use the newer
> LuaTeX also have the package installed.

This seems a safe assumption.

> A more robust solution would be to make the behavior dependent on the
> version of LuaTeX that the user has.

However, this would make the tex-file nonportable.

Günter



We will have to change our output for newest LuaTeX

2016-05-20 Thread Scott Kostyshak
There have been some changes in the luatex engine that will be shipped
with TeX Live 2016 that cause many of our tests to fail (500 something
instead of 100 something on TL 2015). The root issue is discussed on the
LuaTeX mailing list at [1].

There is a transitional package available, luatex85, that should make
our current LuaTeX code work. A reasonable approach for now would be to
use the package if it is available and to not use it if not, keeping the
rest of our LuaTeX export code the same. This would make sense if we
think that most users who use the newer LuaTeX also have the package
installed.

A more robust solution would be to make the behavior dependent on the
version of LuaTeX that the user has.

I'm not worried about this for 2.2.0 for the following reasons:

- TL 2016 is not here yet
- Even when it is released, it takes a while for normal users to switch over
- Users relying on LuaTeX are more advanced and more likely to be able
  to deal with the issue or ask for help
- There is an easy workaround to suggest to users that do come across
  the issue (just load the transitional package in the preamble)
- LuaTeX is still marked as beta

Scott

[1]
https://www.mail-archive.com/search?l=mid=45FEDA7E-550E-4B19-AA7B-0976CCDE7DBA%40wspr.io


signature.asc
Description: PGP signature