Commit Graph

2584 Commits

Author SHA1 Message Date
Enrico Forestieri
d9bcbe5de6 Index: src/mathed/InsetMathEnsureMath.cpp
===================================================================
--- src/mathed/InsetMathEnsureMath.cpp	(revisione 34304)
+++ src/mathed/InsetMathEnsureMath.cpp	(copia locale)
@@ -13,8 +13,9 @@
 
 #include "InsetMathEnsureMath.h"
 
-#include "MathStream.h"
 #include "MathData.h"
+#include "MathStream.h"
+#include "MathSupport.h"
 
 #include <ostream>
 
@@ -34,7 +35,8 @@ Inset * InsetMathEnsureMath::clone() con
 
 void InsetMathEnsureMath::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-	FontSetChanger dummy(mi.base, "mathnormal");
+	bool really_change_font = isTextFont(from_ascii(mi.base.fontname));
+	FontSetChanger dummy(mi.base, "mathnormal", really_change_font);
 	cell(0).metrics(mi, dim);
 	metricsMarkers(dim);
 }
@@ -42,7 +44,8 @@ void InsetMathEnsureMath::metrics(Metric
 
 void InsetMathEnsureMath::draw(PainterInfo & pi, int x, int y) const
 {
-	FontSetChanger dummy(pi.base, "mathnormal");
+	bool really_change_font = isTextFont(from_ascii(pi.base.fontname));
+	FontSetChanger dummy(pi.base, "mathnormal", really_change_font);
 	cell(0).draw(pi, x, y);
 	drawMarkers(pi, x, y);
 }


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34321 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-28 01:58:11 +00:00
Enrico Forestieri
6c33aa2e5b Index: src/mathed/InsetMathHull.cpp
===================================================================
--- src/mathed/InsetMathHull.cpp	(revisione 34304)
+++ src/mathed/InsetMathHull.cpp	(copia locale)
@@ -328,6 +328,23 @@ docstring InsetMathHull::standardFont()
 }
 
 
+docstring InsetMathHull::standardColor() const
+{
+	docstring color;
+	switch (type_) {
+	case hullRegexp:
+		color = from_ascii("foreground");
+		break;
+	case hullNone:
+		color = from_ascii("foreground");
+		break;
+	default:
+		color = from_ascii("math");
+	}
+	return color;
+}
+
+
 bool InsetMathHull::previewState(BufferView * bv) const
 {
 	if (!editing(bv) && RenderPreview::status() == LyXRC::PREVIEW_ON) {
@@ -417,8 +434,11 @@ void InsetMathHull::draw(PainterInfo & p
 		return;
 	}
 
+	bool const really_change_color = pi.base.font.color() == Color_none;
+	ColorChanger dummy0(pi.base.font, standardColor(), really_change_color);
 	FontSetChanger dummy1(pi.base, standardFont());
 	StyleChanger dummy2(pi.base, display() ? LM_ST_DISPLAY : LM_ST_TEXT);
+
 	InsetMathGrid::draw(pi, x + 1, y);
 
 	if (numberedType()) {
Index: src/mathed/MathSupport.cpp
===================================================================
--- src/mathed/MathSupport.cpp	(revisione 34311)
+++ src/mathed/MathSupport.cpp	(copia locale)
@@ -653,6 +653,13 @@ bool isMathFont(docstring const & name)
 }
 
 
+bool isTextFont(docstring const & name)
+{
+	fontinfo * f = lookupFont(name);
+	return f && f->color_ == Color_foreground;
+}
+
+
 FontInfo getFont(docstring const & name)
 {
 	FontInfo font;
Index: src/mathed/MathSupport.h
===================================================================
--- src/mathed/MathSupport.h	(revisione 34311)
+++ src/mathed/MathSupport.h	(copia locale)
@@ -51,6 +51,8 @@ bool isFontName(docstring const & name);
 
 bool isMathFont(docstring const & name);
 
+bool isTextFont(docstring const & name);
+
 // converts single cell to string
 docstring asString(MathData const & ar);
 // converts single inset to string
Index: src/mathed/InsetMathHull.h
===================================================================
--- src/mathed/InsetMathHull.h	(revisione 34304)
+++ src/mathed/InsetMathHull.h	(copia locale)
@@ -197,6 +197,8 @@ private:
 	void changeCols(col_type);
 	///
 	docstring standardFont() const;
+	///
+	docstring standardColor() const;
 	/// consistency check
 	void check() const;
 	/// can this change its number of rows?
Index: src/MetricsInfo.cpp
===================================================================
--- src/MetricsInfo.cpp	(revisione 34312)
+++ src/MetricsInfo.cpp	(copia locale)
@@ -235,11 +235,15 @@ FontSetChanger::FontSetChanger(MetricsBa
 		save_ = mb;
 		FontSize oldsize = save_.font.size();
 		ColorCode oldcolor = save_.font.color();
+		docstring const oldname = from_ascii(save_.fontname);
 		mb.fontname = name;
 		mb.font = sane_font;
 		augmentFont(mb.font, from_ascii(name));
 		mb.font.setSize(oldsize);
-		mb.font.setColor(oldcolor);
+		if (string(name) != "lyxtex"
+		    && ((isTextFont(oldname) && oldcolor != Color_foreground)
+			|| (isMathFont(oldname) && oldcolor != Color_math)))
+			mb.font.setColor(oldcolor);
 	}
 }
 
@@ -252,11 +256,15 @@ FontSetChanger::FontSetChanger(MetricsBa
 		save_ = mb;
 		FontSize oldsize = save_.font.size();
 		ColorCode oldcolor = save_.font.color();
+		docstring const oldname = from_ascii(save_.fontname);
 		mb.fontname = to_utf8(name);
 		mb.font = sane_font;
 		augmentFont(mb.font, name);
 		mb.font.setSize(oldsize);
-		mb.font.setColor(oldcolor);
+		if (name != "lyxtex"
+		    && ((isTextFont(oldname) && oldcolor != Color_foreground)
+			|| (isMathFont(oldname) && oldcolor != Color_math)))
+			mb.font.setColor(oldcolor);
 	}
 }
 
@@ -294,17 +302,21 @@ WidthChanger::~WidthChanger()
 //
 /////////////////////////////////////////////////////////////////////////
 
-ColorChanger::ColorChanger(FontInfo & font, string const & color)
-	: Changer<FontInfo, string>(font)
+ColorChanger::ColorChanger(FontInfo & font, docstring const & color,
+			   bool really_change_color)
+	: Changer<FontInfo, ColorCode>(font), change_(really_change_color)
 {
-	save_ = lcolor.getFromLyXName(color);
-	font.setColor(lcolor.getFromLyXName(color));
+	if (change_) {
+		save_ = font.color();
+		font.setColor(lcolor.getFromLyXName(to_utf8(color)));
+	}
 }
 
 
 ColorChanger::~ColorChanger()
 {
-	orig_.setColor(lcolor.getFromLyXName(save_));
+	if (change_)
+		orig_.setColor(save_);
 }
 
 
Index: src/MetricsInfo.h
===================================================================
--- src/MetricsInfo.h	(revisione 34312)
+++ src/MetricsInfo.h	(copia locale)
@@ -222,12 +222,16 @@ public:
 
 
 // temporarily change the used color
-class ColorChanger : public Changer<FontInfo, std::string> {
+class ColorChanger : public Changer<FontInfo, ColorCode> {
 public:
 	///
-	ColorChanger(FontInfo & font, std::string const & color);
+	ColorChanger(FontInfo & font, docstring const & color,
+		     bool really_change_color = true);
 	///
 	~ColorChanger();
+private:
+	///
+	bool change_;
 };
 
 } // namespace lyx


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34320 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-28 01:40:11 +00:00
Enrico Forestieri
c88eaf877e Changing only the shape does not always work. For example,
\mathbb{\underbar{a}} is not correctly rendered on screen.
We really have to change the font set, but not always.
This cannot be done using an "if" statement, as when
the FontSetChanger scope ends, everything is restored,
defeating our change. Thus, this has to be done in the
FontSetChanger class itself. This is easily accomplished
by introducing a boolean with a default value of true
for really changing a font set.
This will also be useful in other cases that I am discovering.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34312 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-27 21:31:28 +00:00
Enrico Forestieri
dbb5ac93ea The check for Color_math would fail if the font color is changed
in mathed, so implement a strategy which is immune to color changes.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34311 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-27 19:23:31 +00:00
Enrico Forestieri
17af3ea8f4 Change only the shape and not the whole font, otherwise constructs
such as \mathbf{\hat{a}} would not be correctly rendered on screen.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34297 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-26 20:20:49 +00:00
Peter Kümmel
38628558a6 cmake: more merged build fixes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34274 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-23 09:10:35 +00:00
Peter Kümmel
61b2bd5e7f Using "using namespace std" with msvc10 makes also std::tr1::bind visible and generates conflicts with boost::bind.
Solution: don't use boost::bind for msvc10 (could also be extended  to several GCC versions)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34257 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-22 11:16:58 +00:00
Pavel Sanda
62ca7f3ae5 Proper camel case for FileName.absFilename
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34234 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 01:19:09 +00:00
Vincent van Ravesteijn
108a67ed43 Make Cursor::anchor_ private and make an access function Cursor::realAnchor() to stress the fact that this is thus not the normalAnchor().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34146 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-15 18:16:07 +00:00
Vincent van Ravesteijn
8156884090 Make Cursor::disp_ private as it should be.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34144 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-15 17:34:34 +00:00
Richard Heck
b79d8e5e2d Make members of FuncRequest private, per the FIXME there. Again, this is
basically a massive renaming, with no real changes.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34106 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-09 19:00:42 +00:00
Richard Heck
4c7a5d0024 This is just a giant renaming of member variables in FuncRequest,
preparatory to making them private.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34105 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-09 18:15:17 +00:00
Vincent van Ravesteijn
333c17f879 Fix bug #6633: Equations that end in \limits or \nolimits are corrupted on load.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34025 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-02 15:22:50 +00:00
Richard Heck
1eb8311aff HTML for binomials.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33995 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 21:33:33 +00:00
Richard Heck
c7cfcf9e2f Make sure to call the parent's validate method.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33992 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 21:24:16 +00:00
Richard Heck
6a702a2f99 HTML for substack. Sort of. There's an odd problem here, that is
actually a general LyX bug, but I'll report that to the list.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33991 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 21:17:30 +00:00
Richard Heck
bf76659e67 Revert r33989. We do need this.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33990 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 21:02:10 +00:00
Richard Heck
bab268352b HTML for stackrel.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33989 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 20:54:27 +00:00
Richard Heck
85425d8e6c HTML for InsetMathSplit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33988 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 20:50:29 +00:00
Richard Heck
ae69c7c63c HTML for special characters.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33987 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 20:49:21 +00:00
Richard Heck
da26079578 HTML for math spaces.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33986 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 20:47:55 +00:00
Richard Heck
f3711d8a65 HTML for math sizes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33985 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 20:37:23 +00:00
Richard Heck
ea44f30077 Ignore phantoms for now.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33984 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 20:31:15 +00:00
Richard Heck
32ee4c13cf HTML for roots.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33983 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 20:31:04 +00:00
Richard Heck
36e2a2c95f HTML for underset.
Neither underset nor overset will work reliably, I'm afraid, but such is
the price of using HTML rather than MathML.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33982 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 20:12:52 +00:00
Richard Heck
77bd365b39 HTML for overset.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33979 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 20:04:39 +00:00
Richard Heck
edff97cb30 Matrix output via HTML. I have to say, this one took some work.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33978 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 19:59:09 +00:00
Richard Heck
db1d81f03a Forgot this piece before.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33977 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 19:58:49 +00:00
Richard Heck
96390e0ff7 Change semantics of two-arg htmlize to make more consistent with other
functions.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33975 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 19:17:06 +00:00
Richard Heck
2f44dc2583 This doesn't seem to be compiled even, but oh well.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33972 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 19:01:15 +00:00
Richard Heck
ed8af8f7fd Ignore kerning in HTML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33971 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 18:59:04 +00:00
Richard Heck
2a1c6c3541 HTML for math fonts.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33970 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 18:57:47 +00:00
Richard Heck
9ee805185c Fix up the math stream.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33969 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 18:57:37 +00:00
Richard Heck
a0043da05f Introduce and use a "math_flavor" flag with OutputParams.
I'm not happy about having what is basically the same enum in
BufferParams.h and OutputParams.h, but I don't see how to unify them
without either (a) including BufferParams.h in OutputParams.h, which is
ugly or (b) creating some new file just containing this enum, which
seems like overkill. Any other ideas?


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33967 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 18:24:52 +00:00
Enrico Forestieri
4fc5f86137 Fix bug #4565: Using keyboard shortcuts to write Greek letters with an underbar produces LaTeX errors.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33963 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 01:09:38 +00:00
Richard Heck
8cf5ff6fbf Simplify.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33961 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 22:51:11 +00:00
Richard Heck
36b1623c5b Integrals via HTML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33960 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 22:51:02 +00:00
Richard Heck
ab2a59b0a1 I don't think we need to do this for MathML or HTML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33959 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 22:17:06 +00:00
Richard Heck
caf170d612 HTML for dots.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33958 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 22:14:00 +00:00
Richard Heck
8d51923b8b Do the obvious thing with delimiters.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33957 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 22:07:05 +00:00
Richard Heck
ed71c32fcd Treat certain decoration cases differently.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33956 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 22:05:28 +00:00
Richard Heck
69fc590ee3 Decorations via HTML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33955 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 21:56:52 +00:00
Richard Heck
5aff128354 HTML for comments and colors.
Color doesn't do anything at this point. The colors are given in LaTeX
format. Do we know how to convert these to HTML format?


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33954 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 17:24:22 +00:00
Richard Heck
f835e2a6f9 Cases for HTML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33950 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 02:57:05 +00:00
Richard Heck
3e31491871 HTML for InsetMathBrace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33949 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 02:40:32 +00:00
Richard Heck
27add8d945 HTML for math boxes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33948 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 02:37:05 +00:00
Richard Heck
7be729f028 Bold symbols via HTML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33947 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 02:05:49 +00:00
Richard Heck
e64be58736 InsetMathBig via HTML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33946 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 02:04:07 +00:00
Richard Heck
0190b003b0 Fractions via HTML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33945 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 02:03:45 +00:00
Richard Heck
f5bcb24da2 HTML for scripts.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33944 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 01:31:25 +00:00
Richard Heck
f60dad8aaf HTML for numbers.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33943 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 01:23:10 +00:00
Richard Heck
ad49c45475 Pure HTML for math symbols.
I may have to re-do some of the symbols file to make this work properly.
Some of the entities used may have been MathML only.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33942 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 00:24:54 +00:00
Richard Heck
b8550d11e8 Pure HTML output for math macros.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33941 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 00:18:24 +00:00
Richard Heck
9e34cf8186 Fix math char stuff.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33940 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 00:18:08 +00:00
Richard Heck
5ef3c828b2 Simple characters.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33937 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-29 23:03:37 +00:00
Richard Heck
30b18aec37 The beginnings of pure HTML output of math, for our internal XHTML
output routines. The idea is that in some cases people may not want to
use MathML, so we are going to try to give options.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33936 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-29 22:52:13 +00:00
Richard Heck
93c99335b0 Suppress XHTML output for math macros. (We used to get the default from
Inset.)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33795 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-18 22:19:34 +00:00
Richard Heck
8f5d4a3fcb Get rid of label_init_length. There is no way to set it from the GUI any
more. Worse, it was being used inconsistently. And we don't really need
it.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33786 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-17 12:50:58 +00:00
Enrico Forestieri
ea4d17acb3 Fix bug #6581: Empty base of a script inset should not be shown as an empty brace inset on screen
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33705 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-10 20:10:30 +00:00
Vincent van Ravesteijn
a866d2e1a9 Add missing continue. I guess I found this when running latex with a symbol file with some windows encoding or line-ends.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33698 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-10 16:58:20 +00:00
Vincent van Ravesteijn
5d60104a69 Whitespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33697 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-10 16:57:01 +00:00
Vincent van Ravesteijn
cd5d57e504 Do not use const char *.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33696 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-10 16:56:13 +00:00
Richard Heck
8a6b77bfe1 Introduce isBufferValid() method now, that returns true also for cloned
Buffers. Use it, as well.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33679 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-08 19:07:05 +00:00
Richard Heck
a2e06a3c15 Eliminate redundancy.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33678 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-08 19:06:28 +00:00
Richard Heck
821cffab63 s/isBufferValid/isBufferLoaded/
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33677 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-08 18:57:42 +00:00
Abdelrazak Younes
321f6031af Fix bug #6564. The cmd status retrieval is quite broken within tables (math or text).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33639 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-06 14:19:21 +00:00
Richard Heck
d65020b293 s/updateLabels/updateBuffer/g, per a suggestion of Abdel's.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33613 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-03 22:13:45 +00:00
Abdelrazak Younes
5d235f5251 Migrate GuiHSPace to InsetParamsDialog.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33525 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-21 09:28:33 +00:00
Abdelrazak Younes
b5049e769b * InsetTabular cleanup:
- proper message passing for all tabular features
- properly define which feature needs an argument

* replace LFUN_TABULAR_FEATURE with LFUN_INSET_MODIFY
- The math tables are also affected. In the future a common base class
between math and text table will solve this inconsistency.
- There is a hack in GuiApplication in order to not rename the toolbar
icons. This will have to be cleaned up with a general icon naming for
LFUN_INSET_MODIFY... to be discussed.

* Tabular Dialog:
- big cleanup, lots and lots of bug fixing here
- migrated to InsetParamsWidget


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33495 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-18 08:28:46 +00:00
Jürgen Spitzmüller
1178b30c54 generalize special handling of command inset parameters on LaTeX output (escaping, etc.).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33461 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-13 13:08:32 +00:00
Abdelrazak Younes
377cdd5f6c Transfer LyXfunc code to GuiApplication::dispatch() and getStatus(). Now
a lot of simplification is possible. Except some instability period...


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33389 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-09 16:11:13 +00:00
Jürgen Spitzmüller
a70e21a34e Patch by John McCabe-Dansted to fix bug #6502:
Wrong line count with parent math macros:

* TeXRow.{cpp,h}:
	- new helper function to insert multiple newline at once.

* mathed/MacroTable.{cpp,h}:
* mathed/MacroTemplate.{cpp,h}:
	- make write() an int, returning number of newlines

* Buffer.cpp (writeLaTeXSource):
	- update texrow's newline on parent macro output.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33367 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-08 17:39:55 +00:00
Tommaso Cucinotta
c0c1e1fd2b Most common cases with regexps seem to work, at least with ignore-format on.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33355 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-07 21:44:31 +00:00
Tommaso Cucinotta
33dca1df0f Now the coloured box around the regexp is visible also if InsetPreview is enabled.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33336 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-05 18:34:01 +00:00
Tommaso Cucinotta
9e057e7533 Improved appearence of regexp insets (at least I hope so), also suggested in #6498 (Regex looks like math).
- added a frame around regexp insets, with a customizable dedicated color code
- regexp insets font turned to texttt
- recovered back the preamble snippet allowing for latex compilation of regexp insets, something that happens if you have instant preview on.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33329 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-05 09:00:40 +00:00
Enrico Forestieri
d652a84f4b Automate the setting of the ascii only flag.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33328 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-04 23:03:48 +00:00
Enrico Forestieri
271d53fdd0 Fix bug #3325: Labels with special characters in equations do not work
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33325 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-04 19:08:17 +00:00
Enrico Forestieri
63cb2b52aa Fix bug #2872: reference in math to label with "underscore"...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33324 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-04 10:32:58 +00:00
Vincent van Ravesteijn
8f09cda025 Please Abdel.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33292 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-31 13:38:47 +00:00
Vincent van Ravesteijn
00bbabd00f Fix bug #6489: Assertion triggered when deleting contents of math ERT. (probably a stdlib assertion).
Do not access name_[0] if name_ has size 0.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33290 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-31 13:03:31 +00:00
Vincent van Ravesteijn
489b80aef4 Correct the mess introduced in r33250.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33251 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-28 20:03:09 +00:00
Vincent van Ravesteijn
61eecb8a44 Expand the string "regexp" to something user will better be able to understand.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33250 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-28 19:56:12 +00:00
Jürgen Spitzmüller
7bbd67eb26 * Implement updateLabels in mathed and add the MathRef insets to the references cache.
This fixes bug #1560.

The diverse setBuffer / updateLabels calls need auditing. See FIXMEs.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33249 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-28 17:37:22 +00:00
Jürgen Spitzmüller
fd40810a8c * InsetMathHull.h: constness, as suggested by Abdel.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33243 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-28 09:18:15 +00:00
Vincent van Ravesteijn
a4e03846cd Fix doxygen output for grouped items. Without the /name tag doxygen shows the group name as the name of the first item. Moreover, the comment styles are somewhat standardized.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33236 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-27 18:10:33 +00:00
Jürgen Spitzmüller
a484f95910 When pasting a math inset with a label, check for duplicates (as we do outside math)
(bug 6218)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33230 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-27 08:41:19 +00:00
Jean-Marc Lasgouttes
fe9a43f44b Add DispatchResult argument to BufferView::dispatch, and remove explicit updates in there.
Split LyXFunc::dispatch into a wrapper that does the actual screen updates and
a worker method that updates a DispatchResult object.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33226 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-25 15:14:41 +00:00
Richard Heck
1d6923b65b Use the attributes MTag now takes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33149 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-21 21:06:44 +00:00
Richard Heck
7a32a8489a Allow MTag to take attributes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33148 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-21 21:06:29 +00:00
Richard Heck
4a4ec0c96a We do not need to extract exponents, either.
There may be more we do not need to do.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33147 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-21 21:05:53 +00:00
Richard Heck
51a388e745 We do not need to extract limits for MathML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33146 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-21 21:01:51 +00:00
Richard Heck
a36607b800 XHTML for InsetMathSize.
We now have nice output of the User's Guide.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33145 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-21 20:48:12 +00:00
Richard Heck
caa4e94bf0 Get rid of some magic booleans in updateLabels() and related routines.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33110 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-20 19:42:12 +00:00
Richard Heck
3e654186d2 Move the StartTag, EndTag, and CompTag classes into the html namespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33099 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-19 22:08:04 +00:00
Enrico Forestieri
19c935ca37 Fix XHTML output on systems where char_type is not typedef'd to wchar_t.
See docstream.h for the explanation.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33027 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-14 13:29:13 +00:00
Richard Heck
50b700938b Whitespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32997 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-12 20:22:07 +00:00
Richard Heck
cb346ae202 Whitespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32976 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-11 19:29:33 +00:00
Richard Heck
bae9393d53 Minor re-organization.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32975 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-11 18:25:26 +00:00
Richard Heck
a8dc000901 Include omitted case, and fix underline.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32759 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-03 17:46:02 +00:00
Abdelrazak Younes
930088a07d Fix bug #6388
* Buffer can be retrieved from currently set buffer_.
* detachMacroParameters() doesn't really need a Cursor.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32752 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-03 11:00:21 +00:00