Commit Graph

2704 Commits

Author SHA1 Message Date
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
Richard Heck
acc158a846 Add a comment and update notes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32728 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 23:31:30 +00:00
Richard Heck
69fc2f6702 Mostly comments about InsetMathSplit, which more or less works.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32727 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 23:28:19 +00:00
Richard Heck
316af4a90b These are in lib/symbols, so should have been caught by the first test:
# split environments with optional valign argument.
# the others (split and alignedat) are hardcoded.
aligned           split       none
gathered          split       none
# from Morten H\o gholm's mathtools.sty:
lgathered         split       none
rgathered         split       none

Right? Someone tell me if that is wrong.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32725 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 22:31:12 +00:00
Richard Heck
95f07cf181 Fix comments and whitespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32722 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 22:03:15 +00:00
Richard Heck
ab1f7c3fc5 MathML for XArrow.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32721 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 22:02:19 +00:00
Richard Heck
791d28bf0b MathML for Stackrel.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32720 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 21:54:00 +00:00
Richard Heck
f29db33e69 MathML for Underset. And fix Overset.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32719 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 21:48:56 +00:00
Richard Heck
bee7a4c8d2 MathML for Overset.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32718 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 21:44:12 +00:00
Richard Heck
07aca7cccc Fix MathML for binominals.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32717 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 21:22:04 +00:00
Richard Heck
b129d5ebdc We do not need special treatment of differentials for MathML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32716 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 21:09:28 +00:00
Richard Heck
f621c97411 MathML for MathCases.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32715 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 21:01:00 +00:00
Richard Heck
14001c49fe Fix up the InsetMathGrid output: detect better if we have a table, and
use appropriate tags.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32714 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 21:00:49 +00:00
Richard Heck
c95c30184d MBox is currently inactive, but in case it becomes active....
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32713 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 20:44:09 +00:00
Richard Heck
eb17e9c362 MathML for MathBox and such.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32712 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 20:36:34 +00:00
Richard Heck
19cd5f0e82 Fix MathML output for MathBox, as suggested in the FIXME.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32711 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 19:49:29 +00:00
Richard Heck
812c3204bd Special handing of space characters during text output.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32709 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 19:40:36 +00:00
Richard Heck
3915c2d01a Fix some issues with textmode. We'll let SetMode() handle as much of
this as possible for us.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32708 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 19:35:56 +00:00
Richard Heck
5536d442cd Don't wrap numbers in text in <mn>.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32706 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 18:56:55 +00:00
Richard Heck
88d5bfac6a Wrap text in <mtext>, not <mrow>.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32705 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 18:53:40 +00:00
Richard Heck
25edee2ead A little debugging output.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32704 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 18:40:20 +00:00
Richard Heck
0b8c6246ff Use SetMode() to manage text and math mode.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32703 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 18:38:01 +00:00
Richard Heck
4479a7f689 A simple version of ModeSpecifier for MathStream.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32702 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 18:37:09 +00:00
Richard Heck
dfe2d5ae4d FIXME.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32701 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 17:33:22 +00:00
Richard Heck
13b88d6166 Fix MathML output of wide characters.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32699 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 17:31:13 +00:00
Richard Heck
a62d46b5e3 MathML for InsetMathFont. Unfortunately, this does not seem to render at
the moment in Firefox, but it is the right way to do it.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32697 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 16:59:56 +00:00
Richard Heck
9ab24e95b9 MathML for InsetMathBoldSymbol.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32693 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 16:39:37 +00:00
Richard Heck
98e6886dc4 Provide for the possibility of deferred material, per Andre's excellent
suggestion. Now I wish I'd done XHTMLStream the same way....


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32691 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 15:52:57 +00:00
Richard Heck
c060a85d81 Revert r32684, per Andre's suggestion.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32689 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 15:46:39 +00:00
Richard Heck
f37a1b8aea MathML for InsetMathBig.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32685 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 04:16:45 +00:00
Richard Heck
8a0134cc8c Introduce a return value for mathmlize(). We will need this to be able
to defer labels.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32684 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-31 03:50:12 +00:00
Richard Heck
27d580b5c0 Thanks, Andre.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32649 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-26 20:29:57 +00:00
Richard Heck
27f8da648d Output numbers as numbers.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32644 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-26 15:08:03 +00:00
Richard Heck
a278ff37c3 Ignore this in MathML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32643 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-26 15:05:43 +00:00
Richard Heck
d8053e2683 Ensuring math should just be doing math in MathML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32642 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-26 15:01:03 +00:00
Richard Heck
904129cba6 Get MathML output working for math decorations.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32636 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-25 23:23:42 +00:00
Richard Heck
bae47150c6 Must wrap everything...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32635 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-25 23:18:38 +00:00
Richard Heck
f7c53f3af6 Add a FIXME.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32634 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-25 21:47:42 +00:00
Richard Heck
8fa637a36f Get MathML output for InsetMathDots working.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32633 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-25 21:42:07 +00:00
Richard Heck
e1ed39f8b4 So this changes the way we handle sums and such. We just don't need to
handle them specially for MathML, and we don't need to split scripts
either.

Wouldn't it have been nice if I'd realized that before?


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32572 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-17 17:52:09 +00:00
Richard Heck
64c84ae883 Last commit didn't complete reversion, as I forgot to resolve the
conflicted state of this file.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32571 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-17 17:50:46 +00:00
Richard Heck
812616e100 Revert r32566 and r32568.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32569 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-17 17:42:21 +00:00
Richard Heck
46e1424678 Make InsetMathExInt handle products as well as sums.
We can do more here, but it's actually not clear to me whether we even
need to give these things special treatment for MathML. I may revert
this.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32568 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-17 17:28:07 +00:00
Richard Heck
c3fc67ef54 Fix up MathML output of integrals.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32567 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-17 16:06:00 +00:00
Richard Heck
2ae6331072 Fix MathML output of sums.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32566 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-17 15:54:49 +00:00
Richard Heck
873c9ad4f8 Fix up math scripts. Everything needs to go into <mrow>. (This acts as a
general grouping mechanism, basically.)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32564 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-17 15:39:18 +00:00
Vincent van Ravesteijn
5a530cca94 Do not hardcode the background color of the preview at two places.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32562 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-17 15:21:08 +00:00
Vincent van Ravesteijn
6b96abd211 Correctly paint the background of the instant preview of a displayed equation.
For a displayed equation, the height is artificially increased by a displayMargin() in InsetMathHull::metrics if it is a displayed equation and there is a preview. 

This extra height is not covered by the preview image and what one can see is the background as drawn by the MathHull inset. The color of this background should be either Color_mathbg or Color_background depending on whether the preview is shown or not.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32560 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-17 14:09:37 +00:00
Richard Heck
48b09463dd Add comment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32554 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-16 17:44:40 +00:00
Richard Heck
c271d0d8c1 Whitespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32552 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-16 17:22:56 +00:00
Richard Heck
96012a8859 Fix MathML for fractions.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32551 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-16 17:22:42 +00:00
Richard Heck
1a74f3d103 Add a fixme, in effect, about dots.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32550 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-16 17:12:58 +00:00
Richard Heck
05f1f323de Detect appropriate delimiter for matrices.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32549 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-16 17:01:09 +00:00
Richard Heck
05336422a4 Fix matrix output, at least a bit. A little more work needs to be done
here, though.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32548 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-16 16:43:26 +00:00
Richard Heck
2635724b57 In a normal grid, we can just use <mrow>.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32547 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-16 15:50:31 +00:00
Richard Heck
ce2e071cdf This should do it for the delimiters.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32546 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-16 15:50:05 +00:00
Richard Heck
d4b3b61593 A bit more for math delim.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32545 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-16 15:35:25 +00:00
Richard Heck
7aeda251ce More Math ML fixes. Using <mfenced> seems to be a bad idea, and the <mo>
version is claimed to be completely equivalent.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32543 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-16 15:12:34 +00:00
Richard Heck
9e149b8919 Fix a few MathML things: the default output and the output of limits.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32542 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-16 14:53:23 +00:00
Richard Heck
5f27992e16 Restore the MathML output we had before. Still work to be done here.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32540 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-15 13:14:57 +00:00
Vincent van Ravesteijn
c4701b2256 Fix bug #6341: Can't set equal spacing in xymatrix.
Now we also 'support' \xymatrix!C (columns), \xymatrix!R (rows), \xymatrix!0 (all equal and ignore entry sizes) and \xymatrix! (all equal).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32518 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-13 21:32:08 +00:00
Enrico Forestieri
c2befc2b1e Fix bug #6382: Wrong cursor placement when inserting math
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32473 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-11 01:30:33 +00:00
Vincent van Ravesteijn
e6d1759340 CitationUI and InsetMathChar:
squeeze warnings

output_xhtml:
  fix whitespace

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32380 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-07 01:28:14 +00:00
Vincent van Ravesteijn
80ac638d42 Fix trunk after r32352.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32353 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-05 01:07:38 +00:00
Vincent van Ravesteijn
b56e4c5697 Do not start loading a preview each time one is added. This caused LyX to generate LaTeX code of the document over and over again for each math inset. As a consequence, the loading of the User's Guide took ages.
Fixes a bug introduced in r32157 while fixing bug #4360.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32352 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-05 00:43:28 +00:00
Richard Heck
996505c2ae This patch introduces an optional argument to Buffer::updateLabels(), so
as to allow us to call the routine when we are preparing for output and
so to do certain things we might not want to do every time. 

This is an abuse of updateLabels(), in a way, but updateLabels() long
ago became the general recurse-through-the-Buffer routine, and to
implement the sort of thing I want to do here in validate(), say, much
of the code in updateLabels()---in particular, the counter-update
code---would have to be duplicated. So I believe this is the best, and
easiest, way to go.

Actual use of the new argument will follow.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32318 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-04 03:03:38 +00:00
Jean-Marc Lasgouttes
2f7d14a7e1 fix warning
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32219 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-27 10:00:12 +00:00
Enrico Forestieri
ae40a33202 Fix bug #6351: Crash when editing the unit on a number
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32211 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-26 01:56:50 +00:00
Vincent van Ravesteijn
92c8561674 Some cosmetics after r32157.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32159 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-22 21:45:51 +00:00
Vincent van Ravesteijn
f19b6178a9 Fix bug #4360: Instant preview does not render formulas which contain math-macro from input file.
Patch from Stefan.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32157 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-22 20:50:35 +00:00
Vincent van Ravesteijn
fd25e06129 Revert some unwanted debug info.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32146 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-22 02:09:10 +00:00
Vincent van Ravesteijn
cd514c458a Fix bug #6310: Incorrect latex for sparse matrices with vertical lines.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32145 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-22 02:03:09 +00:00
Jean-Marc Lasgouttes
1545219dcb squash warning
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32066 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-17 16:57:35 +00:00
Enrico Forestieri
935d1a3221 Clarify comment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32051 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-16 14:11:25 +00:00
Enrico Forestieri
d3378a6b84 Style: insetCur -> inset_cursor
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32049 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-16 13:31:01 +00:00
Enrico Forestieri
7365a29fea Fix bug #6208: macro crash.
The fix consists in not updating the macro while it is being edited,
and this is accomplished by the changes in MathData::updateMacros().
However, when clicking away with the mouse I was getting another crash,
which is cured by the changes in MathMacro::notifyCursorLeaves().


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32037 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-15 23:54:45 +00:00
Abdelrazak Younes
216f9156dc Fix MathML export for < and > special characters.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32033 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-15 21:45:21 +00:00
Richard Heck
ae60474513 Get math macros working for MathML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32004 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-15 12:30:26 +00:00
Richard Heck
8340a17e96 Typo.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31997 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-14 23:28:50 +00:00
Richard Heck
584bca0fe8 MathML for InsetMathSpace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31994 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-14 21:38:28 +00:00
Richard Heck
70217ba676 Initial work on InsetMathBox. This doesn't really work yet, for reasons
given in the FIXME.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31993 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-14 21:11:23 +00:00
Richard Heck
ff7d0d5c6e Fix whitespace, comment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31991 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-14 20:40:09 +00:00
Richard Heck
0229c21be4 Fix single character output for MathML. Kind of.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31990 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-14 20:38:22 +00:00
Richard Heck
9ba340b218 Fix parsing of functions and arguments for MathML.
The enum is overkill for now, but will be useful if anyone decides
really to return to this stuff. It's apparent that there are some 
powerful tools here---like the ability to pipe expressions through
Mathematica.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31989 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-14 20:20:17 +00:00
Richard Heck
963c22353a Fix delimiters.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31988 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-14 20:18:32 +00:00
Richard Heck
177ff11cfb Whoops. Forgot to fix this.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31987 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-14 19:52:06 +00:00
Richard Heck
25f429d3e5 Fix external function output for MathML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31986 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-14 19:41:22 +00:00
Richard Heck
90f392425f FIXME
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31984 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-14 16:58:32 +00:00
Richard Heck
886304a588 Little bit of fixup for math symbols.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31983 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-14 16:21:33 +00:00
Richard Heck
83c7a5576f Fix silly bit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31981 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-14 15:55:51 +00:00
Richard Heck
54b4b8e6b4 Get MathML output for XHTML working a bit.
Turns out MathML is already here, for the most part, so this will
not be too bad at all. 

Anyone else think that is very cool?!



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31979 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-14 15:25:32 +00:00
Uwe Stöhr
d5099c8605 - introduce option to suppress the LaTeX package mhchem, fileformat change
The fileformat change is also needed because of our mistake that we load mhchem since LyX 1.6.4 automatically so that files created with LyX 1.6.4 won't compile under LyX 1.6.3. Now at least all files created or opened with LyX 1.7 can be reverted to the fileformat of LyX 1.6.x and can therefore be read by all LyX 1.6.x versions.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31941 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-11 01:48:07 +00:00
Enrico Forestieri
f83a6cc3af Don't use updateMacros() in the math parser, in order to avoid
performance problems when loading documents with lots of macros.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31907 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-08 18:47:33 +00:00
Enrico Forestieri
c34cff8d11 In order to avoid confusion, always use buf in Parser::parse1(),
instead of mixed usage of buffer_ and buf.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31905 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-08 18:22:57 +00:00
Abdelrazak Younes
882e2eeb7b InsetCommand ctor: Pass 'Buffer *'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31902 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-08 16:10:34 +00:00
Abdelrazak Younes
82c7e15e64 Uniformize Inset construction (passing Buffer * everywhere). Lots of cleanup to do still...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31901 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-08 15:53:21 +00:00
Abdelrazak Younes
ff4460603e Make Buffer argument mandatory in most of the InsetMath based class... boring work...
Math manual loads and save correctly it seems but expect some instability period.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31898 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-08 11:45:46 +00:00
Pavel Sanda
dac1c003d6 Unneeded headers.
It would be interesting to know how many headers do we actually use in our code.
Nice task for some script.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31893 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-07 12:54:19 +00:00
Pavel Sanda
f57a4615cd Header sort order
../treeview.patch

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31892 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-07 12:54:08 +00:00
Enrico Forestieri
a1a34443ef Fix bug #5530: LyX expansion in math-macro overwritten by default one.
This patch initializes the buffer_ member of a MathHull inset in most
(but not all) cases. The problems with buffer_ should be greatly
allievated now, but there still can be some corner case.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31873 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-06 15:18:48 +00:00
Vincent van Ravesteijn
d63403205b Fix bug #5968: Assertion while reading a document with multiple equation labels.
This is another ad-hoc solution for the problem of a zero buffer pointer while reading a document or when using cut&paste.

This simple solution would be suitable for branch.

see also e.g. r29085, r28319, bug #5688.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31861 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-05 00:38:09 +00:00
Vincent van Ravesteijn
d3c786eed6 Fix bug #6297: Use of Fraktur font in boxed equation does not automatically include amssymb.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31819 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-01 22:16:49 +00:00
Enrico Forestieri
5e26133947 Fix another problem related to bug #6284.
When pasting "# a" within \mbox{} through Ctrl+Shift+V, the space is
correctly retained. However, using Ctrl+Shift+V for pasting "^ a" into
\mbox{}, the space gets swallowed. This is fixed by this patch.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31708 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-24 15:54:03 +00:00
Enrico Forestieri
1535e4b825 Fix the rest of bug #6284.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31694 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-23 15:00:36 +00:00
Enrico Forestieri
456449bd56 Better fix for bug #6284. There's no need to check for spaces here
as they are already accounted for during the tokenization phase.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31687 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-20 15:26:22 +00:00
Enrico Forestieri
5484edda22 Fix bug #6284: missing space between # and text in math mode when using \mbox
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31680 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-19 23:11:36 +00:00
Jean-Marc Lasgouttes
60dca30530 disable the del-suppresses-equation-label-at-end feature (not easy to describe, is it?) when there is a selection
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31600 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-12 15:20:23 +00:00
Enrico Forestieri
a7c944b280 Fix bug #6250: LyX 1.6.4 crashes when copying Japanese text in math to clipboard
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31572 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-09 21:33:08 +00:00
Enrico Forestieri
6fb07e35c5 Fix bug #6264: Broken undo of removed script in mathed when both scripts are present.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31558 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-08 12:32:11 +00:00
Pavel Sanda
5847e05e12 Already done
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31543 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-06 14:26:18 +00:00
Enrico Forestieri
eb065995b1 Fix bug #6246: InsetMathKern is broken
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31474 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-27 17:29:01 +00:00
Enrico Forestieri
21fcdfb479 Fix a crash when the modified uncompleted macro is a font changing command.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31379 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-12 21:20:51 +00:00
Pavel Sanda
ab36804b6c Fix searching bug #6139.
Patch by Tommaso.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31053 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-15 15:35:14 +00:00
Pavel Sanda
4c338ac22d Fix bug #2045.
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg153796.html


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30997 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-12 22:09:50 +00:00
Abdelrazak Younes
5425c53fd1 Now that Text knows its owner, use the associated Buffer access.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30941 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 15:29:34 +00:00
Abdelrazak Younes
e8674d6141 General cleanup: Text is (or should be) nothing more than InsetText private implementation. We need access to the owner InsetText property in many cases where we instead take the Paragraph owner inset, which is the same of course. Next step is to avoid this indirection whenever possible.
I also updated InsetMathMBox so that it remains compilable, even if not used.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30940 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 15:05:36 +00:00
Jürgen Spitzmüller
89e7f60e1d Catch encoding exception when performing instant preview on an uncodable char (bug 6116).
* MathStream{.cpp, h}:
	- replace bool dryrun() by enum output that also knows whether the stream is for instant preview
* InsetMathHull.cpp:
	- tell the stream whether we use it for instant preview.
* MathString.cpp (write):
	- gracefully catch encoding exception for instant preview.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30895 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-07 05:25:22 +00:00
Enrico Forestieri
abb1ff4a66 MacroData has a buffer_ member, so use this instead of a dummy one.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30871 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-06 10:25:48 +00:00
Enrico Forestieri
d53c2ec215 Fix bug #6014: Assertion when pasting "\def" into 2.0svn
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30870 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-06 09:53:06 +00:00
Vincent van Ravesteijn
11c3f2d1bc Fix the math output mess I caused in r30822.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30860 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-04 20:34:53 +00:00
Jean-Marc Lasgouttes
ca7b18a5db Try to implement properly recursive setBuffer. Normally, implmenting
for InsetMathNest and InsetMathHull is enough.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30847 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-03 10:30:34 +00:00
Vincent van Ravesteijn
13bb684eb0 Improve LaTeX output of arrays in math. Always output a '\n' except in the case that the line is completely empty.
see also:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg153349.html

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30822 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-01 22:03:12 +00:00
Vincent van Ravesteijn
93e39157b6 Add const versions of Inset::asInsetMath.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30819 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-01 21:39:14 +00:00
Vincent van Ravesteijn
b62b366a67 Fix bug #2969: Double labels appear on empty lines of multi-line equations.
This reverts part of r10553. There, an extra '//' was added when the last line was empty. However, this really makes an extra line and that is visible when the lines have a line number. The bug #2067 that would have been fixed by this does not seem to 'exist' anymore.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30795 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-26 20:25:11 +00:00
Uwe Stöhr
0b33b9d090 allow to use glue lengths in the HSpace dialog; file format change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30724 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-21 11:51:43 +00:00
Richard Heck
0facb603fe Give inset codes to all the math insets, so we get more information when
we run into assertions.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30634 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-16 19:00:24 +00:00
Richard Heck
6de1a1a2da Fix another assertion.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30629 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-16 13:34:33 +00:00
Richard Heck
93593f8c15 Fix crash related to empty buffer_ argument.
Restore assertion removed at r30602.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30609 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-15 19:20:53 +00:00
Jean-Marc Lasgouttes
78c45693ef remove all trace of editMessage
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30585 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-14 18:56:13 +00:00
Pavel Sanda
34fc56c9bc Hopefully fixes #6082
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg153098.html

Juergen?


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30581 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-14 18:06:19 +00:00
Pavel Sanda
49ea9227cd Fix leftover from r27378. Patch and report from John McCabe-Dansted.
Presumably it fixes
"r30414 unselects insets after a fraction of a second. 1.5.7 doesn't exhibit this bug"
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg152960.html

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30536 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-13 09:50:46 +00:00
Uwe Stöhr
802067ecdc support for matrix decoration in the MathMatrix dialog;
introduces a new LFUN and fixes #4620

This can in principle also go to branch when new LFUNs are there allowed, Jürgen?

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30523 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-12 21:39:21 +00:00
Enrico Forestieri
ce7302098c Allow undoing changes to the name of macros that are already finalized.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30434 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-09 18:00:27 +00:00
Enrico Forestieri
0c2902d0c0 Better fix for bug #5923. Now the macro name can be freely edited.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30425 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-09 15:21:21 +00:00
Enrico Forestieri
6852e976b0 Proper fix for bug #5923 that doesn't introduce bug #6015.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30410 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-08 01:48:19 +00:00
Enrico Forestieri
98fb455d3f Revert r30398, r30396, r30395, r30393, r30392, and r29387.
Soon to be replaced with a proper fix.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30409 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-08 01:41:06 +00:00
Vincent van Ravesteijn
1c6eea89b4 Fix previous commit for macros with arguments, again.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30398 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-07 08:23:31 +00:00
Vincent van Ravesteijn
ebe7913a47 Only allow the cursor to be in lastpos for macros as editing in macro-mode is only possible at lastpos.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30396 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-07 08:16:21 +00:00
Vincent van Ravesteijn
ebe9b42279 Fix crash when selecting part of a macro and trying to resume macro-mode editing.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30395 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-07 08:13:07 +00:00
Vincent van Ravesteijn
abdb069f9e Remove unneeded check for cur.pos() > 0.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30393 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-07 08:12:08 +00:00
Vincent van Ravesteijn
fb57c00c0d Fix bug #6015: Macro with arguments is not finished when pressing space
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30392 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-07 08:08:14 +00:00
Enrico Forestieri
14c5adf034 Better fix for #6049 and similar cases with other math insets.
In order to fix #6047, I needed a further mode other than MATH_MODE
and TEXT_MODE. In this mode, LyX should have behaved as in TEXT_MODE
but should also have allowed math mode commands. Well, this mode was
already implemented in LyX as UNDECIDED_MODE. Currently, this mode is
used nowhere except in the strange case where a math hull is not
present. It cannot be created by any other mean than editing a .lyx
file and getting rid of the $...$ math delimiters. This kind of
file can be reloaded in LyX and you would see a strange math formula
in text mode outside of mathed. Of course, trying to latex this file
would cause errors. After this commit, this strange mode is still
possible, but now all math insets correctly declare that their mode
is math mode (instead of undecided, and unless they state otherwise)
and bugs such as #6049 are fixed.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30385 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-06 00:48:07 +00:00
Enrico Forestieri
e8ecb8b483 Fix bug #6049: Mathed: spacebar misbehavior while typing fractions
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30384 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-05 23:50:16 +00:00
Enrico Forestieri
d178fabe24 Refinements to fix for bug #6041.
- Fix display of centered vertical alignment status.
- Avid else branch and simply return early (conforms to the used style).
- Smash unnecessary debug output.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30372 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-05 13:36:34 +00:00
Enrico Forestieri
0b219d2541 Fix bug #6041: "tabular-feature align-" in a math-matrix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30363 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-05 00:24:17 +00:00
Enrico Forestieri
0a90c42b86 Fix bugs #6047, #4043, and #5394.
6047: Lyx 1.6.3 unable to typeset the third chemical equation of the
      file mhchem.lyx (package mhchem)
4043: mhchem support
5394: support for the mhchems's \ce command
The \ce and \cf insets are text mode environments that allow entering
spaces and mathmode commands. LyX leaves them alone and doesn't try to
be smart, i.e., the behaviour is exactly the same we had in the old days
with text-in-math mode environments, before the introduction of the
\ensuremath and \lyxmathsym macros. This means that in those environments
one has to know what he is doing, as LyX will not offer any protection.
The hack of enclosing \ce and \cf in a \text{} environment in order to
be able to enter spaces is no longer necessary.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30338 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-03 00:05:58 +00:00
Enrico Forestieri
5415144621 Fix bug #6033: Initial character sometimes eaten by math-insert
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30246 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-23 18:01:31 +00:00
Georg Baum
9c662bf442 - fix requirements of \dddot
- add support for \ddddot
- add partial support for inverse diagonal dots (i. e. they are recognized and
  displayed correctly, but the needed package is not loaded, because it would
  need an off/auto/on setting as amsmath, and that calls for a general solution)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30162 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-18 20:04:27 +00:00
Enrico Forestieri
4559c29eeb Reintroduce workaround due to nested math hulls as it is not
guaranteed that LyX is always able to replace $...$ constructs
with \ensuremath{...}.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30145 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-16 21:22:32 +00:00
Uwe Stöhr
39c96ebb75 InsetMathFrac.cpp: fix the regression now completely
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29849 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-25 22:46:51 +00:00
Uwe Stöhr
e83c2032ac InsetMathFrac.cpp: fix regression reported here: http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg151588.html
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29847 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-25 22:42:22 +00:00
Vincent van Ravesteijn
1458ac6a7c Set flag for LFUN_MATH_MUTATE. Also, remove some 'ghost code' from InsetMathNest (if this had a purpose it should have been documented).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29764 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-21 12:45:31 +00:00
Vincent van Ravesteijn
788b0097a6 Hide "Number this line" for single line equations.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29762 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-21 10:14:07 +00:00
Vincent van Ravesteijn
60b26d1aac Fix the copy label as ref for equations from the context menu.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29754 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-20 23:58:29 +00:00
Enrico Forestieri
1a65f586ee Fix bug #1435. Now Ctrl-m enters math mode when in text-in-math mode,
instead of producing nested text boxes.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29746 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-20 14:52:03 +00:00
Vincent van Ravesteijn
193b36e71f Fix bug #5923: Resume macromode.
When the user wants to resume a macro, delete the current one and insert a new one, which is not yet finalized.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29687 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-15 22:04:41 +00:00
Vincent van Ravesteijn
7fc21bf766 Fix bug #2034: Inconsistent behavior of cursor inside mathed.
When closing the macromode, do the same trick as in lines 835--838.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29686 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-15 22:00:43 +00:00
Vincent van Ravesteijn
a1a9c4c4ba Fix bug #5540: Crash in MathAtom on Undo.
No undo steps are recorded for math-macros. Now, it is also not done when we resume to edit a macro.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29685 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-15 21:51:43 +00:00
Vincent van Ravesteijn
8996be1208 Restore Object.Event order for:
- LFUN_LABEL_COPY_AS_REF,
- LFUN_LABEL_INSERT_AS_REF.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29680 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-15 21:05:19 +00:00
Vincent van Ravesteijn
13da98685d * InsetMathHull.cpp : constify.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29679 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-15 20:57:48 +00:00
Vincent van Ravesteijn
3c976db90b Fix bug #5948: Copy as reference for equation labels.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29678 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-15 20:54:15 +00:00
André Pönitz
89e4055189 cosmestics (test...)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29649 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-12 21:03:47 +00:00
Enrico Forestieri
024378db01 Remove workaround due to nested math hulls. See:
http://thread.gmane.org/gmane.editors.lyx.devel/110190/focus=110242


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29600 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-09 21:16:04 +00:00
Enrico Forestieri
318fad58a6 Don't create nested math hulls (fixes bug #5392).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29599 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-09 21:15:36 +00:00
Vincent van Ravesteijn
4c9fe33c83 * Move handling of LFUN_INSET_SETTINGS to Inset,
* Remove the EDITABLE enum,
* add functions hasSettings() for all insets.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29375 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-22 20:55:13 +00:00
Jean-Marc Lasgouttes
37d6ef964c fix compiler warnings in new mathfrac/binom code
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29257 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-16 09:15:24 +00:00
Uwe Stöhr
23f833a92b InsetMathFrac.cpp: add some comments and remove an unused code line
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29147 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-08 00:19:57 +00:00
Uwe Stöhr
23f9e34a08 InsetMathFrac.cpp: some code optimization
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29133 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-07 01:02:34 +00:00
Uwe Stöhr
48236d215c InsetMathNest.cpp: forgot this in last commit
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29132 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-07 00:23:38 +00:00
Uwe Stöhr
8225a56dfe InsetMathFrac: reimplement \cfrac with its optional argument the way Enrico proposed (http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg149855.html)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29131 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-06 23:58:42 +00:00
Enrico Forestieri
3e341497a8 Introduce a helper function and use it.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29130 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-06 22:12:22 +00:00
Enrico Forestieri
56210f5a39 Don't wrap characters marked as mathalpha in the unicodesymbols file.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29121 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-06 09:04:00 +00:00
Enrico Forestieri
ed6f569fc8 Don't create nested text-in-math environments.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29118 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-05 23:34:22 +00:00
Uwe Stöhr
a97b097768 major code cleanup for fractions:
- InsetMathFrac.cpp/h:
    - InsetCFrac, InsetDFrac, and InsetTFrac are now included as kind of InsetMathFrac
    - InsetDBinom and InsetTBinum are now included as kind of InsetMathBinom
    - support for the optional argument of \cfrac (cursor position still needs to be fixed, see post in mailing list)

- stdtoolbars.inc:
    - add entries for \cfrac
    - remove entry for \atop since atop is outdated and only in LaTeX2e for compatibility reasons (according to the LaTeX companion, you get warnings from amsmath in the LaTeX log when using atop)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29114 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-05 19:52:53 +00:00
Enrico Forestieri
8f52d3b7db The \text macro does not require the full AMS package. Also load amstext
when a text-in-math environment is used, such that super and subscripts
are typeset in the correct size.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29098 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-05 02:11:07 +00:00
Enrico Forestieri
67cbe895fe No need to call t.character() as the char is already available in c.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29097 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-05 01:49:25 +00:00
Enrico Forestieri
376f3f08bd Unicode symbols entered or pasted in math are wrapped in \text{} by default.
Unwrapped symbols can be obtained either by dissolving the text inset or by
verbatim paste (Ctrl+Shift+V). In such a case, the symbols are wrapped in
\lyxmathsym when exporting to latex, as usual.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29096 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-05 01:14:10 +00:00
Uwe Stöhr
a9c466ae2f InsetMathFrac.h: forgot to add my name in r28639
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29082 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-04 11:33:13 +00:00
Enrico Forestieri
d786fa0ab8 Partly revert r28731 (see discussion in bug 5836).
Essentially, it is not true that Cyrillic characters in math are to be typeset
in italic by default, and LyX already permits to style them as desired. 


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28981 a592a061-630c-0410-9148-cb99ea01b6c8
2009-03-30 22:40:27 +00:00
Jürgen Spitzmüller
13a1390271 * InsetMathCases.cpp:
- fix string.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28835 a592a061-630c-0410-9148-cb99ea01b6c8
2009-03-17 10:47:55 +00:00
Enrico Forestieri
3175a28893 Fix bug 5836 (http://bugzilla.lyx.org/show_bug.cgi?id=5836)
Cyrillic formatted text in mathmode

If some other letters from some script need to be typeset in italic,
it will suffice adding the flag "mathalpha" to the unicodesymbols file.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28731 a592a061-630c-0410-9148-cb99ea01b6c8
2009-03-09 06:34:00 +00:00
Jean-Marc Lasgouttes
f24870ea9b In math matrices, make sure that only the align-type tablar-feature can get a check box in menus (with some themes, empty check boxes are visible)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28703 a592a061-630c-0410-9148-cb99ea01b6c8
2009-03-04 17:07:05 +00:00
Uwe Stöhr
fd051070a1 InsetMathCases.cpp: fix http://bugzilla.lyx.org/show_bug.cgi?id=4141
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28700 a592a061-630c-0410-9148-cb99ea01b6c8
2009-03-04 01:30:08 +00:00
Uwe Stöhr
ff9f9c92ae support for \cfrac in mathed, fixes bug 2473 and can also go to LyX 1.6.3
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28639 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-28 02:43:26 +00:00
Enrico Forestieri
654600486b Fix bug 5541: http://bugzilla.lyx.org/show_bug.cgi?id=5541
This was due to a thinko in http://www.lyx.org/trac/changeset/26002


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28605 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-25 12:16:56 +00:00
André Pönitz
20d5148dca move ColorSet to a header of its own to reduce #include dependencies
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28426 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-09 23:30:24 +00:00
Vincent van Ravesteijn
78bc661ff8 * MathAutoCorrect: kill compiler warning.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28390 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-08 01:21:54 +00:00
Vincent van Ravesteijn
2daac3125f * InsetMathNest.cpp: Cosmetics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28389 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-08 01:14:48 +00:00
Vincent van Ravesteijn
814a8411eb Reverse unwanted commits.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28388 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-08 01:11:27 +00:00
Vincent van Ravesteijn
f694cf7135 * InsetMathNest.cpp: Cosmetics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28387 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-08 01:01:15 +00:00
Vincent van Ravesteijn
4b1d73775c Allow commands with parameters in InsetMathGrid. For example 'tabular-feature append-row 4'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28363 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-05 16:19:38 +00:00
Vincent van Ravesteijn
036e61dd17 Fix bug 5731. http://bugzilla.lyx.org/show_bug.cgi?id=5731\nInsert column after the current one, then copy the current one to the new one
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28326 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-02 21:44:37 +00:00
Jürgen Spitzmüller
48d5e2a579 please Jean-Marc.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28324 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-02 13:53:41 +00:00
Jürgen Spitzmüller
66e455ba29 * InsetMathHull (numbered):
- prevent NULL pointer (bug 5688).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28319 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-02 13:27:57 +00:00
Vincent van Ravesteijn
650a0261a6 Disable the Edit->Math menu when not in math.
Introduce new LFUN_MATH_FONT_STYLE which takes one of the font styles as an argument. A dispatch is being redirected to math-insert.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28181 a592a061-630c-0410-9148-cb99ea01b6c8
2009-01-16 10:35:57 +00:00
Martin Vermeer
b4b47d783b Make autocorrect configurable in preferences file
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28171 a592a061-630c-0410-9148-cb99ea01b6c8
2009-01-15 09:48:00 +00:00
Martin Vermeer
823e27f465 Make autocorrect (still disabled) better. Now switched
on/off by !/space.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28008 a592a061-630c-0410-9148-cb99ea01b6c8
2009-01-06 09:44:47 +00:00
Georg Baum
a9f29e6f6c make Pavel happy
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27971 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-23 17:25:11 +00:00
Georg Baum
ac1fd9b37f fix bug 2558: hspace support in math
The basic idea was to reuse the corresponding text space inset in the same
fashion as is already done for references. The dialog displays a different
selection for math than for text. If wanted, the additional spaces could
also be enabled for text, but that would be a file format change.
Constructs like \hspace{\mylengthvariable} that are not supported are
treated by the math parser as ERT as before.

For reasons I don't know the context menu does not work, but this is not so
important IMHO (since a left click opens the dialog).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27954 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-22 18:12:32 +00:00
Martin Vermeer
d6f30aac95 Fix, but keep disabled, mathed autocorrect
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27927 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-19 10:26:33 +00:00
Abdelrazak Younes
21b78c8d5a Fix assertion on exit when quitting.
Wraning for everybody: don't use static Buffer object, always pass through theBufferList().


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27677 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-23 08:37:14 +00:00
André Pönitz
6192345f60 add Buffer * member to DocIterator
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27603 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-17 11:46:07 +00:00
Stefan Schimanski
22808f5265 * compile fix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27595 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-16 23:10:26 +00:00
Stefan Schimanski
971f934d1e * fix latex grid output of commit http://www.lyx.org/trac/changeset/27524
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27594 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-16 23:07:13 +00:00
André Pönitz
f8f5a7b28d move updateLables to buffer
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27562 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-16 16:43:49 +00:00
André Pönitz
ae7a262a78 less negated logic
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27553 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-16 14:57:03 +00:00
Stephan Witt
2b30ed58ef enable LFUN_MATH_NUMBER_LINE_TOGGLE when display() is not inline
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27552 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-16 14:55:30 +00:00
Abdelrazak Younes
f000a62b0d part 7
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27524 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-16 00:18:52 +00:00
André Pönitz
1516e79855 cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27440 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-15 12:44:11 +00:00
Jürgen Spitzmüller
16fee5c01d * InsetMathHull (eolString):
- revert rev. 27412. This is more complicated.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27437 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-15 11:04:35 +00:00
André Pönitz
f1cba8ff64 more latin1..utf8 schanges. all of src/* should be utf8 now
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27425 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-14 15:58:50 +00:00
André Pönitz
1fc477efac thrid attempt at changing the naming pattern of the intermediated 'mocced' files
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27420 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-14 14:28:50 +00:00
Jürgen Spitzmüller
c8ecd8d24a * InsetMathHull (eolString):
- Properly escape non-ASCII characters in equation labels (bug 5512).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27412 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-14 10:05:07 +00:00
Enrico Forestieri
28fe97b553 Avoid creating bad math insets with Ctrl+M
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27214 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-31 15:19:39 +00:00
Abdelrazak Younes
84eec959c5 Revert 27186 which fixed an invalid bug.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27189 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-29 15:33:52 +00:00
Abdelrazak Younes
8939303131 Fix http://bugzilla.lyx.org/show_bug.cgi?id=5392
The problem is that, for an unknown reason, an InsetMathHull is used *inside* an InsetMathHull. This is the reason why we have two levels of instant preview. I don't know if that was intended.

When moving the cursor, only the doDispatch() of the enclosing InsetMathHull is
called, not the inner one; so we don't have a chance to detect that the inner InsetMathHull should leave its preview mode.

The new leavePreview() method ensures that the screen will be redrawn if needed with cursor movement.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27186 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-29 09:24:54 +00:00
Abdelrazak Younes
46b4a8428b Style, const access and small optimizations.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27185 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-29 08:03:26 +00:00
Enrico Forestieri
b92e30fbdd Remove dead code.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27161 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-27 23:09:08 +00:00
Enrico Forestieri
cb2933147c The LaTeX control space "\ " is a special char, too. In mathed, it should
be represented on screen as a visible space rather than as an empty macro.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27140 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-26 18:32:25 +00:00
Pavel Sanda
e4808961c9 Another selection painting patch, PainterInfo::backgroundColor introduced.
Patch by Vincent.

http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg145438.html



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27097 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-25 10:47:38 +00:00
Enrico Forestieri
62530e98e0 Get rid of superfluous conversions and else statement.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27062 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-23 19:30:51 +00:00
Enrico Forestieri
7d4ec3f944 Fix bug 5393
http://bugzilla.lyx.org/show_bug.cgi?id=5393


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27044 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-23 00:48:06 +00:00
Enrico Forestieri
946287b882 Fix bug 5263
http://bugzilla.lyx.org/show_bug.cgi?id=5263


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27020 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-22 09:11:42 +00:00
Stefan Schimanski
c8f87b06fb * Added Uwe's comment and a word about \global
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27013 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-21 15:44:15 +00:00
Stefan Schimanski
5baf9d3f20 * use \long for \def macros (fixes http://bugzilla.lyx.org/show_bug.cgi?id=5371, patch due to Uwe)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27011 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-21 13:04:22 +00:00
Enrico Forestieri
7923d0b90e Correct logic: single characters must also be parsed when quiet == false.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26987 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-20 00:18:29 +00:00
Jürgen Spitzmüller
30a777e8a8 honour requirements for dots (bug 5376).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26947 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-18 14:15:56 +00:00
Uwe Stöhr
02d28d981c mathparser_flags.h: follow our naming convention part 2/2
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26937 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-18 12:25:03 +00:00
Uwe Stöhr
8cacb191aa mathparser_flags.h: follow our naming convention part 1/2
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26936 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-18 12:23:59 +00:00
Enrico Forestieri
6bd593d8b3 When pasting into mathed, take into account the current mode.
For example, this allows to paste something like $x$ to a textmode
inset and get the expected result. If $x$ is pasted in mathmode,
it is pasted verbatim, such that no compile errors can arise.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26935 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-18 09:06:27 +00:00
Enrico Forestieri
02ebfa000b Fix bug 3397
http://bugzilla.lyx.org/show_bug.cgi?id=3397


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26934 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-17 21:40:11 +00:00
Stefan Schimanski
af9206b392 * Call metrics of the parameters with the correct font in MathMacros, for example
if they are in an index and should be drawn smaller.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26927 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-16 21:27:43 +00:00
Pavel Sanda
792ece8130 Fix whitespaces so the diff between branches is not so huge.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26881 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-13 11:25:37 +00:00
Stefan Schimanski
c874e95030 * Be more conservative about leaving out parenthesis by checking for < 0x80.
This fixes lyxmathsym characters as macro arguments.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26802 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-07 16:24:07 +00:00
Enrico Forestieri
f505227f6e Smash remaining drawbacks for bug 2315
http://bugzilla.lyx.org/show_bug.cgi?id=2315


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26792 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-06 22:49:30 +00:00
Enrico Forestieri
5ca3be4d67 In mathmode, treat nonascii chars with diacritical marks as an input method
for entering math accents, such that an umlauted A is translated as \ddot{A},
for example.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26577 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-26 15:53:15 +00:00
Enrico Forestieri
b5dcdbc960 When in mathmode, always use the mathcommand replacement from the
unicodesymbols file. Also take into account that a unicode symbol
may appear in both mathmode and textmode and thus both the mathmode
and textmode features may be required. As a side effect, the problem
that the \lyxmathsym definition is added to the preamble even when
a unicode symbol appears only in textmode is solved.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26548 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-25 18:38:25 +00:00
André Pönitz
4c7fdddd74 streamlining setter syntax. using mutable references seems a bit
outlandish compared to the rest of LyX


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26527 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-24 21:27:41 +00:00
Jean-Marc Lasgouttes
b23bdfa00b use Length::inPixel and not Length::inBP to get screen lengths
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26441 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-18 13:59:35 +00:00
Jean-Marc Lasgouttes
00c0933502 bad behaviour of recordUndoInset has been fixed in http://www.lyx.org/trac/changeset/14791
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26431 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-17 15:45:47 +00:00
Enrico Forestieri
3e55de70dd Introduce LFUN_FONT_BOLDSYMBOL, performing the same as LFUN_FONT_BOLD
except when in math mode, where \boldsymbol is used instead of \mathbf.
Restore the previous binding of Ctrl-B and make sure that LFUN_FONT_BOLDSYMBOL,
now bound to Ctrl-Alt-B, can be toggled.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26418 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-15 16:49:11 +00:00
Richard Heck
e16468d72e Revert 26348 and 26350. Wrong solution.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26353 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-10 14:36:38 +00:00
Richard Heck
e3b15701a7 Forgot this part.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26350 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-09 18:46:38 +00:00
Richard Heck
e78347a673 Restore toggling behavior to math bold.
I've left mathbf in the symbols file. We should perhaps restore it as something that can be toggled.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26348 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-09 17:50:37 +00:00
Pavel Sanda
c1173eb11c Coding style
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26335 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-08 01:18:33 +00:00
Stefan Schimanski
849b405c73 * typo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26314 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-06 15:10:10 +00:00
Enrico Forestieri
8fde2a6fa7 Implement the EnsureMath inset in mathed for nesting math mode in text mode.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26304 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-04 22:24:07 +00:00
Enrico Forestieri
105e0dfe29 Add FIXME
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26294 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-03 19:07:54 +00:00
Enrico Forestieri
8d6b5113ec We may have buffers with different encodings, that, in turn, may also
be different from the language default ones.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26290 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-03 08:17:00 +00:00
Enrico Forestieri
1c362c80b2 Specify that we are in math mode. This avoids unnecessary \ensuremath
commands when using math in text mode (such as in $\text{$\phi$}$, where
\phi would be enclosed in \ensuremath{} as it is inside \text{}).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26288 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-02 20:04:05 +00:00
Enrico Forestieri
ad91dd139c Take into account the latex encoding when generating math preview snippets.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26287 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-02 20:02:08 +00:00
André Pönitz
68c1719929 fix off-by-two drawing error
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26232 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-24 21:16:09 +00:00
Jean-Marc Lasgouttes
97e6476feb Fix bug 3407: Undo with text-in-mathmode
http://bugzilla.lyx.org/show_bug.cgi?id=3407

	* InsetMathNest.cpp (doDispatch/LFUN_MATH_MODE): handle undo


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26173 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-15 15:50:42 +00:00
Stefan Schimanski
ae410deed1 * \xymatrix added to completion (fixing bug 5123)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26082 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-06 18:44:35 +00:00
Pavel Sanda
97812e8718 Clean debug logs before rc1.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26033 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-02 14:11:04 +00:00
Enrico Forestieri
dac70247f0 Fix bug 5041
http://bugzilla.lyx.org/show_bug.cgi?id=5041


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26002 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-30 15:07:06 +00:00
Uwe Stöhr
c08f8291f9 - InsetMathAMSArray.cpp: code cosmetic
- Math.lyx: leftovers from bug 5090

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25916 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-27 11:32:26 +00:00
Uwe Stöhr
5aece0832c - InsetMathAMSArray.cpp: load the amscd package when the command \CD was used, fixes bug 5090
- LaTeXFeatures.cpp: add amscd

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25909 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-27 00:47:28 +00:00
Uwe Stöhr
180448cf14 InsetMathHull.cpp: whitespace
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25908 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-27 00:45:19 +00:00
Jürgen Spitzmüller
a2a3d8337f * src/mathed/InsetMathHull.cpp:
- update labels cache after a label has been erased (bug 4929).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25757 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-21 08:48:16 +00:00
Enrico Forestieri
0e834b9342 When producing latex output, check whether a character entered in mathed
can be encoded in the current latex encoding before resorting to the
unicodesymbols file.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25725 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-20 01:50:54 +00:00
Enrico Forestieri
aabd9d03bb Fix bug 4992
http://bugzilla.lyx.org/show_bug.cgi?id=4992


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25458 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-05 23:29:48 +00:00
Enrico Forestieri
2477901f07 Fix color of math macros
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25403 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-28 22:49:40 +00:00
Enrico Forestieri
4fa59cbd9b Fix bug 4320
http://bugzilla.lyx.org/show_bug.cgi?id=4320


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25367 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-24 05:51:15 +00:00
Enrico Forestieri
419b5a1551 Fix the new incarnation of bug 4687
http://bugzilla.lyx.org/show_bug.cgi?id=4687


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25355 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-22 22:32:48 +00:00
Enrico Forestieri
ab9a074f20 Trust Andre'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25319 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-19 09:17:57 +00:00
Enrico Forestieri
c691839abe Fix bug 4687
http://bugzilla.lyx.org/show_bug.cgi?id=4687


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25318 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-19 09:16:05 +00:00
Enrico Forestieri
e224ef029b Implement the suggestion by Andre'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25287 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-17 11:10:43 +00:00
Enrico Forestieri
01398327df Ops
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25285 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-16 20:39:40 +00:00
Enrico Forestieri
4781794e4e The mode changing math insets already provide the needed info, so
this is definitely better.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25284 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-16 20:25:44 +00:00
Enrico Forestieri
aace605564 Avoid 11 from_ascii calls
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25282 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-16 18:52:54 +00:00
Enrico Forestieri
31713932b2 Use a helper method in order to avoid code repetition.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25273 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-16 14:32:51 +00:00
Enrico Forestieri
90837aaf6e Fix bug 1527
http://bugzilla.lyx.org/show_bug.cgi?id=1527

* src/mathed/*.cpp:
	- Track mode (math or text) when outputting latex code and
	  properly wrap commands that are in the wrong mode with
	  either \ensuremath or \lyxmathsym.

* src/mathed/MathParser.cpp:
	- Parse \ensuremath and \lyxmathsym, such that exported latex
	  produces the same result when imported back.
	- Replace latex commands with corresponding unicode symbols.

* src/Encoding.cpp:
	- Implement Encodings::fromLaTeXCommand() for converting either
	  a single or a sequence of latex commands to unicode symbols.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25270 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-16 01:21:17 +00:00
Pavel Sanda
8ab36ddef7 Let LFUN_MATH_SPACE use various spaces we support.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25266 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-15 22:12:40 +00:00
Pavel Sanda
cb5ce8348b Ressurect LFUN_MATH_SIZE, set toolbars accordingly.
http://thread.gmane.org/gmane.editors.lyx.devel/108469


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25250 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-14 18:38:14 +00:00
Pavel Sanda
154fe36eb2 Old, unused and handled elsewhere.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25227 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-11 09:05:46 +00:00
Pavel Sanda
07113cf424 LFUN_FONT_FREE_* -> LFUN_TEXSTYLE_*
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg141274.html


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25225 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-11 08:35:15 +00:00
Enrico Forestieri
4ad2d0e15c Produce a cleaner latex output by avoiding \lyxmathsym when in text mode
inside math mode, and also ensure the proper mode inside math when using
the symbols from the unicodesymbols file. This hopefully fixes bug 3938.
Note that this approach could also be used for fixing bug 1527.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25109 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-04 00:36:04 +00:00
Jürgen Spitzmüller
e8d99617b5 * Allow the use of eqrefs in mathed (bug 4623).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25092 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-03 06:23:45 +00:00
Enrico Forestieri
69bd59cc8b Be sure to insert a space after a macro when needed.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25088 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-03 00:09:20 +00:00
Enrico Forestieri
1a2af1197e Allow to specify either text mode or math mode commands (or both) in the
unicodesymbols file. When the command for a mode is not specified, the
other one is used (taking care that it also works in the "wrong" mode).
This allows to avoid the \lyxmathsym macro when a native math command
is available. Patch from Georg, modifications to the unicodesymbols
file by me.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25061 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-02 01:35:42 +00:00