commit 5fd56eb9ad410d5f67cd6bd8879285ec6b0a6207 Author: Günter Milde <mi...@lyx.org> Date: Tue Sep 6 21:42:06 2016 +0200
fr/UserGuide: remove spurious language switch in an index inset. This led to errors when compiling with polyglossia (and non-TeX fonts). A minimal (currently non-compiling) test sample is kept in autotests/export/ and inverted in suspiciousTests. --- autotests/export/languagenesting_index_inset.lyx | 185 ++++++++++++++++++++++ development/autotests/suspiciousTests | 20 +-- lib/doc/fr/UserGuide.lyx | 17 +- 3 files changed, 201 insertions(+), 21 deletions(-) diff --git a/autotests/export/languagenesting_index_inset.lyx b/autotests/export/languagenesting_index_inset.lyx new file mode 100644 index 0000000..0ed5961 --- /dev/null +++ b/autotests/export/languagenesting_index_inset.lyx @@ -0,0 +1,185 @@ +#LyX 2.3 created this file. For more info see http://www.lyx.org/ +\lyxformat 512 +\begin_document +\begin_header +\save_transient_properties true +\origin unavailable +\textclass scrbook +\use_default_options false +\begin_modules +customHeadersFooters +enumitem +logicalmkup +\end_modules +\maintain_unincluded_children false +\language french +\language_package default +\inputencoding auto +\fontencoding global +\font_roman "lmodern" "default" +\font_sans "lmss" "default" +\font_typewriter "lmtt" "default" +\font_math "auto" "auto" +\font_default_family default +\use_non_tex_fonts true +\font_sc false +\font_osf false +\font_sf_scale 100 100 +\font_tt_scale 100 100 +\use_microtype false +\graphics default +\default_output_format default +\output_sync 0 +\bibtex_command bibtex +\index_command default +\paperfontsize 12 +\spacing single +\use_hyperref false +\pdf_title "Guide de l'utilisateur de LyX" +\pdf_author "L'équipe LyX, Traduction: Adrien Rebollo, Siegfried Meunier-Guttin-Cluzel et Jean-Pierre Chrétien" +\pdf_subject "LyX" +\pdf_keywords "LyX" +\pdf_bookmarks true +\pdf_bookmarksnumbered true +\pdf_bookmarksopen false +\pdf_bookmarksopenlevel 1 +\pdf_breaklinks false +\pdf_pdfborder false +\pdf_colorlinks true +\pdf_backref false +\pdf_pdfusetitle false +\pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false" +\papersize default +\use_geometry false +\use_package amsmath 1 +\use_package amssymb 1 +\use_package cancel 0 +\use_package esint 1 +\use_package mathdots 1 +\use_package mathtools 0 +\use_package mhchem 1 +\use_package stackrel 0 +\use_package stmaryrd 0 +\use_package undertilde 0 +\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 +\notefontcolor #0000ff +\branch Question +\selected 1 +\filename_suffix 0 +\color #00ff00 +\end_branch +\branch Réponse +\selected 0 +\filename_suffix 0 +\color #aa55ff +\end_branch +\index Index +\shortcut idx +\color #008000 +\end_index +\secnumdepth 3 +\tocdepth 2 +\paragraph_separation skip +\defskip medskip +\quotes_language french +\papercolumns 1 +\papersides 2 +\paperpagestyle 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 +\paragraph_spacing single +Verbatim +\begin_inset Index idx +status open + +\begin_layout Plain Layout + +\lang english +Verbatim +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +If the index inset contains English text but the rest of the document is + french, compilation fails with +\end_layout + +\begin_layout LyX-Code +! LaTeX Error: +\backslash +begin{otherlanguage} on input line 10 ended by +\backslash +end{theindex}. +\end_layout + +\begin_layout Standard +with language package Polyglossia while no error is shown with Babel. +\end_layout + +\begin_layout Standard +(Should we prevent language switches in index insets?) +\end_layout + +\begin_layout Standard +If the index inset is in a section heading, the error is cryptic: +\end_layout + +\begin_layout LyX-Code +! Undefined control sequence. + +\backslash +in@ #1#2-> +\backslash +begingroup +\backslash +def +\backslash +in@@ ##1#1{} +\backslash +toks@ +\backslash +expandafter { +\backslash +in@@ #2{}{}#1... + l.42 }} +\end_layout + +\begin_layout Standard +\begin_inset CommandInset nomencl_print +LatexCommand printnomenclature +set_width "auto" + +\end_inset + + +\begin_inset CommandInset index_print +LatexCommand printindex +type "idx" + +\end_inset + + +\end_layout + +\end_body +\end_document diff --git a/development/autotests/suspiciousTests b/development/autotests/suspiciousTests index 8451c58..ae59ec0 100644 --- a/development/autotests/suspiciousTests +++ b/development/autotests/suspiciousTests @@ -21,10 +21,6 @@ Sublabel: todo # side-effects: Ukrainean instead of Russian date, different hyphenation. export/examples/uk/splash_(dvi3|pdf[45])_texF -# missing commands (polyglossia?) -# Explore! (works with language_package==babel) -export/doc/fr/UserGuide_.*_systemF - # Missing characters (U+0361, U+1E61) in LM, # set different system font in the source? # + language nesting problem (may disappear after completed translation) @@ -33,6 +29,10 @@ export/doc/(de/|fr/)Customization_.*_systemF # Probably language mess export/export/ja/wrong_auto_encoding_(dvi|pdf(|3)) +# language nesting in index insets +# fails with polyglossia, works with language_package==babel) +export/export/languagenesting_index_inset_.*_systemF + # Missing characters with Latin Modern Unicode: # 0000 NULL (where does this come from?) # 212B ANGSTROM SIGN (literal character in the source, replace with 00C5) @@ -76,14 +76,6 @@ export/examples/ko/splash_(dvi||pdf[23]?) export/mathmacros/testcases_speed_(lyx16|lyx21|dvi|pdf|pdf[23]|(dvi3|pdf[45])_(texF|systemF)) check_load/mathmacros/testcases_speed -# The "longest label" marker in a labeling must be valid LaTeX (just like ERT). -# What should we do: -# - document this, -# - escape special characters, -# - convert to LaTeXString, -# or just report this at Trac for now? -export/export/LongestLabelWithUnderscore_[^x].* - Sublabel: lyxbugs # @@ -113,6 +105,10 @@ export/doc/attic/eu_UserGuide_xhtml export/doc/(es|ja)/UserGuide_xhtml export/examples/spreadsheet_xhtml +# Compilation error if longest label marker in labeling style +# contains underscores etc. Ticket #10371 +export/export/LongestLabelWithUnderscore_[^x].* + Sublabel: ert # diff --git a/lib/doc/fr/UserGuide.lyx b/lib/doc/fr/UserGuide.lyx index 98db056..d036a2c 100644 --- a/lib/doc/fr/UserGuide.lyx +++ b/lib/doc/fr/UserGuide.lyx @@ -1,5 +1,5 @@ -#LyX 2.2 created this file. For more info see http://www.lyx.org/ -\lyxformat 508 +#LyX 2.3 created this file. For more info see http://www.lyx.org/ +\lyxformat 512 \begin_document \begin_header \save_transient_properties true @@ -81,6 +81,7 @@ logicalmkup \font_osf false \font_sf_scale 100 100 \font_tt_scale 100 100 +\use_microtype false \graphics default \default_output_format pdf2 \output_sync 0 @@ -8981,11 +8982,9 @@ Objets insérés \begin_layout Subsubsection Verbatim \begin_inset Index idx -status collapsed +status open \begin_layout Plain Layout - -\lang english Verbatim \end_layout @@ -9055,14 +9054,12 @@ Verbatim \end_layout \begin_layout Verbatim - This is Verbatim. \end_layout \begin_layout Verbatim \noindent \align block - The following 2 lines are empty: \end_layout @@ -9075,7 +9072,6 @@ The following 2 lines are empty: \end_layout \begin_layout Verbatim - Almost everything is allowed in Verbatim:"%&$§#~'` \backslash }][{| @@ -9108,7 +9104,6 @@ Verbatim \end_layout \begin_layout Verbatim* - This is Verbatim*. \end_layout @@ -31606,6 +31601,7 @@ Réponses \begin_layout Standard \begin_inset Branch Question +inverted 0 status open \begin_layout Standard @@ -31619,6 +31615,7 @@ Question: Qui a été le premier prix Nobel de physique ? \begin_layout Standard \begin_inset Branch Réponse +inverted 0 status collapsed \begin_layout Standard @@ -31792,6 +31789,7 @@ reponse}[1]{#1} \begin_layout Standard \begin_inset Branch Question +inverted 0 status open \begin_layout Standard @@ -31828,6 +31826,7 @@ reponse}[1]{} \begin_layout Standard \begin_inset Branch Réponse +inverted 0 status collapsed \begin_layout Standard