Commit Graph

351 Commits

Author SHA1 Message Date
Enrico Forestieri
7da981b322 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.
2015-03-22 22:25:38 +01:00
Jean-Marc Lasgouttes
477fddebe5 Add proper importers for Sweave and knitr.
Fixes bug #8734.
2015-03-16 18:43:51 +01:00
Kornel Benko
3104c105d8 eplace unparseable char in lib/configure.py.
Apparently xgettext is choking on that unicode char (\302 \240)
2015-02-17 13:24:56 +01:00
Uwe Stöhr
4549468dc9 configure.py: change name of a converter as discussed 2015-02-17 00:44:47 +01:00
Richard Heck
eaaeda65cb Do not show new "cropped" formats on export menu.
(cherry picked from commit 2fc44e96f5)
2015-02-15 10:59:04 -05:00
Georg Baum
ff97582e01 Fix lyxrc formatting error
Thanks to Jürgen for noticing this. I rearranged the formatting after testing,
so this slipped through.
2015-02-14 10:30:29 +01:00
Georg Baum
70afbc82ac Add low-res pdf export as suggested by James
As discussed on the list, but I did not need to create two new pdf formats
since any given document either uses TeX fonts or not. For the same reason
I also added an additional converter to PDF (cropped).
2015-02-11 22:24:04 +01:00
Uwe Stöhr
b2c761a7db configure.py: quote path to python
this fixes a path issue unveiled while inspecting bug #8478
2015-02-10 23:35:25 +01:00
Enrico Forestieri
417c233d07 Fix bug #9235: LyX 2.2's tex2lyx fails in general on Windows
The reason being the backslashes in the path. Note that escaping
does not work here because the path is being interpreted multiple
times (how many times I don't know) and that would be fragile.
For this same reason, the change is not limited to Windows.
2014-11-27 22:35:20 +01:00
Jean-Marc
41740ea915 Merge remote-tracking branch 'features/str-metrics'
This branch implements string-wise metrics computation. The goal is to
have both good metrics computation (and font with proper kerning and
ligatures) and better performance than what we have with
force_paint_single_char. Moreover there has been some code
factorization in TextMetrics, where the same row-breaking algorithm
was basically implemented 3 times.

Globally, the new code is a bit shorter than the existing one, and it
is much cleaner.  There is still a lot of potential for code removal,
especially in the RowPainter, which should be rewritten to use the new
Row information.

The bugs fixed and caused by this branch are tracked at ticket #9003:
http://www.lyx.org/trac/ticket/9003

What is done:

* Make TextMetrics methods operate on Row objects: breakRow and
  setRowHeight instead of rowBreakPoint and rowHeight.

* Change breakRow operation to operate at strings level to compute
  metrics The list of elements is stored in the row object in visual
  ordering, not logical. This will eventually allow to get rid of the
  Bidi class.

* rename getColumnNearX to getPosNearX (and change code accordingly).
  It does not make sense to return a position relative to the start of
  row, since nobody needs this.

* Re-implement cursorX and getPosNearX using row elements.

* Get rid of lyxrc.force_paint_single_char. This was a workaround that
  is not necessary anymore.

* Implement proper string metrics computation (with cache). Remove
  useless workarounds which disable kerning and ligatures.

* Draw also RtL text string-wise. This speeds-up drawing.

* Do not cut strings at selection boundary in RowPainter. This avoids
  ligature/kerning breaking in latin text, and bad rendering problems
  in Arabic.

* Remove homebrew Arabic and Hebrew support from Encoding.cpp. We now
  rely on Qt to do handle complex scripts.

* Get rid of LyXRC::rtl_support, which does not have a real use case.

* Fix display of [] and {} delimiters in Arabic scripts.
2014-07-25 20:10:55 +02:00
Enrico Forestieri
d5210c555a Add some postscript and pdf viewers for Unix and Windows.
For Windows: AcroRd32 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-07-13 20:05:37 +02:00
Jean-Marc Lasgouttes
45eb314a86 Get rid of rtl_support preference
This variable was introduced to guard against any bad consequence of the then-new right-to-left
languages support. Let's be bold and get rid of it altogether!

Now right to left support is always enabled.
2014-07-09 21:11:08 +02:00
Jean-Marc Lasgouttes
9d5c947110 Remove LyXRC option force_paint_single_char
It was not honored anymore.
2014-07-08 23:12:09 +02:00
Scott Kostyshak
e716f1ef12 Add Sumatra as a PDF reader
It currently does not make a difference that it is before
Adobe Reader in configure.py because as Enrico points out
on Windows the default viewer configured in the OS is used.
2014-05-24 07:37:16 -04:00
Stephan Witt
f24feb9038 Until there is some more general solution… prepare 2.1 prefs migration manually. 2014-04-29 21:43:41 +02:00
Vincent van Ravesteijn
b9489e73b5 configure: Add export format for 2.1.x 2014-04-18 14:06:37 +02:00
Scott Kostyshak
23a28e78a8 Bump RC format for commit 214f7ed2 2014-03-19 21:56:31 -04:00
Stephan Witt
97341eab7c Automatic copying and migration of elder user config directories
With a check for platform = darwin this is done on Mac only
2014-03-19 19:12:30 +01:00
Scott Kostyshak
b2c8ac0e78 Add NoWeb -> XeTeX converter
Now the examples noweb2lyx.lyx and Literate.lyx can be
exported to the pdf4 format.
2013-12-03 02:15:37 -05:00
Georg Baum
14a5d07df6 Fix encoding for copying LaTeX from clipboard
If we call tex2lyx on a temporary file created from the clipboard, the
file is always in utf8 encoding, without any temporary changes, even if it
contains encoding changing LaTeX commands. Therefore, we must tell tex2lyx
to use a fixed utf8 encoding for the whole file, and this is done using the
new latexclipboard format. Previously, tex2lyx thought the encoding was
latin1.
As a side effect, the -e option is now also documented in the man page.
2013-11-11 21:52:14 +01:00
Juergen Spitzmueller
73ab0fb665 We only have the last LyX release in the export menu (the others are accessible via SendTo and SaveAs dialogs)
In general, the export menu looks much too crowded again. Should be audited if really all these items are needed on top level.
2013-11-11 09:48:56 +01:00
Vincent van Ravesteijn
ae2d0e0d43 Update format of lyxrc.default
No changes are necessary.
2013-06-04 19:37:58 +02:00
Vincent van Ravesteijn
d20956594b Revert part of "Pass the encoding to the japanese pLaTeX processor (#4697)."
See ticket #8408 for the reason why this is reverted.

This reverts part of commit 0bff66b8a5.
2013-06-03 17:39:54 +02:00
Vincent van Ravesteijn
704273eea0 Add formats and converters for cropped PDF/EPS
With LyX configured in this way, the user would only need to:

File > New from Template > EPS.lyx (or PDF-cropped.lyx):
- insert a math inset and type in an equation, or create whatever
  content LaTeX can handle,
- view/export to cropped EPS/PDF.

This would allow for LyX to act as a "generator for includable graphics" (equations, commented graphics, etc).

This fixes bug #7839.
2013-05-27 22:06:33 +02:00
Julien Rioux
c02c03ce81 Finally also fix #6986 for autotools out-of-source builds. 2013-05-14 11:27:03 +02:00
Julien Rioux
ef04549d8d configure.py: Check path accessibility before call to os.path.isfile.
If you have an unmounted dir, ac_dir, in your PATH, the call to

os.path.isfile( os.path.join(ac_dir, ac_word + ext) )

hangs. This is probably a python bug, but the result of configure.py
hanging and LyX freezing is really bad, hence this workaround.

According to the python docs, MacOS doesn't provide os.access();
the hasattr protection is used for this reason.
2013-05-14 11:26:43 +02:00
Scott Kostyshak
959d2c5264 converter: change 'ps2pdf13' to 'ps2pdf'
ps2pdf by default produces the PDF 1.4 format. The PDF 1.3 format was
released in 2000. PDF 1.4 was released in 2001.  LyX specified 1.3 as
the output version in 2002 (c1541c22), perhaps because at the time
PDF 1.4 was only a year old so some viewers did not support it.
2013-04-25 06:41:15 -04:00
Vincent van Ravesteijn
cd88c51cce Pass the binary dir to the configure script to find tex2lyx
When using CMake, the binary files are stored in <build-dir>/bin. LyX can't fin tex2lyx with the current code. So, we have to point configure.py to explicitly look in the binary dir.
2013-04-19 20:31:30 +02:00
Scott Kostyshak
7309f018f5 Add a DocBook -> PS converter
Before, the converter chain for DocBook -> PDF (ps2pdf) was:

  docbook -> DVI
  DVI -> Postscript
  Postscript -> PDF (ps2pdf)

sgmltools has a backend for PostScript so the first two
steps in the above converter chain are now condensed into
one by adding the following converter for docbook -> Postscript:

  sgmltools -b ps $$i
2013-04-13 14:19:58 -04:00
Georg Baum
8c8e19bb1c Work around gnuhtml2latex encoding bug
gnuhtml2latex does not handle encodings at all. Therefore the result is not
imported correctly by tex2lyx if the HTML file is encoded in anything else
than ascii or latin1 (the default of tex2lyx). The simple wrapper script
loads inputenc if needed. It may not be possible to compile the result with
LaTeX, (e.gif utf8 is used), but for running tex2lyx it will work just fine.
2013-04-12 21:35:50 +02:00
Scott Kostyshak
8e5a020c0c configure.py: add 'MuPDF' as a PDF viewer
MuPDF is a fast and lightweight PDF viewer released under the
Affero GNU General Public License.
2013-04-06 02:56:39 -04:00
Georg Baum
6cf84601f4 Oops, I mixed up the argument order 2013-04-01 21:58:03 +02:00
Georg Baum
c1b81d83b9 Fix HTML to LaTeX converter output name
If you do not explicitly specify the output file name, gnuhtml2latex will
guess a file name itself. The result of the guess is not what we expect if
the input file name did not contain a .html extension, but something which
is not related to a format, e.g. .qV9984 from FileName::tempName().
2013-04-01 12:11:27 +02:00
Georg Baum
cb5dd33475 Split pdf format as discussed on the list
Previously, the format used for included pdf files was the same as for
document export via ps2pdf. This caused unwanted conversion routes, e.g.
export via odt->pdf instead of dvi->ps->pdf.
I renamed the format for included graphics and not for exported documents,
since otherwise the command line syntax for export would change. This would
require more adaptions for the users, since with the chosen solution the
custom converters are almost always changed correctly in prefs2prefs(),
so that only custom external templates need manual adjustement.
2013-03-21 20:13:02 +01:00
Georg Baum
73c424323d Update lyxrc.defaults to current format
Actually, configure.py was already producing the current format, since it
did not output default_language.
2013-03-19 21:17:15 +01:00
Kornel Benko
6c03b1ff74 Revert changes for output format dvi4
This affects commits c0d4805acf,
                     14fed1df7d
                     8e4f656aa7
2013-02-22 12:06:31 +01:00
Kornel Benko
8e4f656aa7 Add new output format dvi4 ( == DVI(pLaTeX)
Add converter for this format (platex without extra parameters)
2013-02-19 09:26:05 +01:00
Scott Kostyshak
6403ea272f Add NoWeb -> LuaTeX converter
Now the examples noweb2lyx.lyx and Literate.lyx can be
exported to the pdf5 format.
2013-02-18 02:41:37 -05:00
Enrico Forestieri
d46e595397 Proper fix for #8477
The "fix" in ec8ae50f was reintroducing #7718, #8098, and #8254.
This fix is hopefully right while still avoiding code duplication.
2013-01-01 03:58:33 +01:00
Uwe Stöhr
ec8ae50f54 configure.py: fix major part of bug #8477
configure.py needn't to hide the status of the LaTeX package checking
2012-12-31 18:37:45 +01:00
Jean-Marc Lasgouttes
4f6c0b5202 Fix # 8414: Use the noweb module instead of literate-* article layouts
Now that we have module support for literate programming, it is possible to do a noweb cleanup. This is basically a patch from Kayvan Sylvan:

- get rid of literate-xxx classes
- rename Scrap to Chunk, since this is the name noweb doc uses (Scrap is from nuweb)
- update lyx file format and add lyx2lyx support for gettting rid of literate-xxx classes
- update documentation

On the top of it, update tex2lyx to
- avoid creating files with literate-xxx class
- fix conflict between parsing << as a quote and parsing it as a Chunk
- create Chunk layouts instead of Scrap ones.
2012-11-28 14:11:47 +01:00
Uwe Stöhr
1a42de1bab configure.py: register our "pdfview" helper application
- pdfview is necessary for LyX on Windows because it makes it possible to update the view of a LyX file as PDF
- must also go to branch
2012-11-21 23:18:38 +01:00
Uwe Stöhr
06eb4594d7 configure.py: add 5 popular editors with LaTeX syntax highlighting
I also need this for branch for the Windows installer, OK?
2012-11-13 00:41:29 +01:00
Juergen Spitzmueller
7c8f4d57a7 Double Thinko :-/ 2012-10-09 11:14:13 +02:00
Juergen Spitzmueller
c3001fba5c Thinko 2012-10-09 11:12:54 +02:00
Juergen Spitzmueller
f18af303fe Introduce textclass categories
The categories are ascribed by \DeclareCategory{<category>} in the layout file header.
UI follows.
2012-10-09 07:17:36 +02:00
Juergen Spitzmueller
6a8231401b Rescan TeX Files on reconfigure 2012-10-05 15:05:01 +02:00
Juergen Spitzmueller
04618bc070 Fix LyXBlogger entry 2012-09-25 15:56:18 +02:00
Enrico Forestieri
08b3d492fa Fix bug #8254: An encoding problem
Use the short version of a path, which is guaranteed to be ascii and
works even if the path is not encodable in the current codepage.
2012-07-18 22:20:46 +02:00
Richard Heck
bb8a909dac Add lo* converters for libreoffice. Fixes #8148. 2012-05-10 16:03:20 -04:00