From 26ed48a5427dc1e323b9af650d4f14e0a2306157 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnter=20Milde?= Date: Sun, 24 Jan 2016 21:06:45 +0100 Subject: [PATCH] Invert and document test for "longest labeling label" problem. Fails for known reason. --- .../export/LongestLabelWithUnderscore.lyx | 70 ++++++++++++++++--- development/autotests/suspiciousTests | 8 +++ 2 files changed, 69 insertions(+), 9 deletions(-) diff --git a/autotests/export/LongestLabelWithUnderscore.lyx b/autotests/export/LongestLabelWithUnderscore.lyx index 749fcd7d59..68ee8969ef 100644 --- a/autotests/export/LongestLabelWithUnderscore.lyx +++ b/autotests/export/LongestLabelWithUnderscore.lyx @@ -6,7 +6,7 @@ \origin unavailable \textclass article \begin_preamble -\usepackage{pgfplots} + \end_preamble \use_default_options false \maintain_unincluded_children false @@ -14,9 +14,9 @@ \language_package default \inputencoding auto \fontencoding global -\font_roman "default" "TeX Gyre Termes" -\font_sans "default" "TeX Gyre Pagella" -\font_typewriter "default" "TeX Gyre Cursor" +\font_roman "default" "default" +\font_sans "default" "default" +\font_typewriter "default" "default" \font_math "auto" "auto" \font_default_family default \use_non_tex_fonts true @@ -51,7 +51,7 @@ \use_indices false \paperorientation portrait \suppress_date false -\justification true +\justification false \use_refstyle 0 \index Register \shortcut idx @@ -81,15 +81,67 @@ \begin_body \begin_layout Standard -Setting the longest label to a string containing underscore leads to uncompilabl -e document. - See Paragraph Settings...Longest label +The +\begin_inset Quotes eld +\end_inset + +longest label +\begin_inset Quotes erd +\end_inset + + marker in a labeling environment must be valid LaTeX (just like ERT). +\end_layout + +\begin_layout Standard +Setting the longest label to a string containing underscore (or another + special character like +\family typewriter + +\backslash +]$%#^ +\family default +...) may lead to an uncompilable document (while in valid constructs like +\family typewriter +$ +\backslash +sin^2 x_i$ +\family default + they are OK). + \end_layout \begin_layout Labeling \labelwidthstring Longest_Label_With_Underscore \noindent -Longest_Label_With_Underscore Long label with underscore +Label content. +\end_layout + +\begin_layout Labeling +\labelwidthstring Longest_Label_With_Underscore +\noindent +This labeling list has the longest label set to +\begin_inset Quotes eld +\end_inset + +Longest_Label_With_Underscore +\begin_inset Quotes erd +\end_inset + +. + (See Edit>Paragraph>Settings...Longest label) +\end_layout + +\begin_layout Labeling +\labelwidthstring Longest_Label_With_Underscore +It fails with +\begin_inset Quotes eld +\end_inset + +Missing $ inserted. +\begin_inset Quotes erd +\end_inset + + \end_layout \end_body diff --git a/development/autotests/suspiciousTests b/development/autotests/suspiciousTests index 7b611655b6..06e7287a10 100644 --- a/development/autotests/suspiciousTests +++ b/development/autotests/suspiciousTests @@ -84,6 +84,14 @@ 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.* + Sublabel: lyxbugs # -- 2.39.2