]> git.lyx.org Git - features.git/commitdiff
Bug #7095: Support fix-cm.sty
authorPavel Sanda <sanda@lyx.org>
Fri, 28 Jan 2011 10:04:52 +0000 (10:04 +0000)
committerPavel Sanda <sanda@lyx.org>
Fri, 28 Jan 2011 10:04:52 +0000 (10:04 +0000)
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
lib/Makefile.am
lib/chkconfig.ltx
lib/layouts/fix-cm.module [new file with mode: 0644]
src/BufferParams.cpp

index 7886714e360f36b0ae700180d219b390dc3dad37..04ea5dd7a60cd77a378d18b9f024bd2f63375ea2 100644 (file)
@@ -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
index 6a7c9e4536d3821374fe074afbad126b6ce246e9..240c7828c0ca197d2584c81727b4eb6e04489247 100644 (file)
@@ -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 \
index 92995afdebade75e9206bc9bf7cfe0ea4c50c6f8..c02902a5664463cf7d3ea0bcb897867d558fe834 100644 (file)
 \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 (file)
index 0000000..a847b71
--- /dev/null
@@ -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 <patrick-lyx@frobs.net>
+
+Format 31
+
+Requires fix-cm
index 0a5e672edf9395e5109a31bd36d3007a557c0f96..42eebeaba0768d10197807b68064f60428c24bf3 100644 (file)
@@ -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();