Commit Graph

2294 Commits

Author SHA1 Message Date
Enrico Forestieri
fb63864d7a Fix bug #6745: Wrong fonts with \ensuremath
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@34584 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-02 00:24:19 +00:00
Enrico Forestieri
c0da660f4b Fix bug #6729: Wrong fonts when using \underbar in math.
See also r34312.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@34582 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-01 14:19:40 +00:00
Enrico Forestieri
cb3044101e Fix bug #6739: Loading in a 1.6.5 file causes 1.6.6-1 to crash
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@34580 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-01 13:34:31 +00:00
Enrico Forestieri
0c71d4fb78 Fix bug #4071: wrong fonts in math
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@34519 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-27 07:03:09 +00:00
Enrico Forestieri
a7795cf303 Correctly restore a dissolved macro inset on undo (bug #6678).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@34454 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-22 17:15:57 +00:00
Enrico Forestieri
7c0bda490e Change only the shape and not the whole font, otherwise constructs
such as \mathbf{\hat{a}} would not be correctly rendered on screen.
No status.16x entry is necessary, as this problem was introduced
by the fix for bug #4565 in r34023.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@34304 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-27 10:41:44 +00:00
Pavel Sanda
19b665d987 Squash compiler warning about unused parameter
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@34138 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-15 09:54:26 +00:00
Vincent van Ravesteijn
f292717f5d branch: Fix bug #6633: Equations that end in \limits or \nolimits are corrupted on load.
see r34025.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@34030 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-02 17:27:10 +00:00
Vincent van Ravesteijn
0982149c00 branch: 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.

see r32560.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@34029 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-02 17:18:58 +00:00
Enrico Forestieri
aa2d362dcf 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/branches/BRANCH_1_6_X@34023 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-02 15:02:46 +00:00
Enrico Forestieri
ab08ae33ca 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/branches/BRANCH_1_6_X@33772 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-16 17:29:24 +00:00
Enrico Forestieri
d616b5215b Fix bug #3325: Labels with special characters in equations do not work
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@33471 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-13 19:00:17 +00:00
Jürgen Spitzmüller
879272068b 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/branches/BRANCH_1_6_X@33368 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-08 17:51:15 +00:00
Vincent van Ravesteijn
d37683420c branch: 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.

see r33290 and r33292.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@33337 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-06 01:43:50 +00:00
Enrico Forestieri
64ddb9f47d Fix bug #2872: reference in math to label with "underscore"...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@33332 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-05 13:33:20 +00:00
Jürgen Spitzmüller
207ca6ccbf * InsetMathHull.h: constness, as suggested by Abdel.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@33242 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-28 09:15:04 +00:00
Jürgen Spitzmüller
3e330398b1 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/branches/BRANCH_1_6_X@33239 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-28 07:29:57 +00:00
Uwe Stöhr
66ad612769 MathData: fix #6388 also for branch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@33103 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-20 02:10:29 +00:00
Enrico Forestieri
756862c37c Fix bug #6382: Wrong cursor placement when inserting math
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@32480 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-11 18:05:12 +00:00
Vincent van Ravesteijn
4b5f45a6b9 Restore the encoding after messing with it in r32418.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@32456 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-10 14:18:46 +00:00
Vincent van Ravesteijn
ad291caa99 Correct encoding (Hope it works).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@32455 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-10 13:49:59 +00:00
Vincent van Ravesteijn
e0c1663e39 branch: Fix bug #4360: Instant preview does not render formulas which contain math-macro from input file.
see r32157, r32200, r32352 and r32353.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@32418 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-07 21:56:58 +00:00
Enrico Forestieri
8e8ce41eeb Fix bug #6351: Crash when editing the unit on a number
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@32214 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-26 13:47:20 +00:00
Vincent van Ravesteijn
feb5aae02b branch: Fix bug #6310: Incorrect latex for sparse matrices with vertical lines.
see r32145.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@32150 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-22 12:12:16 +00:00
Enrico Forestieri
a70ece44ed Clarify comment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@32052 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-16 14:13:24 +00:00
Enrico Forestieri
5ba1dbb453 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/branches/BRANCH_1_6_X@32050 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-16 13:59:23 +00:00
Enrico Forestieri
bdb91ff5cc Fix bug #5530: LyX expansion in math-macro overwritten by default one.
Changes backported from r31873, r31898, 31905, r31907, and r31998.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@32027 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-15 17:38:36 +00:00
Vincent van Ravesteijn
294247c93a branch: 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, r31861.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31862 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-05 12:33:59 +00:00
Vincent van Ravesteijn
be86dbbd39 branch: Fix bug #6297: Use of Fraktur font in boxed equation does not automatically include amssymb.
see r31819.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31831 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-02 17:36:53 +00:00
Enrico Forestieri
fe41e57d12 Backport cumulative fix for bug #6284.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31710 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-24 16:15:29 +00:00
Jean-Marc Lasgouttes
a8ab4e22e1 backport r31600 (bug #6273)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31601 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-12 15:50:39 +00:00
Enrico Forestieri
8f2106783f 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/branches/BRANCH_1_6_X@31591 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-11 15:26:57 +00:00
Enrico Forestieri
a08af1f602 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/branches/BRANCH_1_6_X@31559 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-08 14:21:55 +00:00
Enrico Forestieri
391659b5af Fix bug #6246: InsetMathKern is broken
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31483 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-28 22:11:02 +00:00
Enrico Forestieri
3fda114784 Fix bug #6110.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31385 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-13 13:53:53 +00:00
Vincent van Ravesteijn
660c977512 branch: 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/branches/BRANCH_1_6_X@31333 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-07 14:42:29 +00:00
Pavel Sanda
68b323f62d Backport bugfix for #2045.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31328 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-07 11:44:49 +00:00
Vincent van Ravesteijn
7fd27c3b81 Some improvements for the math context menu:
- hide "Number this line" for single line equations,
- set flag for LFUN_MATH_MUTATE.

see r29762 and r29764.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30906 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-07 15:56:00 +00:00
Jürgen Spitzmüller
c35cfda727 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/branches/BRANCH_1_6_X@30894 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-07 05:24:57 +00:00
Pavel Sanda
9e6e4ebdd5 Backport r30581.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30596 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-15 07:31:22 +00:00
Jean-Marc Lasgouttes
708a139d77 compilation fix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30576 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-14 16:31:06 +00:00
Vincent van Ravesteijn
6f1642fe3e branch: Fix bug #5948: Copy as reference for equation labels.
see r29678.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30571 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-14 16:01:10 +00:00
Pavel Sanda
a277b8bd21 Backport r30536
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30538 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-13 10:48:48 +00:00
Vincent van Ravesteijn
059d5ee830 branch: Fix bug #2034: Inconsistent behavior of cursor inside mathed.
When closing the macromode, do the same trick as in lines 835--838.

see r29686

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30492 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-11 17:57:25 +00:00
Enrico Forestieri
955716dfa5 Fix bug #5923: Math macro expansion not performed when modifying the macro identifier
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30450 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-10 14:48:16 +00:00
Enrico Forestieri
a8b29819e9 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/branches/BRANCH_1_6_X@30439 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-09 20:51:21 +00:00
Enrico Forestieri
09eb90bd3e Fix bug #6041: "tabular-feature align-" in a math-matrix.
Also fix display of centered vertical alignment status and smash
unnecessary debug output.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30374 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-05 14:01:53 +00:00
Enrico Forestieri
ac9587e6e1 Fix bug #6033: Initial character sometimes eaten by math-insert
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30250 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-24 08:29:50 +00:00
Enrico Forestieri
943eb2a6f1 Reintroduce workaround for dealing with 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/branches/BRANCH_1_6_X@30147 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-17 17:36:41 +00:00
Uwe Stöhr
10ce509814 InsetMathFrac.cpp: fix the regression now completely
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@29850 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-25 22:48:59 +00:00