Richard Heck [Thu, 25 Apr 2013 21:27:10 +0000 (17:27 -0400)]
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?
The default sizeAdjustPolicy is AdjustToContentsOnFirstShow. As the
combobox is initially filled with all items, it will not change size if we
later remove the 'At Decimal Separator' item.
Fix bug #3199: change-next may leave empty lines behind
Using Cursor::setCursor or even BufferView::setCursor is often a bad
idea since it does not run DEPM. In this case (and other cases in
f&replace code) it is better to use BufferView::mouseSetCursor (which
should maybe be renamed...).
Scott Kostyshak [Thu, 11 Apr 2013 02:56:35 +0000 (22:56 -0400)]
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.
Scott Kostyshak [Sat, 20 Apr 2013 02:24:16 +0000 (22:24 -0400)]
GuiRef: do not insert a category as a ref
Before, if a user had "Group" checked in GuiRef and double-clicked
on a category, that category would be inserted as a (broken)
reference. Now, when a category is double-clicked, nothing happens.
Scott Kostyshak [Fri, 19 Apr 2013 11:48:26 +0000 (07:48 -0400)]
GuiRef: only show "<No prefix>" if non-empty
If "Group" is checked, "<No prefix>" is shown only if there exists a
label with no prefix. Before, it was shown even when it was empty and
even when there were no labels at all.
Georg Baum [Sun, 21 Apr 2013 19:32:53 +0000 (21:32 +0200)]
Fix bug #8636
This was a simple logic error that crept in during refactoring:
If the format does not match, and the converted file has been read,
the string must not be read.
Georg Baum [Sun, 21 Apr 2013 18:45:56 +0000 (20:45 +0200)]
Use MathML on the clipboard for formulas in HTML
This speeds up the copying, and although not many applications understand
MathML currently (MS word is supposed to understand it), their number should
go up in the future.
Richard Heck [Sun, 21 Apr 2013 01:07:07 +0000 (21:07 -0400)]
Fix bug found by Scott concerning copying XHTML to clipboard. We
needed to updateMacros() before doing the export, which required a
bit of code massaging.
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.
Scott Kostyshak [Mon, 15 Apr 2013 21:06:23 +0000 (17:06 -0400)]
jasatex.layout: fix 'Acknowledgments' style
'Acknowledgments' does not belong in the title but did not override
'InTitle 1' inherited from 'Abstract'. Without this patch, the
following error is given:
output_latex.cpp (1111): Error in latexParagraphs: You should not
mix title layouts with normal ones.
Thanks to Hashini Senaratne for narrowing down the problem.
Georg Baum [Sun, 14 Apr 2013 17:45:36 +0000 (19:45 +0200)]
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.
Georg Baum [Sun, 14 Apr 2013 16:17:56 +0000 (18:17 +0200)]
Add class for threadsafe temp file handling
FileName::tempName() is not thread safe, since the QTemporaryFile object is
immediately deleted after creating it. Therefore, another thread could create
the same temporary file in the time span before the user of FileName::tempName()
recreates it. This is not as theoretical as it may look: I observed that
repeated creation and deletion of QTemporaryFile objects always use the same
name.
This problem is solved by the new class TempFile which should be used like
QTemporaryFile itself.
José Matos [Sun, 14 Apr 2013 10:34:47 +0000 (11:34 +0100)]
sgml: ignore paragraphs named *dummy*
dummy is the name given in the latex backend to simple (usually single) paragraphs and since dummy is not a docbook element it is acceptable to ignore it. It is a reasonal compromise.
Scott Kostyshak [Thu, 11 Apr 2013 01:56:18 +0000 (21:56 -0400)]
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:
Georg Baum [Fri, 12 Apr 2013 20:12:47 +0000 (22:12 +0200)]
Also put HTML on the clipboard when copying
The HTML export is now mature enough so that it can be used to transfer
formatted text to the clipboard. This enhances interoperability e.g. with
office applications.
Georg Baum [Fri, 12 Apr 2013 19:35:50 +0000 (21:35 +0200)]
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.
Replacing git status --porcelain along with output parsing, with a simple git ls-files.
git ls-files tells me straight whether or not a file-name is in the repo.
I cannot say the same of git status --porcelain.
See also discussion at: http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg177840.html
Georg Baum [Wed, 10 Apr 2013 20:31:38 +0000 (22:31 +0200)]
Remove partial support for non-buffer files in VCS
This reverts a small part of 0526eb9d and gets rid of the double calls of
SVN::findFile() and GIT::findFile(). Please note that git detection does
currently not work because of 26dd4d0c.
- we found out that Kazakh is currently not supported by babel nor polyglossia so that using Kazakh as language will break the compilation, Günter proposed therefore this encoding change until Kazakh is supported.
- this is not the way it goes, all Tutorials should stay identical as possible, moreover there is no need to disable PDF bookmarks because the document compiles without problems, moreover I still manage the documentation and as long as there is no beta for LyX 2.1 please keep the fileformat of LyX 2.0
- if you have problems compiling a file, report this as bug or the docmentation mailing list! or at least write me a mail
Scott Kostyshak [Tue, 9 Apr 2013 04:40:54 +0000 (00:40 -0400)]
JSS-article.lyx: set default output to pdf2
The reasons are specified in the note at the top of the template:
It is possible to export with plain LaTeX but an option must be
specified to remove some elements (e.g. JSS logo).
Scott Kostyshak [Tue, 9 Apr 2013 05:23:06 +0000 (01:23 -0400)]
tufte-{book,handout}: set default output to pdf2
If the 'nols' option were set, the files could be output with plain
LaTeX as well; but because letterspacing is an important part of the
Tufte design, letterspacing is preserved and pdf2 is set as the
default output format. This is now explained in a note.
Scott Kostyshak [Mon, 1 Apr 2013 05:35:48 +0000 (01:35 -0400)]
Remove exclamation mark from "String not found!"
When using 'find' and a string is not found, this is not an error or a
surprising event. It is often expected (e.g. after searching through
the whole document for a certain string eventually you will get this
message). The exclamation mark should be reserved for messages that
are unexpected or that need extra attention, such as errors.