diff --git a/autotests/export/lyx2lyx/lyx_2_2_test.lyx b/autotests/export/lyx2lyx/lyx_2_2_test.lyx index 4e8e0d537c..9a652f1b8a 100644 --- a/autotests/export/lyx2lyx/lyx_2_2_test.lyx +++ b/autotests/export/lyx2lyx/lyx_2_2_test.lyx @@ -25,7 +25,7 @@ logicalmkup \font_sf_scale 100 100 \font_tt_scale 100 100 \use_microtype false -\use_dash_ligatures true +\use_dash_ligatures false \graphics default \default_output_format default \output_sync 0 @@ -94,11 +94,15 @@ Test reversion/conversion between 2.2 and 2.1 formats with lyx2lyx \end_layout \begin_layout Description +BoxFeatures, +\begin_inset space ~ +\end_inset + colorbox: The word \begin_inset Newline newline \end_inset -shadowsize at start of a line did trigger insertion of box options. +shadowsize at start of a line must not trigger insertion of box options. \end_layout @@ -123,7 +127,7 @@ backgroundcolor "orange" status open \begin_layout Plain Layout -simple green frame around orange box +framecolor "green" around orange box \end_layout \end_inset @@ -173,24 +177,41 @@ thickness "0.4pt" separation "3pt" shadowsize "4pt" framecolor "black" -backgroundcolor "none" +backgroundcolor "cyan" status open \begin_layout Plain Layout -no frame around cyan box +framecolor "black" around cyan box +\begin_inset Note Note +status open + +\begin_layout Plain Layout +nested inset +\end_layout + +\end_inset + + \end_layout \end_inset +\end_layout + +\begin_layout Standard +Fancy boxes have the colour chooser greyed out: +\end_layout + +\begin_layout Standard \begin_inset Box ovalbox -position "t" +position "b" hor_pos "c" has_inner_box 1 inner_pos "t" use_parbox 0 use_makebox 0 -width "40col%" +width "20col%" special "none" height "1in" height_special "totalheight" @@ -202,16 +223,12 @@ backgroundcolor "none" status open \begin_layout Plain Layout -no frame around cyan box +framecolor at bol must not trigger replacement \end_layout \end_inset -\begin_inset Newline newline -\end_inset - - \begin_inset Box Shadowbox position "t" hor_pos "c" @@ -219,7 +236,7 @@ has_inner_box 1 inner_pos "t" use_parbox 0 use_makebox 0 -width "40col%" +width "30col%" special "none" height "1in" height_special "totalheight" @@ -231,7 +248,7 @@ backgroundcolor "none" status open \begin_layout Plain Layout -no frame around cyan box +shadowsize at bol must not trigger insertion of box options \end_layout \end_inset @@ -244,7 +261,7 @@ has_inner_box 1 inner_pos "t" use_parbox 0 use_makebox 0 -width "40col%" +width "12col%" special "none" height "1in" height_special "totalheight" @@ -256,36 +273,7 @@ backgroundcolor "none" status open \begin_layout Plain Layout -no frame around cyan box -\end_layout - -\end_inset - - -\begin_inset Newline newline -\end_inset - - -\begin_inset Box Shaded -position "t" -hor_pos "c" -has_inner_box 1 -inner_pos "t" -use_parbox 0 -use_makebox 0 -width "40col%" -special "none" -height "1in" -height_special "totalheight" -thickness "0.4pt" -separation "3pt" -shadowsize "4pt" -framecolor "black" -backgroundcolor "none" -status open - -\begin_layout Plain Layout -no frame around cyan box +oval, thick \end_layout \end_inset @@ -298,7 +286,36 @@ has_inner_box 1 inner_pos "t" use_parbox 0 use_makebox 0 -width "40col%" +width "30col%" +special "none" +height "1in" +height_special "totalheight" +thickness "0.4pt" +separation "3pt" +shadowsize "4pt" +framecolor "black" +backgroundcolor "none" +status open + +\begin_layout LyX-Code +double frame +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +The background of +\begin_inset Box Shaded +position "t" +hor_pos "c" +has_inner_box 1 +inner_pos "t" +use_parbox 0 +use_makebox 0 +width "30col%" special "none" height "1in" height_special "totalheight" @@ -310,20 +327,16 @@ backgroundcolor "none" status open \begin_layout Plain Layout -no frame around cyan box +shaded boxes \end_layout \end_inset - + is set in Document>Settings>Colors \end_layout \begin_layout Standard -The conversion must not change LyX code examples, e. -\begin_inset space \thinspace{} -\end_inset - -g., for fancy frames: +The problem was detected in a LyX-Code example for fancy frames: \end_layout \begin_layout LyX-Code @@ -352,8 +365,15 @@ shadowsize}{1pt}]{shadow} \end_deeper \begin_layout Description -Hyphens vs. - dashes in different context +Hyphens +\begin_inset space ~ +\end_inset + +vs. +\begin_inset space ~ +\end_inset + +dashes in different context \end_layout \begin_deeper @@ -440,6 +460,7 @@ LyX-Code hyphens -- ---; en–dash, em—dash; \end_layout +\end_deeper \end_deeper \begin_layout Subsubsection ligature breaks inserted by lyx2lyx @@ -458,11 +479,7 @@ Rows of hyphens on subsequent lines -- ---; en–dash, em—dash and more hyphen \end_layout \begin_layout Standard - -\bar under -H -\bar default -yphens with explicit ligature breaks -\SpecialChar ligaturebreak +Hyphens with explicit ligature breaks -\SpecialChar ligaturebreak - -\SpecialChar ligaturebreak -\SpecialChar ligaturebreak -; en–dash, em—dash. @@ -516,7 +533,7 @@ literal "false" \end_inset -\begin_inset Formula $\ @{-->>}[r]$ +\begin_inset Formula $math--formula>>$ \end_inset @@ -550,6 +567,5 @@ set_width "auto" \end_layout -\end_deeper \end_body \end_document diff --git a/autotests/export/lyx2lyx/lyx_2_3_test.lyx b/autotests/export/lyx2lyx/lyx_2_3_test.lyx index dbed95330e..46d28cfbb9 100644 --- a/autotests/export/lyx2lyx/lyx_2_3_test.lyx +++ b/autotests/export/lyx2lyx/lyx_2_3_test.lyx @@ -14,9 +14,9 @@ logicalmkup \language_package default \inputencoding auto \fontencoding global -\font_roman "lmodern" "default" -\font_sans "default" "default" -\font_typewriter "default" "default" +\font_roman "NotoSerif-TLF" "default" +\font_sans "NotoSans-TLF" "default" +\font_typewriter "NotoMono-TLF" "default" \font_math "auto" "auto" \font_default_family default \use_non_tex_fonts false @@ -73,8 +73,9 @@ logicalmkup \tocdepth 2 \paragraph_separation skip \defskip medskip -\is_math_indent 0 -\math_numbering_side default +\is_math_indent 1 +\math_indentation 3em +\math_numbering_side right \quotes_style english \dynamic_quotes 0 \papercolumns 1 @@ -93,84 +94,12 @@ logicalmkup Test reversion/conversion between 2.3 and 2.2 formats with lyx2lyx. \end_layout -\begin_layout Description -allowbreak: -\bar under - -\begin_inset Box Boxed -position "t" -hor_pos "c" -has_inner_box 1 -inner_pos "t" -use_parbox 0 -use_makebox 0 -width "11em" -special "none" -height "1in" -height_special "totalheight" -thickness "0.4pt" -separation "3pt" -shadowsize "4pt" -framecolor "black" -backgroundcolor "none" -status open - -\begin_layout Plain Layout - -\emph on -simple -\end_layout - -\begin_layout Plain Layout -The em-dash is used—mainly in American english—without spaces. -\end_layout - -\end_inset - - -\bar default - -\bar under - -\begin_inset Box Boxed -position "t" -hor_pos "c" -has_inner_box 1 -inner_pos "t" -use_parbox 0 -use_makebox 0 -width "11em" -special "none" -height "1in" -height_special "totalheight" -thickness "0.4pt" -separation "3pt" -shadowsize "4pt" -framecolor "black" -backgroundcolor "none" -status open - -\begin_layout Plain Layout - -\emph on -with optional line break -\emph default -: -\end_layout - -\begin_layout Plain Layout -The em-dash is used—\SpecialChar allowbreak -mainly in American english—\SpecialChar allowbreak -without spaces. -\end_layout - -\end_inset - - +\begin_layout Standard +Part 1: Fonts: NoTo \end_layout \begin_layout Description -baselineskip%: +baselineskip%: Box and rule with dimensions set to baselineskip% \begin_inset Box Boxed position "t" hor_pos "c" @@ -233,5 +162,136 @@ horizontal space insets using baselineskip. \end_layout \end_deeper +\begin_layout Description +rotated +\begin_inset space ~ +\end_inset + +floats: (sideways environment) +\end_layout + +\begin_deeper +\begin_layout Standard +sideways true at the beginning of a line must not confuse conversion +\end_layout + +\begin_layout Standard +\begin_inset Float figure +placement !ph +wide false +sideways true +status open + +\begin_layout Plain Layout +\noindent +\align center +[figure 1 stub] +\end_layout + +\begin_layout Plain Layout +\begin_inset Caption Standard + +\begin_layout Plain Layout +rotated float 1 +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\end_deeper +\begin_layout Description +rotated +\begin_inset space ~ +\end_inset + +float insets can be defined in a list: +\begin_inset Float figure +placement !ph +wide false +sideways true +status open + +\begin_layout Plain Layout +\noindent +\align center +[figure 2 stub] +\end_layout + +\begin_layout Plain Layout +\begin_inset Caption Standard + +\begin_layout Plain Layout +rotated float 2 +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Description +new +\begin_inset space ~ +\end_inset + +Babel +\begin_inset space ~ +\end_inset + +languages: text parts in +\lang bosnian +Bosnian +\lang english +, +\lang friulan +Friulian +\lang english +, +\lang macedonian +Macedonian +\lang english +, +\lang piedmontese +Piedmontese +\lang english +, +\lang romansh +Romansh +\lang english +. +\end_layout + +\begin_layout Description +Indent +\begin_inset space ~ +\end_inset + +Formulas/formula +\begin_inset space ~ +\end_inset + +numbering: 3em/right +\begin_inset Formula +\begin{equation} +y=x^{2} +\end{equation} + +\end_inset + + +\end_layout + \end_body \end_document diff --git a/autotests/export/lyx2lyx/lyx_2_3_test2.lyx b/autotests/export/lyx2lyx/lyx_2_3_test2.lyx new file mode 100644 index 0000000000..1d19f2fb33 --- /dev/null +++ b/autotests/export/lyx2lyx/lyx_2_3_test2.lyx @@ -0,0 +1,299 @@ +#LyX 2.4 created this file. For more info see https://www.lyx.org/ +\lyxformat 544 +\begin_document +\begin_header +\save_transient_properties true +\origin unavailable +\textclass scrartcl +\use_default_options false +\begin_modules +logicalmkup +\end_modules +\maintain_unincluded_children false +\language bosnian +\language_package default +\inputencoding auto +\fontencoding global +\font_roman "cochineal" "DejaVu Serif" +\font_sans "lmss" "default" +\font_typewriter "lmtt" "default" +\font_math "auto" "auto" +\font_default_family default +\use_non_tex_fonts false +\font_sc false +\font_osf true +\font_sf_scale 100 100 +\font_tt_scale 100 100 +\use_microtype true +\use_dash_ligatures false +\graphics default +\default_output_format default +\output_sync 0 +\bibtex_command default +\index_command default +\paperfontsize 12 +\spacing single +\use_hyperref true +\pdf_bookmarks false +\pdf_bookmarksnumbered true +\pdf_bookmarksopen false +\pdf_bookmarksopenlevel 1 +\pdf_breaklinks false +\pdf_pdfborder false +\pdf_colorlinks true +\pdf_backref false +\pdf_pdfusetitle 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 0 +\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 +\branch branch1 +\selected 0 +\filename_suffix 0 +\color #faf0e6 +\end_branch +\branch branch2 +\selected 1 +\filename_suffix 0 +\color #faf0e6 +\end_branch +\index Index +\shortcut idx +\color #008000 +\end_index +\secnumdepth 3 +\tocdepth 2 +\paragraph_separation skip +\defskip medskip +\is_math_indent 0 +\math_numbering_side left +\quotes_style polish +\dynamic_quotes 0 +\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 Subsection* +Test reversion/conversion between 2.3 and 2.2 formats with lyx2lyx. +\end_layout + +\begin_layout Standard +Part 2: +\end_layout + +\begin_layout Itemize +Fonts: Crimson +\end_layout + +\begin_layout Itemize +microtype true +\end_layout + +\begin_layout Description +language +\begin_inset space ~ +\end_inset + +bosnian: +\begin_inset Float table +wide false +sideways false +status open + +\begin_layout Plain Layout +\begin_inset Caption Standard + +\begin_layout Plain Layout +table caption with bosnian prefix +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Description +allowbreak: +\bar under + +\begin_inset Box Boxed +position "t" +hor_pos "c" +has_inner_box 1 +inner_pos "t" +use_parbox 0 +use_makebox 0 +width "11em" +special "none" +height "1in" +height_special "totalheight" +thickness "0.4pt" +separation "3pt" +shadowsize "4pt" +framecolor "black" +backgroundcolor "none" +status open + +\begin_layout Plain Layout + +\emph on +literal dashes +\end_layout + +\begin_layout Plain Layout + +\lang english +The em-dash is used—mainly in American english—without spaces. +\end_layout + +\end_inset + + +\bar default + +\bar under + +\begin_inset Box Boxed +position "t" +hor_pos "c" +has_inner_box 1 +inner_pos "t" +use_parbox 0 +use_makebox 0 +width "11em" +special "none" +height "1in" +height_special "totalheight" +thickness "0.4pt" +separation "3pt" +shadowsize "4pt" +framecolor "black" +backgroundcolor "none" +status open + +\begin_layout Plain Layout ++ +\emph on +optional line break +\emph default +: +\end_layout + +\begin_layout Plain Layout + +\lang english +The em-dash is used—\SpecialChar allowbreak +mainly in American english—\SpecialChar allowbreak +without spaces. +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Description +inverted +\begin_inset space ~ +\end_inset + +branches: branch1 is off, branch 2 is active +\begin_inset Branch branch1 +inverted 0 +status open + +\begin_layout Standard +normal branch1 +\end_layout + +\end_inset + + +\begin_inset Branch branch1 +inverted 1 +status open + +\begin_layout Standard +inverted branch1 +\end_layout + +\end_inset + + +\begin_inset Branch branch2 +inverted 0 +status open + +\begin_layout Standard +normal branch2 +\end_layout + +\end_inset + + +\begin_inset Branch branch2 +inverted 1 +status open + +\begin_layout Standard +inverted branch2 +\end_layout + +\end_inset + +. +\end_layout + +\begin_layout Description +Indent +\begin_inset space ~ +\end_inset + +Formulas/formula +\begin_inset space ~ +\end_inset + +numbering: false/left +\begin_inset Formula +\begin{equation} +y=x^{2} +\end{equation} + +\end_inset + + +\end_layout + +\end_body +\end_document diff --git a/development/autotests/invertedTests b/development/autotests/invertedTests index 3105523792..6d925d104c 100644 --- a/development/autotests/invertedTests +++ b/development/autotests/invertedTests @@ -94,7 +94,6 @@ export/export/latex/unicodesymbols/.*_jis-platex_pdf2 export/export/latex/unicodesymbols/.*_shift-jis-platex_pdf2 export/export/latex/unicodesymbols/.*_utf8-platex_pdf2 - # Arabic # If we want to try to get it to work with pdfTeX: # - set all non-Arab text parts to a different language (e.g. English) @@ -120,6 +119,9 @@ export/templates/RJournal_(dvi3|pdf[45])_systemF export/templates/aa_(dvi3|pdf[45])_.* export/templates/kluwer_.*_systemF +# lyx2lyx tests: +# back-conversion fails for rotated float inset in a list +export/export/lyx2lyx/lyx_2_3_test_lyx.* # ================================================ Sublabel: lyxbugs