Commit Graph

21566 Commits

Author SHA1 Message Date
Georg Baum
877e73e0a2 Fix bug #8784 (mathml export for scripts)
For displaystyle scripts we need to use munder, mover or munderover.
2014-02-22 19:01:20 +01:00
Enrico Forestieri
3c1969574f Fix bug #8889 by always issuing \protect in fragile environments. 2014-02-22 10:30:55 -05:00
Georg Baum
270201ed67 Fix bug #8891 (wrong depth of copied text)
This was an obvious thinko: When pasting a paragraph list the depth of the
pasted paragraphs need to be adjusted, so that no paragraph has a negative
depth afterwards. However, the maximum allowed depth was only adjusted after
the second and following pasted paragraphs. Since the computed value was only
used for the subsequent paragrph this meant that the second paragraph did
still use the same maximum allowed depth as the first one, which came from the
paragraph the text as pasted into. This was wrong e.g. in case the outside
paragraph was a standard paragraph (max_depth = 0), and the first pasted
paragraph was an enumeration (max_depth = 1). Therefore, max_depth needs to
be adjusted also after the first pasted paragaph. Since the adjustment is
done aftre max_depth was used for the current paragraph the condition
mentioned in the comment is still met.
2014-02-22 11:02:50 +01:00
Pavel Sanda
02bde93d2a Allow statusbar toggling in fullscreen (part of #8816). 2014-02-22 00:21:17 -08:00
Georg Baum
acb7906fb5 Fix remaining part of bug #8967
Now interactive insertion of \smash[t] and \smash[b] is possible again.
\smash with optional argument behaves now exactly as in LyX 2.0.x, and without
optional argument it is supported by InsetMathPhantom.
2014-02-21 21:31:35 +01:00
Scott Kostyshak
731b8610af Allow $$s converter substitution if 'latex' flag
A more general patch will be committed for 2.2 that
centralizes replacement of $$s in startScript().
2014-02-21 12:51:48 -05:00
Scott Kostyshak
9ca242e5bf moveColumn now also swaps column_info
For example, width and alignment are now swapped.

Same for moveRow.
2014-02-21 09:40:16 -05:00
Scott Kostyshak
f52eb9d823 Comment a minor bug not worth fixing (#8986) 2014-02-19 16:21:46 -05:00
Georg Baum
227675ee02 Fix regression of 18779013 for \smash
When adding native support for \smash in 18779013 I overlooked that amsmath
redefines \smash to take an optional argument t or b. These optional
arguments are not parsed correctly anymore (bug 8967). This change fixes
the regression, so that \smash with optional argument appears in red, as it
was before th introduction of the native smash inset.
In the future, we should have native support for \smash[t] and \smash[b]
as well, but this would be a file format change (automatic amsmath loading),
and it is too late for 2.1.0.
2014-02-19 20:50:57 +01:00
Stephan Witt
cfe9724a4c add -fobjc-exceptions for compiling linkback sources with g++ and cmake on Mac
Original patch is from Ramanathan Vishnampet
2014-02-19 16:11:03 +01:00
Richard Heck
7220f1459e Fix bug #8540 by not resetting the GUI if the request came from
the minibuffer. As the comments explain, this leaves a different
bug, but (a) it isn't a crash and (b) it probably won't affect
many users, if *any* users.
2014-02-18 10:42:52 -05:00
Richard Heck
0a5b33bcad Rename a routine. 2014-02-18 10:42:52 -05:00
Uwe Stöhr
789a6ebf2a InsetMathXArrow.cpp; code simplification 2014-02-17 02:11:57 +01:00
Uwe Stöhr
e9ce68dddc InsetMathXArrow.cpp: the cells of \xleftarrow must be centered
the cells are centered in the output so also center them in LyX
2014-02-17 01:23:16 +01:00
Uwe Stöhr
8c33f73cc7 MathSupport.cpp: fix drawing of leftrightarrow
- to see the difference use this in a formula:
\overleftrightarrow{aasasasasassdsdsdasdsdsd}
2014-02-17 01:19:31 +01:00
Juergen Spitzmueller
cc7c042dda Fix localization of captions (#8977) 2014-02-16 10:23:30 +01:00
Juergen Spitzmueller
e0e8d6a40f Simplification 2014-02-16 09:57:17 +01:00
Richard Heck
27af044a2d It's definitely not safe to continue in this case. The cursor is
invalid. So we should try to save the document before anything
really bad happens.
2014-02-15 20:56:13 -05:00
Jean-Marc Lasgouttes
d25e273abf Whitespace 2014-02-14 12:00:56 +01:00
Richard Heck
2e23f1719e This is meant to be almost UINT_MAX, but needn't really be that
big, and I don't see the point of pulling in limits.h.
2014-02-13 17:55:53 -05:00
Jean-Marc Lasgouttes
2b1791641f Fix various typos in LFUNs.lyx 2014-02-13 14:20:43 +01:00
Jean-Marc Lasgouttes
e7a1cce551 Rename some LFUN names to match their text name
Also, rename copy-label-as-reference to label-copy-as-reference and update LFUNs.lyx accordingly.
2014-02-13 13:50:33 +01:00
Richard Heck
b7a1eb68e1 Fix bug #8944 by introducing a maximum size for keys we process.
The problem is caused by the fact that Encodings::fromLaTeXCommand
is very slow. It's not clear to me if that can be fixed, or if that
is just how things are. Georg suggested another time that we might
use tex2lyx in or instead of convertLatexCommands() in BiblioInfo.cpp,
but I don't know if that would much faster. The author string in the
example file is 32K characters long. As long as some files tex2lyx
would convert.
2014-02-12 13:28:26 -05:00
Georg Baum
6b49b6b129 Fix conflicting inset font defaults (bug #8874)
This makes the defaults of Inset::inheritFont() and Inset::resetFontEdit()
compatible. There is no user visible change except for the Chunk inset which
does not produce invalid LaTeX after editing operations anymore.
This is the safe version for 2.1.0, for later there are still open questions:
- All insets with ResetsFont true should be audited: Is this really needed,
  or do they show similar editing problems as the Chunk inset?
- Does inheritFont() need to be customizable in the layout file as well?
- Is resetFontEdit() != !inheritFont() needed at all?
I did not use change tracking for the docs, since I updated all existing
translations.
2014-02-10 22:06:32 +01:00
Juergen Spitzmueller
8b1504d7ad Do not crash with empty (invalid) math environments (part of #8359) 2014-02-10 09:24:14 +01:00
Juergen Spitzmueller
d4f04513c2 Fix LFUN_MATH_AMS_MATRIX: it was possible to generate corrupt documents (part of #8359) 2014-02-10 09:23:17 +01:00
Juergen Spitzmueller
fa6b388cb3 Do not issue module warnings when just cloning a buffer (#8864) 2014-02-09 11:16:20 +01:00
Scott Kostyshak
1fd32312e9 Right border of multicol should be set if 1 column
This commit fixes a bug uncovered by the fix to #8082:
If you create a table, select all columns in a row,
and set as multicolumn, the right border used to be unset.
2014-02-08 00:13:10 -05:00
Vincent van Ravesteijn
77d532bd51 Compare: Add the authors from the 'other' document
Otherwise the resulting document may contain references to authors that are not present in the author list, which results in a crash.

Fixes-bug: #8769
2014-02-07 23:14:36 +01:00
Vincent van Ravesteijn
fc6b8c64f8 Return true to indicate we might have invalidated the cursor
If we don't do so, Cursor::notifyCursorLeavesOrEnters might continue with
an invalidated cursor.

Fixes-bug: #8329
2014-02-07 23:04:15 +01:00
Vincent van Ravesteijn
795535e44f Do not try to track_change an auto-deleted bibitem
We are not capable of handling two bibitems within one biblio paragraph.
That's why we have functions like Paragraph::brokenBiblio() and
Paragraph::fixBiblio(). So, if we fix the biblio by deleting the second
bibitem, we should not keep it as deleted.

This code caused a crash because the inset was released, but still kept as
deleted.

Fixes-bug: #8646.
2014-02-07 22:55:05 +01:00
Juergen Spitzmueller
6837345209 Fix crash 2014-02-06 13:07:00 +01:00
Juergen Spitzmueller
b13f5dee53 Fix assertion in editing math (bug #8946) 2014-02-06 11:09:02 +01:00
Vincent van Ravesteijn
ebf18a9711 Fix wrong painting of lines right of multicol
We should skip the other cells that are part of the multicolumn before we find the cell right to the current one.

Fixes-bug: #8082
2014-02-05 21:37:57 +01:00
Georg Baum
c616c7e73f Add more paste lfun doc from bug #8749. 2014-02-04 22:22:54 +01:00
Juergen Spitzmueller
5a669fa62b Style 2014-02-04 10:37:29 +01:00
Vincent van Ravesteijn
cda585baf5 CMake: Move biblio test projects into tests group 2014-02-03 20:07:09 +01:00
Richard Heck
3f62601a8f Fix bug discovered by Kornel. See
http://marc.info/?l=lyx-devel&m=138590578911716&w=2
If you look at Buffer.cpp, around line 4351, there was a comment about bug 5699. We are seeing the
same crash. The problem is that, although the master does have a GUI, that GUI is in a different window. So the structureChanged() call we do during updateBuffer() is for the TOC in that window, not the TOC in the window we are actually in. So our TocModel::toc_ has been reset and is invalid, though the widget itself has not been updated and looks fine.

This patch tests whether the master is in the same window as the buffer we are updating.

A problem remains, which is noted in a comment.
2014-01-29 11:23:03 -05:00
Kornel Benko
3369de6d7c Added test for algo2e tex2lyx conversion
Testfile from Jürgen Spitzmüller
2014-01-28 13:58:28 +01:00
Juergen Spitzmueller
f76a8c8ab1 tex2lyx: support algorithm2e (#8728) 2014-01-28 12:44:22 +01:00
Jean-Marc Lasgouttes
bab58480bc Do not skip space at start of row (fixes #8947, #8838)
TextMetrics::getColumnNearX (x -> pos translation) has special code to
ignore spaces at the beginning of a row, but neither the display code
nor TextMetrics::cursorX (pos->x translation) follow this logic. One
might argue that spaces should actually be ignored (like LaTeX does),
but this leads to UI issues and is probably too difficult to
implement.
2014-01-28 11:04:31 +01:00
Juergen Spitzmueller
ef5d702325 Harmonize naming 2014-01-27 12:04:58 +01:00
Juergen Spitzmueller
e6c5f9a17c Whitespace 2014-01-27 11:14:24 +01:00
Juergen Spitzmueller
5a3f1a731f Extend environment-split to an 'outer' split function
This fixes a major beamer UI flaw reported by several users.
2014-01-27 08:01:24 +01:00
Richard Heck
9d7f25a4ae Do not allow newlines in subfloats. Fixes #8752. 2014-01-26 14:23:40 -05:00
Juergen Spitzmueller
35e64bf951 Allow usage of algorithm2e package (#8744)
This simple module allows users to use the algorithm2e package at all. Before, it was not possible with LyX, since this package conflicts with LyX's own algorithm support (see also #8728)
2014-01-26 19:23:40 +01:00
Juergen Spitzmueller
2b941da7fc Fix longtable captions (#8933)
Don't know why this code is now needed again (or why it had to be removed in the first place).
2014-01-25 09:33:23 +01:00
Stephan Witt
01969e59fb #8932 improved spell checker debug messages 2014-01-15 21:20:05 +01:00
Scott Kostyshak
27131e655a Shortcut box now stays open if bad input (#8703)
This allows the user to correct the bad input without
having to enter the other fields again in a new dialog.

Patch from Martin Hoffmann.
2014-01-14 08:04:05 -05:00
Jean-Marc Lasgouttes
2a99afee94 Handle undo in `branch-add' LFUN 2014-01-13 17:32:32 +01:00