update latex export tests, add test for bug #9871

This commit is contained in:
Günter Milde 2019-01-18 19:02:33 +01:00
parent b9833f180a
commit 12c301d1ca
3 changed files with 173 additions and 647 deletions

View File

@ -0,0 +1,139 @@
#LyX 2.4 created this file. For more info see https://www.lyx.org/
\lyxformat 566
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass scrartcl
\use_default_options false
\begin_modules
theorems-ams-bytype
\end_modules
\maintain_unincluded_children false
\language slovak
\language_package default
\inputencoding ascii
\fontencoding auto
\font_roman "default" "default"
\font_sans "default" "default"
\font_typewriter "default" "default"
\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 false
\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 german
\dynamic_quotes 0
\papercolumns 1
\papersides 1
\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
minimal test for bug #9871
\end_layout
\begin_layout Standard
The error pop-up blames
\backslash
listoflistings, but the Complete Log reveales that the problem is the
\end_layout
\begin_layout LyX-Code
! Undefined control sequence.
\end_layout
\begin_layout LyX-Code
\backslash
lstlistlistingname ->
\backslash
inputencoding
\end_layout
\begin_layout Standard
which is inserted by LyX in the document preamble if a
\begin_inset Quotes gld
\end_inset
list of listings
\begin_inset Quotes grd
\end_inset
is present:
\end_layout
\begin_layout Standard
\begin_inset CommandInset toc
LatexCommand lstlistoflistings
\end_inset
\end_layout
\end_body
\end_document

View File

@ -1,5 +1,5 @@
#LyX 2.3 created this file. For more info see http://www.lyx.org/
\lyxformat 512
#LyX 2.4 created this file. For more info see https://www.lyx.org/
\lyxformat 566
\begin_document
\begin_header
\save_transient_properties true
@ -14,23 +14,26 @@
\language english
\language_package default
\inputencoding auto
\fontencoding global
\fontencoding auto
\font_roman "lmodern" "default"
\font_sans "lmss" "default"
\font_typewriter "lmtt" "default"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\use_non_tex_fonts true
\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 pdf5
\output_sync 0
\bibtex_command default
\index_command default
\float_placement class
\float_alignment class
\paperfontsize 12
\spacing single
\use_hyperref false
@ -64,6 +67,7 @@
\suppress_date false
\justification true
\use_refstyle 0
\use_minted 0
\notefontcolor #0000ff
\index Index
\shortcut idx
@ -73,7 +77,10 @@
\tocdepth 3
\paragraph_separation skip
\defskip medskip
\quotes_language english
\is_math_indent 0
\math_numbering_side default
\quotes_style english
\dynamic_quotes 0
\papercolumns 1
\papersides 2
\paperpagestyle plain
@ -106,73 +113,6 @@ missing character
errors for the following reasons:
\end_layout
\begin_layout Quote
Fractions
\end_layout
\begin_deeper
\begin_layout Standard
For nested fractions the command
\series bold
\backslash
cfrac
\series default
can be used.
Here is an example:
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{align*}
\textrm{created with \textbf{\textbackslash frac}} & & \textrm{created with \textbf{\textbackslash cfrac}}\\
\frac{A}{B+\frac{C+\frac{E}{F}}{D}} & & \cfrac{A}{B+\cfrac{C+\cfrac{E}{F}}{D}}
\end{align*}
\end_inset
\end_layout
\end_deeper
\begin_layout Standard
In
\begin_inset Quotes eld
\end_inset
mathematical text
\begin_inset Quotes erd
\end_inset
and with tex2lyx, the
\backslash
textbackslash became 0x29f5 REVERSE SOLIDUS OPERATOR.
After adding
\begin_inset Quotes eld
\end_inset
deprecated
\begin_inset Quotes erd
\end_inset
in lib/unicodesymbols, this is fixed.
\end_layout
\begin_layout Standard
The converted characters should be replaced with
\begin_inset Quotes eld
\end_inset
\backslash
textbackslash
\begin_inset Quotes eld
\end_inset
.
\end_layout
\begin_layout Quote
Bold Formulas
\end_layout
@ -227,567 +167,6 @@ fixmath
).
\end_layout
\begin_layout Quote
Special Characters in Mathematical Text
\end_layout
\begin_deeper
\begin_layout Standard
The following commands can only be used in mathematical text or in \SpecialChar TeX
mode:
\end_layout
\begin_layout Standard
\begin_inset space \hfill{}
\end_inset
\begin_inset Tabular
<lyxtabular version="3" rows="8" columns="2">
<features booktabs="true" tabularvalignment="middle">
<column alignment="left" valignment="top" width="0pt">
<column alignment="block" valignment="top">
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Command
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Result
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\backslash
oe
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $\textrm{œ}$
\end_inset
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\backslash
OE
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $\textrm{Œ}$
\end_inset
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\backslash
ae
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $\textrm{æ}$
\end_inset
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\backslash
AE
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $\textrm{Æ}$
\end_inset
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\backslash
aa
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $\textrm{å}$
\end_inset
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\backslash
AA
\begin_inset Index idx
status collapsed
\begin_layout Plain Layout
\backslash
@
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
\backslash
textrm{
\backslash
AA}
\end_layout
\end_inset
\end_layout
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $\textrm{Å}$
\end_inset
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\backslash
i
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $\textrm{ı}$
\end_inset
\end_layout
\end_inset
</cell>
</row>
</lyxtabular>
\end_inset
\begin_inset space \hfill{}
\end_inset
\begin_inset Tabular
<lyxtabular version="3" rows="8" columns="2">
<features booktabs="true" tabularvalignment="middle">
<column alignment="left" valignment="top" width="0pt">
<column alignment="center" valignment="top">
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Command
\begin_inset Note Note
status collapsed
\begin_layout Plain Layout
The space of 0
\begin_inset space \thinspace{}
\end_inset
mm is used for separation, because otherwise the output will be ¡ and ¿
respectively.
\end_layout
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Result
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\backslash
o
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $\textrm{ø}$
\end_inset
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\backslash
O
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $\textrm{Ø}$
\end_inset
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\backslash
l
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $\textrm{ł}$
\end_inset
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\backslash
L
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $\textrm{Ł}$
\end_inset
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
!
\begin_inset space \hspace{}
\length 0mm
\end_inset
`
\begin_inset space \textvisiblespace{}
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $\textrm{!`}$
\end_inset
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
?
\begin_inset space \hspace{}
\length 0mm
\end_inset
`
\begin_inset space \textvisiblespace{}
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $\textrm{?`}$
\end_inset
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\backslash
j
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $\textrm{ȷ}$
\end_inset
\end_layout
\end_inset
</cell>
</row>
</lyxtabular>
\end_inset
\begin_inset space \hfill{}
\end_inset
\end_layout
\begin_layout Standard
The characters
\begin_inset Formula $\textrm{\textrm{Å}}$
\end_inset
and
\begin_inset Formula $\textrm{\textrm{Ø}}$
\end_inset
can also be inserted via the math toolbar button
\begin_inset Info
type "icon"
arg "math-insert \\digamma"
\end_inset
.
\end_layout
\end_deeper
\begin_layout Standard
The literal
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
\family default
\series default
\shape default
\size default
\emph default
\bar default
\strikeout default
\uuline default
\uwave default
\noun default
\color inherit
212B ANGSTROM SIGN is not present in many fonts.
The Unicode standard says
\emph on
preferred representation is 00C5.
\end_layout
\begin_layout Standard
The backconversion
\backslash
AA -> 212B is now deprecated in lib/unicodesymbols.
\end_layout
\begin_layout Standard
The converted characters should be replaced with
\begin_inset Quotes eld
\end_inset
\backslash
AA
\begin_inset Quotes eld
\end_inset
.
\end_layout
\begin_layout Quote
Accents in Text
\end_layout

View File

@ -84,13 +84,19 @@ export/export/latex/unicodesymbols/069-greek-extended_cp1256_pdf2
export/export/latex/unicodesymbols/070-72-general-punctuation-sub-super-currency_cp1256_pdf2
export/export/latex/unicodesymbols/074-76-letterlike-numberforms-arrows_cp1256_pdf2
# CJK:
# CJK
# with 8-bit encodings: missing "\usepackage[<encoding(s)>]{inputenc}"
# leads to # ! Undefined control sequence.
# \inputencoding
# {latin9}
# if there is a non-CJK language in the document.
export/export/latex/unicodesymbols/.*_euc-cn_pdf2
export/export/latex/unicodesymbols/.*_gbk_pdf2
export/export/latex/unicodesymbols/.*_jis_pdf2
export/export/latex/unicodesymbols/.*_euc-kr_pdf2
export/export/latex/unicodesymbols/.*_euc-tw_pdf2
export/export/latex/unicodesymbols/.*_euc-jp_pdf2
# pLaTeX
export/export/latex/unicodesymbols/.*_euc-jp-platex_pdf2
export/export/latex/unicodesymbols/.*_jis-platex_pdf2
@ -111,7 +117,6 @@ export/export/latex/arabic_simple_pdf4_texF
# See note about "Missing ␣" in file "ignoreLatexErrorsTests".
export/doc/ar/UserGuide_lyx(22|23)
# Polyglossia + LuaTeX does not support Farsi yet. See:
# https://github.com/reutenauer/polyglossia/commit/ccb0e9e2c6411170ad779b05ff5076f1193cc323
# Why does farsi fail with Babel?
@ -129,20 +134,15 @@ export/templates/kluwer_.*_systemF
# back-conversion fails for rotated float inset in a list
export/export/lyx2lyx/lyx_2_3_test_lyx(16|20|21|22)
# ================================================
Sublabel: lyxbugs
# LyX bugs with a Trac number.
# ================================================
#10355 xmllint detects failures
export/doc/attic/eu_UserGuide_xhtml
export/doc/(es|ja)/UserGuide_xhtml
export/examples/spreadsheet_xhtml
export/export/WrongDfnTagHandling_xhtml
#10371 Compilation error if longest label marker in labeling style
# contains underscores etc.
export/export/latex/LongestLabelWithUnderscore.*
#6463 font encoding changes and combining accents
# problem remains for Cyrillic in a non-Cyrillic-using language
export/export/latex/cyrillic-accent-ascii_pdf2
#9871 LyX sends invalid Unicode to iconv when converting to ASCII
# most probably due to BabelPreamble code (language specific headings for
@ -156,10 +156,17 @@ export/doc/es/Customization_pdf4_texF
# see also the discussion at:
# https://www.mail-archive.com/search?l=mid&q=20170228190738.cgs3tl3ny2bxiegk%40steph
export/examples/es/linguistics_pdf4_texF
export/latex/bug9871-slovak-ascii-preambleencoding
#6463 font encoding changes and combining accents
# problem remains for Cyrillic in a non-Cyrillic-using language
export/export/latex/cyrillic-accent-ascii_pdf2
#10355 xmllint detects failures
export/doc/attic/eu_UserGuide_xhtml
export/doc/(es|ja)/UserGuide_xhtml
export/examples/spreadsheet_xhtml
export/export/WrongDfnTagHandling_xhtml
#10371 Compilation error if longest label marker in labeling style
# contains underscores etc.
export/export/latex/LongestLabelWithUnderscore.*
#11454 luainputenc must be loaded after textcomp
export/export/latex/luainputenc-utf8_pdf5_texF
@ -171,6 +178,7 @@ export/export/latex/luainputenc-utf8_pdf5_systemF
#11455 "Unable to process argument!" with multiple 1.6.x roundtrips
export/templates/IEEEtran-Journal_lyx16
# ==============================================================
Sublabel: ert
# Export failures due to "raw" LaTeX use in ERT or preamble code