Commit Graph

75 Commits

Author SHA1 Message Date
Enrico Forestieri
a8b7e0a18b Add some postscript and pdf viewers for Unix and Windows.
For Windows: AcroRd32, SumatraPDF and gsview (both 32 and 64 bit versions).
For Unix: qpdfview.

Qpdfview is a nice alternative to Okular for KDE users and a superior
alternative to Evince for Gnome users, due to its complete synctex
support. It only depends on Qt libraries for the graphical interface.
2014-08-03 19:26:34 +02:00
Enrico Forestieri
64cc8a1c1e Use getent instead of grepping /etc/passwd.
Forthcoming versions of cygwin will use a different mechanism for
obtaining passwd/group information based on /etc/nsswitch.conf.
Thus, it will not be guaranteed that the files /etc/passwd and
/etc/group even exist. The recommended way for obtaining those
info is by using the getent command, which already works in
current versions.
2014-08-03 18:59:54 +02:00
Enrico Forestieri
47e263fa7f Fix compatibility issue with 64-bit cygwin. 2014-08-03 18:53:33 +02:00
Enrico Forestieri
154cd41119 Fix import of latex documents with scaled fonts. 2014-08-03 18:42:04 +02:00
Juergen Spitzmueller
d8b88a78a4 Fix bug with wrong baseline calculation in last paragraph
Fixes: #9231
2014-08-03 17:43:18 +02:00
Juergen Spitzmueller
03d6040904 Do not break documents with complex beamer block ERT usage we cannot handle
Fixes: #9144
2014-08-03 17:38:46 +02:00
Enrico Forestieri
2a0b22ba9e Fix bug #9151 (Wrong reverse search for images and tables).
If the reverse position corresponds to an inset, its paragraph id
does not follow the main text numbering. Typically, an inset has
only a few paragraphs, so that we would jump near the beginning of
the document. Now the cursor in LyX jumps to the right spot.
2014-08-03 16:47:22 +02:00
Juergen Spitzmueller
c31cb9fd98 Improve parsing of ERT arguments in beamer block titles.
Fixes: #9225
2014-08-01 16:06:42 +02:00
Enrico Forestieri
5f7948e5a5 Fix bugs 9190 and 9193.
The conversion from floating point to string performed by
boost:lexical_cast does not allow specifying a precision and,
for example, values such as 0.9 are returned as 0.899999976.
The standard C++ way for performing the conversion is using
std::ostringstream which is exempt from this problem, even if
less efficient. For the sake of accuracy, boost::lexical_cast
is ditched in favor of the ostrinsgstream implementation.
In C++11 another option would be using std::to_string, but I
think it is not as efficient as the boost way and not worth
implementing through #ifdef's.
2014-07-28 00:33:13 +02:00
Juergen Spitzmueller
edddfb99fc Fix beamer block conversion when arguments are in multiple ERTS.
Fixes second part of #9208.
2014-07-27 18:06:08 +02:00
Juergen Spitzmueller
a8ba869d73 Add beamer-resenumerate (from our wiki) to the list of safe modules for argument conversion, since it is safe.
Fixes part of #9208.
2014-07-27 18:02:35 +02:00
Juergen Spitzmueller
5210cfa5f9 Whitespace 2014-07-27 12:26:37 +02:00
Juergen Spitzmueller
8d8880d83b Fix typos in InsetListingsParams validator 2014-07-27 09:08:30 +02:00
Scott Kostyshak
63f980bc04 Backport 'select word on double click at boundary'
Now when double clicking on a boundary of a word, the
word is selected. This also causes single-letter words
to now be selected (fixes #9159).

Backported from bcbc162.
2014-07-26 17:30:56 -04:00
Jean-Marc Lasgouttes
3e60f58a92 Do not forget last word of paragraph in completion
With the old code, the last word of a paragraph would not be added in
the completion list. The key difference is to pass `from' instead of `pos'
to FontList::fontiterator.

Slight cleanup of the code.
2014-07-20 00:07:23 +02:00
Jean-Marc Lasgouttes
fa67a6ae89 Fix error spotted by cppcheck 2014-07-20 00:04:45 +02:00
Georg Baum
275c6dabe6 Fix bug #9162: Missing \use_indices
The lyx2lyx conversion for format 352 was incomplete: It should have been
added the \use_indices setting, but it relied on the fact that the default in
LyX for missing \use_indices is the same as the old format without that
setting used. However, the default might change in the future, and later
lyx2lyx conversions rely on that setting as well.
2014-07-09 20:58:44 +02:00
Georg Baum
f5cf3705d5 Make theWordList() thread safe.
Without this, you get crashes in a few second when you set the autosave
interval to one second and edit quickly (typing new words etc). The reason
is that the cloned buffer wants to insert words into the word list and
remove them again, but it lives in a different thread.
2014-07-06 18:12:57 +02:00
Georg Baum
e64954e7d3 Reset after 2.1.1 release 2014-07-06 18:02:56 +02:00
Uwe Stöhr
d13650974b sv.po: translations for LyX 2.1.1 from Jim 2014-06-26 00:19:50 +02:00
Uwe Stöhr
34f6289ac2 es.po: translations from Ignacio 2014-06-21 01:40:07 +02:00
Uwe Stöhr
f1fa30ab83 fr.po: updates from Jean-Pierre 2014-06-21 01:24:51 +02:00
Richard Heck
e49f4124c7 Backup the existing LyX file before attempting to write the new one.
This avoids dataloss in case we are unable to write the new one after
all.

A more sophisticated approach, due to Georg, is in master, but it needs
more testing that it will be able to get before the release of 2.1.1.
That should be committed to 2.1.x when it is ready and this patch backed
out again.
2014-06-14 17:42:27 -04:00
Richard Heck
a72e68dd09 Revert "Use a different naming scheme, per Enrico's suggestion."
This reverts commit fff454fa4b.

Revert "Per a suggestion of JMarc's, first write the saved file to a"
This reverts commit 094129f804.
2014-06-14 17:42:26 -04:00
Uwe Stöhr
a8dcda1e6c ia.po: updates for 2.1.1 from Giovanni 2014-06-13 00:42:18 +02:00
Enrico Forestieri
32e42f2f81 Set the default locale at startup.
On startup, the default locale is "C", meaning that all system
functions assume an ascii codeset. The environment's locale
settings should be selected by calling setlocale(LC_ALL,"").
This is done by Qt during the QCoreApplication initialization
but this inizialization is never performed for batch processing
and, as a result, LyX is not able to process files whose names
contain non-ascii characters. This is not an issue on Windows,
where the file names are always stored as UTF-16, so the call is
only performed for unix-like platforms (this also includes cygwin,
due to its own filenames management that allows using characters
which are forbidden to native programs).
2014-06-11 19:08:44 +02:00
Enrico Forestieri
970da7c5e2 Fix bug #9153 (Using mathpanel to insert matrix creates extra space on top)
The code was setting the current index before filling the
combo box items.
2014-06-08 23:59:59 +02:00
Jean-Marc Lasgouttes
3544ce4a4e Fix crash when accepting change
The problem is the use of cursor movement methods to update cursor.
Cursor::forwardPos() steps into insets, which is not always what we
want. The problem here is that there is a math inset just after the
accepted change, and that the cursor steps into it for some reason.

This code is a nightmare anyway.

Fixes: bug #9145
2014-06-05 12:51:40 +02:00
Richard Heck
b9db0c1321 Flush stream more often to help figure out where the mystery crash
originates.
(cherry picked from commit 5536b0c7fe)
2014-06-04 09:22:21 -04:00
Jean-Marc Lasgouttes
d4faf127d7 Make TextMetrics::editXY more robust
This fixes a crash in examples/fa/splash.lyx when selecting text
representing menu entries. This happens because menu names are in LTR
English, while the inset itself is in RTL.

The problem is that the current code relies on the fact that
 1. getColumnNearX and checkInsetHit share the same idea about cursor
    position.
 2. pos and pos + 1 are in general consecutive on screen.

It seems that 1. is wrong here (for reasons I did not try to
understand); the second assumption is definitely false with
bi-directional text. This makes editXY very fragile.

The new code should be more robust in this respect. The logic is:
 * if checkInsetHit finds an inset, use its position,
 * otherwise, ask getColumnNearX for the cursor position.

Fixes: #9142
2014-06-04 12:17:01 +02:00
Uwe Stöhr
aa6a4c818d fr.po: updates for 2.1.1 from Jean-Pierre 2014-06-04 02:52:44 +02:00
Richard Heck
094129f804 Per a suggestion of JMarc's, first write the saved file to a
temporary name, then move it to its real location if we succeed.
This prevents our over-writing the existing file with a corrupt
one.
(cherry picked from commit 10364082c8)
2014-06-03 11:48:49 -04:00
Georg Baum
76417c7326 Do not corrupt documents without newline at EOF
trim_eol() assumes that a line always ends either with \n, \r, or \r\n.
This assumption is always valid except for the last line of a document, since it
may miss the trailing newline. LyX does not create such documents, bu they may
result from automatic creation tools, and LyX can read them, so lyx2lyx should
be able to read them as well.
(cherry picked from commit c75c6e446a)

Fix the fix

MAC-style (pre-OS X) line ends were not recognized anymore
(cherry picked from commit 55af9cb006)
2014-05-29 11:28:04 -04:00
Richard Heck
b128f3de14 Fix bug #9131 for stable branch. The real problem lies
elsewhere, but it will require major surgery and, more
importantly, a file format change.
2014-05-23 11:01:07 -04:00
Juergen Spitzmueller
994155b2a6 Output arguments required by arguments with default or preset arg
Fixes: #9128
2014-05-21 15:53:53 +02:00
Juergen Spitzmueller
ad723c41b6 Fix nesting in some beamer reversion methods.
Patch by Enrico
2014-05-21 15:44:30 +02:00
Georg Baum
c9fdf37678 Ugly fix for bug #9102
The real problem is the encoding of latex_language: It is hardcoded to latin1,
but InsetListig uses the currently active encoding. Therefore, we cannot tell
whether any given character wil be encodable or not, and we should not prevent
non-ACII characters.
In the future, we need to make the encoding of latex_language dynamic, so that
it always represents the currently active encoding. Then, we could do the
correct check both for listings and ERT. For now, I simply disabled the
encoding check for listings, which also means that bug 9012 might occur in
other cases for listings, but this is less important than bug 9102.
2014-05-19 21:50:34 +02:00
Juergen Spitzmueller
1379c381c3 Fix crash when right-clicking into an inset with more paragraphs than the main text.
Fixes: #9123.
2014-05-18 18:08:43 +02:00
Richard Heck
ccd8cd89ad Add limits to searches in convert_TeX_brace_to_Argument.
(cherry picked from commit eb26d85dc9)
2014-05-18 11:26:34 -04:00
Enrico Forestieri
1fa06296b6 Adapt output to the on-screen representation.
LyX assumes that a standard paragraph following a layout with
NextNoIndent==false has to be indented on screen, so output the
necessary blank line to make it so also in the output.
2014-05-17 22:05:07 +02:00
Enrico Forestieri
f5a246b185 Fix an on-screen representation glitch.
If a layout has NextNoIndent set to true, the following paragraph
is not indented on screen. LyX checks the previous layout for that
style parameter to decide whether to indent or not. Of course,
what matters is the latex output and the on-screen representation
should match this output. Now, when a layout has NextNoIndent==true,
the latex output is correctly not indented, while the on-screen
representation may fail to match this output. This can occur when,
for example, a standard paragraph is nested in the previous layout,
because LyX would check the property of the nested layout instead
of the container layout. Thus, LyX should check the property of a
previous layout at the same depth for correctly deciding whether
a paragraph has to be indented or not.
See also http://www.lyx.org/trac/ticket/9055#comment:12 for an
example document where the previous scenario actually occurs.
2014-05-16 21:58:21 +02:00
Richard Heck
b17802ba81 Fix bug #9112: There is a test here that seems intended to catch the
case where there are unbalanced braces, but it comes too late. In that
case, we try to check cmd[docstring::npos] and crash.
(cherry picked from commit 6b0a8fbc96)
2014-05-10 10:40:30 -04:00
Juergen Spitzmueller
ede754039d Beamer block conversion: consider ERT arguments with leading/trailing blanks
Should also go to branch.
2014-05-08 19:52:01 +02:00
Enrico Forestieri
2c2ba981fb Fix problem with drawing of math backround with selections.
(cherry picked from commit 3e681bea4f)
2014-05-07 14:23:53 -04:00
Juergen Spitzmueller
5160fa1043 Stabilize mouse selection in mathed
Fixes: #9074
2014-05-06 17:10:11 +02:00
Jean-Marc Lasgouttes
bd206ff5f5 Turn an error message into a Debug::LOCALE warning 2014-05-06 16:41:26 +02:00
Juergen Spitzmueller
b14e5925a9 Fix View Source size
Fixes: #9084.
2014-05-02 11:03:32 +02:00
Georg Baum
90a16b3ec1 Forgot status 2014-05-01 13:53:17 +02:00
Juergen Spitzmueller
932b81c175 Status update 2014-04-30 16:06:27 +02:00
Uwe Stöhr
ff507c1a33 status.21x: move an entry to the correct position 2014-04-29 22:27:51 +02:00