From a5d5a633d9f7776934aa911bfb8bb43d468ff8a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Mon, 7 Jan 2008 17:32:47 +0000 Subject: [PATCH] some more uses of Requires. The package ifthen needs to be added to LaTeXConfig.lyx. I'll do this when that file can be opened again. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22419 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/chkconfig.ltx | 1 + lib/layouts/amsart-plain.layout | 4 +++- lib/layouts/entcs.layout | 4 +++- lib/layouts/foils.layout | 8 ++------ lib/layouts/hanging.module | 2 +- lib/layouts/stdinsets.inc | 6 +++--- src/LaTeXFeatures.cpp | 3 ++- 7 files changed, 15 insertions(+), 13 deletions(-) diff --git a/lib/chkconfig.ltx b/lib/chkconfig.ltx index 4371279768..c354476f3a 100644 --- a/lib/chkconfig.ltx +++ b/lib/chkconfig.ltx @@ -231,6 +231,7 @@ \TestPackage{endnotes} \TestPackage{enumitem} \TestPackage{esint} +\TestPackage{ifthen} \TestPackage{fancybox} \TestPackage{fancyhdr} \TestPackage{framed} diff --git a/lib/layouts/amsart-plain.layout b/lib/layouts/amsart-plain.layout index ce23eddd49..bbbb724250 100644 --- a/lib/layouts/amsart-plain.layout +++ b/lib/layouts/amsart-plain.layout @@ -17,8 +17,10 @@ Input amsart.layout # Use a simpler preamble. Preamble - \usepackage{amsmath,amsthm} + \usepackage{amsthm} \usepackage{amsfonts} EndPreamble +Requires amsmath + Input amsmaths-plain.inc diff --git a/lib/layouts/entcs.layout b/lib/layouts/entcs.layout index 1bfd23bf16..461fb20bda 100644 --- a/lib/layouts/entcs.layout +++ b/lib/layouts/entcs.layout @@ -11,8 +11,10 @@ ClassOptions FontSize 11 End +Requires ifthen + Preamble - \usepackage{entcsmacro,ifthen} + \usepackage{entcsmacro} \newcommand{\theTitle}[1]{} \newcommand{\theAuthor}[1]{} \newcommand{\theAddress}[1]{} diff --git a/lib/layouts/foils.layout b/lib/layouts/foils.layout index b8279451d6..062f2fc6d6 100644 --- a/lib/layouts/foils.layout +++ b/lib/layouts/foils.layout @@ -95,9 +95,7 @@ Style TickList AlignPossible Block, Left LabelType Static LabelString "_/" - Preamble - \usepackage{pifont} - EndPreamble + Requires pifont End Style CrossList @@ -116,9 +114,7 @@ Style CrossList AlignPossible Block, Left LabelType Static LabelString "><" - Preamble - \usepackage{pifont} - EndPreamble + Requires pifont End diff --git a/lib/layouts/hanging.module b/lib/layouts/hanging.module index 6ad06a9f59..3ac84748d5 100644 --- a/lib/layouts/hanging.module +++ b/lib/layouts/hanging.module @@ -15,8 +15,8 @@ Style Hanging Margin Static LeftMargin "MMMM" ParIndent "-MMMM" + Requires ifthen Preamble - \usepackage{ifthen} \newlength{\lyxhang} \IfFileExists{hanging.sty}{ \usepackage{hanging} diff --git a/lib/layouts/stdinsets.inc b/lib/layouts/stdinsets.inc index 17d3d5660d..46ddf5f379 100644 --- a/lib/layouts/stdinsets.inc +++ b/lib/layouts/stdinsets.inc @@ -43,6 +43,8 @@ # FreeSpacing Preserve multiple spaces etc. # ForceLTR Force the "latex" language, leading to Left-to-Right # (latin) output, e.g., in ERT or URL. A kludge. +# Requires Require a given (supported) feature. Multiple features must +# be comma-separated. #End Format 6 @@ -247,9 +249,7 @@ InsetLayout URL Color Blue Size Small EndFont - Preamble - \usepackage{url} - EndPreamble + Requires url End InsetLayout OptArg diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index 887651d4c5..2a3eec1efb 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -533,7 +533,8 @@ char const * simplefeatures[] = { "covington", "csquotes", "enumitem", - "endnotes" + "endnotes", + "ifthen" }; int const nb_simplefeatures = sizeof(simplefeatures) / sizeof(char const *);