From 42785e6219637491d82998df7a46c583edcf8167 Mon Sep 17 00:00:00 2001 From: Pavel Sanda Date: Fri, 28 Jan 2011 10:04:52 +0000 Subject: [PATCH] Bug #7095: Support fix-cm.sty Patch from Patrick Atamaniuk. http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg165122.html git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37342 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/scons/scons_manifest.py | 1 + lib/Makefile.am | 1 + lib/chkconfig.ltx | 1 + lib/layouts/fix-cm.module | 13 +++++++++++++ src/BufferParams.cpp | 11 +++++++++++ 5 files changed, 27 insertions(+) create mode 100644 lib/layouts/fix-cm.module diff --git a/development/scons/scons_manifest.py b/development/scons/scons_manifest.py index 7886714e36..04ea5dd7a6 100644 --- a/development/scons/scons_manifest.py +++ b/development/scons/scons_manifest.py @@ -2932,6 +2932,7 @@ lib_layouts_module_files = Split(''' eqs-within-sections.module figs-within-sections.module fixltx2e.module + fix-cm.module foottoend.module hanging.module initials.module diff --git a/lib/Makefile.am b/lib/Makefile.am index 6a7c9e4536..240c7828c0 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1096,6 +1096,7 @@ dist_layouts_DATA =\ layouts/extreport.layout \ layouts/figs-within-sections.module \ layouts/fixltx2e.module \ + layouts/fix-cm.module \ layouts/foils.layout \ layouts/foottoend.module \ layouts/frletter.layout \ diff --git a/lib/chkconfig.ltx b/lib/chkconfig.ltx index 92995afdeb..c02902a566 100644 --- a/lib/chkconfig.ltx +++ b/lib/chkconfig.ltx @@ -267,6 +267,7 @@ \TestPackage{fancybox} \TestPackage{fancyhdr} \TestPackage{fixltx2e} +\TestPackage{fix-cm} \TestPackage{float} \TestPackage{framed} \TestPackage{geometry} diff --git a/lib/layouts/fix-cm.module b/lib/layouts/fix-cm.module new file mode 100644 index 0000000000..a847b71d72 --- /dev/null +++ b/lib/layouts/fix-cm.module @@ -0,0 +1,13 @@ +#\DeclareLyXModule{Fix cm} +#DescriptionBegin +#Fix-cm improves the appearance of Computer Modern fonts and makes them +#available with arbitrary sizes. For details see the documentation +#of the fix-cm.sty package: +#http://tug.org/texmf-dist/doc/latex/base/fixltx2e.pdf +#DescriptionEnd + +# Author : Patrick Atamaniuk + +Format 31 + +Requires fix-cm diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index 0a5e672edf..42eebeaba0 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -1202,6 +1202,17 @@ void BufferParams::validate(LaTeXFeatures & features) const bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features, TexRow & texrow, FileName const & filepath) const { + // http://www.tug.org/texmf-dist/doc/latex/base/fixltx2e.pdf + // !! To use the Fix-cm package, load it before \documentclass, and use the command + // \RequirePackage to do so, rather than the normal \usepackage + // Do not to load any other package before the document class, unless you + // have a thorough understanding of the LATEX internals and know exactly what you + // are doing! + if (features.mustProvide("fix-cm")) { + os << "\\RequirePackage{fix-cm}\n"; + texrow.newline(); + } + os << "\\documentclass"; DocumentClass const & tclass = documentClass(); -- 2.39.5