From c1357cbd01e6abbd7b3dcfe5e97f78d738843776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Milde?= Date: Thu, 5 Mar 2020 00:19:11 +0100 Subject: [PATCH] ctest autotest for #11773 language nesting with lyx2lyx. * invert failing lyx2lyx tests for ko/Welcome * add dedicated test sample * set language for English text part in ko/Welcome. Also * fix a lyx2lyx language test sample * fix clause in unreliableTests --- ...language-reversion-nesting-polyglossia.lyx | 138 ++++++++++++++++++ .../export/lyx2lyx/revert-languages-babel.lyx | 15 +- development/autotests/invertedTests | 3 + development/autotests/unreliableTests | 2 +- lib/examples/ko/Welcome.lyx | 14 +- 5 files changed, 164 insertions(+), 8 deletions(-) create mode 100644 autotests/export/lyx2lyx/11773-language-reversion-nesting-polyglossia.lyx diff --git a/autotests/export/lyx2lyx/11773-language-reversion-nesting-polyglossia.lyx b/autotests/export/lyx2lyx/11773-language-reversion-nesting-polyglossia.lyx new file mode 100644 index 0000000000..b5420f2c27 --- /dev/null +++ b/autotests/export/lyx2lyx/11773-language-reversion-nesting-polyglossia.lyx @@ -0,0 +1,138 @@ +#LyX 2.4 created this file. For more info see https://www.lyx.org/ +\lyxformat 592 +\begin_document +\begin_header +\save_transient_properties true +\origin unavailable +\textclass article +\begin_preamble +\@ifpackageloaded{fontspec} + {\newfontfamily\churchslavonicfont{FreeSans}} + {} + +\end_preamble +\use_default_options true +\maintain_unincluded_children false +\language churchslavonic +\language_package default +\inputencoding utf8 +\fontencoding auto +\font_roman "lmodern" "default" +\font_sans "default" "default" +\font_typewriter "default" "default" +\font_math "auto" "auto" +\font_default_family default +\use_non_tex_fonts true +\font_sc false +\font_roman_osf false +\font_sans_osf false +\font_typewriter_osf false +\font_sf_scale 100 100 +\font_tt_scale 100 100 +\use_microtype false +\use_dash_ligatures true +\graphics default +\default_output_format default +\output_sync 0 +\bibtex_command default +\index_command default +\float_placement class +\float_alignment class +\paperfontsize default +\spacing single +\use_hyperref false +\papersize default +\use_geometry false +\use_package amsmath 1 +\use_package amssymb 1 +\use_package cancel 1 +\use_package esint 1 +\use_package mathdots 1 +\use_package mathtools 1 +\use_package mhchem 1 +\use_package stackrel 1 +\use_package stmaryrd 1 +\use_package undertilde 1 +\cite_engine basic +\cite_engine_type default +\biblio_style plain +\use_bibtopic false +\use_indices false +\paperorientation portrait +\suppress_date false +\justification true +\use_refstyle 1 +\use_minted 0 +\use_lineno 0 +\lineno_options \index Index +\index Index +\shortcut idx +\color #008000 +\end_index +\secnumdepth 3 +\tocdepth 3 +\paragraph_separation indent +\paragraph_indentation default +\is_math_indent 0 +\math_numbering_side default +\quotes_style swiss +\dynamic_quotes 0 +\papercolumns 1 +\papersides 1 +\paperpagestyle default +\tablestyle default +\tracking_changes false +\output_changes false +\change_bars false +\postpone_fragile_content false +\html_math_output 0 +\html_css_as_file 0 +\html_be_strict false +\end_header + +\begin_body + +\begin_layout Standard + +\lang english +Church Slavonicy Document mixing English and Church Slavonicy text. +\end_layout + +\begin_layout Standard +This is a Church Slavonicy paragraph. +\end_layout + +\begin_layout Standard + +\lang english +English paragraph with one +\lang churchslavonic +Church Slavonicy +\lang english + word. +\end_layout + +\begin_layout Standard + +\emph on +\lang english +English +\emph default + paragraph starting with emphasis. +\end_layout + +\begin_layout Itemize +A list +\end_layout + +\begin_layout Itemize + +\emph on +\lang english +English +\emph default + list item starting with emphasis. +\end_layout + +\end_body +\end_document diff --git a/autotests/export/lyx2lyx/revert-languages-babel.lyx b/autotests/export/lyx2lyx/revert-languages-babel.lyx index 26999cba76..38a3db9f5a 100644 --- a/autotests/export/lyx2lyx/revert-languages-babel.lyx +++ b/autotests/export/lyx2lyx/revert-languages-babel.lyx @@ -1,5 +1,5 @@ #LyX 2.4 created this file. For more info see https://www.lyx.org/ -\lyxformat 575 +\lyxformat 592 \begin_document \begin_header \save_transient_properties true @@ -7,8 +7,11 @@ \textclass article \begin_preamble \@ifpackageloaded{fontspec}{% - \newfontfamily\friulanfont{FreeSans}}{% - \AtBeginDocument{\addto\extrasfrilulan{\sffamily}}} + \newfontfamily\friulanfont{FreeSans} +}{% + \AtBeginDocument{\addto\extrasfriulan{\sffamily}} + \AtBeginDocument{\addto\extrasenglish{\rmfamily}} +} \end_preamble \use_default_options true \maintain_unincluded_children false @@ -23,7 +26,9 @@ \font_default_family default \use_non_tex_fonts false \font_sc false -\font_osf false +\font_roman_osf false +\font_sans_osf false +\font_typewriter_osf false \font_sf_scale 100 100 \font_tt_scale 100 100 \use_microtype false @@ -80,6 +85,8 @@ \tablestyle default \tracking_changes false \output_changes false +\change_bars false +\postpone_fragile_content false \html_math_output 0 \html_css_as_file 0 \html_be_strict false diff --git a/development/autotests/invertedTests b/development/autotests/invertedTests index 5c54fdbffa..9987ed63ef 100644 --- a/development/autotests/invertedTests +++ b/development/autotests/invertedTests @@ -157,6 +157,9 @@ export/examples/ja/Modules/Linguistics.*systemF export/doc/ar/UserGuide_pdf4_systemF export/doc/ar/UserGuide_lyx(22|23) +#11773 lyx2lyx: language reversion nesting problems with polyglossia +export/export/lyx2lyx/11773-language-reversion-nesting-polyglossia_lyx2[23] +export/examples/ko/Welcome_lyx2[23] # ============================================================== Sublabel: ert diff --git a/development/autotests/unreliableTests b/development/autotests/unreliableTests index ec79d47fad..df494a5208 100644 --- a/development/autotests/unreliableTests +++ b/development/autotests/unreliableTests @@ -226,4 +226,4 @@ export/export/latex/CJK/el-zh_CN_utf8-cjk.* # Bug 3059: document language instead of "outer language" in table cells # This document fails with "fontencoding=auto-legacy" # and has wrong output (RTL in table cells) with all export formats. -export/export/latex/lyxbugs-resolved/3059.* +export/export/latex/lyxbugs/3059.* diff --git a/lib/examples/ko/Welcome.lyx b/lib/examples/ko/Welcome.lyx index a5c50d6cb5..b802004ef8 100644 --- a/lib/examples/ko/Welcome.lyx +++ b/lib/examples/ko/Welcome.lyx @@ -1,5 +1,5 @@ #LyX 2.4 created this file. For more info see https://www.lyx.org/ -\lyxformat 575 +\lyxformat 592 \begin_document \begin_header \save_transient_properties true @@ -25,7 +25,9 @@ \font_default_family default \use_non_tex_fonts true \font_sc false -\font_osf false +\font_roman_osf false +\font_sans_osf false +\font_typewriter_osf false \font_sf_scale 100 100 \font_tt_scale 100 100 \font_cjk mj @@ -82,6 +84,8 @@ \tablestyle default \tracking_changes false \output_changes false +\change_bars false +\postpone_fragile_content false \html_math_output 0 \html_css_as_file 0 \html_be_strict false @@ -214,7 +218,11 @@ https://www.lyx.org \SpecialChar LyX 에 대한 정보를 얻고, \SpecialChar LyX 메일링 리스트에 가입하고, \SpecialChar LyX - 그림으로 배우기(Graphical Tour): + 그림으로 배우기( +\lang english +Graphical Tour +\lang korean +): \begin_inset Flex URL status collapsed