Revert some recent test changes

These should not have been done without discussion.

- Removal of the dcolumn table in 1a8b74f5e1. Even if LyX does not support
dcolumn anymore, it is still a useful test whether tex2lyx imports it
correctly.

- Removal of the first "%% LyX" line. A long time ago it was decided (after
long discussion between at least Jean-Marc, Uwe and me), that this line is
interpreted by tex2lyx, and used to remove some LyX-generated preamble code.
These lines in the current tests exist on purpose (one can see in the diff
how the removal added unwanted stuff). I do not really like the
interpretation of the "%% LyX" line, but if this behaviour is to be changed
then this needs discussion first.

- Changed comment of \date. The comment was put there on purpose, and the
warning which was "fixed" by the change hints at a limitation in LyX, not a
tex2lyx problem (LyX does not know that a comment inset between some title
insets is OK). The roundtrip .tex output was OK with the old version.

- Change of \verbatiminput{foo}. This was supposed to test whether a
verbatim inset is correctly created even if the included file does not
exist.

- Removal of \lyxlines. Although these tests test input of files created by
old LyX versions, they are useful.

- Change of the lemma in test-modules.tex. The old version was put there on
purpose, and the file itself explains why it is translated to ERT.
This commit is contained in:
Georg Baum 2015-06-01 21:09:43 +02:00
parent 5239a27bfc
commit e1d9ad9f28
6 changed files with 439 additions and 116 deletions

View File

@ -5,27 +5,6 @@
\origin roundtrip
\textclass article
\begin_preamble
%% Do not edit unless you really know what you are doing.
\usepackage{url}
% the following is useful when we have the old nomencl.sty package
\providecommand{\printnomenclature}{\printglossary}
\providecommand{\makenomenclature}{\makeglossary}
\makenomenclature
\usepackage{xargs}
\usepackage{listings}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
% Load refstyle before prettyref so that prettyref wins.
% The real refstyle tests are in test-refstyle-theorems.tex.
@ -124,10 +103,6 @@
Title
\end_layout
\begin_layout Date
two days ago
\end_layout
\begin_layout Standard
\begin_inset ERT
@ -142,6 +117,10 @@ status collapsed
\end_layout
\begin_layout Date
two days ago
\end_layout
\begin_layout Standard
\begin_inset CommandInset toc
@ -903,7 +882,7 @@ If you prefer verbatim input, you can choose between
\begin_inset CommandInset include
LatexCommand verbatiminput
preview false
filename "DummyDocument.tex"
filename "foo"
\end_inset
@ -916,7 +895,7 @@ filename "DummyDocument.tex"
\begin_inset CommandInset include
LatexCommand verbatiminput*
preview false
filename "DummyDocument.tex"
filename "foo"
\end_inset
@ -5001,6 +4980,340 @@ in % of pixel size
\end_inset
\end_layout
\begin_layout Standard
A table using dcolumn:
\end_layout
\begin_layout Standard
\begin_inset Float table
wide false
sideways false
status open
\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="4" columns="5">
<features rotate="0" tabularvalignment="middle" tabularwidth="0pt">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<column alignment="none" valignment="top" special="d">
<column alignment="none" valignment="top" special="d">
<column alignment="none" valignment="top" special="d">
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text
\begin_layout Standard
One
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text
\begin_layout Standard
Two
\end_layout
\end_inset
</cell>
<cell multicolumn="1" alignment="none" valignment="top" usebox="none" special="c">
\begin_inset Text
\begin_layout Standard
\family roman
Three
\family default
\end_layout
\end_inset
</cell>
<cell multicolumn="1" alignment="none" valignment="top" usebox="none" special="c">
\begin_inset Text
\begin_layout Standard
\family roman
Four
\family default
\end_layout
\end_inset
</cell>
<cell multicolumn="1" alignment="none" valignment="top" usebox="none" special="c">
\begin_inset Text
\begin_layout Standard
\family roman
Five
\family default
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" usebox="none">
\begin_inset Text
\begin_layout Standard
one
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" usebox="none">
\begin_inset Text
\begin_layout Standard
two
\end_layout
\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" usebox="none">
\begin_inset Text
\begin_layout Standard
\begin_inset Box Frameless
position "c"
hor_pos "c"
has_inner_box 1
inner_pos "c"
use_parbox 0
use_makebox 1
width ""
special "none"
height "1in"
height_special "totalheight"
thickness "0.4pt"
separation "3pt"
shadowsize "4pt"
framecolor "black"
backgroundcolor "none"
status open
\begin_layout Standard
three
\end_layout
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" usebox="none">
\begin_inset Text
\begin_layout Standard
\begin_inset Box Frameless
position "c"
hor_pos "c"
has_inner_box 1
inner_pos "c"
use_parbox 0
use_makebox 1
width ""
special "none"
height "1in"
height_special "totalheight"
thickness "0.4pt"
separation "3pt"
shadowsize "4pt"
framecolor "black"
backgroundcolor "none"
status open
\begin_layout Standard
four
\end_layout
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" usebox="none">
\begin_inset Text
\begin_layout Standard
\begin_inset Box Frameless
position "c"
hor_pos "c"
has_inner_box 1
inner_pos "c"
use_parbox 0
use_makebox 1
width ""
special "none"
height "1in"
height_special "totalheight"
thickness "0.4pt"
separation "3pt"
shadowsize "4pt"
framecolor "black"
backgroundcolor "none"
status open
\begin_layout Standard
five
\end_layout
\end_inset
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text
\begin_layout Standard
He
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text
\begin_layout Standard
2
\end_layout
\end_inset
</cell>
<cell alignment="none" valignment="top" usebox="none">
\begin_inset Text
\begin_layout Standard
2.77234
\end_layout
\end_inset
</cell>
<cell alignment="none" valignment="top" usebox="none">
\begin_inset Text
\begin_layout Standard
45672.
\end_layout
\end_inset
</cell>
<cell alignment="none" valignment="top" usebox="none">
\begin_inset Text
\begin_layout Standard
0.69
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text
\begin_layout Standard
C
\begin_inset Foot
status collapsed
\begin_layout Standard
Some tables require footnotes.
\end_layout
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text
\begin_layout Standard
C
\begin_inset Foot
status collapsed
\begin_layout Standard
Some tables need more than one footnote.
\end_layout
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="none" valignment="top" usebox="none">
\begin_inset Text
\begin_layout Standard
12537.64
\end_layout
\end_inset
</cell>
<cell alignment="none" valignment="top" usebox="none">
\begin_inset Text
\begin_layout Standard
37.66345
\end_layout
\end_inset
</cell>
<cell alignment="none" valignment="top" usebox="none">
\begin_inset Text
\begin_layout Standard
86.37
\end_layout
\end_inset
</cell>
</row>
</lyxtabular>
\end_inset
\end_layout
\end_inset
\end_layout
\begin_layout Standard
@ -5883,7 +6196,7 @@ Special formattings
\end_layout
\begin_layout Subsection
Rules
LyX line
\end_layout
\begin_layout Standard
@ -5894,6 +6207,13 @@ test
\size tiny
\end_layout
\begin_layout Standard
\noindent
\size tiny
\begin_inset CommandInset line
LatexCommand rule
offset "0.5ex"
@ -5921,6 +6241,24 @@ test
test
\end_layout
\begin_layout Standard
\noindent
\begin_inset CommandInset line
LatexCommand rule
offset "0.5ex"
width "100line%"
height "1pt"
\end_inset
\end_layout
\begin_layout Standard
test
\end_layout
\begin_layout Standard
\size giant
@ -5947,6 +6285,33 @@ height "1pt"
\end_layout
\begin_layout Subsection
Rules
\end_layout
\begin_layout Standard
test
\end_layout
\begin_layout Standard
\size tiny
\begin_inset CommandInset line
LatexCommand rule
offset "0.5ex"
width "100line%"
height "1pt"
\end_inset
\size default
\size tiny
\end_layout
\begin_layout Standard
test
\begin_inset CommandInset line

View File

@ -1,3 +1,4 @@
%% LyX trick_preamble_code_into_believing_that_this_was_created_by_lyx created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[a4paper,12pt]{article}
\usepackage[T1]{fontenc}
@ -33,6 +34,7 @@
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{hhline}
\usepackage{dcolumn}
\usepackage{pdfpages}
\usepackage{textcomp}
\usepackage{amssymb}
@ -64,7 +66,8 @@
\title{Title}
\date{two days ago}%stupid stuff
\date %stupid stuff
{two days ago}
\maketitle
@ -177,7 +180,7 @@ and PDF pages:
\includepdf[pages=-,angle=22,origin=Bl,width=5cm,height=40mm,keepaspectratio]{../../../lib/examples/beamer-icsi-logo}
If you prefer verbatim input, you can choose
between~\verbatiminput{DummyDocument.tex} or~\verbatiminput*{DummyDocument.tex}.
between~\verbatiminput{foo} or~\verbatiminput*{foo}.
\section{URLs and Hyperlinks\index{URL}\nomenclature[www]{URL}{uniform resource locator}}
@ -452,6 +455,24 @@ in \% of pixel size & 76.3 & 95.9 & 92.3\tabularnewline
\end{tabular}
\end{table}
A table using dcolumn:
\begin{table}
\begin{tabular}{ccddd}
One&Two&
\multicolumn{1}{c}{\textrm{Three}}&
\multicolumn{1}{c}{\textrm{Four}}&
\multicolumn{1}{c}{\textrm{Five}}\\
\hline
one&two&\mbox{three}&\mbox{four}&\mbox{five}\\
He&2& 2.77234 & 45672. & 0.69 \\
C\footnote{Some tables require footnotes.}
&C\footnote{Some tables need more than one footnote.}
& 12537.64 & 37.66345 & 86.37 \\
\end{tabular}
\end{table}
A table using decimal alignment:
\begin{table}
@ -498,16 +519,27 @@ The following tow don't work, but they should???
\section{Special formattings\index{Special formattings}}
\subsection{LyX line}
test
{\tiny \lyxline{\tiny}}{\tiny \par}
test {\Huge Test} {\tiny test} test
\lyxline{\normalsize}
test
{\Huge \lyxline{\Huge}}{\Huge \par}
\subsection{Rules}
test
{\tiny \rule[0.5ex]{1\linewidth}{1pt}}{\tiny \par}
test {\Huge Test} {\tiny test} test
{\Huge \lyxline{\Huge}}{\Huge \par}
test\rule[0.001\textwidth]{1\columnwidth}{0.05\textheight}
test

View File

@ -5,17 +5,8 @@
\origin roundtrip
\textclass amsart
\begin_preamble
\numberwithin{equation}{section} %% Comment out for sequentially-numbered
\numberwithin{figure}{section} %% Comment out for sequentially-numbered
\providecommand{\theoremname}{Theorem}
\theoremstyle{plain}
\newtheorem{thm}{\protect\theoremname}\theoremstyle{plain}
\newtheorem{lem}[thm]{Lemma}
\usepackage{babel}
\end_preamble
\use_default_options false
\begin_modules

View File

@ -1,14 +1,19 @@
%% LyX 1.6.1 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[oneside,english]{amsart}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{amsthm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\numberwithin{equation}{section} %% Comment out for sequentially-numbered
\numberwithin{figure}{section} %% Comment out for sequentially-numbered
\providecommand{\theoremname}{Theorem}
\theoremstyle{plain}
\newtheorem{thm}{\protect\theoremname}
\theoremstyle{plain}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{thm}{\protect\theoremname}
\theoremstyle{plain}
\newtheorem{lem}[thm]{Lemma}
\usepackage{babel}

View File

@ -5,78 +5,7 @@
\origin roundtrip
\textclass book
\begin_preamble
%% Do not edit unless you really know what you are doing.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\AtBeginDocument{\providecommand\partref[1]{\ref{part:#1}}}
\AtBeginDocument{\providecommand\chapref[1]{\ref{chap:#1}}}
\AtBeginDocument{\providecommand\secref[1]{\ref{sec:#1}}}
\AtBeginDocument{\providecommand\subsecref[1]{\ref{subsec:#1}}}
\AtBeginDocument{\providecommand\parref[1]{\ref{par:#1}}}
\AtBeginDocument{\providecommand\figref[1]{\ref{fig:#1}}}
\AtBeginDocument{\providecommand\tabref[1]{\ref{tab:#1}}}
\AtBeginDocument{\providecommand\algref[1]{\ref{alg:#1}}}
\AtBeginDocument{\providecommand\fnref[1]{\ref{fn:#1}}}
\AtBeginDocument{\providecommand\enuref[1]{\ref{enu:#1}}}
\AtBeginDocument{\providecommand\eqref[1]{\ref{eq:#1}}}
\AtBeginDocument{\providecommand\lemref[1]{\ref{lem:#1}}}
\AtBeginDocument{\providecommand\thmref[1]{\ref{thm:#1}}}
\AtBeginDocument{\providecommand\corref[1]{\ref{cor:#1}}}
\AtBeginDocument{\providecommand\propref[1]{\ref{prop:#1}}}
\floatstyle{ruled}
\newfloat{algorithm}{tbp}{loa}[chapter]
\providecommand{\algorithmname}{Algorithm}
\floatname{algorithm}{\protect\algorithmname}
\RS@ifundefined{subsecref}{\newref{subsec}{name = \RSsectxt}}{}
\RS@ifundefined{thmref}{\def\RSthmtxt{theorem~}\newref{thm}{name = \RSthmtxt}}{}
\RS@ifundefined{lemref}{\def\RSlemtxt{lemma~}\newref{lem}{name = \RSlemtxt}}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\theoremstyle{plain}
\newtheorem{thm}{\protect\theoremname}\theoremstyle{plain}
\newtheorem{lem}[thm]{\protect\lemmaname}\theoremstyle{plain}
\newtheorem{cor}[thm]{\protect\corollaryname}\theoremstyle{plain}
\newtheorem{prop}[thm]{\protect\propositionname}\theoremstyle{plain}
\newtheorem{conjecture}[thm]{\protect\conjecturename}\theoremstyle{plain}
\newtheorem{fact}[thm]{\protect\factname}\theoremstyle{definition}
\newtheorem{defn}[thm]{\protect\definitionname}\theoremstyle{definition}
\newtheorem{example}[thm]{\protect\examplename}\theoremstyle{definition}
\newtheorem{problem}[thm]{\protect\problemname}\theoremstyle{definition}
\newtheorem{xca}[thm]{\protect\exercisename}\theoremstyle{remark}
\newtheorem{rem}[thm]{\protect\remarkname}\theoremstyle{remark}
\newtheorem{claim}[thm]{\protect\claimname}\ifx\proof\undefined
\newenvironment{proof}[1][\protect\proofname]{\par
\normalfont\topsep6\p@\@plus6\p@\relax
\trivlist
\itemindent\parindent
\item[\hskip\labelsep\scshape #1]\ignorespaces
}{%
\endtrivlist\@endpefalse
}
\providecommand{\proofname}{Proof}
\fi
\usepackage{babel}
\providecommand{\claimname}{Claim}
\providecommand{\conjecturename}{Conjecture}
\providecommand{\corollaryname}{Corollary}
\providecommand{\definitionname}{Definition}
\providecommand{\examplename}{Example}
\providecommand{\exercisename}{Exercise}
\providecommand{\factname}{Fact}
\providecommand{\lemmaname}{Lemma}
\providecommand{\problemname}{Problem}
\providecommand{\propositionname}{Proposition}
\providecommand{\remarkname}{Remark}
\providecommand{\theoremname}{Theorem}
\end_preamble
\use_default_options false

View File

@ -1,3 +1,4 @@
%% LyX trick_preamble_code_into_believing_that_this_was_created_by_lyx created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{book}
\usepackage[T1]{fontenc}