From d89bde0652a3d95939ab59d1f10e25369e657bb0 Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Sun, 21 Nov 2010 18:07:04 +0000 Subject: [PATCH] Load mhchem if it is requested unconditionally, fix some typos git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36425 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Buffer.cpp | 2 +- src/LaTeXFeatures.cpp | 7 ++++--- src/Layout.cpp | 2 +- src/LyXVC.h | 2 +- src/frontends/qt4/GuiWorkArea.cpp | 2 +- src/mathed/InsetMathGrid.h | 2 -- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index f628e030e7..c7682d11eb 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -1614,7 +1614,7 @@ void Buffer::writeLyXHTMLSource(odocstream & os, os << "\n\n" << features.getTClassHTMLPreamble() - << "\n\n" + << "\n\n" << from_utf8(features.getPreambleSnippets()); os << "\n\n"; diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index 14faacca1f..c6516995c9 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -634,7 +634,7 @@ string const LaTeXFeatures::getPackages() const // FIXME: currently, we can only load packages and macros known // to LyX. // However, with the Require tag of layouts/custom insets, - // also inknown packages can be requested. They are silently + // also unknown packages can be requested. They are silently // swallowed now. We should change this eventually. // @@ -768,8 +768,9 @@ string const LaTeXFeatures::getPackages() const packages << "\\PassOptionsToPackage{normalem}{ulem}\n" "\\usepackage{ulem}\n"; - if (mustProvide("mhchem") && - params_.use_mhchem != BufferParams::package_off) + if (params_.use_mhchem == BufferParams::package_on || + (mustProvide("mhchem") && + params_.use_mhchem != BufferParams::package_off)) packages << "\\PassOptionsToPackage{version=3}{mhchem}\n" "\\usepackage{mhchem}\n"; diff --git a/src/Layout.cpp b/src/Layout.cpp index b2d4d2e273..5ba77ce1c6 100644 --- a/src/Layout.cpp +++ b/src/Layout.cpp @@ -184,7 +184,7 @@ bool Layout::read(Lexer & lex, TextClass const & tclass) { "htmllabel", LT_HTMLLABEL }, { "htmllabelattr", LT_HTMLLABELATTR }, { "htmllabelfirst", LT_HTMLLABELFIRST }, - { "htmlpremable", LT_HTMLPREAMBLE }, + { "htmlpreamble", LT_HTMLPREAMBLE }, { "htmlstyle", LT_HTMLSTYLE }, { "htmltag", LT_HTMLTAG }, { "htmltitle", LT_HTMLTITLE }, diff --git a/src/LyXVC.h b/src/LyXVC.h index a75dc97453..55de93f103 100644 --- a/src/LyXVC.h +++ b/src/LyXVC.h @@ -25,7 +25,7 @@ class VCS; class Buffer; /** Version Control for LyX. - This is the class giving the verison control features to LyX. It is + This is the class giving the version control features to LyX. It is intended to support different kinds of version control. The support in LyX is based loosely upon the version control in GNU Emacs, but is not as extensive as that one. See Extended Manual for a simple diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp index ef79b02fe3..89d18bcbd2 100644 --- a/src/frontends/qt4/GuiWorkArea.cpp +++ b/src/frontends/qt4/GuiWorkArea.cpp @@ -140,7 +140,7 @@ public: int r = rect_.right() - x_; int bot = rect_.bottom(); - // draw vertica linel + // draw vertical line painter.fillRect(x_, y, CursorWidth, rect_.height(), color_); // draw RTL/LTR indication diff --git a/src/mathed/InsetMathGrid.h b/src/mathed/InsetMathGrid.h index 3b1b5a1c25..ba5ebeacd4 100644 --- a/src/mathed/InsetMathGrid.h +++ b/src/mathed/InsetMathGrid.h @@ -73,8 +73,6 @@ public: ColInfo(); /// currently possible: 'l', 'c', 'r' char align_; - /// cache for drawing - int h_offset; /// cached width mutable int width_; /// cached offset