Commit Graph

2302 Commits

Author SHA1 Message Date
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