Re: Should LaTeX output from command line be equivalent to GUI?

2017-04-20 Thread Scott Kostyshak
On Wed, Mar 01, 2017 at 03:10:23PM -0500, Scott Kostyshak wrote:
> On Wed, Mar 01, 2017 at 07:05:36PM +0100, Jean-Marc Lasgouttes wrote:
> > Le 01/03/2017 à 18:42, Scott Kostyshak a écrit :
> > > > It gives me the following output:
> > > > 
> > > > 8548c8548
> > > > < \settowidth{\nomlabelwidth}{"@, "|, "!, ""}
> > > > ---
> > > > > \settowidth{\nomlabelwidth}{May�sculas}
> > > 
> > > Can anyone reproduce?
> > 
> > I did not try to, but the reason is obvious: this is InsetNomencl code,
> > where \nomlabelwidth is set to the width of the larger entry. This width
> > uses the width seen on screen if there is a GUI (which does not make sense!)
> > and the string length otherwise.
> > 
> > Looking at nomencl's documentation, I think that we should not set
> > \nomlabelwidth, but instead add a width option to InsetNomencl and pass it
> > to \printnomenclature (as optional argument).
> > 
> > The other simpler solution would be to remove this hack. The only problem is
> > that this will change the display of existing documents.
> 
> OK so if we do this it would be for master only, and we should put
> something in the release notes.

I created a trac ticket here:

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

I did not set the milestone but if you think we should fix it for 2.3.0
we should set it.

Scott


signature.asc
Description: PGP signature


Re: Should LaTeX output from command line be equivalent to GUI?

2017-03-01 Thread Scott Kostyshak
On Wed, Mar 01, 2017 at 07:04:05PM +0100, Kornel Benko wrote:

> > cd lib/doc/es
> > lyx -E luatex UserGuide_CL.tex UserGuide.lyx
> > lyx -x "command-sequence buffer-export luatex" UserGuide.lyx
> > # exit LyX.
> > diff UserGuide_CL.tex UserGuide.tex

Kornel, since it seems this did discover a potential issue, what do you
think about us making tests for this?

Because these do not seem as useful as the export tests and because they
require a GUI, perhaps the tests could be disabled by default and the
release manager could just run them before releases or something like
that. On the other hand, since it is just about exporting LaTeX (and not
compiling), perhaps the tests are cheap to run.

Scott


signature.asc
Description: PGP signature


Re: Should LaTeX output from command line be equivalent to GUI?

2017-03-01 Thread Scott Kostyshak
On Wed, Mar 01, 2017 at 07:05:36PM +0100, Jean-Marc Lasgouttes wrote:
> Le 01/03/2017 à 18:42, Scott Kostyshak a écrit :
> > > It gives me the following output:
> > > 
> > > 8548c8548
> > > < \settowidth{\nomlabelwidth}{"@, "|, "!, ""}
> > > ---
> > > > \settowidth{\nomlabelwidth}{May�sculas}
> > 
> > Can anyone reproduce?
> 
> I did not try to, but the reason is obvious: this is InsetNomencl code,
> where \nomlabelwidth is set to the width of the larger entry. This width
> uses the width seen on screen if there is a GUI (which does not make sense!)
> and the string length otherwise.
> 
> Looking at nomencl's documentation, I think that we should not set
> \nomlabelwidth, but instead add a width option to InsetNomencl and pass it
> to \printnomenclature (as optional argument).
> 
> The other simpler solution would be to remove this hack. The only problem is
> that this will change the display of existing documents.

OK so if we do this it would be for master only, and we should put
something in the release notes.

Thanks for figuring out the issue,

Scott


signature.asc
Description: PGP signature


Re: Should LaTeX output from command line be equivalent to GUI?

2017-03-01 Thread Kornel Benko
Am Mittwoch, 1. März 2017 um 12:42:14, schrieb Scott Kostyshak 

> On Tue, Feb 21, 2017 at 02:40:42AM -0500, Scott Kostyshak wrote:
> > On Tue, Feb 21, 2017 at 02:07:13AM -0500, Richard Heck wrote:
> > > On 02/20/2017 09:41 PM, Scott Kostyshak wrote:
> > > > Is it a bug if our LaTeX output is different when exporting from the
> > > > command line, versus exporting from the GUI? That is, are there some
> > > > cases where we expect them to be different, and if so, are these
> > > > documented?
> > > 
> > > This is definitely a bug, I'd say.
> > 
> > I get different output for the Spanish UserGuide.lyx.
> > 
> > # I can only reproduce with the Spanish version
> > cd lib/doc/es
> > mylyx master -E luatex UserGuide_CL.tex UserGuide.lyx
> > mylyx master -x "command-sequence buffer-export luatex" UserGuide.lyx
> > # exit LyX.
> > diff UserGuide_CL.tex UserGuide.tex
> 
> More portable ("mylyx master" -> "lyx") code to reproduce:
> 
> cd lib/doc/es
> lyx -E luatex UserGuide_CL.tex UserGuide.lyx
> lyx -x "command-sequence buffer-export luatex" UserGuide.lyx
> # exit LyX.
> diff UserGuide_CL.tex UserGuide.tex
> 
> 
> > It gives me the following output:
> > 
> > 8548c8548
> > < \settowidth{\nomlabelwidth}{"@, "|, "!, ""}
> > ---
> > > \settowidth{\nomlabelwidth}{May�sculas}
> 
> Can anyone reproduce?

Yes but the difference line is 8547c8547.

> Scott

Kornel

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


Re: Should LaTeX output from command line be equivalent to GUI?

2017-03-01 Thread Scott Kostyshak
On Tue, Feb 21, 2017 at 02:40:42AM -0500, Scott Kostyshak wrote:
> On Tue, Feb 21, 2017 at 02:07:13AM -0500, Richard Heck wrote:
> > On 02/20/2017 09:41 PM, Scott Kostyshak wrote:
> > > Is it a bug if our LaTeX output is different when exporting from the
> > > command line, versus exporting from the GUI? That is, are there some
> > > cases where we expect them to be different, and if so, are these
> > > documented?
> > 
> > This is definitely a bug, I'd say.
> 
> I get different output for the Spanish UserGuide.lyx.
> 
> # I can only reproduce with the Spanish version
> cd lib/doc/es
> mylyx master -E luatex UserGuide_CL.tex UserGuide.lyx
> mylyx master -x "command-sequence buffer-export luatex" UserGuide.lyx
> # exit LyX.
> diff UserGuide_CL.tex UserGuide.tex

More portable ("mylyx master" -> "lyx") code to reproduce:

cd lib/doc/es
lyx -E luatex UserGuide_CL.tex UserGuide.lyx
lyx -x "command-sequence buffer-export luatex" UserGuide.lyx
# exit LyX.
diff UserGuide_CL.tex UserGuide.tex


> It gives me the following output:
> 
> 8548c8548
> < \settowidth{\nomlabelwidth}{"@, "|, "!, ""}
> ---
> > \settowidth{\nomlabelwidth}{May�sculas}

Can anyone reproduce?

Scott


signature.asc
Description: PGP signature


Re: Should LaTeX output from command line be equivalent to GUI?

2017-02-20 Thread Scott Kostyshak
On Tue, Feb 21, 2017 at 02:07:13AM -0500, Richard Heck wrote:
> On 02/20/2017 09:41 PM, Scott Kostyshak wrote:
> > Is it a bug if our LaTeX output is different when exporting from the
> > command line, versus exporting from the GUI? That is, are there some
> > cases where we expect them to be different, and if so, are these
> > documented?
> 
> This is definitely a bug, I'd say.

I get different output for the Spanish UserGuide.lyx.

# I can only reproduce with the Spanish version
cd lib/doc/es
mylyx master -E luatex UserGuide_CL.tex UserGuide.lyx
mylyx master -x "command-sequence buffer-export luatex" UserGuide.lyx
# exit LyX.
diff UserGuide_CL.tex UserGuide.tex

It gives me the following output:

8548c8548
< \settowidth{\nomlabelwidth}{"@, "|, "!, ""}
---
> \settowidth{\nomlabelwidth}{May�sculas}

Thinking more generally, I wonder if it would be useful to automate this
to check all of our documents and formats (more tests?). Or
alternatively, is this a one-time bug that is very unlikely to surface
again?

Scott


signature.asc
Description: PGP signature


Re: Should LaTeX output from command line be equivalent to GUI?

2017-02-20 Thread Richard Heck
On 02/20/2017 09:41 PM, Scott Kostyshak wrote:
> Is it a bug if our LaTeX output is different when exporting from the
> command line, versus exporting from the GUI? That is, are there some
> cases where we expect them to be different, and if so, are these
> documented?

This is definitely a bug, I'd say.

Richard