]> git.lyx.org Git - features.git/commitdiff
small fix with footnote, use stringstream some more
authorLars Gullik Bjønnes <larsbj@gullik.org>
Thu, 10 May 2001 15:53:10 +0000 (15:53 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Thu, 10 May 2001 15:53:10 +0000 (15:53 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1995 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/LaTeXFeatures.C
src/LaTeXFeatures.h
src/buffer.C
src/frontends/kde/FormParagraph.C
src/frontends/qt2/FormParagraph.C
src/insets/ChangeLog
src/insets/insetfoot.C
src/lyxparagraph.h

index 7745895ff4b5ab7b0362fa7d37233e92be0dc556..d371d6e80c4738c9313fee3c8c4f810bee7a010a 100644 (file)
@@ -1,3 +1,7 @@
+2001-05-10  Lars Gullik Bjønnes  <larsbj@birdstep.com>
+
+       * buffer.C (makeLaTeXFile): use stringstream on language_optons.
+
 2001-05-09  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
        * bufferlist.C (emergencyWrite): fix assert() call
index b4030a9fe82b54521c2be80aa091c625819e0bb3..31b4fe16b940155a4396336578da14d60fcbbcc2 100644 (file)
@@ -40,7 +40,7 @@ LaTeXFeatures::LaTeXFeatures(BufferParams const & p, LyXTextClass::size_type n)
        makeidx = false;
        verbatim = false;
        longtable = false;
-       algorithm = false;
+       //algorithm = false;
        rotating = false;
        amssymb = false;
        latexsym = false;
@@ -95,8 +95,8 @@ void LaTeXFeatures::require(string const & name)
                verbatim = true;
        } else if (name == "longtable") {
                longtable = true;
-       } else if (name == "algorithm") {
-               algorithm = true;
+       //} else if (name == "algorithm") {
+       //algorithm = true;
        } else if (name == "rotating") {
                rotating = true;
        } else if (name == "amssymb") {
@@ -182,9 +182,9 @@ string const LaTeXFeatures::getPackages() const
        if (verbatim)
                packages << "\\usepackage{verbatim}\n";
 
-       if (algorithm) {
-               packages << "\\usepackage{algorithm}\n";
-       }
+       //if (algorithm) {
+       //      packages << "\\usepackage{algorithm}\n";
+       //}
 
        // lyxchess.sty
        if (chess) {
index 1f26df092762e411ff7e0a90649157cf82637b9e..e4b263e004cd8432f72c1c69e53b8e6e1b9a6207 100644 (file)
@@ -72,7 +72,7 @@ struct LaTeXFeatures {
        ///
        bool longtable; // longtable.sty
        ///
-       bool algorithm; // algorithm.sty
+       //bool algorithm; // algorithm.sty
        ///
        bool rotating;  // rotating.sty
        ///
index dce9cf38ee9d2b4291278aa73fb89dddd88111ff..1b2e1e8f9ab88dcd50dea944b19240c6c3fdd3d3 100644 (file)
@@ -1832,7 +1832,7 @@ void Buffer::makeLaTeXFile(string const & fname,
                
                // language should be a parameter to \documentclass
                use_babel = false;
-               string language_options;
+               ostringstream language_options;
                if (params.language->babel() == "hebrew"
                    && default_language->babel() != "hebrew")
                         // This seems necessary
@@ -1845,10 +1845,10 @@ void Buffer::makeLaTeXFile(string const & fname,
                        for (LaTeXFeatures::LanguageList::const_iterator cit =
                                     features.UsedLanguages.begin();
                             cit != features.UsedLanguages.end(); ++cit)
-                               language_options += (*cit)->babel() + ',';
-                       language_options += params.language->babel();
+                               language_options << (*cit)->babel() << ',';
+                       language_options << params.language->babel();
                        if (lyxrc.language_global_options)
-                               options << language_options << ',';
+                               options << language_options.str() << ',';
                }
 
                // the user-defined options
@@ -2035,8 +2035,9 @@ void Buffer::makeLaTeXFile(string const & fname,
                        string tmp = lyxrc.language_package;
                        if (!lyxrc.language_global_options
                            && tmp == "\\usepackage{babel}")
-                               tmp = "\\usepackage[" +
-                                       language_options + "]{babel}";
+                               tmp = string("\\usepackage[") +
+                                       language_options.str().c_str() +
+                                       "]{babel}";
                        ofs << tmp << "\n";
                        texrow.newline();
                }
index b9525118ce59a2fd21da99019ad32550e2f949c1..795c014c8daa90a873d21e53e5e8c61b93842132 100644 (file)
@@ -67,6 +67,8 @@ void FormParagraph::update(bool switched)
        if (align==LYX_ALIGN_LAYOUT)
                align = textclasslist.Style(buf->params.textclass, par->GetLayout()).align;
 
+#if 0
+       // Just remove this and change physpar to par
        LyXParagraph const * physpar = par;
 
        if (physpar->params.spaceTop().kind() == VSpace::LENGTH) {
@@ -102,6 +104,53 @@ void FormParagraph::update(bool switched)
                          physpar->params.spaceBottom().kind(),
                          physpar->params.spaceTop().keep(),
                          physpar->params.spaceBottom().keep());
+#else
+       if (par->params.spaceTop().kind() == VSpace::LENGTH) {
+               LyXGlueLength above = par->params.spaceTop().length();
+               lyxerr[Debug::GUI] << "Reading above space : \"" 
+                       << par->params.spaceTop().length().asString() << "\"" << endl;
+               dialog_->setAboveLength(above.value(), above.plusValue(),
+                                       above.minusValue(),
+                                       above.unit(), above.plusUnit(),
+                                       above.minusUnit());
+       } else
+               dialog_->setAboveLength(0.0, 0.0, 0.0,
+                                       LyXLength::UNIT_NONE,
+                                       LyXLength::UNIT_NONE,
+                                       LyXLength::UNIT_NONE);
+
+       if (par->params.spaceBottom().kind() == VSpace::LENGTH) {
+               LyXGlueLength below = par->params.spaceBottom().length();
+               lyxerr[Debug::GUI] << "Reading below space : \"" 
+                       << below.asString() << "\"" << endl;
+
+               dialog_->setBelowLength(below.value(),
+                                       below.plusValue(),
+                                       below.minusValue(),
+                                       below.unit(),
+                                       below.plusUnit(),
+                                       below.minusUnit());
+       } else
+               dialog_->setBelowLength(0.0, 0.0, 0.0,
+                                       LyXLength::UNIT_NONE,
+                                       LyXLength::UNIT_NONE,
+                                       LyXLength::UNIT_NONE);
+
+       dialog_->setLabelWidth(text->cursor.par()->GetLabelWidthString());
+       dialog_->setAlign(align);
+
+       dialog_->setChecks(par->params.lineTop(),
+                          par->params.lineBottom(),
+                          par->params.pagebreakTop(),
+                          par->params.pagebreakBottom(),
+                          par->params.noindent());
+       dialog_->setSpace(par->params.spaceTop().kind(),
+                         par->params.spaceBottom().kind(),
+                         par->params.spaceTop().keep(),
+                         par->params.spaceBottom().keep());
+#endif
 }
 
 
index 17fd71e5f77e8d8cd90574cffad78196cd5e22f3..513514b5b8234aee3efda897cec780a7d463f298 100644 (file)
@@ -72,7 +72,7 @@ void FormParagraph::update(bool switched)
        if (align==LYX_ALIGN_LAYOUT)
                align = textclasslist.Style(buf->params.textclass, par->GetLayout()).align;
 
-       ParagraphParameters *params = &(par->params);
+       ParagraphParameters * params = &(par->params);
 
        if (params->spaceTop().kind() == VSpace::LENGTH) {
                LyXGlueLength above = params->spaceTop().length();
index 4c0f8967e764a2b4e002b7ade43132aed53ae7af..9fa20f49c24e870ab64d6f82e188b2b19cb846c2 100644 (file)
@@ -1,3 +1,7 @@
+2001-05-10  Lars Gullik Bjønnes  <larsbj@birdstep.com>
+
+       * insetfoot.C (Latex): don't use % after footnote.
+
 2001-05-08  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
        * insettext.C (Read): use clear
index f6cdfb05efec919625b24ad1de7c5886f9e02356..cd94e5c2f4ab40025c156bcf3c2d01b9a10febef 100644 (file)
@@ -54,7 +54,7 @@ int InsetFoot::Latex(Buffer const * buf,
        os << "\\footnote{%\n";
        
        int const i = inset.Latex(buf, os, fragile, fp);
-       os << "}%\n";
+       os << "}\n";
        
        return i + 2;
 }
index 05bc96d3ce894485cbef21a7f6df3003cb10a1e6..e99828da8aa2953ce3d257c5f35deffe01d75d6d 100644 (file)
@@ -34,10 +34,16 @@ class InsetBibKey;
 class BufferView;
 class Language;
 
-// I dare you to enable this and help me find all the bugs that then show
-// up. (Lgb)
-#define NEW_INSETS 1
-#define NO_PEXTRA 1
+// After 1.2.0 is released, during 1.3.0cvs, we enable this. And after
+// a while we verify that reading of 1.2.x files work perfectly we remove
+// this code completely. (Lgb)
+//#define NO_PEXTRA_REALLY 1
+
+// Define this if you want to try out the new storage container for
+// paragraphs. std::container instead of obfuscated homegrown
+// linked list. (Lgb)
+// This is non working and far from finished.
+// #define NO_NEXT 1
 
 /// A LyXParagraph holds all text, attributes and insets in a text paragraph
 class LyXParagraph  {