From: Günter Milde Date: Wed, 27 Mar 2019 14:57:38 +0000 (+0100) Subject: Test for #11532 "inputencoding desynchronisation". X-Git-Tag: lyx-2.4.0dev-acb2ca7b~2314 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;ds=inline;h=48b92cf63c2e2c494c0ea4266bb6b8f5b2f0cd12;p=lyx.git Test for #11532 "inputencoding desynchronisation". --- diff --git a/autotests/export/latex/misplaced-inputenc-switch.lyx b/autotests/export/latex/misplaced-inputenc-switch.lyx new file mode 100644 index 0000000000..52d7ba8415 --- /dev/null +++ b/autotests/export/latex/misplaced-inputenc-switch.lyx @@ -0,0 +1,211 @@ +#LyX 2.4 created this file. For more info see https://www.lyx.org/ +\lyxformat 569 +\begin_document +\begin_header +\save_transient_properties true +\origin unavailable +\textclass article +\use_default_options false +\maintain_unincluded_children false +\language english +\language_package default +\inputencoding auto +\fontencoding auto +\font_roman "lmodern" "DejaVu Serif" +\font_sans "default" "DejaVu Sans" +\font_typewriter "default" "DejaVu Sans Mono" +\font_math "auto" "auto" +\font_default_family default +\use_non_tex_fonts false +\font_sc false +\font_osf false +\font_sf_scale 100 100 +\font_tt_scale 100 100 +\use_microtype false +\use_dash_ligatures true +\graphics default +\default_output_format pdf2 +\output_sync 0 +\bibtex_command default +\index_command default +\float_placement class +\float_alignment class +\paperfontsize default +\spacing single +\use_hyperref false +\pdf_bookmarks false +\pdf_bookmarksnumbered false +\pdf_bookmarksopen false +\pdf_bookmarksopenlevel 1 +\pdf_breaklinks false +\pdf_pdfborder true +\pdf_colorlinks true +\pdf_backref section +\pdf_pdfusetitle true +\papersize a4paper +\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 0 +\use_minted 0 +\index Stichwortverzeichnis +\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 english +\dynamic_quotes 0 +\papercolumns 1 +\papersides 1 +\paperpagestyle default +\tablestyle default +\tracking_changes false +\output_changes false +\html_math_output 0 +\html_css_as_file 0 +\html_be_strict false +\end_header + +\begin_body + +\begin_layout Standard +LyX-Bug: Sometimes, an inputencoding switch is limited to a group by LaTeX + but LyX does not take this into account and subsequent non-ASCII characters + fail. +\end_layout + +\begin_layout Subsection* +Example +\end_layout + +\begin_layout Standard +Paragraph in Cyrillic followed by +\emph on +Description +\emph default + list: +\end_layout + +\begin_layout Standard + +\emph on +\lang bulgarian +Бъ̀лгарският езѝк +\emph default + е индоевропейски език от групата на южнославянските езици. +\end_layout + +\begin_layout Description +term +\begin_inset space ~ +\end_inset + +with +\begin_inset space ~ +\end_inset + +inputenc +\begin_inset space ~ +\end_inset + +latin9 Definition: LyX assumes input encoding latin9, but for LaTeX it is + again cp1251! +\end_layout + +\begin_deeper +\begin_layout Standard +Da kommt größter Mist raus! cp1251 misses ð and Þ +\end_layout + +\begin_layout Standard +If a new language in a nested paragraph uses the same inputencoding as the + current language, there is still no switch: +\emph on +\lang icelandic +Íslenska +\emph default + er talað og ritað á Íslandi. +\end_layout + +\end_deeper +\begin_layout Standard +After the list, the inputencoding is set accordingly: +\end_layout + +\begin_layout Standard +latin9 supports ð and Þ. +\end_layout + +\begin_layout Subsection* +Example 2 +\end_layout + +\begin_layout Standard +Paragraph in Cyrillic followed by +\emph on +Labeling +\emph default + list: +\end_layout + +\begin_layout Standard + +\emph on +\lang bulgarian +Бъ̀лгарският езѝк +\emph default + е индоевропейски език. +\end_layout + +\begin_layout Labeling +\labelwidthstring 00.00.0000 +term LyX assumes inputencoding latin9, but for LaTeX it is again cp1251! +\end_layout + +\begin_deeper +\begin_layout Standard +Da kommt größter Mist raus! cp1251 misses ð and Þ +\end_layout + +\begin_layout Standard +If a new language in a nested paragraph uses the same inputencoding as the + current language, there is still no switch: +\emph on +\lang icelandic +Íslenska +\emph default + er talað og ritað á Íslandi. +\end_layout + +\end_deeper +\begin_layout Standard +After the list, the inputencoding is set accordingly: +\end_layout + +\begin_layout Standard +latin9 supports ð and Þ. +\end_layout + +\end_body +\end_document diff --git a/development/autotests/invertedTests b/development/autotests/invertedTests index 4ae843e7ee..1cd8ab7a65 100644 --- a/development/autotests/invertedTests +++ b/development/autotests/invertedTests @@ -178,7 +178,8 @@ export/doc/ar/UserGuide_lyx(22|23) # Günter Milde: works in TeXLive17 (Debian/stretch) # export/doc/ar/Intro_pdf4_systemF - +#11532 inputencoding desynchronisation +export/export/latex/misplaced-inputenc-switch_pdf2 # ==============================================================