]> git.lyx.org Git - features.git/log
features.git
9 years agoUpdate he.po
Kornel Benko [Fri, 3 Apr 2015 09:51:25 +0000 (11:51 +0200)]
Update he.po

new translations from  Guy Rutenberg <guyrutenberg@gmail.com>

9 years agoMath Panels: revise the "Relations" svg icons.
Enrico Forestieri [Thu, 2 Apr 2015 22:35:06 +0000 (00:35 +0200)]
Math Panels: revise the "Relations" svg icons.

9 years agoFix math macro crash (bug 9418)
Georg Baum [Thu, 2 Apr 2015 19:35:05 +0000 (21:35 +0200)]
Fix math macro crash (bug 9418)

In the test case the crash occured in mathml export of the temporary buffer,
because the macro was updated, and because one of the used other macros was
not copied, the macro argument was detached. However, the underlying problem
of the crash was a broken ArgumentProxy::mathMacro_ reference which became
invalid each time the ownng MathMacro was copied. In the bug test case the
copying happened due to resizing a std::vector, but any other copy would have
created the same problem. The crash did not always happen, because sometimes
the old freed memory was not immediately reused, so the invalid reference did
still point to usable data.

The fix is easy: Convert ArgumentProxy::mathMacro_ to a pointer and update it
always after creating a copy of the owner. The pimpl of MathMacro from the
previous commit helps here to distinguish between the data that can be
automatically copied (in MathMacro::Private) and the cleanup that needs to be
done manually (in MathMacro). This way, the manual copy constructor and
assigment operator of MathMacro does not need to be touched if a new member is
added.

9 years agoPimpl MathMacro
Georg Baum [Thu, 2 Apr 2015 19:20:32 +0000 (21:20 +0200)]
Pimpl MathMacro

This will make it easier to fix bug 9418.

9 years agoProperly determine active font encoding
Juergen Spitzmueller [Thu, 2 Apr 2015 15:13:45 +0000 (17:13 +0200)]
Properly determine active font encoding

9 years agoImplement checkWidgets in the remaining InsetParamsWidget derived dialogs.
Juergen Spitzmueller [Thu, 2 Apr 2015 15:03:08 +0000 (17:03 +0200)]
Implement checkWidgets in the remaining InsetParamsWidget derived dialogs.

9 years agoNo need for default argument
Juergen Spitzmueller [Thu, 2 Apr 2015 14:32:04 +0000 (16:32 +0200)]
No need for default argument

9 years agoCmake tests: Test export xhtml always, independent of default output format
Kornel Benko [Thu, 2 Apr 2015 07:51:53 +0000 (09:51 +0200)]
Cmake tests: Test export xhtml always, independent of default output format

9 years agoAdded test for export of icon graphics in lyx info inset.
Kornel Benko [Thu, 2 Apr 2015 07:39:42 +0000 (09:39 +0200)]
Added test for export of icon graphics in lyx info inset.

Tests the polluting of the system directory with pdf form of the
original svgz graphic.

9 years agoMath Panels: revise the "Operators (extra)" svg icons.
Enrico Forestieri [Wed, 1 Apr 2015 22:25:51 +0000 (00:25 +0200)]
Math Panels: revise the "Operators (extra)" svg icons.

Also small tweaks to some other icons.

9 years agoEnable editing 'slovak.nsh' with emacs.
Kornel Benko [Wed, 1 Apr 2015 16:16:35 +0000 (18:16 +0200)]
Enable editing 'slovak.nsh' with emacs.

9 years agoCmake build: Do not install .pdf icons created by export
Kornel Benko [Wed, 1 Apr 2015 15:26:13 +0000 (17:26 +0200)]
Cmake build: Do not install .pdf icons created by export

Such files are polluting the lib/images directory if
exporting lyx-files containing lyx-info of type icon.

9 years agoClean-up the undo API
Jean-Marc Lasgouttes [Thu, 12 Mar 2015 14:57:29 +0000 (15:57 +0100)]
Clean-up the undo API

* Remove the UndoKind parameter in the general interface
* move recordUndoInset to Cursor
* remove one variant of Undo::recordUndo.
* get rid of Text::recUndo.

9 years agoCmake tests: Test pdf exports honoring the default output format
Kornel Benko [Wed, 1 Apr 2015 09:50:31 +0000 (11:50 +0200)]
Cmake tests: Test pdf exports honoring the default output format

The variable 'out_formats' was not set correctly in this case.

9 years agoGuiInfo: implement checkWidgets.
Juergen Spitzmueller [Wed, 1 Apr 2015 08:07:20 +0000 (10:07 +0200)]
GuiInfo: implement checkWidgets.

9 years agoEuropassCV only supports pdflatex.
Juergen Spitzmueller [Wed, 1 Apr 2015 07:47:53 +0000 (09:47 +0200)]
EuropassCV only supports pdflatex.

9 years agoFix warning
Jean-Marc Lasgouttes [Tue, 31 Mar 2015 15:08:04 +0000 (17:08 +0200)]
Fix warning

9 years agoGet rid of autoBreakRow, which is obsoleted by allowMultiPar()
Jean-Marc Lasgouttes [Mon, 30 Mar 2015 17:45:01 +0000 (19:45 +0200)]
Get rid of autoBreakRow, which is obsoleted by allowMultiPar()

The only real user was Text::insertStringAsLine, but this got changed
in commit 2c7152ab.

While not other place did read the value, there is a side effect of
setAutobreakRow that merges exiting paragraphs. However, this is used
in two situations

* some constructors, where the inset is empty;

* InsetTabular::toggleFixedWidth, which actually contains itself some
  code to merge paragraphs.

Therefore the member and all associated code can be removed safely.

9 years agoFix bug #9279
José Matos [Tue, 31 Mar 2015 14:03:48 +0000 (15:03 +0100)]
Fix bug #9279

Make lyx2lyx parser a bit more robust.

Ignore if the first line of a lyx file does not start with a #
Add such a line if it is missing..

9 years agoTypo
Enrico Forestieri [Tue, 31 Mar 2015 14:03:16 +0000 (16:03 +0200)]
Typo

9 years agoImprove the check for multiple paragraphs in Text::insertStringAsLine.
Jean-Marc Lasgouttes [Mon, 30 Mar 2015 21:12:39 +0000 (23:12 +0200)]
Improve the check for multiple paragraphs in Text::insertStringAsLine.

Rely only on InsetText::allowMultipar() to get this information.

Implement this method for InsetTabular and InsetBox.

Also rely on this method for disabling LFUN_PARAGRAPH_BREAK.

9 years agoAdd comment
Enrico Forestieri [Mon, 30 Mar 2015 23:26:48 +0000 (01:26 +0200)]
Add comment

9 years agoMath Panels: revise the Operators svg icons
Enrico Forestieri [Mon, 30 Mar 2015 23:14:02 +0000 (01:14 +0200)]
Math Panels: revise the Operators svg icons

9 years agoInitialize definition_ correctly
Georg Baum [Mon, 30 Mar 2015 20:04:52 +0000 (22:04 +0200)]
Initialize definition_ correctly

9 years agowhitespace
Georg Baum [Mon, 30 Mar 2015 20:03:03 +0000 (22:03 +0200)]
whitespace

9 years agoMath Panels: revise the "Arrows" svg icons
Enrico Forestieri [Mon, 30 Mar 2015 14:06:02 +0000 (16:06 +0200)]
Math Panels: revise the "Arrows" svg icons

9 years agoImprove read-only mode of InsetParams derived dialogs
Juergen Spitzmueller [Mon, 30 Mar 2015 12:44:11 +0000 (14:44 +0200)]
Improve read-only mode of InsetParams derived dialogs

* Disable "New Inset" button
* Do not disable line edits, but use setReadOnly instead (this allows copying contents)

Fixes: #9408
Note that some dialogs still need some care.

9 years agoUpdate doc-files due to icon rename, this time correct
Kornel Benko [Sun, 29 Mar 2015 15:20:35 +0000 (17:20 +0200)]
Update doc-files due to icon rename, this time correct

9 years agoUpdate doc-files due to icon rename
Kornel Benko [Sun, 29 Mar 2015 14:49:27 +0000 (16:49 +0200)]
Update doc-files due to icon rename

promote -> outline-up
demote -> outline-down

9 years agoRemove InsetMathSqrt hack from MathMacro
Georg Baum [Sun, 29 Mar 2015 12:50:37 +0000 (14:50 +0200)]
Remove InsetMathSqrt hack from MathMacro

The expanded cells of a mathmacro were previously stored in an InsetMathSqrt.
This was only used as a container for the MathData object in the first cell
of the sqrt inset, which contained the actual expanded arguments.
Funny enough, the only place were the inset property of expanded_ was really
used cannot be seen in the diff. It was MathMacro::kerning(), and this usage
was wrong, since InsetMathSqrt::kerning() always returns 0. Threfore, using
the correct type (MathData) for expanded_ does not only make the code more
readable, gets rid of an unneeded dependency, but also fixes a bug: Now the
correct kerning is returned for expanded cells. Also, expanded_ and
definition_ use the same type now, which looks nicely symmetric.

9 years agoImprove CAS output of math macros
Georg Baum [Sun, 29 Mar 2015 11:53:01 +0000 (13:53 +0200)]
Improve CAS output of math macros

Previously, things like [ name ] where exported for computer algebra systems.
Now, the expanded macros are exported, which may still be wrong, but now the
CAS has at least a chance to understand what was meant.

9 years agosupport tests do not need QtGui anymore
Georg Baum [Sun, 29 Mar 2015 10:56:38 +0000 (12:56 +0200)]
support tests do not need QtGui anymore

9 years agoAdjust docs after cb899b3f.
Enrico Forestieri [Sat, 28 Mar 2015 22:39:30 +0000 (23:39 +0100)]
Adjust docs after cb899b3f.

9 years agoProvide icons for the outline-* lfuns.
Enrico Forestieri [Sat, 28 Mar 2015 22:18:22 +0000 (23:18 +0100)]
Provide icons for the outline-* lfuns.

- Accordingly rename "promote" and "demote" icons.
- Add "outline-down" and "outline-up" icons.

9 years agoCmake tests: Make check_load tests run in sequence.
Kornel Benko [Sat, 28 Mar 2015 21:54:08 +0000 (22:54 +0100)]
Cmake tests: Make check_load tests run in sequence.

Running parallel commands 'lyx -batch ...' with files from
the same directory has lead to conflicts.

9 years agoCmake tests: make parallel export tests safer.
Kornel Benko [Sat, 28 Mar 2015 20:21:16 +0000 (21:21 +0100)]
Cmake tests: make parallel export tests safer.

Use different temporary directory for each test.

9 years agoNo need to compute size of an icon if not using GUI.
Kornel Benko [Sat, 28 Mar 2015 20:05:41 +0000 (21:05 +0100)]
No need to compute size of an icon if not using GUI.

This also avoids crash while calling Qimage() without GUI.

9 years agoUse an info inset instead of a graphics one
Enrico Forestieri [Sat, 28 Mar 2015 12:13:03 +0000 (13:13 +0100)]
Use an info inset instead of a graphics one

9 years agoAllow using icon names in InsetInfo
Enrico Forestieri [Sat, 28 Mar 2015 11:45:20 +0000 (12:45 +0100)]
Allow using icon names in InsetInfo

Currently, only lfun names are accepeted but there are cases in which
the lfun name does not map directly to an icon. Fore example, in the
outliner, the icon named "promote" is used for the lfun outline-out.
As a result, a graphics inset is used in the documentation for describing
the corresponding icon. Now one can also use an icon name. The argument
of "info-isert icon" is firstly lookep up as an lfun. If no corresponding
icon is found, the argument is taken as the name of the icon. If no such
icon exists, the "unknown" icon is used.

9 years ago#9477 add documentation for optional language argument of LFUN_SPELLING_{ADD,REMOVE...
Stephan Witt [Sat, 28 Mar 2015 08:24:08 +0000 (09:24 +0100)]
#9477 add documentation for optional language argument of LFUN_SPELLING_{ADD,REMOVE,IGNORE}

9 years agoUdate sk.po
Kornel Benko [Fri, 27 Mar 2015 10:17:40 +0000 (11:17 +0100)]
Udate sk.po

9 years agoExpand dummy_functions.cpp with needed class for check_ExternalTransforms.
Kornel Benko [Fri, 27 Mar 2015 09:53:12 +0000 (10:53 +0100)]
Expand dummy_functions.cpp with needed class for check_ExternalTransforms.

9 years ago#9477 improved argument handling for LFUN_SPELLING_ADD,LFUN_SPELLING_IGNORE and LFUN_...
Stephan Witt [Fri, 27 Mar 2015 07:07:05 +0000 (08:07 +0100)]
#9477 improved argument handling for LFUN_SPELLING_ADD,LFUN_SPELLING_IGNORE and LFUN_SPELLING_REMOVE

9 years agoMake builds reproducible
Jean-Marc Lasgouttes [Thu, 26 Mar 2015 17:14:45 +0000 (18:14 +0100)]
Make builds reproducible

We do not really need to use __TIME__ and __DATE__, which prevent from making LyX builds reproducible.

Fixes bug #9415.

9 years agoImprove support for on screen length calculation
Jean-Marc Lasgouttes [Thu, 26 Mar 2015 15:55:19 +0000 (16:55 +0100)]
Improve support for on screen length calculation

The computation of length on screen depend in particular of the computation of the size of an em. Many places of the code used to rely on the width of the M character, which is not really correct:
http://en.wikipedia.org/wiki/Em_%28typography%29

In digital typography, the best value to use is the point size of the font.

* Implement FontMetrics::em(), which returns the value in pixels of the EM unit.
 Convert code to use it.

* Introduce Length::inPixel(MetricsBase const &), which takes the textwidth and em information from the MetricsBase object. Convert code to use it.

* Fix several places where Length::inPixel is used without a proper em value.

* add mathed_font_em() helper function. It should eventually be removed like some other functions in MathSupport.

* Add dummy implementation of FontMetrics to tex2lyx for linking purposes.

9 years agoCall DEPM properly when going somewhere with outliner.
Jean-Marc Lasgouttes [Thu, 26 Mar 2015 09:27:59 +0000 (10:27 +0100)]
Call DEPM properly when going somewhere with outliner.

LFUN_PARAGRAPH_GOTO used to do a plain setCursor, whereas the more elaborate mouseSetCursor is a much better version.

Fixes bug #9479.

9 years agoFix compilation with cmake
Enrico Forestieri [Thu, 26 Mar 2015 01:27:11 +0000 (02:27 +0100)]
Fix compilation with cmake

9 years agoRemove the iconScaleFactor() method from src/support.
Enrico Forestieri [Wed, 25 Mar 2015 20:26:32 +0000 (21:26 +0100)]
Remove the iconScaleFactor() method from src/support.

I am moving the corresponding code directly to InsetInfo.cpp.
Moreover, the size of the image displayed by the info inset is
now dynamically set according to the text size.

9 years agoMath Panels: revise the "Frame decorations" svg icons
Enrico Forestieri [Wed, 25 Mar 2015 14:19:39 +0000 (15:19 +0100)]
Math Panels: revise the "Frame decorations" svg icons

9 years agoFix thinko in convert_corollary_args
Juergen Spitzmueller [Tue, 24 Mar 2015 20:43:25 +0000 (21:43 +0100)]
Fix thinko in convert_corollary_args

Fixes: #9478
9 years agoMath panels: revise the big operators svg icons.
Enrico Forestieri [Tue, 24 Mar 2015 20:21:29 +0000 (21:21 +0100)]
Math panels: revise the big operators svg icons.

9 years agoAutotool python support: allow to set version in configure.ac.
Jean-Marc Lasgouttes [Tue, 24 Mar 2015 11:09:21 +0000 (12:09 +0100)]
Autotool python support: allow to set version in configure.ac.

9 years agoFix consecutive merging of tabular cells
Jean-Marc Lasgouttes [Tue, 24 Mar 2015 09:50:51 +0000 (10:50 +0100)]
Fix consecutive merging of tabular cells

This is a bug reported and fixed by Edwin Leuven.

Here is how Edwin described it in his inimitable minimalist style:
  first i merge the top-left two cells in a small, say 3x3, table

  if i then merge this multicolumn cell with the remaining cell in the first row
  my table ends up all bonkers

9 years agoAutotools: check for python >= 2.7.0 or >= 3.3.0
Jean-Marc Lasgouttes [Mon, 23 Mar 2015 21:35:52 +0000 (22:35 +0100)]
Autotools: check for python >= 2.7.0 or >= 3.3.0

A new macro adapted from AM_PROG_PYTHON is defined. It does the dual version testing for python 2 and python 3. The rest of the functionnality of AM_PROG_PYTHON has been stripped off.

Once our special macro has been invoked, we use the usual AM_PROG_PYTHON.

9 years agoWhitespace.
Richard Heck [Tue, 24 Mar 2015 01:58:45 +0000 (21:58 -0400)]
Whitespace.

9 years agoMake InsetSpecialChar names more consistent
Georg Baum [Mon, 23 Mar 2015 20:28:04 +0000 (21:28 +0100)]
Make InsetSpecialChar names more consistent

This is the rersult of a discussion on the list. Now all special characters
have meaningful names, and it is clear that the LyX file syntax is not LaTeX.

9 years agoFix compilation of tests
Georg Baum [Mon, 23 Mar 2015 20:23:03 +0000 (21:23 +0100)]
Fix compilation of tests

support/filetools.cpp requires the qt GUI libs since d00dcc2ca7b.

9 years agoFix tex2lyx import of \LaTeXe
Georg Baum [Sun, 22 Mar 2015 16:56:07 +0000 (17:56 +0100)]
Fix tex2lyx import of \LaTeXe

Previously, it did generate an invalid SpecialChar inset.

9 years agoUse isActive() instead of editable() in mathed.
Jean-Marc Lasgouttes [Sun, 22 Mar 2015 20:40:52 +0000 (21:40 +0100)]
Use isActive() instead of editable() in mathed.

Fixes crash introduced in [17e435c4/lyxgit].

editable() is more related to Texted. It is false for closed collapsable insets
Eventually the two methods should be merged.

9 years agoAlso install oxygen math svg icons.
Enrico Forestieri [Sun, 22 Mar 2015 22:16:05 +0000 (23:16 +0100)]
Also install oxygen math svg icons.

These icons have no png counterpart and hence are not catched by the shortcuts.

9 years agoFix crash related to the icon info inset.
Enrico Forestieri [Sun, 22 Mar 2015 21:13:55 +0000 (22:13 +0100)]
Fix crash related to the icon info inset.

When closing a document with the cursor near an icon info inset, LyX
may crash on loading again the same document. This is most probably due
to the fact that compressed svg icons are first uncompressed to a
temporary file before being used. The temporary file is then deleted
but something still expects to find it in place. The exact circumstances
that lead to the crash are unknown, and maybe there is also a race entering
the picture here. However, a document that always leads to a crash can be
found attached here: http://article.gmane.org/gmane.editors.lyx.devel/154566
This commit does not fix the cause of the crash but rather avoids it.
As a bonus, the svg icons used by LyX are not uncompressed anymore before
being used, speeding up startup time. This is not a problem, because Qt
can deal with compressed svg images.

9 years agoTest for undo crash in math env.
Kornel Benko [Sun, 22 Mar 2015 18:04:16 +0000 (19:04 +0100)]
Test for undo crash in math env.

According to fix #9432, Scott found a new crash
1. start a new LyX document, english GUI
2. alt+m f to create a fraction
3. alt+m r to insert a root
4. undo

9 years agoMath Panels: revise the Greek set of svg icons
Enrico Forestieri [Sun, 22 Mar 2015 17:23:04 +0000 (18:23 +0100)]
Math Panels: revise the Greek set of svg icons

9 years agoUse standard comparison against end
Georg Baum [Sun, 22 Mar 2015 16:29:22 +0000 (17:29 +0100)]
Use standard comparison against end

This makes it more easy to exchange the underlying iterator. Also, use our
own specialized erase() instead of repeating its implementation.

9 years agoLoad amsthm after amsmath.
Juergen Spitzmueller [Sun, 22 Mar 2015 10:14:08 +0000 (11:14 +0100)]
Load amsthm after amsmath.

This follows a strong advice in the masthm manual and fixes #7233.

9 years agoLet imagemagick detect file format (bug #2332)
Georg Baum [Sun, 22 Mar 2015 09:22:31 +0000 (10:22 +0100)]
Let imagemagick detect file format (bug #2332)

Imagemagick detects the inut file format based on contents. Therefore it does
not make sense that we prefix the to be converted file name with the extension
(assuming that the file extension matches the imagemagick format name). This
breaks formats where the extension used by LyX does not match the imagemagick
format name.

9 years agoMath Panels: revise the miscellaneous set of svg icons
Enrico Forestieri [Sat, 21 Mar 2015 14:33:54 +0000 (15:33 +0100)]
Math Panels: revise the miscellaneous set of svg icons

- Restore proportion between icons, such that, for example, \imath
  is not confused with a lower case 'l' or \textdegree with \circ
- Use real \mathbb and \mathcal TeX icons

I'll revise also the other sets in the Math Panels toolbar along
these lines. It is important to see whether a symbol has ascendents
or descendents or what is their relative size.

9 years agoImplement DocIterator::backwardInset()
Georg Baum [Thu, 19 Mar 2015 20:44:25 +0000 (21:44 +0100)]
Implement DocIterator::backwardInset()

I thought I would need it to fix bug #9418, but once backwardInset() worked
it turned out that it is not needed. However, since it took me some time to
figure out the correct implementation I do not want to throw the result away.

9 years agoReplace outdated LASSERT
Georg Baum [Wed, 18 Mar 2015 21:06:59 +0000 (22:06 +0100)]
Replace outdated LASSERT

The concept of rows and cols is no longer unique to mathed.
Each inset decides itself whether it is grid like or not, so we should not
interfere with this in the cursor slice.

9 years agoAssert if successful export but no output file
Scott Kostyshak [Fri, 20 Mar 2015 04:13:50 +0000 (00:13 -0400)]
Assert if successful export but no output file

If LyX thinks the export was successful but no output file was
produced for preview, then something is wrong (most likely LyX
did not detect an error that occurred during export).

Also clean up some logic.

9 years agoExport/view a PDF even if error
Scott Kostyshak [Wed, 18 Mar 2015 20:51:12 +0000 (16:51 -0400)]
Export/view a PDF even if error

A PDF is often still produced after a LaTeX error.

If there was an error when exporting a PDF, we now give an error
and the PDF (if it exists), where before we gave the error and
not the PDF. The GUI and command line behaviors are consistent:
in the GUI an error is given and the PDF is viewed; on the
command line, a non-zero exit code is given and a PDF is created.

This also solves what was in my mind an inconsistency: if the user
"updated" a document and there was an error, the resulting
PDF would be shown; but if the user viewed a document and there
was an error, the document would not be shown.

Note that this applies to all output formats, not just PDF.

For discussion, see:
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg186454.html

9 years agoImprove log scanner to correctly report error
Scott Kostyshak [Sat, 21 Feb 2015 05:00:51 +0000 (00:00 -0500)]
Improve log scanner to correctly report error

When scanning the LaTeX log, previously we only looked ahead 10 lines
after a "!" line and if we did not find a line number we did not count
an error. This lead to the problem that templates/ACM-sigplan.lyx was
showing a successful export and the PDF was shown (it is still
created despite the error). Now that the exit code of the latex
command is checked (as of the previous commit), an error is correctly
given, but by parsing the log better with this commit, a more
informative error is given.

Increasing the look-ahead to 15 lines leads to correct parsing of
the ACM-sigplan log. The excerpt in the log file where there are more
than 10 lines in-between the "!" line and the line number is below:

! Undefined control sequence.
\@toappear ...ent http://dx.doi.org/10.1145/\@doi

<argument> ...n is removed.]\par \else \@toappear
                                                  \fi \if \@reprint
\noinden...

\@begin@tempboxa ...mpboxa #1{\color@begingroup #2
                                                  \color@endgroup }\def
\wid...

\@iiiparbox ...tempdima \@parboxrestore #5\@@par }
                                                  \ifx \relax #2\else
\setle...

\@copyrightspace ...planconf@finalpage}.\par \fi }
                                                  }\end@float
\maketitle ... \@copyrightwanted \@copyrightspace
                                                  \fi
l.34 \maketitle

Another example is posted here:
http://tex.stackexchange.com/questions/231655/lyx-cannot-output-to-pdflatex-for-a-specific-file

9 years agoCheck exit code of LaTeX process in LaTeX::run
Scott Kostyshak [Fri, 20 Mar 2015 04:40:01 +0000 (00:40 -0400)]
Check exit code of LaTeX process in LaTeX::run

Systemcall::startscript returns the exit code of the LaTeX command
that is run, but the return value was not being checked by
LaTeX::run.  Instead, we relied on parsing log files. However, this
parsing is not perfect.

The return value is now checked and if the exit code of the command
is non-zero, an enum value is added to the return and the user is
notified of the error.

At a higher level, if the LaTeX command returns a non-zero exit code,
in the GUI a message such as
"Error while exporting format: PDF (LuaTeX)" will be given instead of
"Successful preview of format: PDF (LuaTeX)".

When run on the commandline, lyx -e lualatex example.lyx
will give "Error: LaTeX failed" and a non-zero exit code
where before it gave a zero exit code.

A real example of the bug this commit fixes is LyX's (as of this commit)
ACM-sigplan.lyx template.
Before this commit:
  $ lyx -e pdf2 ACM-sigplan.lyx
  [...snip...]
  support/Systemcall.cpp (288): Systemcall: 'pdflatex  "ACM-sigplan.tex"'
  finished with exit code 1
  $ echo $?
  0
Starting with this commit:
  $ mylyx master -e pdf2 ACM-sigplan.lyx
  support/Systemcall.cpp (288): Systemcall: 'pdflatex  "ACM-sigplan.tex"'
  finished with exit code 1
  Error: LaTeX failed
  ----------------------------------------
  LaTeX did not run successfully. The command that was run exited with
  error.
  $ echo $?
  1

9 years agoAllow cloned buffers to give alerts in runLaTeX()
Scott Kostyshak [Fri, 20 Feb 2015 22:45:36 +0000 (17:45 -0500)]
Allow cloned buffers to give alerts in runLaTeX()

This was disabled in 2009 in bea0925f but it is now safe.

From Richard:
"I am pretty sure that all the work that Peter Kümmel did with the
InGuiThread classes dealt with this issue."

9 years agoRemove an outdated comment
Scott Kostyshak [Fri, 20 Feb 2015 22:31:53 +0000 (17:31 -0500)]
Remove an outdated comment

LaTeX::deleteFilesOnError is no longer a dummy function.

This comment was interoduced with the first version of this
function, at e6d063c4.

9 years agoRemove output file in temporary folder on error
Scott Kostyshak [Fri, 20 Mar 2015 06:03:51 +0000 (02:03 -0400)]
Remove output file in temporary folder on error

This commit solves two issues:

(1) A PDF from a previous run could have been the result of a command
that exited with error (e.g. sometimes pdflatex still produces a PDF if
it exits with error). If the "View" button were clicked a second time
without changing the .lyx file, then the checksum of the .tex file would
not have changed so LyX would show the PDF (which was created from the
first run that exited with error), and this time LyX would not report
the error (because the parsing of the logs only happens when the .tex
file is compiled).

(2) A myfile.tex that results in no output does not yield a myfile.pdf.
Thus, Any myfile.pdf in the temporary directory will not be overwritten.
Before this commit, the following scenario was possible: LyX runs
pdflatex which processes myfile.tex and no error is given so LyX opens
myfile.pdf. However, it could have been the scenario that pdflatex did
not exit with error and did not create myfile.pdf, in which case
whichever myfile.pdf is being shown is not correct. To see this bug in
action, start a new document, type "abc", view the PDF, delete "abc",
view the PDF (this correctly gives an error that empty output was
created), view the PDF again (this does not give an error because the
checksum has not changed). The PDF shown will contain "abc".

Note that the above also applies to DVI files and that the fix is
general.

9 years agoClarify message about an empty file
Scott Kostyshak [Sun, 22 Feb 2015 04:46:42 +0000 (23:46 -0500)]
Clarify message about an empty file

When empty output is generated, no PDF is produced. The previous
message made it seem like an empty PDF was produced.

9 years agoSVG: text -> Path
Juergen Spitzmueller [Thu, 19 Mar 2015 08:25:05 +0000 (09:25 +0100)]
SVG: text -> Path

9 years agoImprove source code documentation
Georg Baum [Wed, 18 Mar 2015 20:31:50 +0000 (21:31 +0100)]
Improve source code documentation

Adjust comments to current code and extend them a bit, also revert a part
of af5acb6d which was certainly not wanted.

9 years agowhitespace
Georg Baum [Sun, 15 Mar 2015 17:20:01 +0000 (18:20 +0100)]
whitespace

9 years agoFix math macro plain text output
Georg Baum [Sun, 15 Mar 2015 16:47:38 +0000 (17:47 +0100)]
Fix math macro plain text output

Previously it was not thread safe, and the translation could be wrong.

9 years agoRevise svg icons for the math toolbar
Enrico Forestieri [Wed, 18 Mar 2015 19:29:31 +0000 (20:29 +0100)]
Revise svg icons for the math toolbar

- Use paths, not fonts. Have a look at the sqrt icon in the image attached
  here http://thread.gmane.org/gmane.editors.lyx.devel/154179/focus=154183
  to see what may happen when a font is not present on a given system.
- Make uniform the height of the parentheses.
- Move a couple of icons to the oxygen subdir (I was not sure it was Ok
  replacing them. If yes, they can be simply deleted).

9 years agoUse integer arithmetic for drawing logos; fix LaTeX output
Jean-Marc Lasgouttes [Wed, 18 Mar 2015 10:32:49 +0000 (11:32 +0100)]
Use integer arithmetic for drawing logos; fix LaTeX output

Using fraction of points is a reasonable way to avoid warnings with fussy compilers.

Moreover, this fixes the output of PHRASE_LATEX2E to use the proper form \LaTeXe.

The file format still uses the questionnable form \\LaTeX2e.

9 years agoCmake build: Add .svgz files to Resources.
Kornel Benko [Tue, 17 Mar 2015 19:46:02 +0000 (20:46 +0100)]
Cmake build: Add .svgz files to Resources.

It does not seam to make a difference.
Added because other icons are also included.

9 years agoNew test for seach and replace of a logo
Kornel Benko [Tue, 17 Mar 2015 16:52:37 +0000 (17:52 +0100)]
New test for seach and replace of a logo

9 years agoMake tests for QT5 and QT4 work.
Kornel Benko [Tue, 17 Mar 2015 16:36:47 +0000 (17:36 +0100)]
Make tests for QT5 and QT4 work.

Changing *-in.txt due to erroneous shortcuts in it.po
keytest.py, single-test.cmake and CMakeLists.txt now
provide a frontend hint for xvkbd.

9 years agoToggle properly toolbar icons that set layout of a paragraph.
Jean-Marc Lasgouttes [Tue, 17 Mar 2015 15:40:55 +0000 (16:40 +0100)]
Toggle properly toolbar icons that set layout of a paragraph.

Fixes bug #9463.

9 years agoFix setting Interlingua as GUI language
Jean-Marc Lasgouttes [Tue, 17 Mar 2015 10:34:28 +0000 (11:34 +0100)]
Fix setting Interlingua as GUI language

The problem came from the fact that Qt associates Interlingua to locale C.
Now, we do not rely anymore on the Qt locale to set the language. I suspect that the problem will still exist if the system locale is ia_IA.

Fixes bug #9267.

9 years agofixltx2e must be loaded as early as possible
Juergen Spitzmueller [Tue, 17 Mar 2015 09:24:16 +0000 (10:24 +0100)]
fixltx2e must be loaded as early as possible

Fixes: #9452, #9361
This reverts the 'fix' to #7233, which must be solved differently.

9 years agoadd "Keywords" to lyx.desktop file
Jean-Marc Lasgouttes [Tue, 17 Mar 2015 09:17:35 +0000 (10:17 +0100)]
add "Keywords" to lyx.desktop file

Fixes bug #9414.

9 years agoUpdate it.po
Enrico Forestieri [Mon, 16 Mar 2015 23:33:37 +0000 (00:33 +0100)]
Update it.po

9 years agoMake the missing class warning opt-out
Juergen Spitzmueller [Mon, 16 Mar 2015 19:34:32 +0000 (20:34 +0100)]
Make the missing class warning opt-out

9 years agoProperly handle the bicaption package (bug #9449)
Juergen Spitzmueller [Mon, 16 Mar 2015 19:31:38 +0000 (20:31 +0100)]
Properly handle the bicaption package (bug #9449)

9 years agoAdd proper importers for Sweave and knitr.
Jean-Marc Lasgouttes [Mon, 16 Mar 2015 17:43:51 +0000 (18:43 +0100)]
Add proper importers for Sweave and knitr.

Fixes bug #8734.

9 years agoImprove undo of consecutive insertions/deletions
Jean-Marc Lasgouttes [Thu, 12 Mar 2015 13:47:39 +0000 (14:47 +0100)]
Improve undo of consecutive insertions/deletions

The old scheme was:
 * multiple insertions are undone by groups of 20
 * multiple deletions are undone in one big block

The new scheme is to stop merging undo elements after 2 seconds of elapsed time.

Moreover, the merging of undo elements stops when the cursor has moved. Potentially, this could allow to remove many of the finishUndo() calls.

Fixes bug #9204.

9 years agoAdd missing breaks (and time for a break :-()
Juergen Spitzmueller [Mon, 16 Mar 2015 13:49:58 +0000 (14:49 +0100)]
Add missing breaks (and time for a break :-()

9 years agoMore switches and whitespace fixes
Juergen Spitzmueller [Mon, 16 Mar 2015 13:47:38 +0000 (14:47 +0100)]
More switches and whitespace fixes

9 years agode.po
Juergen Spitzmueller [Mon, 16 Mar 2015 13:31:24 +0000 (14:31 +0100)]
de.po

9 years agoGrr...
Juergen Spitzmueller [Mon, 16 Mar 2015 13:30:02 +0000 (14:30 +0100)]
Grr...

9 years agoProperly escape backslash in string
Juergen Spitzmueller [Mon, 16 Mar 2015 13:28:16 +0000 (14:28 +0100)]
Properly escape backslash in string