From 53694874f32891a2a4a2cc67ceeccba94d4a83e4 Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Mon, 8 Oct 2012 21:23:11 +0200 Subject: [PATCH] Make tex2lyx tests almost compilable If the original tests cannot ve compiled with latex/pdflatex/xelatex it is difficult to compare the visual output. --- src/tex2lyx/test/DummyDocument.lyx | 13 +++++++++++-- src/tex2lyx/test/box-color-size-space-align.tex | 2 +- src/tex2lyx/test/test-insets.lyx.lyx | 13 +++++++++++-- src/tex2lyx/test/test-insets.tex | 14 ++++++++++++-- src/tex2lyx/test/test-structure.tex | 2 +- 5 files changed, 36 insertions(+), 8 deletions(-) diff --git a/src/tex2lyx/test/DummyDocument.lyx b/src/tex2lyx/test/DummyDocument.lyx index 1c78873178..9215e6f8e6 100644 --- a/src/tex2lyx/test/DummyDocument.lyx +++ b/src/tex2lyx/test/DummyDocument.lyx @@ -26,11 +26,20 @@ \index_command default \paperfontsize 12 \spacing onehalf -\use_hyperref false +\use_hyperref true +\pdf_bookmarks 1 +\pdf_bookmarksnumbered 0 +\pdf_bookmarksopen 0 +\pdf_bookmarksopenlevel 1 +\pdf_breaklinks 0 +\pdf_pdfborder 0 +\pdf_colorlinks 0 +\pdf_backref section +\pdf_pdfusetitle 1 \papersize a4paper \use_geometry false \use_package amsmath 2 -\use_package amssymb 0 +\use_package amssymb 2 \use_package esint 1 \use_package mathdots 0 \use_package mathtools 0 diff --git a/src/tex2lyx/test/box-color-size-space-align.tex b/src/tex2lyx/test/box-color-size-space-align.tex index 6a8a5d61db..b44e03883b 100644 --- a/src/tex2lyx/test/box-color-size-space-align.tex +++ b/src/tex2lyx/test/box-color-size-space-align.tex @@ -28,7 +28,7 @@ \setstretch{1.2} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands. - +\newcommand{\noun}[1]{\textsc{#1}} %% The greyedout annotation environment \newenvironment{lyxgreyedout}{\textcolor{note_fontcolor}\bgroup}{\egroup} diff --git a/src/tex2lyx/test/test-insets.lyx.lyx b/src/tex2lyx/test/test-insets.lyx.lyx index d1acb84042..f103f3a596 100644 --- a/src/tex2lyx/test/test-insets.lyx.lyx +++ b/src/tex2lyx/test/test-insets.lyx.lyx @@ -32,11 +32,20 @@ \index_command default \paperfontsize 12 \spacing onehalf -\use_hyperref false +\use_hyperref true +\pdf_bookmarks 1 +\pdf_bookmarksnumbered 0 +\pdf_bookmarksopen 0 +\pdf_bookmarksopenlevel 1 +\pdf_breaklinks 0 +\pdf_pdfborder 0 +\pdf_colorlinks 0 +\pdf_backref section +\pdf_pdfusetitle 1 \papersize a4paper \use_geometry false \use_package amsmath 2 -\use_package amssymb 0 +\use_package amssymb 2 \use_package esint 1 \use_package mathdots 0 \use_package mathtools 0 diff --git a/src/tex2lyx/test/test-insets.tex b/src/tex2lyx/test/test-insets.tex index a74a542289..508d19f827 100644 --- a/src/tex2lyx/test/test-insets.tex +++ b/src/tex2lyx/test/test-insets.tex @@ -19,7 +19,6 @@ \makenomenclature \usepackage{varioref} \usepackage{prettyref} -\usepackage{makeidx} \usepackage{splitidx} \makeindex @@ -28,6 +27,17 @@ \usepackage{xargs} \usepackage{subscript} \usepackage{rotating} +\usepackage{listings} +\usepackage{hyperref} +\usepackage{array} +\usepackage{booktabs} +\usepackage{multirow} +\usepackage{hhline} +\usepackage{pdfpages} +\usepackage{textcomp} +\usepackage{amssymb} +\usepackage{color} +\usepackage[ps,mover]{lyxskak} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands. \providecommand{\LyX}{L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@} @@ -132,7 +142,7 @@ We can also import chess diagrams: Spreadsheets: -\def\inputGnumericTable{}\input{../../../lib/examples/longsheet.gnumeric} +\def\inputGnumericTable{}\input{../../../lib/examples/longsheet.tex} and PDF pages: diff --git a/src/tex2lyx/test/test-structure.tex b/src/tex2lyx/test/test-structure.tex index 79989fc443..096da4140c 100644 --- a/src/tex2lyx/test/test-structure.tex +++ b/src/tex2lyx/test/test-structure.tex @@ -1,6 +1,6 @@ %% 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[legalpaper,french,german,english,dummyoption]{article} +\documentclass[legalpaper,french,german,newzealand,english,dummyoption]{article} \usepackage[latin9]{inputenc} \usepackage{color} \usepackage{rotfloat}