Added test for algo2e tex2lyx conversion

Testfile from Jürgen Spitzmüller
This commit is contained in:
Kornel Benko 2014-01-28 13:58:28 +01:00
parent f76a8c8ab1
commit 3369de6d7c
4 changed files with 258 additions and 2 deletions

View File

@ -19,7 +19,8 @@ set(_tex_tests test.ltx
test-refstyle-theorems.tex
test-structure.tex
verbatim.tex
XeTeX-polyglossia.tex)
XeTeX-polyglossia.tex
algo2e.tex)
foreach(_fl ${_tex_tests})
set(fl ${_fl})

View File

@ -0,0 +1,228 @@
#LyX file created by tex2lyx 2.1
\lyxformat 474
\begin_document
\begin_header
\textclass article
\begin_preamble
\end_preamble
\options boxed
\use_default_options false
\begin_modules
algorithm2e
\end_modules
\maintain_unincluded_children false
\language english
\language_package none
\inputencoding iso8859-1
\fontencoding T1
\font_roman default
\font_sans default
\font_typewriter default
\font_math auto
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize default
\use_geometry false
\use_package amsmath 1
\use_package amssymb 0
\use_package cancel 0
\use_package esint 1
\use_package mathdots 0
\use_package mathtools 0
\use_package mhchem 0
\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 0
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\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 Title
Using Algorithm2e
\end_layout
\begin_layout Author
John Doe
\end_layout
\begin_layout Section
Introduction
\end_layout
\begin_layout Subsection
An alternating optimization algorithm
\end_layout
\begin_layout Standard
bla
\end_layout
\begin_layout Standard
\begin_inset Float algorithm
placement h
wide false
sideways false
status open
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
\backslash
SetAlgoLined
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
\backslash
KwData
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
{
\end_layout
\end_inset
\begin_inset Formula $X$
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
\backslash
KwResult
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
{
\end_layout
\end_inset
Result
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
}
\end_layout
\end_inset
42
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
\backslash
;
\end_layout
\end_inset
\begin_inset Caption Standard
\begin_layout Standard
An alg
\begin_inset CommandInset label
LatexCommand label
name "alg:altOptRW"
\end_inset
\end_layout
\end_inset
\end_layout
\end_inset
\end_layout
\end_body
\end_document

View File

@ -0,0 +1,26 @@
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[boxed]{algorithm2e}
\begin{document}
\title{Using Algorithm2e}
\author{John Doe}
\maketitle
\section{Introduction}
\subsection{An alternating optimization algorithm}
bla
\begin{algorithm}[h]
\SetAlgoLined
\KwData{$X$}
\KwResult{Result}
42\;
\caption{An alg \label{alg:altOptRW}}
\end{algorithm}
\end{document}

View File

@ -79,7 +79,8 @@ def main(argv):
'test-refstyle-theorems.tex', \
'test-structure.tex', \
'verbatim.tex', \
'XeTeX-polyglossia.tex']
'XeTeX-polyglossia.tex', \
'algo2e.tex']
errors = []
overwrite = (outputdir == inputdir)