Dear developers, please find attached my proposed implementation of fix-cm.sty support against LyX 2.0.0svn.
Adresses feature #7095 Applies in lyx-devel/trunk: patch -p0 <patch-7095.1.diff Its compiling fine for me in trunk revision 37304 on x86_64-unknown-linux-gnu. Details: - layout module added (similar to fixltx2e) - feature 'fix-cm' has to be rendered _before_ \\documentclass as described by http://www.tug.org/texmf-dist/doc/latex/base/fixltx2e.pdf. Therefore the implementation is in src/BufferParams.cpp instead of src/LaTeXFeatures.cpp. - Changes to po files are not included in this patch. Cheers and thanks for the welcome, patrick -- ------------------------------------- ataman...@frobs.net
Index: src/BufferParams.cpp =================================================================== --- src/BufferParams.cpp (revision 37304) +++ src/BufferParams.cpp (working copy) @@ -1202,6 +1202,17 @@ 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(); Index: lib/layouts/fix-cm.module =================================================================== --- lib/layouts/fix-cm.module (revision 0) +++ lib/layouts/fix-cm.module (revision 0) @@ -0,0 +1,19 @@ +#\DeclareLyXModule{Fix cm} +#DescriptionBegin +#Loads the LaTeX package fix-cm which changes the font definitions of the +#Computer Modern fonts, in order to achieve the following effects: +#The appearance of the T1 and TS1 encoded CM fonts (aka `EC') is made as similar +#as possible to the traditional (OT1 encoded) ones. Particularly, a +#number of broken or ugly design sizes are no longer used, the look of the bold +#sans serif typeface at large sizes is considerably improved, and mismatches +#between the text fonts and the corresponding math fonts are avoided. +#The Computer Modern fonts are made available with arbitrary sizes. +#Only those design sizes of the fonts will be used, that are normally available +#in Type1 format, too. +#DescriptionEnd + +# Author : Patrick Atamaniuk <patrick-...@frobs.net> + +Format 31 + +Requires fix-cm Index: lib/chkconfig.ltx =================================================================== --- lib/chkconfig.ltx (revision 37304) +++ lib/chkconfig.ltx (working copy) @@ -267,6 +267,7 @@ \TestPackage{fancybox} \TestPackage{fancyhdr} \TestPackage{fixltx2e} +\TestPackage{fix-cm} \TestPackage{float} \TestPackage{framed} \TestPackage{geometry} Index: lib/Makefile.am =================================================================== --- lib/Makefile.am (revision 37304) +++ lib/Makefile.am (working copy) @@ -1095,6 +1095,7 @@ layouts/extreport.layout \ layouts/figs-within-sections.module \ layouts/fixltx2e.module \ + layouts/fix-cm.module \ layouts/foils.layout \ layouts/foottoend.module \ layouts/frletter.layout \