On Sun, Mar 01, 2020 at 09:43:52PM -0000, Guenter Milde wrote:
> On 2020-02-23, Scott Kostyshak wrote:
> > On Fri, Feb 21, 2020 at 11:26:08AM -0500, Scott Kostyshak wrote:
> >> The following tests are failing on master:
> 
> >>   export/examples/ko/Welcome_lyx22 (Failed)
> >>   export/examples/ko/Welcome_lyx23 (Failed)
> 
> >> To reproduce manually, export Welcome.lyx in mater to LyX 2.3.x format.
> >> Then open the created file either with master or 2.3.x and compile with
> >> the default format (XeLaTeX) and get the following error:
> 
> >>   ! Extra }, or forgotten \endgroup.
> 
> >> This happens because the ERT "\begin{English}" is inside the bold
> >> layout. Either we need to end it at the end of the bold layout, or we
> >> need to move the "\begin{English}" before the bold starts. That is, the
> >> current LaTeX code being produced is:
> 
> >>   \textbf{\begin{english}Note for Linux users:}
> 
> > Bisect gives the following:
> 
> >   0d49918c0c815ead4ab70128fd6677118bf08c1e is the first bad commit
> >   commit 0d49918c0c815ead4ab70128fd6677118bf08c1e
> >   Author: Günter Milde <mi...@lyx.org>
> >   Date:   Thu Jul 4 20:49:06 2019 +0200
> 
> >       Refactor lyx2lyx for speed and simplicity.
> 
> > Günter can you reproduce?
> 
> I can reproduce the problem but not the bisect result:
> 
> Converting an MWE with lyx2lyx from commit fc99ef2ab3e60b4 28.05.2019,
> I get the same nesting mixup and compilation error.
> 
> I rather assume the problem goes back to the inclusion of the
> revert_language() function or at least to commit
>   c70c0494 10.03.2019 Enhance revert_language function
> (which solved the case of English text parts in a document with no longer
> supported main language).
> 
> 
> 
> In the the revert_language() function in lyx2lyx_tools.py,
> I find a comment:
> 
>         # TODO: handle nesting issues with font attributes, e.g.
>         # \begin_layout Standard
>         #
>         # \emph on
>         # \lang macedonian
>         # Македонски јазик
>         # \emph default
>         #  — јужнословенски јазик, дел од групата на словенски јазици од 
> јазичното
>         #  семејство на индоевропски јазици.
>         #  Македонскиот е службен и национален јазик во Македонија.
>         # \end_layout
> 
> added 2019-06-03 in commit
> 8e06c2ffa9d  Fix some problems with lyx2lyx_tools.revert_languages().
> 
> with description
> 
>   Amends 7bb30286.
> 
>   Tested cases are now handled fine.
> 
>   (There are still many cases where the language support emulation
>   is too complex for lyx2lyx and manual fixes are required after
>   lyx2lyx conversion.)
> 
> 
> I still stand by these comments: backporting support for new languages is
> known to be incomplete. Improvements are welcome but
> 
> * we cannot and do not promise correct back-translating of documents using
>   new features
> 
> * IMV it is better an unsolved problem results in compilation error with
>   message than in siltent generation of wrong output.
> 
> I recommend filing an enhancement ticket and inverting the tests as "lyxbug".

When I use 0d49918c, compared to 0d49918c^, I get different lyx2lyx
output. The compilation succeeds with 0d49918c^ and fails with 0d49918c.
Attached is the diff. From what I understand from the commit message, it
is not expected that 0d49918c changed the lyx2lyx output.

Scott
16c16
< \setdefaultlanguage{korean}
---
> \setotherlanguage{korean}
20c20
< \language korean
---
> \language english
90a91,106
> \begin_layout Standard
> \begin_inset ERT
> status open
> 
> \begin_layout Plain Layout
> 
> 
> \backslash
> resetdefaultlanguage{korean}
> \end_layout
> 
> \end_inset
> 
> 
> \end_layout
> 
233c249,259
< \lang english
---
> \begin_inset ERT
> status collapsed
> 
> \begin_layout Plain Layout
> 
> 
> \backslash
> begin{english}
> \end_layout
> 
> \end_inset
286a313,323
> \begin_inset ERT
> status collapsed
> 
> \begin_layout Plain Layout
> 
> 
> \backslash
> end{english}
> \end_layout
> 
> \end_inset

Attachment: signature.asc
Description: PGP signature

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to