On 2018-01-18, Scott Kostyshak wrote:

> [-- Type: text/plain, Encoding: quoted-printable --]

> On Thu, Jan 18, 2018 at 06:44:40AM +0000, Kornel Benko wrote:

>> Hm, the error in export/doc/Math_lyx16 comes from the fact, that the 
>> re-export
>> of Math.16.lyx to Math.16.16.lyx. This 2 files _are_ different
>> OTOH
>>      #lyx -e pdf2 Math.16.lyx
>>      #lyx -e pdf2 Math.16.16.lyx
>>      #diffpdf Math.16.pdf Math.16.16.pdf
>>      ==> appears to be the same

> Günter, can you reproduce? I think this changed because of 9ce5d857. But
> it's possible I did not do the bisect correctly.

I can imagine that the problem is related to my latest patch but cannot tell
exactly, how.

I had a look at the UserGuide:

first with ctest "export/doc/UserGuide_lyx16" 

1638/6672 Testing: export/doc/UserGuide_lyx16
1638/6672 Test: export/doc/UserGuide_lyx16
Command: "/usr/bin/cmake" "-DLYX_ROOT=/usr/local/src/lyx/lib/doc" 
"-DLYX_TESTS_USERDIR=/usr/local/src/lyxtest/Testing/.lyx" 
"-Dlyx=/usr/local/src/lyxtest/bin/lyx2.4" 
"-DWORKDIR=/usr/local/src/lyxtest/autotests/out-home" 
"-DLYX_USERDIR_VER=LYX_USERDIR_24x" "-Dformat=lyx16x" "-Dextension=16.lyx" 
"-DLYX_FORMAT_NUM=16" "-Dfile=UserGuide" "-Dinverted=0" 
"-DTOP_SRC_DIR=/usr/local/src/lyx" "-DPERL_EXECUTABLE=/usr/bin/perl" "-P" 
"/usr/local/src/lyx/development/autotests/export.cmake"
Directory: /usr/local/src/lyxtest/autotests/out-home
"export/doc/UserGuide_lyx16" start time: Jan 18 12:00 CET
Output:
----------------------------------------------------------
-- IgnoreErrorMessage = ""
-- using fonttype = 
-- Not converting
-- MD5SUM of "/usr/local/src/lyx/lib/doc/UserGuide.lyx" is 
2ca01de60ccbd01e10b5cf61461bd279
-- Executing /usr/local/src/lyxtest/bin/lyx2.4 -userdir 
"/usr/local/src/lyxtest/Testing/.lyx" -E lyx16x UserGuide.16.lyx 
"/usr/local/src/lyx/lib/doc/UserGuide.lyx"
-- This implicitly checks load of /usr/local/src/lyx/lib/doc/UserGuide.lyx
-- Expected result file "UserGuide.16.lyx" exists
-- MD5SUM of "UserGuide.16.lyx" is 85d3da7bf3897ca73ad95d0bced0409f
-- Executing /usr/local/src/lyxtest/bin/lyx2.4 -userdir 
"/usr/local/src/lyxtest/Testing/.lyx" -E lyx16x UserGuide.16.16.lyx 
"UserGuide.16.lyx"
-- This implicitly checks load of UserGuide.16.lyx
-- Expected result file "UserGuide.16.16.lyx" exists
-- MD5SUM of "UserGuide.16.16.lyx" is 97f1a1cdf3c2875f8183e215a8ee98fd
-- Executing /usr/local/src/lyxtest/bin/lyx2.4 -userdir 
"/usr/local/src/lyxtest/Testing/.lyx" -E lyx16x UserGuide.16.16.16.lyx 
"UserGuide.16.16.lyx"
-- This implicitly checks load of UserGuide.16.16.lyx
-- Exporting UserGuide.lyx to lyx16x
CMake Error at /usr/local/src/lyx/development/autotests/export.cmake:205 
(message):
  Export failed


So yes, there is a difference between the lyx files
UserGuide.16.lyx and UserGuide.16.16.lyx.

How are these files generated? Does one of them need updating?


>> The question is: should we still care about exporting to such old versions?

We should, at the very least, try to understand the problem. Then we can make
a decision whether/how to solve it...


So I tried "manual" export:

a) export with LyX 2.4dev with the lyx2lyx/lyx_2_2.py patch
   --> UserGuide.16.lyx
   
b) export with LyX 2.4.dev to 2.2 format, then with LyX 2.2:
   --> UserGuide.22.16.lyx
   
Both documents load here in LyX 2.2 and 2.4dev without error or warning.

Both documents fail to compile with a bunch of errors like:

    ! Missing number, treated as zero.
    <to be read again> 
                       [
    l.2734 \rule[[0.5ex]]{1.0\linewidth}
                                        {1pt}
    A number should have been here; I inserted `0'.
    (If you can't figure out why I needed to see a number,
    look up `weird error' in the index to The TeXbook.)

    ! Illegal unit of measure (pt inserted).
    <to be read again> 
                       [
    ...

This comes from section "G.5.7 Horizontal Lines" (ERT for 
Insert->Formatting->Horizontal Line) and seems to be unrelated.
(Do we test compiling the re-imported document?)


The diff of the both exports shows expected changes:

@@ -13260,10 +13260,7 @@
 
 \end_inset
 
- instead of ligatures (-\SpecialChar \textcompwordmark{}
--, -\SpecialChar \textcompwordmark{}
--\SpecialChar \textcompwordmark{}
--) (see section
+ instead of ligatures (--, ---) (see section
 \begin_inset space ~
 \end_inset
 
That fixes the round-trip of -- and --- in text:

UserGuide.16.lyx:

  literal characters, if the literal character is not supported by the
  LaTeX input encoding. instead of ligatures (--, ---)
  
vs. UserGuide.22.16.lyx:

  literal characters, if the literal character is not supported by the
  LaTeX input encoding. instead of ligatures (–, —) 

There are, however also the following differences, which may be a
side-effect of the latest patch or some other change in 2.4:

--- /usr/local/src/lyx/lib/doc/UserGuide.16.lyx 2018-01-18 11:09:51.844553097 
+0100
+++ /usr/local/src/lyx/lib/doc/UserGuide.22.16.lyx      2018-01-18 
11:55:38.366586553 +0100
@@ -1,4 +1,4 @@
-#LyX 2.3 created this file. For more info see https://www.lyx.org/
+#LyX 2.2 created this file. For more info see http://www.lyx.org/
 \lyxformat 345
 \begin_document
 \begin_header

...

@@ -17696,12 +17685,7 @@
 \labelwidthstring <<Outer>> and <<inner>>:
 
 \family sans
-"
-
-Outer
-"
-
-
+"Outer"
 \begin_inset space ~
 \end_inset
 
@@ -17709,27 +17693,10 @@
 \begin_inset space ~
 \end_inset
 
-
-'
-
-inner
-'
-
-
+'inner'
 \family default
- Produces 
-"
-
-these outer
-"
-
- and 
-'
-
-these inner
-'
-
- quotation marks (so-called plain or non-typographical quotation marks)
+ Produces "these outer" and 'these inner' quotation marks (so-called plain
+ or non-typographical quotation marks)
 \end_layout
 
 \begin_layout Labeling
@@ -18070,7 +18037,7 @@
 
 \begin_layout Labeling
 \labelwidthstring <<Outer>> and <<inner>>:
-\begin_inset Formula $\langle\kern -2.5pt\langle$
+\begin_inset Formula $\langle\kern-2.5pt \langle$
 \end_inset
 
 
@@ -18078,7 +18045,7 @@
 Outer
 \family default
 
-\begin_inset Formula $\rangle\kern -2.5pt\rangle$
+\begin_inset Formula $\rangle\kern-2.5pt \rangle$
 \end_inset
 
 
@@ -18106,11 +18073,11 @@
 \end_inset
 
  Produces 
-\begin_inset Formula $\langle\kern -2.5pt\langle$
+\begin_inset Formula $\langle\kern-2.5pt \langle$
 \end_inset
 
 these outer
-\begin_inset Formula $\rangle\kern -2.5pt\rangle$
+\begin_inset Formula $\rangle\kern-2.5pt \rangle$
 \end_inset
 
 
However, there is no visible change in the PDF. 

Do you experience the same? 
Could this explain the test failure?


The strange thing is how can it be that a change to lyx2lyx/lyx_2_2.py
leads to differences in *.lyx.16.lyx but not in *.lyx.21.lyx?


Günter

Reply via email to