Commit Graph

104 Commits

Author SHA1 Message Date
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
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
Enrico Forestieri
a694de895e Fix bug 3938
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25028 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-31 20:54:50 +00:00
Richard Heck
77ed747114 FuncStatus::enabled(bool) --> FuncStatus::setEnabled(bool)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24999 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-29 15:14:00 +00:00
Jean-Marc Lasgouttes
9b4a26a252 rename assert.h to lassert.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24559 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-30 08:26:40 +00:00
Uwe Stöhr
82fca3a08d InsetMathNest.cpp: fix bug 4720 for trunk as well
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24287 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-15 23:44:23 +00:00
André Pönitz
7f461f4392 infrastructure for 'graceful asserts'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24216 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-10 21:49:34 +00:00
André Pönitz
1d022b19ba fix #4713
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24158 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-07 19:19:03 +00:00
Dov Feldstern
7412bd1fb1 allow extending a selection to outside a math inset (broken since r22930)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24143 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-06 20:11:05 +00:00
Enrico Forestieri
b5acd03891 Allow using \binom without amsmath and add support for \brace and \brack
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24067 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-31 01:23:25 +00:00
Stefan Schimanski
aad4651830 * another try on http://bugzilla.lyx.org/show_bug.cgi?id=4566:
"Eqnarray multiple cells size change erases what they contain"

  We also apply LFUN_MATH_INSERT to every selected cell if a single math inset is inserted.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23804 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-18 10:58:57 +00:00
Stefan Schimanski
7269440c83 * reset current_view_ when deleting a GuiView.
* check for current_view_ when exiting to avoid segfaults


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23752 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-15 02:42:59 +00:00
André Pönitz
a98f82c292 s/kb_action/FuncCode/g
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23749 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-15 01:20:36 +00:00
André Pönitz
f2c9b56fb4 cosmetics/#include cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23747 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-15 00:22:54 +00:00
Jürgen Spitzmüller
ad5ba124be * src/mathed/InsetMathNest.cpp:
- also handle the Color_inherit case.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23688 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-12 18:50:50 +00:00
Stefan Schimanski
2f67f8c2b3 * handle the multiple-selected-cells case also for color changes in mathed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23682 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-12 14:04:25 +00:00
Stefan Schimanski
5e2aeffc43 * half of the fix for http://bugzilla.lyx.org/show_bug.cgi?id=4091
"Applying Text-style to math generates \color{ignore}"

Which kind of font changes do we want to support here? After all the
text style dialog is meant for text. So it only really make sense for
\mbox'es. But there we probably cannot store every font change because
it still math up to now.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23681 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-12 13:20:40 +00:00
Stefan Schimanski
e01f7e7105 * fix a serious data loss problem: undo did not save the whole
selection in mathed if more than one cell was selected.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23675 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-12 00:59:29 +00:00
Stefan Schimanski
40c4d50c82 * fix for http://bugzilla.lyx.org/show_bug.cgi?id=4566
"Eqnarray multiple cells size change erases what they contain"

  We now loop over the selected cells and change the font in each of them.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23673 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-12 00:19:31 +00:00
Stefan Schimanski
b2e8d557cc * only use selection of current cell when starting a macro (fixes http://bugzilla.lyx.org/show_bug.cgi?id=4566 for macros)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23670 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-12 00:18:39 +00:00
Uwe Stöhr
8151dd5852 InsetMathNest.cpp: Ctrl-b uses now \boldsymbol (fixes http://bugzilla.lyx.org/show_bug.cgi?id=499)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23608 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-09 23:23:50 +00:00
Bernhard Roider
a99c5828f8 Add support for \bm from bm.sty
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23520 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-06 20:49:59 +00:00
Abdelrazak Younes
a4d5b78430 Transfer and bug fix LFUN_BUFFER_BEGIN/END_SELECT to BufferView.cpp
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23512 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-06 15:39:30 +00:00
Stefan Schimanski
03a1c9192e * store the selection in the InsetMathUnknown and insert it into the
first argument after finalizing the macro. This also works with real
  math macros.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23449 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-04 14:49:24 +00:00
André Pönitz
db8c16d554 progress on buffer-reference-in-insets. beware of instabilities...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23289 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-27 20:43:16 +00:00
Stefan Schimanski
c0e2c0cd5c * better fix for * math commands. We allow the * for known math commands and for known math macros which are valid at that point in the buffer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23273 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-27 10:46:38 +00:00
Stefan Schimanski
1b0591b28e * fix for http://bugzilla.lyx.org/show_bug.cgi?id=4584:
"not possible to use the command \tag*"


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23263 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-26 22:40:59 +00:00
Stefan Schimanski
b6be7d908f * adapt to the changed signature
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23229 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-25 14:25:49 +00:00
Stefan Schimanski
323e3b0207 * Moved std::sets out of Buffer.h to reduce overall LyX compile time
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23163 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-23 18:11:35 +00:00
Stefan Schimanski
8c2149d3aa * following Andre's advice to rename the method into
createCompletionList. This makes the ownership of the returned
  object clear.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23143 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-22 21:11:19 +00:00
Stefan Schimanski
8527a08903 * simplify notifyCursorLeaves logic: We now only call it from strategic
places, i.e.
  - BufferView::setMouseCursor,
  - BufferView::mouseEventDispatch
  - LyXFunc::dispatch
  Before it was called from several dispatch handlers in the middle of the
  dispatch process. Because the cursor might get invalidated, this is
  not a good idea. We had plenty of crashes and odd behaviours because
  of this as nobody really understood those cases.

  This fixes (at least) #2069 and #4163.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23140 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-22 20:45:18 +00:00
Stefan Schimanski
6eb72bd1f2 * Reduce compilation time by removing the shared_ptr (which is not
really important because the ownership of the CompletionLists is
  easy enough) and by removing the deque for the half finished
  favorites implemention in InsetMathNest. I think this fits better
  into the GuiCompleter anyway.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23114 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-21 23:36:02 +00:00
Stefan Schimanski
7794f870f2 * add some space between math inset and popup. This should really come from the font maximal descent in fact.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23108 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-21 19:45:05 +00:00
Stefan Schimanski
1bf7b59d60 * completion infrastructure
* completion support for mathed
* experimental completion support for text


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23104 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-21 19:42:34 +00:00
Abdelrazak Younes
2bf1c09376 header cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23049 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-18 07:14:42 +00:00
Abdelrazak Younes
8e831bb602 modify Inset::EntryDirectionType to follow style used in FontEnums.h for enums.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22936 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-11 08:20:13 +00:00
Dov Feldstern
8f47f5d396 visual mode for bidi cursor movement --- in math
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22930 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-10 19:57:00 +00:00
Dov Feldstern
11a6b3c4c7 visual mode for bidi cursor movement
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22929 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-10 19:52:45 +00:00
Jean-Marc Lasgouttes
c3ec9ddda0 Disable and check properly the math numbering functions.
* InsetMathHull.cpp (getStatus): disable LFUN_MATH_NUMBER and LFUN_MATH_NONUMBER
	when the equation is not in display mode; add a checkbox as needed.
	(doDispatch): no need to test for dispatch() anymore.

	* InsetMathNest.cpp (getStatus): LFUN_MATH_NUMBER and LFUN_MATH_NONUMBER are not 
	handled by this class.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22350 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-03 17:31:12 +00:00
Stefan Schimanski
7150b0caa3 * moved atom_dim_ to coord cache in the buffer view to make it dependent on the buffer view
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22290 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-24 10:52:58 +00:00
Stefan Schimanski
36dbec4506 * Lazy MathData to avoid unneeded interpretation of macro definitions
* DocIterator as MacroPosition
* Iterative search for macro in scope until a visible one is found.
This include the ability to resolve macro inside nested text insets.
* Speed up macro lookups by factor 2: only getMacro(name) call, no
further hasMacro(name) call before
* Both way child/master support
* Correct macro scope for multi-paragraph environments
* Correct macro scope for multi-depth-paragraphs
* Buffer::updateMacros made const
* Update macros when loaded (of master and child)
* Do not remove too many braces when unfolding a macro. This could
lead to a data loss because the relationship between arguments of
macros can be mixed up if nested macros are unfold at once.
* Reduce dependencies to MetricsInfo in MathMacro   
* Update macros when needed. Normally it's done just before doing
metrics. But in cases without a brace around some constructs (like
\left(bla\right)) there is some help needed.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22241 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-21 20:42:46 +00:00
Abdelrazak Younes
7c392af6ea getting rid of superfluous lyx::support:: statements.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22106 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 19:57:42 +00:00
Abdelrazak Younes
9abb7db468 getting rid of superfluous std:: statements.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22104 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 19:28:07 +00:00