Commit Graph

521 Commits

Author SHA1 Message Date
Jean-Marc Lasgouttes
3cbdfa1762 Fix some glitches in inset-select-all
Fix a crash reported in #7727. This happened because cur.pos() was reset before cur.pit(). In this case, cur.lastpos() will usually be wrong.

Fix bad behaviour when selecting at top level with several paragraphs.

Update documentation.
2014-11-14 10:18:34 +01:00
brokenclock
11e679f73e Add LFUN_SERVER_GET_STATISTICS command
This function can be used with the LyX server to obtain the word, character or character+space count in the current document or selection.
2014-10-23 16:06:42 +02:00
Jean-Marc
82ab83080f Whitespace only 2014-10-13 22:44:30 +02:00
Enrico Forestieri
c668ebf611 Fix bugs #8546 and #9055, and introduce new separator inset.
The algorithm used for breaking a paragraph in LaTeX export is changed
for avoiding spurious blank lines causing too much vertical space.
This change is tied to the introduction of a new inset (with two
different specializations) helping in either outputing LaTeX paragraph
breaks or separating environments in LyX. Both of the above goals were
previously achieved by the ---Separator--- layout and can now be
accomplished by the new inset in a more natural way. As an example,
after leaving an environment by hitting the Return key for two times,
a third return automatically inserts a parbreak inset, which is
equivalent to the old separator layout, i.e., it also introduces a
blank line in the output. If this blank line is not wanted, the
parbreak separator can be changed to a plain separator by a right
click of the mouse. Of course, an environment can still be separated
by the following one by using the Alt+P+Return shortcut (or the
corresponding menu key), but now the plain separator inset is used
instead of the old separator layout, such that no blank line occurs in
the LaTeX output.

Old documents are converted such that the LaTeX output remains unchanged.
As a result of this conversion, the old separator layout is replaced by
the new parbreak inset, which may also appear in places where the old
algorithm was introducing blank lines while the new one is not.
Note that not all blank lines were actually affecting the LaTeX output,
because a blank line is simply ignored by the TeX engine when it occurs
in the so called "vertical mode" (e.g., after an alignment environment).
The old ---Separator--- layout is now gone and old layout files using it
are also automatically converted.

Round trip conversions between old and new format should leave a document
unchanged. This means that the new behavior about paragraph breaking is
not "carried back" to the old format. Indeed, this would need introducing
special LaTeX commands in ERT that would accumulate in roundtrip
conversions, horribly cluttering the document. So, when converting a
modified document to old formats, the LaTeX output may slightly differ in
vertical spacing if the document is processed by an old version of LyX.
In other words, forward compatibility is guaranteed, but not backwards.
2014-05-10 23:25:11 +02: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
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
Georg Baum
c616c7e73f Add more paste lfun doc from bug #8749. 2014-02-04 22:22:54 +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
Pavel Sanda
a3d685c16c Add Georg's comments from #8749. 2013-11-17 11:11:03 -08:00
Juergen Spitzmueller
e014f3fabf Some fixes to the SaveAs dialog
LFUN_BUFFER_SAVE_AS has an optional argument where an initial format can be preset

This fixes:

* The remainder of bug #3402: Open Export As dialog when attempting to export to read-only directories
* Bug #8886: 'export as' should default to the default document output format
2013-11-15 09:20:07 +01:00
Jean-Marc Lasgouttes
78780e7b38 Allow master view/update when current buffer is the master 2013-09-01 20:14:44 +02:00
Richard Heck
1b1f8dd235 Audit all the LASSERT calls, and try to do something sensible at
each failure.

There are several places I was not sure what to do. These are marked
by comments beginning "LASSERT:" so they can be found easily. At the
moment, they are at:

Author.cpp:105: // LASSERT: What should we do here?
Author.cpp:121: // LASSERT: What should we do here?
Buffer.cpp:4525:        // LASSERT: Is it safe to continue here, or should we just return?
Cursor.cpp:345:         // LASSERT: Is it safe to continue here, or should we return?
Cursor.cpp:403:         // LASSERT: Is it safe to continue here, or should we return?
Cursor.cpp:1143:                // LASSERT: There have been several bugs around this code, that seem
CursorSlice.cpp:83:     // LASSERT: This should only ever be called from an InsetMath.
CursorSlice.cpp:92:     // LASSERT: This should only ever be called from an InsetMath.
LayoutFile.cpp:303:                     // LASSERT: Why would this fail?
Text.cpp:995:           // LASSERT: Is it safe to continue here?
2013-04-25 17:27:10 -04:00
Georg Baum
c14b9e67bc Implement paste from LaTeX and HTML (bug #3096)
As discussed on the list. No automatic contents detection is done, the user
needs to use the special paste menu instead. I used the new TempFile class
for safe temporary file handling.
The documentation would go into section 2.2 of UserGuide.lyx, but I am not
allowed to edit that document.
2013-04-14 19:45:36 +02:00
Vincent van Ravesteijn
cb93f034d4 Add an LFUN for continuous spell checking
This fixes the first part of #8589.
2013-03-24 20:28:37 +01:00
Georg Baum
0526eb9d47 Implement VCS copy and rename
The advantage of having this in LyX is the intelligent file name handling
of included files. Implementation as discussed on the list, but ensure also
that an attempt to use locked files fails.
2013-02-06 20:38:54 +01:00
Scott Kostyshak
e2f5b4a5e6 Add some linebreaks to LyXAction.cpp
Should make the LyX output look better.
2013-01-25 23:27:02 -05:00
Scott Kostyshak
c70b62a18e LyXAction.cpp: add move row to LFUN_INSET_MODIFY
Same for move column.
2013-01-25 23:27:02 -05:00
Scott Kostyshak
562fa5bcb0 Typo in LFUN doc 2013-01-11 04:36:37 -05:00
Juergen Spitzmueller
3e8bfd8bd6 Convenience LFUN to split an environment 2012-12-23 18:57:32 +01:00
Juergen Spitzmueller
b95c17cfdd Merge remote-tracking branch 'origin/master' into features/latexargs
Conflicts:
	src/Text3.cpp
2012-11-20 18:11:14 +01:00
Juergen Spitzmueller
aafd52f441 Merge branch 'master' of git.lyx.org:lyx 2012-11-20 18:10:18 +01:00
Juergen Spitzmueller
d3488d6f86 Whitespace 2012-11-20 18:09:38 +01:00
Juergen Spitzmueller
2e69c66195 InsetArgument revision, first working version 2012-11-19 14:21:02 +01:00
Pavel Sanda
f47215c5e7 * doxy 2012-11-03 19:08:37 +01:00
Scott Kostyshak
250f60f36b Simplify LFUN_BUFFER_FORALL
buffer-forall only takes one parameter now, which is the LFUN to
dispatch on all non-hidden buffers. A hidden buffer is defined as being
internally open in LyX, but not visible in any window (view).

Thanks, JMarc.
2012-10-15 10:05:20 -04:00
Juergen Spitzmueller
e3e6befc54 Ronen's patch for lfun language set
This adds an optional 'set' argument to the language lfun and reintroduces toggling.

Additions by me reintroduce the possibility to reset to the document language via 'language reset' or just 'language'
2012-10-03 07:27:36 +02:00
Juergen Spitzmueller
3588f2f696 Context menu item to add unknown branch (rest of #7643) 2012-09-30 17:32:00 +02:00
Juergen Spitzmueller
e26635bfb9 UI for separate control of master/child branch state (#7642, part of #7643) 2012-09-30 14:59:24 +02:00
Pavel Sanda
541828ebf5 Another witch hunting case: break-paragraph -> paragraph-break. 2012-09-29 18:06:42 +02:00
Pavel Sanda
d1297047e7 Move similar LFUNs to one place. 2012-09-29 17:42:27 +02:00
Pavel Sanda
e9a28c8000 Correct naming for view-split. 2012-09-29 17:33:46 +02:00
Pavel Sanda
a72b75c50c Proper naming for tab-group-close. 2012-09-29 17:16:52 +02:00
Tommaso Cucinotta
4985015e89 Now LyX closes the current document WA only by default (other WAs remain open).
If the WA is the last one showing a buffer, then the buffer may either be
closed or kept hidden, or the user is asked. The behaviour is controlled
by a new preference option.
For discussion, see http://comments.gmane.org/gmane.editors.lyx.devel/142638
2012-09-28 23:12:38 +01:00
Scott Kostyshak
80c126b092 Typos
Clean up some comments, LFUN documentation, an error message,
and lyx --help output.
2012-09-12 19:38:26 -04:00
Scott Kostyshak
58dd5698ac Fix some typos for LFUNs.lyx 2012-09-12 18:52:16 -04:00
Juergen Spitzmueller
706c5d25de Fix documentation 2012-08-23 17:47:12 +02:00
Juergen Spitzmueller
ee1fc9130a Add support for some basic non-unicoded IPA macros
We now support everything on the IPA chart via the toolbar
2012-08-23 17:42:53 +02:00
Juergen Spitzmueller
b6a63bfce8 An IPA toolbar
Translators: sorry ;-)
2012-08-21 14:56:34 +02:00
Jean-Marc Lasgouttes
6774176aab Implement new LFUN buffer-forall [<BUFFER-TYPE>] <LFUN-COMMAND>
This is a patch from Scott Kostyshak. See the thread here for some
background info:
http://thread.gmane.org/gmane.editors.lyx.devel/142300/focus=142362
2012-07-20 10:50:29 +02:00
Pavel Sanda
436cb86ff1 * doxy 2012-05-17 19:12:27 +02:00
Jürgen Spitzmüller
f626cfb7a3 Implement a native IPA inset (bug #2591) with instant preview.
Currently only basic functionality (our math-tipa functionality plus multipar input). Further enhancements (such as proper unicode input and a specific toolbar) are planned. DocBook and XHTML output also need to be audited.

The lyx2lyx reversion routine surely can be improved (help appreciated), and I don't know  tex2lyx enough to handle this file format change.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40867 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-06 07:54:22 +00:00
Pavel Sanda
255379b1ac Update doxy.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40502 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-15 16:44:21 +00:00
Tommaso Cucinotta
0efccc0d22 typo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40080 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-29 22:15:29 +00:00
Tommaso Cucinotta
824d640227 Adding the capability to paste as simple unformatted text.
Documentation (and perhaps menu items) need still to be a bit
clarified in order to distinguish the various paste options
for the average user.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40060 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-29 15:42:01 +00:00
Georg Baum
8e8c214bef Fix some bugs related to spaces in math:
- Interpret argument of LFUN_SPACE_INSERT correctly
- Use InsetMathSpace instead of InsetMathSpecialChar for "\ " (bug # 7728)
- Use InsetMathSpace instead of InsetMathChar for ~ (bug # 7728).
  This fixes also the display in LyX (previously a literal ~ was displayed).
Using InsetMathSpace enables also the "Insert Formatting" menu entries.
No file format change is needed, since the LaTeX export is unchanged.
Note that there are still some bugs related to spaces in math:
#7746, #7747, #7749, #7842


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39947 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-23 20:19:49 +00:00
Julien Rioux
24cd735153 Correction: The inset name is citation, not cite
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39808 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-06 16:30:28 +00:00
Tommaso Cucinotta
e79b461f9e Fixed typo in comment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39806 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-06 13:51:45 +00:00
Tommaso Cucinotta
164ae1584a Added Export As... dialog, exploiting the new destination path that can
be specified when exporting.
This fixes #3402.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39805 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-06 13:47:42 +00:00
Tommaso Cucinotta
eff76bd3ab Added -E option to specify export format and destination file-name (and export folder).
Addressing #4501.
See also http://comments.gmane.org/gmane.editors.lyx.devel/138329


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39678 a592a061-630c-0410-9148-cb99ea01b6c8
2011-09-15 01:07:49 +00:00