Commit Graph

21157 Commits

Author SHA1 Message Date
Juergen Spitzmueller
63612ca99b Restore buffer parenthood if we exit already after the preamble 2012-10-05 19:26:07 +02:00
Juergen Spitzmueller
e6afdf1b2b Prevent the PreviewLoader from orphaning children 2012-10-05 18:28:38 +02:00
Kornel Benko
ce649ca9fd Added check for support tests in cmake build.
New target: checkregfiles
This will create the regfiles and compare with the data in source.
2012-10-05 16:56:29 +02:00
Juergen Spitzmueller
b6ecb3213b Add master's perspective in children's source preview 2012-10-05 14:30:20 +02:00
Juergen Spitzmueller
08157b5050 Merge branch 'master' of git.lyx.org:lyx 2012-10-05 10:00:13 +02:00
Jean-Marc Lasgouttes
4729b1c35d Fix make check target
A dummy getGuiMessages function was missing. Instead of adding it everywhere, a new file is created that contains all the dummy functions needed by the tests.
2012-10-05 11:55:23 +02:00
Juergen Spitzmueller
2fa840b771 Do not let the children's buffer params leak into the master (#5941) 2012-10-05 09:59:44 +02:00
Georg Baum
2f7f0c7631 Really fix bug #4468.
The old fix was incomplete (\verb~\~ was translated to \verb~~ in roundtrip).
The real cause for this bug (and also the mistranslation of \href{...}{\}})
was the misbehaviour of Token::character() (see comment in Parser.h): This
method even returns a character if the category is catEscape, and this is not
wanted in most (all?) cases.
2012-10-05 00:12:18 +02:00
Georg Baum
5afe35cc59 Compile tex2lyx before running tests 2012-10-04 22:29:43 +02:00
Kornel Benko
66cb259a96 tex2lyx tests adapted to cmake build 2012-10-03 17:04:00 +02:00
Georg Baum
d56295bcdf Add make target to update tex2lyx test references
Now "make check" does not overwrite the test references anymore, use the
updatetests target instead. "make check" now also recognizes test failures.
2012-10-03 15:23:09 +02:00
Georg Baum
adcd2281af Add evaluation for tex2lyx regression tests 2012-10-03 15:01:54 +02:00
Georg Baum
133ceaf0d4 Support out of source tests in tex2lyx test runner 2012-10-03 13:59:20 +02:00
Georg Baum
24181cf28e Add -copyfiles command line option to tex2lyx
If this option is given, included files will be copied to the output directory.
Also -roundtrip is now allowed with given output file.
-copyfiles is useful if you want to ensure that no file (not even an included
one) is overwritten by a subsequent export from LyX. Both changes are needed
for unit tests that do not write to the source directory.
2012-10-03 13:23:27 +02:00
Juergen Spitzmueller
02c73cd721 Do not let the parent interfere when I child document is exported/view standalone (#8100, #8101) 2012-10-03 10:41:07 +02: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
Scott Kostyshak
3b9c75ce27 Make text selectable in Help > About LyX > Version
This might encourage users to post this information when reporting bugs
and sometimes it's useful to be able to copy the paths of the Library
and User directories.
2012-10-02 05:39:57 -04:00
Tommaso Cucinotta
ad827243fc Adding preferences format update as due to commit 4985015 (new close_buffer_with_last_view option). 2012-10-01 22:30:13 +01:00
Pavel Sanda
536a0b44b7 Move layout editor zombie to attic. 2012-10-01 17:14:34 +02:00
Juergen Spitzmueller
f881835da2 Ask for saving changes when branch state in child was altered 2012-10-01 12:37:16 +02:00
Juergen Spitzmueller
31c7ccd4b3 Trigger preview when inserting preview inset on selection 2012-09-30 18:36:22 +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
fab7d42608 Whitespace 2012-09-30 16:27:11 +02:00
Juergen Spitzmueller
6f4b2dd4b0 Whitespace 2012-09-30 16:12:52 +02:00
Georg Baum
ccd3ecf1e9 Fix tex2lyx path handling for relative file names
The input and output file names of tex2lyx may be relative. In this case,
getMasterFilePath() and getParentFilePath() return relative paths as well.
Now the file name translation logic for all kinds of included files can
cope with that.
2012-09-30 15:06:18 +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
Enrico Forestieri
bb67e670ef Make some strings translatable again.
These strings were inadvertently broken in [4985015e/lyxgit].
2012-09-30 00:42:55 +02:00
Pavel Sanda
86473d5556 Bump LFUN format for LyX 2.1 2012-09-29 20:06:39 +02:00
Pavel Sanda
5d9c14a322 Realign numbering. 2012-09-29 18:52:52 +02:00
Pavel Sanda
074277baf1 Next zombies found: LFUN_GETBUFNAME, LFUN_LINEATCURSOR, LFUN_LO?VIEW. 2012-09-29 18:40:48 +02:00
Pavel Sanda
49a9d3ad63 Kill LFUN_HFILL_INSERT zombie. 2012-09-29 18:34:38 +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
Juergen Spitzmueller
c9f9107a7f Fix issues with xref dialog in read-only documents (#8177) 2012-09-29 16:12:31 +02:00
Juergen Spitzmueller
0b2c308a68 sort table 2012-09-29 16:11:09 +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
Juergen Spitzmueller
5801ee2f9a validate encodable characters in href inset (#8357) 2012-09-28 09:27:39 +02:00
Pavel Sanda
c1e9632beb Remove leftover from 16fd47ad8f.
Catch by Kayvan Sylvan.
2012-09-28 01:09:23 +02:00
Georg Baum
a08c693f90 Add test for Parser::getFullArg()
It shows that the special handling of a single backslash in the argument
(whcih is supposed to fix bug #4468) does not work.
2012-09-25 22:25:55 +02:00
Stephan Witt
e0787e839f C++ style to avoid compiler warning for non-NLS implementation of Messages::available 2012-09-25 16:20:43 +02:00
Juergen Spitzmueller
1d84423e76 A font a day keeps the doctor away: Support for the Biolinum LaTeX font 2012-09-25 11:07:33 +02:00
Juergen Spitzmueller
398b1a450a properly validate unicode-math 2012-09-24 13:56:37 +02:00
Juergen Spitzmueller
8bf5d4b461 Very basic support for unicode-math
With non-TeX fonts, you can select a 'Non-TeX Font Default' math font, which simply loads unicode-math without actually selecting a math font, this then uses the default math otf font, currently Latin Modern. Other fonts still need to be set manually in the preamble, via \setmathfont.

The implementation suppresses unneeded package requests from unicodesymbols, but the output still uses macros instead of full unicode (both is possible with unicode-math).

The whole thing is a proof of concept, and it needs to be tested. I have tested it with the math manual, which compiles and seems to display correctly if I remove some hardcoded package loadings. OTOH I have not much experience with math.

This addresses #7449 partly.
2012-09-24 13:19:25 +02:00
Juergen Spitzmueller
909963fd5a thinko: if we have requires, do not test package 2012-09-24 08:41:44 +02:00
Uwe Stöhr
237cb51fb1 GuiTabular.cpp: don't rely on a string but on the combobox data
It was not safe in changeset 9d05ac5c to search for a text because it can be translated, better search for the data, thanks Pavel for spotting
2012-09-24 02:10:21 +02:00
Juergen Spitzmueller
ba1d137769 Support for the NewTX Math fonts (newtx, libertine, minion) 2012-09-23 18:33:04 +02:00
Juergen Spitzmueller
a41dcb5768 Recognize Provides from math fonts 2012-09-23 17:40:44 +02:00
Vincent van Ravesteijn
a1bda4e045 Fix bug #8296: Crash when clicking on completion in math
When the user clicks on the completion, the completion disappears. This
means that we have to fix the cursor before setting it.
2012-09-23 16:44:22 +02:00
Stephan Witt
273ebbef19 avoid deprecated functions on Mac - use Qt instead 2012-09-23 16:06:56 +02:00
Stephan Witt
f1ab5dfc58 remove unnecessary Carbon include 2012-09-23 16:06:56 +02:00
Stephan Witt
5a9aa21350 correct Messages class implementation for non-NLS 2012-09-23 16:06:56 +02:00
Stephan Witt
404ef2467c moving Reconfigure to LyX menu does not work 2012-09-23 16:06:55 +02:00
Juergen Spitzmueller
5170489b98 More no-math fonts
For the sake of completeness, it is now also possible to load fourier and the mathdesign fonts without changing the default math font.
2012-09-23 12:30:19 +02:00
Vincent van Ravesteijn
29e64597d0 Fix bug #6389: Make columns RTL in RTL document 2012-09-22 23:15:53 +02:00
Vincent van Ravesteijn
6b8ed2fa1d Initialize toolbar pop menu button on start
In 0aead96461 it was introduced that the toolbar popup menu buttons are not
initialized until they are being used (i.e. pressed at for the first
time). As a consequence, these buttons are always enabled on start. Now
that we have the sticky button for view and update, I'm now annoyed by
this every time I start LyX.
2012-09-22 23:15:51 +02:00
Vincent van Ravesteijn
0a2024139f InsetIPAMacro: Fix warnings about conversion from double to int 2012-09-22 19:21:00 +02:00
Juergen Spitzmueller
8f9898994d Basic UI for math (TeX) fonts
This addresses #6543 by adding an option to prevent fonts such as Palatino and Times to automatically adapt the math font (IOW it lets you load the text font only for a bunch of fonts where this is easily possible).

Furthermore it adds an interface to select a specific math font, which is defined in latexfonts. Currently, this is only euler (the only one I know), but if there are other math-only tex fonts, they can be added easily (but note that this changes the file format).

Non-TeX math fonts are not yet supported. Eventually, unicode-math support can use the existing UI, but this is not on my agenda.
2012-09-22 17:44:00 +02:00
Juergen Spitzmueller
89df1de885 No need to pass these 2012-09-22 12:14:24 +02:00
Juergen Spitzmueller
a5151c92a9 Much more flexible implementation of alternative (LaTeX) fonts
The LaTeX font now do not specify simply alternative packages or packages for OT1 encoding etc., but they refer to complete AltFonts (which are not directly accessible via the GUI). This way, alternative fonts can also have options (osf, sc etc.), and they can use all sorts of initializing methods (\usepackage, \setrmfamily etc.).
2012-09-22 10:59:53 +02:00
Juergen Spitzmueller
e2173f14ec Follow Lars' advice 2012-09-20 16:24:59 +02:00
Pavel Sanda
13dfbd1927 Simplify translation string. 2012-09-20 13:35:53 +02:00
Juergen Spitzmueller
e9ca6b6bf4 Support for the Minion Pro LaTeX font 2012-09-19 17:46:55 +02:00
Juergen Spitzmueller
f4261030e2 Implement Provides tag to LaTeXFonts
This allows to suppress conflicting packages, such as amssymb with mathdesign.
2012-09-19 15:46:19 +02:00
Juergen Spitzmueller
4517c6f9a5 Do not propose existing labels 2012-09-19 10:20:19 +02:00
Juergen Spitzmueller
86cccf1077 Do not update refs on new label creation (#8147)
This assures that refs to existing labels are not being touched if a new label with a duplicate name is created, and the name then changed by the duplicate checker.

Branch candidate.
2012-09-19 10:14:56 +02:00
Juergen Spitzmueller
f5b4cd90a3 Merge branch 'master' of git.lyx.org:lyx 2012-09-17 11:36:47 +02:00
Juergen Spitzmueller
6bf00d9fed rc.preview and rc.display_graphics are completely unrelated (bug 7562) 2012-09-17 11:36:29 +02:00
Jean-Marc Lasgouttes
538570a1e5 Fix bug #8342: Endless undo group messages
Fix thinko in Undo::endUndoGroup.
Do not reset undo groups in Undo::clean

The underlying problem remains: the various VC functions should not
always reload the buffer or at least should use the parameter
clearUndo=false.
2012-09-17 11:24:39 +02:00
Scott Kostyshak
51c380440b Constify some catches and others 2012-09-17 04:05:34 -04:00
Juergen Spitzmueller
ec078bd29d Do not search for empty string 2012-09-17 09:32:47 +02:00
Juergen Spitzmueller
e8a01d099a Calibrate log file parser
Filenames embraced in <...> can occur anywhere on the line and multiple times. This fixes for me the case that graphics included via ERT were not tracked. It probably also fixes #8336.

This is a candidate for branch.
2012-09-17 08:59:41 +02:00
Juergen Spitzmueller
ba792c4d35 Clarify the logic of fragmental file name checking
No change in functionality.
2012-09-17 07:37:49 +02: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
Uwe Stöhr
66e650e5da InsetTabular: fix resetting reset decimal alignment
If no special alignment is set the default is center not left - my mistake
2012-09-13 00:41:57 +02:00
Uwe Stöhr
b64d17e9dc GuiTabular.cpp: don't hardcode decimal align combobox item 2012-09-11 23:51:50 +02:00
Uwe Stöhr
6f157533a1 fix multirow/column logic in table dialog
GuiTabular.cpp: a cell can either be a multicolumn or multirow, not both the same time, this is already respected by the toolbar and context menu, only the dialog allowed to set this although this was correctly never applied

should also go to branch
2012-09-11 21:58:13 +02:00
Scott Kostyshak
4c1d45aac9 -help, -version, & unqualified -dbg now go to cout
Makes output consistent with other programs and allows for piping that
is more user-friendly.
2012-09-11 01:22:23 -04:00
Scott Kostyshak
1451c7cf66 Get rid of a Qt-generated stderr message
The stderr message "Object::disconnect: Unexpected null parameter"
often appeared when closing and opening buffers.
GuiView::on_currentWorkAreaChanged should not pass a null pointer
to Object::disconnect.
2012-09-10 23:18:22 -04:00
Uwe Stöhr
9d05ac5c91 Fix UI for decimal table alignment (bug #8285)
Fixes 2 issues:
1. LyX uses for a decimal alignment a multicolumn and having for a cell a multicolumn _and_ a multirow is invalid LaTeX.
2. It was impossible to unset a decimal alignment via the context menu or toolbar button.
2012-09-11 02:10:29 +02:00
Jean-Marc Lasgouttes
740c83637d Correctly initialize a member variable
This has be diagnosed by valgrind, I do not know how important it is.
2012-09-08 16:59:19 +02:00
Jean-Marc Lasgouttes
7a7b9abf1b Tracking correctly available translations (take 2)
The previous scheme of loading all possible translations and checking
whether the work is a bit too much "brute force" and causes problems
on Mac OS X (documents loaded with the wrong language).

Now there is an helper static method in Messages class that checks
whether a readable .mo file exist for the language. There should be an
API in gettext for doing that, but alas it is not possible.

As a consequence the method Language::translated() has been removed,
along with its cache.
2012-09-08 16:59:19 +02:00
Jean-Marc Lasgouttes
a86de5d3c0 Revert "Read list of translated languages from a file"
This reverts commit ed1515ef69.
2012-09-08 16:59:18 +02:00
Enrico Forestieri
91afc2430d Protect underlined \ref{} commands by enclosing them in \mbox{}.
This is the same protection used for \cite{}. Although "ulem" commands
don't strictly need this protection with \ref{} and friends, this helps
when one wants to use another package souch as "soul".
Indeed, ulem's \uline{} doesn't hyphenate words, while soul's \ul{} does,
and thus the output is much nicer.

With this patch, replacing ulem with soul is as simple as adding
\usepackage{soul}
\renewcommand{\uline}[1]{\ul{#1}}
to the preamble, without worrying about manually enclosing in \mbox the
\ref commands. In any case, the output from ulem remains unchanged.

Another possibility offered by soul is that of typesetting as
"yellow highlighted" the underlined text. This is achieved by adding
\usepackage{color,soul}
\renewcommand{\uline}[1]{\hl{#1}}
to the preamble.
2012-08-30 14:09:23 +02:00
Juergen Spitzmueller
458c143e49 Fix forward search with okular
Implement a placeholder 2008f which points to the tex file with full path, since this is what okular expects nowadays.
2012-08-26 11:42:43 +02:00
Juergen Spitzmueller
719ec62e28 Fix thinkos in LaTeX font reading 2012-08-25 10:48:37 +02:00
Juergen Spitzmueller
2a22d999b2 Implement plaintext for tie bars 2012-08-24 10:12:17 +02: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
Juergen Spitzmueller
042a1c4d3b Make tipa shortcuts work for combining chars 2012-08-21 12:48:34 +02:00
Enrico Forestieri
f251e01892 Fix bug #8305: ^ symbol does not render into upward arrow when using mhchem
The mhchem package treats the caret both as a shorthand for \uparrow or
as a superscript operator according to whether it is surrounded by
spaces or not. The \ce and \cf insets allow inserting spaces but there
is no provision for inserting a space after the caret, which is always
considered by LyX as a superscript operator. The solution here is to
insert a space after the caret if the superscript is empty or an empty
brace inset.

Mathed does not allow empty superscripts, so an empty brace has to be
inserted when working in LyX. On the other hand, when importing latex
code, an empty superscript is retained.

This has no effect whatsoever for normal latex code, as a space after
the caret is ignored. In any case, the output is only changed if an
empty brace inset is used as superscript. Specifically, the output is
changed from "^{{}}" to "^ {}".
2012-08-21 01:30:51 +02:00
Jean-Marc Lasgouttes
3a99e351d9 Merge branch 'master' of git.lyx.org:lyx 2012-08-20 17:39:25 +02:00
Jean-Marc Lasgouttes
6a936d63d3 Fix crash with undo in nested insets introduced by commit 6ec1683
The code in DocIterator::sanitize now follows more closely the
previous StableDocIterator::asDocIterator code. In particular, it adds
the slices one by one, since fixIfBroken will chop the cursor
otherwise.
2012-08-20 17:20:59 +02:00
Juergen Spitzmueller
c235e73301 Merge branch 'master' of git.lyx.org:lyx 2012-08-20 09:32:04 +02:00
Juergen Spitzmueller
1267319117 The tipa tone macro requires the tone package from the tipa bundle 2012-08-20 08:52:42 +02:00
Stephan Witt
4674c3e1c5 Patch from Benjamin Piwowar - see ticket #8185:
In order to interact with native osx applications, AppleScript support is a plus.
Here is a patch that makes LyX respond to a simple command (run) and that allows to communicate with LyX as with the LyX client.
Example of use:
	tell application "LyX" to run "server-get-filename" with argument ""'
returns
	message:/Users/bpiwowar/newfile1.lyx, code:0
with a message and the error code
2012-08-19 22:27:20 +02:00
Juergen Spitzmueller
66729e434e TIPA fixes 2012-08-19 16:59:53 +02:00
Juergen Spitzmueller
54c41ce26e Support for the TeX Gyre fonts (#4332) 2012-08-19 11:57:48 +02:00
Tommaso Cucinotta
0f97ae5480 Avoid that, if an error dialog pops up during a long operation, it freezes LyX. 2012-08-18 22:45:21 +01:00
Juergen Spitzmueller
b501845b2c Support for the mathdesign fonts (#6072) 2012-08-18 14:45:41 +02:00
Juergen Spitzmueller
6dd333b432 Add missing option commas 2012-08-18 13:29:14 +02:00
Juergen Spitzmueller
c409c9e3d1 Allow for general package options for LaTeX font packages (needed e.g. by mathdesign) 2012-08-18 13:10:34 +02:00
Juergen Spitzmueller
a9ad5c3337 Factor out duplicated code 2012-08-18 11:57:16 +02:00
Juergen Spitzmueller
924f71c792 Remove unused variable 2012-08-18 10:14:32 +02:00
Juergen Spitzmueller
03943ef730 Issue a warning if a LaTeX font is not available
Also output font in source preview notwithstanding availability.
2012-08-18 09:58:19 +02:00
Juergen Spitzmueller
292f48d6b5 Add support for the txtt font (#4979) 2012-08-17 18:24:18 +02:00
Juergen Spitzmueller
bfec6d2552 typo 2012-08-17 17:24:09 +02:00
Juergen Spitzmueller
37137f43f4 Support for the libertine font (#3881) 2012-08-17 14:11:02 +02:00
Pavel Sanda
f4fe5a8fa0 Another attempt at #8295.
This bug occur only at certain Qt versions and systems and we do
not really understand what is going on.

Quoting Stephan - the parent path of "." e.g. never should be ".".
The inconsistency between the name of FileName and the internal QFileInfo
state looks very dangerous.
2012-08-16 20:33:43 +02:00
Stephan Witt
2ecc895775 ensure VCS::checkparentdirs() starts with an absolute path (ticket #8295) 2012-08-16 13:47:27 +02:00
Juergen Spitzmueller
869b84aef9 Clean up LaTeX font handling (#4999)
The LaTeX font information are now centralized and outsourced. This removes a lot of hardcoding and duplication and makes it easier to support new LaTeX fonts.
2012-08-16 13:23:39 +02:00
Stephan Witt
4f1fb3f6d1 add debug messages to VCS::checkparentdirs (ticket #8295) 2012-08-15 17:50:24 +02:00
Juergen Spitzmueller
4950bb5ebc Comments 2012-08-08 17:23:02 +02:00
Juergen Spitzmueller
1db9ff9b1a Add a way to surpass special English treatment in useBabel
Normally, we do not load babel when English is the only language. However, if we check if babel is used from Font::validate, we need to surpass this test, else no secondary language is registered if English is the main language.
2012-08-08 17:02:12 +02:00
Juergen Spitzmueller
8f451fdbef Add missing breaks in switch 2012-08-08 11:27:37 +02:00
Juergen Spitzmueller
a18af62087 Complete default_language rc removal 2012-08-08 09:31:46 +02:00
Juergen Spitzmueller
2dd84b3417 Remove lyxrc \default_language which has been dropped from the GUI some time ago
The default language of new documents is set via the template
2012-08-07 08:29:46 +02:00
Juergen Spitzmueller
6d2ed04800 Decouple lyxrc-default_language from useLanguagePackage() 2012-08-07 08:00:42 +02:00
Richard Heck
166deba79b Wow, that last commit was dumb. So let's fix #8278 properly. 2012-08-05 17:31:00 -04:00
Richard Heck
2375982f7e Fix bug #8278, as suggested there by Ronen. 2012-08-04 17:33:47 -04:00
Stephan Witt
a9de2597ed Merge branch 'master' of git.lyx.org:lyx 2012-07-30 14:34:12 +02:00
Stephan Witt
430cf3ee5e Fix the wrong cursor move when forward flag is false:
The forward flag is used to place the cursor behind the replaced text if it's true.
But it's not correct to move the cursor if it's false. The cursor is in front of the
replacement already after the replaceSelectionWithString() was done.
2012-07-30 14:32:29 +02:00
Kornel Benko
ea76d6de95 Roundtrip tex2lyx, cmake-build:
1.) test.ltx, test.lyx.tex in build-dir (missed this one in previous commit)
2.) Added dependency to "lyx" to work on clean build dir too
2012-07-30 10:04:45 +02:00
Kornel Benko
6fa12b0971 Adapt tex2lyx roundtrip to cmake build.
Use build tree only.
2012-07-30 09:30:16 +02:00
Stephan Witt
44b3278006 Fix bug #8238: correct the forward argument of replace2string() in on_replacePB_clicked(). 2012-07-27 00:34:17 +02:00
Juergen Spitzmueller
b55a6454d9 Whitespace 2012-07-23 14:59:45 +02:00
Juergen Spitzmueller
0b5c20fc0f Fix direction of brackets in Hebrew when using Polyglossia (bug #8251) 2012-07-23 14:56:00 +02:00
Juergen Spitzmueller
6c1326cdeb Rework language package detection
This puts the diverse use[LangPack] function into one (less error-prone) function and differentiates the custom package from the babel case
2012-07-23 14:34:24 +02:00
Juergen Spitzmueller
508dd27e44 Fix thinko 2012-07-23 11:39:41 +02:00
Juergen Spitzmueller
566a5f2b75 Fixes to the language package call
* Assure that really no language package is called when none is selected.
* Only call global custom package if global is desired.
This is a candidate for branch as well.
2012-07-23 11:36:55 +02:00
Juergen Spitzmueller
a1e2e12ba4 Suppress babel RTL commands when using polyglossia (part of #8251) 2012-07-23 08:40:37 +02:00
Juergen Spitzmueller
f30d6acb04 Compile fix
Richard, please check.
2012-07-22 11:45:39 +02:00
Richard Heck
394e559ffc Add a FIXME about when the appendix should be enabled. 2012-07-21 14:19:10 -04:00
Richard Heck
894569e601 Fix a long-standing FIXME by resetting only the counter for top-level
sectioning when we see an appendix. This fixes bug #8271, whose root
cause was the fact that we were resetting all the counters inside ERT.
2012-07-21 14:19:10 -04: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
Jean-Marc Lasgouttes
ed1515ef69 Read list of translated languages from a file
The previous scheme of loading all possible translations and checking whether the work
is a bit too much "brute force" and causes problems on Mac OS X (documents loaded
with the wrong language).

In the new scheme, autotools install a file lib/installed_translations that contains a list of installed languages (the .gmo files that got installed). This file is read
in Languages::readInstalledTranslations and allows to set the translated() property
of each language.
2012-07-19 00:21:28 +02:00
Jean-Marc Lasgouttes
c999e35e54 Make sure that undo is recorded when magic tricks are played with InsetBibitem.
Fixes bug #7111: Assertion with undo and InsetBibitem

  * add Paragraph::brokenBiblio(), with tells whether there is something to fix.
  * rename Paragraph::checkBiblio to fixBiblio; simplify it greatly by using
    InsetList methods
  * In TextMetrics::redoParagraph, call recordUndo before fixBiblio (only when
    there is something to fix obviously)

Special care is taken to update cursor only when it makes sense. Note
that there are cases where undo information is not recorded (current
cursor not in the slice where action happens)
2012-07-18 15:36:58 +02:00
Juergen Spitzmueller
4d5bef1bdc Add \makeat switches to babel settings if necessary.
Babel settings might contain @ characters. Check for this and wrap the settings into \makeatletter ... \makeatother switches if necessary (see discussion at #8265).
2012-07-18 12:41:53 +02:00
Jean-Marc Lasgouttes
467422f9df Do not kill the undo stack when doing a Save As...
The code does a reload on the buffer to avoid loose pointers if the
file changes directory. This commit adds a bool parameter to
Buffer::reload to allow for keeping the undo stack intact. This is of
couse only wanted in this case, not when reloading an earlier version
of the file.
2012-07-18 10:31:47 +02:00
Jean-Marc Lasgouttes
6ec1683aee Fix crash introduced in my previous commit f6b1c24b
Cursor::fixIfBroken does not do what I thought it did. Lift some code
from StableDocIterator::asDocIterator instead.
2012-07-17 22:26:44 +02:00
Jean-Marc Lasgouttes
e2b42b1726 Fix bug #8242: undo fails for longest label width
In the existing code for setting layout of pragraph parameters,
Text::undoSpan is used to "guess" which paragraphs should be saved in Undo.
With this patch the approach is more precise: before every explicit change
to a paragraph, a Cursor::recordUndo call is inserted. This is much more robust than trying to guess.

In particular, we do not look at depth changes at all, since they are now
handled in updateBuffer since #8159 has been fixed.
2012-07-16 23:39:24 +02:00
Jean-Marc Lasgouttes
02ce050fb8 Make the toolbar code less noisy when the session file is not found 2012-07-16 23:11:26 +02:00
Jean-Marc Lasgouttes
2e1c618824 Typo introduced in commit 16fd47ad. 2012-07-16 00:30:28 +02:00
Pavel Sanda
7b1b9823ff Add comment in lstrings.h 2012-07-15 23:25:58 +02:00
Jean-Marc Lasgouttes
16fd47ad8f Fix bug #7741: incorrect locale when starting R from LyX?
The goal here is to get rid of the old code that modified variables
LANGUAGE and LC_ALL, therefore creating the problems mentionned
in the ticket.

In the new system, there is no explicit "GUI" message handler, that
needs to be reset at each language change. Instead, getGuiMessages
calls getMessages with the correct parameter. This allows to simplify
greatly the code and to remove a lot of old cruft.
2012-07-15 22:22:10 +02:00
Jean-Marc Lasgouttes
f6b1c24b99 Fix bug #5204: Undo removes text selection
This commit does a bit more than fix selection, since it saves the full cursor state
in the undo stack. This means that undo now restores:
* the selection
* the current font
* transient mark (shall we keep this one?), logical position...

In order to do that, it introduces an intermediate class between Cursor and DotIterator: CursorData.
The new inheritance diagram is thus
  DocIteraator -> CursorData -> Cursor

CursorData contains all the members of Cursor that define the current position, but not the stuff
related to current view of dispatch mechanism. It may make sense in the future to move members
between CursorData and Cursor and to move some member functions to CursorData.

Now UndoElement uses CursorData for cur_before and cur_after, but not for the cell. The undo API uses
also CursorData instead of DocIterator.
2012-07-15 18:16:09 +02:00
Richard Heck
a0afcdb391 LFUN_CLOSE_TAB_GROUP does exactly the same thing as
LFUN_BUFFER_CLOSE_ALL if there's only one tab group open, so there's
no need to enable it in that case.
2012-07-14 22:13:40 -04:00
Richard Heck
5400ae0720 Fix bug #8160 by updating the dtd for MathML. 2012-07-10 18:07:07 -04:00
Richard Heck
17c5791454 Fix stupid typo. 2012-07-10 17:11:58 -04:00
Georg Baum
af322ba9b4 Make CJK.lyx exportable.
If there was an encoding set by the inputenc package, it must not be ignored.
Now all tex2lyx test cases can be exported to .tex again by LyX (although
there are still some differences in the .lyx output).
2012-07-08 22:35:22 +02:00
Georg Baum
c3731b25da Fix tex2lyx -roundtrip for XeTeX documents 2012-07-08 21:35:40 +02:00
Uwe Stöhr
f0335cef1e tex2lyx: fix a regression
Preamble.cpp: - partly revert [e1b181dd/lyxgit] because the math packages cannot by default be loaded as the user might have defined special commands
2012-07-08 21:32:26 +02:00
Georg Baum
840f6fda51 Don't stop testing after first error.
This was the reason why I forgot to update the last test file in the last
commit.
2012-07-08 20:52:26 +02:00
Georg Baum
45fd75fe96 Manually update test results to current format.
Now you can see the regressions without differences caused by real
fixes or file format updates.
2012-07-08 20:09:02 +02:00
Georg Baum
1c0bd0132c Add very simple tex2lyx regression test suite.
It is invoked by 'make check' (automake only, it would be nice if someone
could add it to cmake as well), or by calling

python src/tex2lyx/test/runtests.py <path to tex2lyx binary>

by hand. Currently, it does not compare the output (this comes later).
The added .lyx files are from tex2lyx around mid of april, so that you
can see the regressions of the current version if you run the test
yourself (simply run git diff afterwards).

The home made test runner is quite stupid, but better than nothing.
Feel free to improve it or replace it with something better, as long
as running it stays as simple as now.
2012-07-08 19:28:19 +02:00
Georg Baum
57a8ea32c0 Include the recently added test files in package 2012-07-08 18:12:26 +02:00
Uwe Stöhr
4e69b9bac5 tex2lyx/text.cpp: fix typos 2012-07-07 13:40:07 +02:00
Uwe Stöhr
fe5a4c8c81 tex2lyx: improve CJK handling
- tex2lyx/text.cpp:
 - fix bug that swallowed valid braces
 - the encoding is "Bg5" not "BIG5"
 - add and update comments

- CJK.tex: add an example for the Bg5 encoding
2012-07-07 13:37:26 +02:00
Uwe Stöhr
d8611f25f2 tex2lyx: remove some superfluous code
text.cpp: besides that eat_whitespace does nothing these calls would be wrong as whitespace is allowed as argument of the box commands
2012-07-06 23:35:33 +02:00
Uwe Stöhr
02b6586ad7 update a tex2lyx test file
box-color-size-space-align.tex:
 - add all possible math spaces
 - remove 2 invalid non-math spaces
2012-07-06 23:33:28 +02:00
Uwe Stöhr
487c8b5bd3 tex2lyx: update a command
Parser.cpp: improve a command as discussed
2012-07-03 00:39:41 +02:00
Juergen Spitzmueller
555ae019b8 update tex2lyx TODO 2012-07-01 14:48:20 +02:00
Juergen Spitzmueller
11f7efe2eb Set the appropriate quote style when switching the main language 2012-07-01 11:27:42 +02:00
Juergen Spitzmueller
837869452a Add quote style information to languages 2012-07-01 11:25:52 +02:00
Juergen Spitzmueller
507302b444 Whitespace 2012-07-01 08:38:54 +02:00
Uwe Stöhr
56f0e0c4fc tex2lyx/Parser.cpp: refine \verb handling 2012-07-01 02:12:56 +02:00
Uwe Stöhr
d10063fd20 polyglossia tex2lyx coding style improvement
- Preamble.cpp/:
 - move list definition out of anon namespace
 - declare lists and a function in the class

- text.cpp: remove the now already defined list
2012-07-01 01:47:39 +02:00
Uwe Stöhr
85c479f4e7 test-structure.tex: add checks for \verb 2012-06-30 15:29:53 +02:00
Juergen Spitzmueller
e903d0158e Whitespace
If someone can tell me how I can tell QtCreator to actually use tabs, not spaces, I would be most grateful (yes, I have set Tab Policy to Tabs Only in Prefs)
2012-06-30 13:45:58 +02:00
Juergen Spitzmueller
5eb9ece39e Properly escape splitindex shortcut and try to encode splitindex name properly (part of bug #8227) 2012-06-30 13:34:49 +02:00
Juergen Spitzmueller
51d591d168 Factor out method to get a properly encoded latex string 2012-06-30 13:30:48 +02:00
Uwe Stöhr
708979fb0e tex2lyx: whitespace only 2012-06-30 03:38:02 +02:00
Uwe Stöhr
80884330d1 tex2lyx: fix handling of \verb
- Parser.cpp: \verb can have any character as delimiter (except of ASCII letters) not only '+', therefore partly revert [3943b887/lyxgit] and fix it for all cases
2012-06-30 03:25:19 +02:00
Uwe Stöhr
85ef627eac fix mistake in tex2lyx testfile
- XeTeX-polyglossia.tex: Hebrew is used in the file and so it must be declared
2012-06-30 02:21:15 +02:00
Juergen Spitzmueller
0062538a54 Add some more characters that need to be escaped in labels etc. 2012-06-30 01:24:40 +02:00
Jean-Marc Lasgouttes
bbbc2b6541 Fix to #8159: Undo doesn't restore environment depth correctly
The idea is to record undo at the place where the document is modified:

1/ in Buffer::updateBuffer, add a recordUndo, with the caveat that a
   const_cast has to be used (because updateBuffer is const but
   modifies the document, go figure).

2/ in GuiApplication::dispatch, add an extra undo group that
   encompasses the updateBuffer call. Some other undo groups may be
   redundant now, but it is not a problem since they do not cost
   anything.
2012-06-29 15:25:47 +02:00
Jean-Marc Lasgouttes
c22334eb3b Revert "Tentative fix to #8159: Undo doesn't restore environment depth correctly"
This reverts commit e3854bb59b.
2012-06-29 15:22:24 +02:00
Pavel Sanda
e43f9d3bbd Revert a6e42e5079.
Removing debug.h makes debugging via lyxerr<< twice as hard.
2012-06-28 20:52:20 +02:00
Juergen Spitzmueller
6de47fa873 fix bug #8209: polyglossia commands ignored partial source preview 2012-06-28 18:15:43 +02:00
Uwe Stöhr
2c9310d935 tex2lyx: fix a typo
tex2lyx/text.cpp: the encoding must be _set_ here
2012-06-27 23:58:16 +02:00
Uwe Stöhr
8f7195a251 tex2lyx: fix a logic mistake
Preamble.cpp: set missing begin position for the search; thanks Vincent for spotting
2012-06-27 23:18:02 +02:00
Uwe Stöhr
d1800d4d5a tex2lyx: reprivatize another variable 2012-06-27 22:48:22 +02:00
Uwe Stöhr
b6192b7c7f texlyx: re-privatize a variable as suggested 2012-06-27 22:32:36 +02:00
Uwe Stöhr
62db3d535d tex2lyx: fix some issues spotted by Vincent 2012-06-27 02:52:09 +02:00
Uwe Stöhr
4ab764c845 BoxUi.ui: revert unintended commit [a6e42e50/lyxgit] 2012-06-26 22:46:06 +02:00
Uwe Stöhr
a6e42e5079 removed unused includes
these files don't use the debug.h and also don't contain commented out debug code
2012-06-26 22:41:53 +02:00
Vincent van Ravesteijn
dfb8dc91c1 Update the button text of InsetInclude insets
The button text of InsetInclude insets shows whether the child document is
included or excluded from compilation. Changing this for a child document
in the document settings does not get reflected on screen. This patch
updates the button text on the updateBuffer() call.
2012-06-26 20:41:25 +02:00
Uwe Stöhr
2e8ed3b3b5 tex2lyx: support fontspec scale option
Preamble.cpp:
 - support the font scaling
 - improve coding style

text.cpp: - improve logic/coding style

XeTeX-polyglossia.tex:
 - add scaling
 - change document so that it is compilable using the Libertine font
2012-06-26 00:46:02 +02:00
Uwe Stöhr
d3bcdb24cc tex2lyx/text.cpp: fix bug #8223
LyX does not yet support \framebox without an option we therefore cannot use our parse_outer_box routine (this is only for supported boxes)
2012-06-25 22:58:21 +02:00
Vincent van Ravesteijn
8941e980b9 BufferParams: Remove superfluous '\n'
This extra '\n' seems to have been an unintended side-effect of d7eaaba9 (Juergen Spitzmueller, "support for CJK font argument"; Jun 5 2008).
2012-06-25 11:28:38 +02:00
Vincent van Ravesteijn
e20238e21f tex2lyx: Remove superfluous '\n'
Instead of adding the extra '\n' to tex2lyx, we should remove it from
BufferParams.cpp because it was introduced there unintendedly in d7eaaba9
(Juergen Spitzmueller; "support for CJK font argument"; Jun 5 2008).

This partly reverts commit c2810f922665c591a7c32d4c679e58e55132505a.
2012-06-25 11:26:20 +02:00
Jean-Marc Lasgouttes
2a13b02a94 Fix bug #8220: tex2lyx crashes on single-character commands
Fix commit [aa9fed93/lyxgit]: it is never a good idea to call substr(4) on a string without checking its length. Moreover, it is even better in this case to check that the first letters are "text" as the reminder of the code assumes...
2012-06-25 11:04:56 +02:00
Uwe Stöhr
66e3ac003f fix bug #8210
we need to store the document language from the beginning of the document in the context to be able to handle all kinds of language switch commands
2012-06-24 18:24:28 +02:00
Uwe Stöhr
8e7b5eebf0 update tex2lyx todo list
- Japanese is now supported as well as CJK
- also all XeTeX issues are now ironed out
- the support for ArmTeX has been dropped meanwhile
2012-06-24 18:20:19 +02:00
Uwe Stöhr
5ad84b9fbd support non-CJK Japanese for tex2lyx
We cannot know the exact encoding and thus con only assume one (the one that Koji uses for the docs) and output a not at the beginning
2012-06-24 18:10:36 +02:00
Uwe Stöhr
adb0d7f63f support synctex in tex2lyx.cpp
- tex2lyx/Preamble.cpp/h: handle \synctex and package srcltx
- tex2lyx/test/test-structure.tex: add \synctex
2012-06-24 16:59:21 +02:00
Uwe Stöhr
5d79cd531d tex2lyx/Preamble.cpp: fix a typo 2012-06-24 15:37:51 +02:00
Uwe Stöhr
e1b181ddd4 update tex2lyx header format really to fileformat 433
- tex2lyx/Preamble.cpp/h: not all new header definitions since fileformat 413 have yet been added to texl2yx, so do it now; also change some new default values
2012-06-24 15:29:32 +02:00
Juergen Spitzmueller
4c2ae219e1 whitespace 2012-06-24 15:15:31 +02:00
Uwe Stöhr
47f7d44747 fix bug #8215
Font.cpp: CJK parts must not have a closing brace because they are within an environment
2012-06-24 14:42:23 +02:00
Uwe Stöhr
e7d1e5b0c9 tex2lyx comment corrections
tex2lyx/Preamble.cpp, tex2lyx/text.cpp: add info about CJK languages
2012-06-24 14:39:57 +02:00
Juergen Spitzmueller
dac9ec0c13 Merge branch 'master' of git.lyx.org:lyx 2012-06-24 10:57:02 +02:00
Juergen Spitzmueller
5b374e0c29 do not output empty language switch commands (bug #8216) 2012-06-24 10:56:08 +02:00
Uwe Stöhr
a3f4f2d1e3 CJK support for tex2lyx
- support as best as possible; setting a document language is however not possible
- fixes bug #4377
2012-06-24 06:38:33 +02:00
Uwe Stöhr
3943b887a8 tex2lyx/Parser.cpp: fix bug #4468: single '\' are allowed in the special case of '+' as comment argument delimiter 2012-06-23 20:00:49 +02:00
Uwe Stöhr
d37bb54e7b - language: Kurmanji is since 2009 also supported by babel; no fileformat change necessary because Kurmanji is already covered by fileformat 432
- tex2lyx/Preamble.cpp: babel support for Kurmanji and remove comment residues of ArmTeX whose support was removed by fileformat 433
2012-06-23 18:56:10 +02:00
Uwe Stöhr
7a103ba6d7 tex2lyx/Preamble.cpp: remove a FIXME, the problem was only in trunk (bug #8211) and is now fixed 2012-06-23 16:57:22 +02:00
Juergen Spitzmueller
ca16190006 fix bug #8208: missing \end for polyglossia-only languages at buffer end 2012-06-23 15:44:25 +02:00
Juergen Spitzmueller
20d7e088fa less opaque bool naming and consistent use 2012-06-23 15:41:05 +02:00
Juergen Spitzmueller
f42c9e50df fix bug #8211: \setotherlanguage not set for non-babel languages 2012-06-23 13:50:40 +02:00
Uwe Stöhr
89b8f380cc tex2lyx/text.cpp: 2 typos 2012-06-23 05:20:39 +02:00
Uwe Stöhr
e31981a414 Merge branch 'master' of git.lyx.org:lyx 2012-06-23 04:29:16 +02:00
Uwe Stöhr
828f7171e8 - tex2lyx: support for the polyglossia language variants
- XeTeX-polyglossia.tex: simplifications, added some more testcases
2012-06-23 04:28:52 +02:00
Pavel Sanda
369e697352 Add hint for backward search (cf #8054) 2012-06-23 04:12:08 +02:00
Uwe Stöhr
f1f63fcad0 tex2lyx/text.cpp: whitespace fix 2012-06-23 00:53:35 +02:00
Uwe Stöhr
73f0f4dd6c - Preamble.cpp: handle \setxxxlanguage with options
- text.cpp: handle the commands \textxxx with options
- XeTeX-polyglossia.tex: add 2 more testcases
2012-06-22 17:19:46 +02:00
Uwe Stöhr
79352b9882 tex2lyx/XeTeX-polyglossia.tex: add a further test 2012-06-22 15:40:40 +02:00
Uwe Stöhr
46051b57ae XeTeX-polyglossia.tex: add missing \setotherlanguages 2012-06-22 04:43:33 +02:00
Uwe Stöhr
e8f4ce5726 tex2lyx/text.cpp: \lang is already handled by parse_text 2012-06-22 04:41:08 +02:00
Uwe Stöhr
aa9fed9322 - tex2lyx/text.cpp:
- bugfix for the parsing of polyglossia's paragraph environments
 - new support for polyglossia's language change commands \textxxx
- XeTeX-polyglossia.tex: add more testcases and add a missing \end
2012-06-22 03:41:00 +02:00
Uwe Stöhr
c695e5fb38 - FORMAT: notice fileformat change
- version.h: fix comments
2012-06-22 01:20:29 +02:00
Uwe Stöhr
1ea2abc77f drop support for ArmTeX as its non-standard armscii8 encoding was quite unusable in real life, use polyglossia/XeTeX instead as clean solution via Unicode; fileformat change; fixes the second part of bug #8026 2012-06-22 01:12:43 +02:00
Uwe Stöhr
8afad998ed LaTeXFeatures.cpp: polyglossia is only required if a language is not supported by babel _and_ also no other special package; patch by Jürgen, to fix the regression mentioned in bug #8026 2012-06-22 01:08:51 +02:00
Uwe Stöhr
dda1bfc949 tex2lyx/table.cpp: please Vincent as discussed 2012-06-21 13:14:16 +02:00
Uwe Stöhr
c00fd8f8be tex2lyx/table.cpp: fix bug #8204, also OK for branch or too late? 2012-06-20 23:24:35 +02:00
Pavel Sanda
35e4c1c9a6 Allow dead caron to be recognized in our key bindings.
This allows to workaround the problem in #8198 - on some systems
we get dead caron as a single character instead of whole combined
character. I suppose this has rather something to do with X settings
than LyX per se.
2012-06-14 12:44:16 +02:00
Jean-Marc Lasgouttes
92e3cc456f Make debug messages more readable
Shorten the file names output by LYXERR so that they start right after /src/.
2012-06-11 15:03:29 +02:00
Juergen Spitzmueller
4698ebd2b7 Let getOutputFlavor return the correct flavors for the latex varieties 2012-06-09 15:11:34 +02:00
Juergen Spitzmueller
f71a55a279 some less language hardcoding 2012-06-09 11:32:34 +02:00
Juergen Spitzmueller
f84c8c56f5 Whitespace 2012-06-08 20:31:20 +02:00
Juergen Spitzmueller
a2f32db171 avoid empty class options 2012-06-08 19:48:24 +02:00
Juergen Spitzmueller
785332f305 re-add change_adapter triggering 2012-06-08 19:21:30 +02:00
Juergen Spitzmueller
040fb73b9c Do not hardcode polyglossia-only languages 2012-06-08 12:54:57 +02:00
Uwe Stöhr
ceb180cebd GuiDocument.cpp: some languages only work with polyglossia, therefore enable non-TeX fonts when one of them is used as document language 2012-06-08 05:39:00 +02:00
Uwe Stöhr
2872f35a51 - FORMAT: document latest change
- tex2lyx/text.cpp: fix a comment
2012-06-08 02:42:22 +02:00
Uwe Stöhr
7eca5d94d1 - support a bunch of new languages (fileformat change)
- tex2lyx support for
  - fontspec fonts
  - polyglossia
2012-06-08 02:37:36 +02:00
Juergen Spitzmueller
a4ea17e0e9 Restore default output format after tex fonts switch (#8191) 2012-06-07 21:27:01 +02:00
Jean-Marc Lasgouttes
c7549c1b54 Fix bug #8027: Edit->Paste Special->... does not replace selected text
Delete the selection before all paste-like lfuns. This was previoulsy done
only for LFUN_PASTE, the others at best unset the selection.
2012-06-07 18:14:17 +02:00
Jean-Marc Lasgouttes
0ef36860c3 Handle sending a FuncRequest object to lyxerr
* Implement the corresponding operator<<

  * Use it in a couple new places
2012-06-07 17:21:49 +02:00
Richard Heck
9e678569ad Typo. 2012-06-06 18:20:02 -04:00
Richard Heck
b7ac2d69e7 Allow LyX format to be written to View>Source window. 2012-06-05 10:24:15 -04:00
Richard Heck
cfc43d772d Move TexRow stuff near where it is used. 2012-06-05 10:24:15 -04:00
Jean-Marc Lasgouttes
bcd6990eca Revert "Revert "Tentative fix to #8159: Undo doesn't restore environment depth correctly""
This is becoming crazy :)

This reverts commit 5b531b56ef.
2012-06-05 12:55:37 +02:00
Jean-Marc Lasgouttes
9a3b6733c0 Revert "Second tentative fix to #8159: Undo doesn't restore environment depth correctly"
Did not mean to commit that.

This reverts commit 8f01556236.
2012-06-05 12:55:37 +02:00
Jean-Marc Lasgouttes
992eae2524 Typos 2012-06-05 12:22:13 +02:00
Jean-Marc Lasgouttes
8f01556236 Second tentative fix to #8159: Undo doesn't restore environment depth correctly
In this version, the idea is to record undo at the place where the document is modified, which is definitely cleaner.

1/ in Buffer::updateBuffer, add a recordUndo, with the caveat that a
   const_cast has to be used

2/ in GuiApplication::dispatch, add an extra undo group that
   encompasses the updateBuffer call. Some other undo groups may be
   redundant now, but it is not a problem since they do not cost
   anything.
2012-06-05 11:32:56 +02:00
Jean-Marc Lasgouttes
5b531b56ef Revert "Tentative fix to #8159: Undo doesn't restore environment depth correctly"
This reverts commit e3854bb59b.
2012-06-05 11:32:56 +02:00
Richard Heck
8b2aab9b3d Style. 2012-06-04 13:42:46 -04:00
Richard Heck
7ef8df460a Fix crash reported by Tommaso:
http://marc.info/?l=lyx-devel&m=133876924408431&w=2
The problem here is that the copy_params() routine in FindAndReplace.cpp
created a new DocumentClass, but it never updated its Buffer to reflect
that new DocumentClass. So its Paragraphs still contained points to the
Layouts in the old DocumentClass which, since ead697d4b6, gets garbage
collected once it is no longer needed. So the Layout doesn't exist, and
we crash.
2012-06-04 13:39:24 -04:00
Richard Heck
1078dba130 Fix crash reported by Scott. Forgot to change some pointers to
shared_ptr.
2012-06-04 13:04:26 -04:00
Jean-Marc Lasgouttes
ad7deaabeb Fix bug #7956: Assertion When Trying to Paste Into Table
For some unknown reason, the paste code likes to call Cursor::setSelection(), which is not appropriate here since we are not trying to set a selection at this point.
2012-06-04 17:05:43 +02:00
Juergen Spitzmueller
af59dffeda Add missing undo recording.
This adds a change of the printindex type (with multiple indices) to the undo stack and marks the buffer dirty on that action (bug #8182)
2012-06-03 10:31:38 +02:00
Richard Heck
ead697d4b6 Deal with memory issue reported some time ago in connection with DocumentClass
objects. The problem that led to the leak is that these objects can be held in
memory long after the Buffer that created them is gone, mostly due to their
use in the CutStack. So they were previously held in a storage facility, the
DocumentClassBundle. Unfortunately, they were now being created too often,
especially by cloning. It's not really a leak, because they're accessible, but
we weren't ever destroying them.

This new approach uses a shared_ptr instead.

Thanks to Vincent for pointing out const_pointer_cast.
2012-05-31 12:34:29 -04:00
Richard Heck
03da96e0f7 Minor cleanup: We should use the usual conventions for
InsetLayout names.
2012-05-31 12:24:08 -04:00
Richard Heck
be89d37bd4 Properly initialize variable. This should fix the problem
reported here:
	http://marc.info/?l=lyx-devel&m=133775786222603&w=2
by Scott.
2012-05-31 12:04:09 -04:00
Pavel Sanda
262c2e95a9 Tabular.ui: Moving Latex argument field to column section.
Forgotten patch from John Tapsell.

Documentation moved from UI to User Guide.
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg173987.html

This was here for ages, no need to rush into branch.
2012-05-31 15:36:33 +02:00
Pavel Sanda
f692181917 Fix #8180: Page break on current row can't be unchecked.
Patch from John Tapsell
2012-05-31 13:56:07 +02:00
Juergen Spitzmueller
ab3491adef Fix crash when removing last converter (bug 8178) 2012-05-29 14:21:29 +02:00
Juergen Spitzmueller
9fc92f783c Load bibtopic after hyperref (bug #8005) 2012-05-29 13:25:30 +02:00
Richard Heck
c1e3d795f6 A few more small optimizations noted along the way. 2012-05-28 18:21:22 -04:00
Jean-Marc Lasgouttes
a756403301 "Performance" fixes suggested by cppcheck
While cppcheck did not turn out any suspicious error messages, using
the "performance" flag highlighted several nitpicks in three categories
 * do not use it++ for iterators, ++it is better
 * do not use size() to test for emptyness, empty() is here
 * do not use "const T" as a function parameter, "const & T" is better

I doubt that any of these is a real performance problem, but the code is cleaner anyway.
2012-05-28 22:42:44 +02:00
Juergen Spitzmueller
6ddcfb87e4 Fix macro termination in IPA inset if next character uses a TIPA shortcut 2012-05-26 16:36:24 +02:00
Pavel Sanda
1b1f9d05d9 compile fix 2012-05-26 10:16:20 +02:00
Vincent van Ravesteijn
655a4f5515 Fix painting of hidden tabbar on gtk
When there is a single document open, the tabbar gets hidden. The only and selected tab is still visible though as a break in the line delining the tabwidget. To fix this we paint the tabwidget ourselves and remove the presence of the hidden tab.
2012-05-25 19:17:48 +02:00
Vincent van Ravesteijn
4c3a97d96e Fix bug #8170: Crash when client disconnects unexpectedly
When the socket does not exist anymore, we should not try to access it. In
trying to do so, std::map will create a new shared_ptr but this pointer
doesn't point at anything. To prevent this, we explicitly check whether
the socket is available.
2012-05-24 13:55:41 +02:00
Richard Heck
9d983562fe Style. 2012-05-23 08:53:14 -04:00
Vincent van Ravesteijn
d20cb73b87 Fix bug #8166: Crash on clicking away from empty last paragraph
This reverts the previous fix in [0a33374c/lyxgit] and fixes it
differently.

We always have to call 'notifyCursorLeaves', but we only have to make sure
that we call the 'fixIfBroken()' functions first.
2012-05-23 08:02:40 +02:00
Vincent van Ravesteijn
0a33374c0d Fix bug #8166: Crash on clicking away from empty paragraph
We rely on the 'or' operator to prevent us from calling
'notifyCursorLeaves' if one of the two cursors is broken. This doesn't
work when using the '|' operator. The compiler 'optimizes' the code in
such a way that we always call notifyCursorLeaves anyway. Using the '||'
operator fixes this.
2012-05-23 01:31:43 +02:00
Jean-Marc Lasgouttes
e3854bb59b Tentative fix to #8159: Undo doesn't restore environment depth correctly
The undo range is extended to encompass all the paragraph after the end that
are a non-zero depth. The reason is that these paragraphs may see their depth
reduced if the last paragraph sees its depth reduced.

Note that there is a memory cost, since we store paragraphs than may not be
modified in practice. This may matter for some pathological files (people
putting all their document at depth 1 for a weird reason?)

I tried to be careful, but this can introduce new bugs. Please test.
2012-05-22 22:18:34 +02:00
Pavel Sanda
255b218ce3 Just comment 2012-05-22 15:54:26 +02:00
Richard Heck
cd05753107 Forgot to change format in LyXRC.cpp. 2012-05-22 08:58:40 -04:00
Richard Heck
288c1e0faa Add "nice" flag for converters, addressing final problem with bug #4624. 2012-05-22 08:56:05 -04:00
Lars Gullik Bjønnes
fb3ecca01c TextMetrics.cpp: comment out addressBreakPoint function
Only user of this function is code that has been commented out, comment
out this function as well.

Signed-off-by: Lars Gullik Bjønnes <larsbj@gullik.org>
2012-05-20 11:08:20 +02:00
Juergen Spitzmueller
ab1434dce3 If a file is saved as, reset its master if it has any, thus preventing a crash (bug 8161) 2012-05-19 10:16:28 +02:00
Pavel Sanda
436cb86ff1 * doxy 2012-05-17 19:12:27 +02:00
Vincent van Ravesteijn
30475664d3 Allow an unnamed buffer to be saved with the same name
The check whether fname != oldname does not work for unnamed buffers.
Therefore, we check explicitly whether the Buffer that already exists with
the same name isn't really the buffer we are trying to save.
2012-05-14 15:26:51 +02:00
Richard Heck
d89158df2a We need to clean the HTML id before writing it. 2012-05-14 08:30:04 -04:00
unknown
b17250d7eb Fix bug #7641: Freeze when removing itemized first paragraph
Text::outerFont looks recursively for paragraphs before the current one
which has a lower depth. If such a paragraph cannot be found, depthHook
and outerHook return the current paragraph. As such, we end up in an
infinite loop. So, if we find a par_depth that was the same as the
previous one, we apparently can't find a suitable paragraph and we should
quit the loop.
2012-05-14 14:24:53 +02:00
Enrico Forestieri
93ebb7a863 Fix bug #7982: LyX does not work if working directory a hard disk drive like D:\
In this case, the working dir has already a slash at the end.
Appending another one would result in a path ending with a double slash,
which has a special meaning when used in TEXINPUTS (all subdirs would
be recursively scanned). So, avoid doing that.
2012-05-14 13:08:30 +02:00
Richard Heck
207d7e4ada Fix bug #8156.
We want the key as id, not the label (which is optional).
We also need a kind of namespace for the citation ids.
We should also clean the id tag before using it.
2012-05-13 14:00:44 -04:00
Richard Heck
319e35188a Style. 2012-05-13 13:40:22 -04:00
Georg Baum
de00ce40aa Forgot the test case for bug #8116. 2012-05-13 18:54:14 +02:00
Georg Baum
3ded1c8506 Fix bug #8116.
The string we parse as name may contain backslashes if \csname ... \endcsname
is used. Therefore we have to output it using asInput() instead of cs().
2012-05-13 18:41:51 +02:00
Vincent van Ravesteijn
6cf1847b31 New function BufferList::newInternalBuffer
This solves the problem that newBuffer() already use Buffer::isInternal
but there was no chance to set it yet.
2012-05-12 14:36:13 +02:00
Vincent van Ravesteijn
fa438c1699 Remove read_only parameter from newBuffer
This parameter defaults to false and it is never set to true. So, we can
better remove the parameter.
2012-05-12 14:35:04 +02:00
Richard Heck
f2fc334cd5 Whitespace. 2012-05-10 15:44:25 -04:00
Vincent van Ravesteijn
6df750aa18 TextMetrics::leftMargin(): Explain why the disabled code is wrong 2012-05-10 10:46:35 +02:00
Vincent van Ravesteijn
92ac678715 Fix bug #8152: Uneditable long rows for 'Right addresses'
As long as leftMargin() is not correctly implemented for
MARGIN_RIGHT_ADDRESS_BOX, we should also not do this here. Otherwise, long
rows will be painted off the screen and will not be editable.
2012-05-10 10:46:32 +02:00
Pavel Sanda
f78d74f40d Fix buddies in tabular dialog, patch from John Tapsell. 2012-05-09 12:22:40 +02:00
Pavel Sanda
ba88f39624 GuiViewSource - prevent null-pointer crash if backend format is not found.
Patch from John Tapsell.
2012-05-09 09:14:55 +02:00
Georg Baum
b86c984bf4 Disentangle amsmath and amssymb loading.
This is needed if you load a font package incompatible to amssymb manually
(see bug #5058).
2012-05-06 20:49:49 +02:00
Vincent van Ravesteijn
5279d5a8a5 Properly mark a buffer as internal
Checking the extension of the temporary filename doesn't work anymore
since the naming of temporary files was corrected.
2012-05-06 20:12:17 +02:00
Georg Baum
cd691081b4 Import table cells in turn environment.
This is a part of bug #8081: Translate cells in
\begin{turn}{number}...\end{turn} to native syntax.
2012-05-06 19:12:51 +02:00
Georg Baum
c90e02ff0d Import table cells in sideways environment.
This is a part of bug #8081: Translate cells in
\begin{sideways}...\end{sideways} to native syntax. The turn environment
comes in a later commit, since this one os suitable for backporting.
2012-05-06 18:47:53 +02:00
Georg Baum
7cfac958f2 Do not swallow newlines after \usepackage. 2012-05-06 17:37:09 +02:00
Georg Baum
c9f68139cb Do not swallow math comments in tex2lyx.
This is not needed, since LyX supports comments in math. Data loss with math
comments containing a backslash in LyX has been fixed as well.
The test case was found in bug #8104.
2012-05-06 16:48:44 +02:00
Pavel Sanda
4ce24954aa Strip gecos on Unix systems on user name only.
Patch from Scott Kostyshak.
2012-05-06 13:36:54 +02:00
Vincent van Ravesteijn
9541e6b851 Fix compilation
Compile fix for [b0b8e5f5/lyxgit].
2012-05-03 17:58:02 +02:00
Vincent van Ravesteijn
6377296492 Fix bug #5167: Correctly paint special characters in InsetMathFont
When using, e.g., a 'mathcal' inset in math, the inline completion and
other special characters like '\#', '{..}' are are painted in the
'mathcal' font as well. This is overcome by setting the mathnormal font
before painted these characters.
2012-05-03 16:36:19 +02:00
Vincent van Ravesteijn
b0b8e5f54c Move metrics computation close to drawing for drawStrRed/Black 2012-05-03 16:35:45 +02:00
Vincent van Ravesteijn
af5ecd1c8d Exclude stdinsets.inc from basic layout if we exclude stdclass.inc
If loading a basic layout fails, we try to load a basic layout without
stdclass.inc instead. However, this still 'implicitly' requires
stdinsets.inc. If the load failed because stdclass.inc couldn't be loaded,
we expect that stdinsets.inc can't be loaded as well, so we should exclude
stdinsets.inc as well.

This prevents an assertion if stdinsets.inc can't be found or can't be
loaded. This can happen when the layouts have the wrong format and python
is not available.
2012-05-03 16:14:38 +02:00
Vincent van Ravesteijn
5e4e4b674c Always require a mask to get a temporary filename
If no mask is supplied or the mask is attached to the end of the filename, we end up with unexpected names like
  <system-temp-dir>\lyx_tmpdir.qHp780.vcr780_<mask>
instead of a temporary file in the lyx temporary directory like
  <system-temp-dir>\lyx_tmpdir.qHp780\<mask>.vcr780.
2012-05-03 16:14:37 +02:00
Jean-Marc Lasgouttes
439da7e82a Remove workaround that is not useful anymore 2012-05-03 15:51:14 +02:00
Richard Heck
0459c43769 Forgot the return value. 2012-05-03 09:09:47 -04:00
Richard Heck
98a810c9d8 Fix bug #8087: Include children in plaintext export. 2012-05-02 17:39:49 -04:00
Richard Heck
3380e0de8f Before we process the LFUN, make sure that it is actually intended
for us.
2012-05-02 17:30:52 -04:00
Richard Heck
f84eb64ac7 Try to fix bug 8124. We enable LFUN_INSET_MODIFY in InsetBox if it
is intended for us, i.e., if the first argument is "box". Maybe we
should also check to make sure that the rest of the arguments are
good, but we used just to return true no matter what the argument
was, so this is an improvement.

LFUN_INSET_MODIFY is really kind of a mess.
2012-05-02 17:30:52 -04:00
Vincent van Ravesteijn
c671703f05 Fix bug #953: Paint text decorations for spaces 2012-05-02 18:02:52 +02:00
Vincent van Ravesteijn
53b75399e7 Factor out painting of text decorations 2012-05-02 18:02:17 +02:00
Vincent van Ravesteijn
fa9bd04ea4 Fix bug #7914: Freeze on docbook export of lists and bibliography
The LATEX_LIST_ENVIRONMENT and LATEX_BIB_ENVIRONMENT type paragraphs are
not yet implemented in DocBook export. However, we need to actively skip
these paragraphs in order not to end up in an endless loop.
2012-05-02 15:34:56 +02:00
Vincent van Ravesteijn
26dcfcd343 Fix bug #8089: Handle spaces at the end of the stream
If the stream is good (i.e. there are still tokens) and we expect an
argument, we call getArg(). However, if there are only spaces, the stream
suddenly isn't good anymore after 'skipSpaces' and we would get an error
when calling 'getChar'. Therefore we have to check whether the stream is
still good.
2012-05-02 14:41:08 +02:00
Vincent van Ravesteijn
1ef930c058 MathParser: Do not rewind the stream if we can't read from it
If the stream is not good, we don't need to 'putback', because we didn't
read anything yet. If we now do rewind the stream, we are asking for
problems as in bug #8089.

This was introduced in [3cafb856\lyxgit] to fix bug #4318.
2012-05-02 14:40:14 +02:00
Richard Heck
e90cd4180e Constness, etc. 2012-05-01 13:02:10 -04:00
Richard Heck
d2acacedf9 We don't need to rescan everything from the BibTeX dialog, just
the bib and bst files.
2012-05-01 12:54:17 -04:00
Enrico Forestieri
9825621798 Fix bug #8140: Crash with math macros and input completion
When clicking away in the same math inset after hitting '\', the
cursor may be broken and all of its instances have to be fixed.
2012-04-30 23:55:34 +02:00
Vincent van Ravesteijn
3c0e3c16c8 Fix bug #8078: Assertions in xhtml output on Windows 2012-04-30 12:58:32 +02:00
Vincent van Ravesteijn
225bcf92df Indicate that this rtl variable is only valid on the last row
Otherwise the variable might be used incorrectly as in [0a137e31/lyxgit].
2012-04-29 22:49:30 +02:00
Vincent van Ravesteijn
d7f68078cf Fix bug #7518: Assert when selecting in RTL text
If we are in rtl text, we *need* to check whether the first character is a
space. We can't use the rtl variable for this because this is only
computed on the last row.

This bug was introduced in [0a137e31/lyxgit] to fix the computation for
freespacing paragraphs. We better can just check whether the paragraph is
freespacing or not.
2012-04-29 22:47:06 +02:00
Vincent van Ravesteijn
6327993867 Fix bug #7667: Pixmap cache and CT lead to random colors
The signature of the character in cache should take into account the
change tracking baseColor (author) and mergeColor (added/deleted). If not,
we will mixup different cached pixmaps.
2012-04-29 14:59:19 +02:00
Vincent van Ravesteijn
af4e31ec28 Reset the (running) change in PainterInfo
When an InsetText is deleted, all lines in the inset are painted as
deleted. This status should be restored afterwards. If not, insets will be
painted in the wrong color afterwards (e.g. tables).
2012-04-29 14:56:19 +02:00
Vincent van Ravesteijn
14ef7d2b82 Fix bug #7653: Quotation marks have wrong color
Quotation marks had the wrong color when using change tracking, or when
selecting.
2012-04-29 14:54:31 +02:00
Vincent van Ravesteijn
77c8c15947 Do not show deleted text in the html title 2012-04-29 14:54:12 +02:00
Vincent van Ravesteijn
3a395ca0f5 BufferView::dispatch(): add a missing break 2012-04-29 14:51:24 +02:00
Richard Heck
631abb2da0 Allow viewing full file of plaintext source. 2012-04-27 21:17:08 -04:00
Richard Heck
db71ec4477 Re-organize logic of getSourceCode() routine, so we can see XHTML
for DocBook files.
2012-04-27 21:14:25 -04:00
Enrico Forestieri
66a95b9c1b Fix bug #8139 and a thinko in [737e9b2c/lyxgit].
I had already noticed the above mentioned thinko and this commit
should have been part of [3285ce1d5/lygit] but somehow I managed
to lose it in the git branches game: do a branch for that, than
try a different thing in another branch, then rebase to avoid
merge conficts, and finally delete all unneeded branches. Well it
is too much easy to do the wrong thing and pick the wrong branch,
deleting the right one. I will never follow the git way anymore
and will do I was used to do with svn.
2012-04-26 15:23:42 +02:00
Pavel Sanda
217ef5bf39 Thesaurus keyword combo completion (bug #8138). 2012-04-25 16:40:51 +02:00
Pavel Sanda
8ea66efe16 Attempt to fix #8137 (arrived at r40862).
1) Revert to designer compilable by older Qt's
2) Remove spacer in right part of dialog
3) Decrease height.
2012-04-24 02:02:25 +02:00
Richard Heck
e56ee0b2e6 Don't output extra body tags with included files. 2012-04-23 13:55:13 -04:00
Pavel Sanda
728043e3da Comment from JMarc (devlist) 2012-04-22 12:32:41 +02:00
Richard Heck
94b9da328b Rename is_valid_ as validated_, which is a bit more informative. 2012-04-21 16:25:38 -04:00
Richard Heck
afee2488cb Optimize a bit the handling of local layout validation. This handles
empty cases better than what was before.

Patch from Scott Kostyshak.
2012-04-21 16:22:28 -04:00
Georg Baum
c1965123ed Fix bug #8104 (\date argument was eaten)
I introduced this bug in r40091 where support for empty dates was added.
I also noticed that the title_layout_found flag was not properly passed down
to all variants of parse_text*. Since this is rather a global variable I
placed it into the preamble class.

The test case of bug #8104 shows other problems as well, but those are no
regressions and will be fixed separately.

OK for branch?
2012-04-19 20:46:08 +02:00
Pavel Sanda
dce6c8875c Allow Insetlayout for Branch inset (#8106).
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg173659.html
2012-04-19 11:56:32 +02:00
Jean-Marc Lasgouttes
a117a51226 In replaceSelectionWithString, do not select the new string
This is a patch from Scott Kostyshak. The problem it solves is as follows:

1. enable continuous spell check.
2. type a misspelled word and press space so that it has a wavy red underline.
3. right-click and choose a suggested replacement word.
4. press the backspace button.

Result: nothing happens. If you press the backspace button again, then it works as normal.

The selection code was added for the benefit of the spellchecker, but the code has been rewritten since then.
2012-04-18 12:44:31 +02:00
Jean-Marc Lasgouttes
9059843121 Simpler fix for undo support when entering \hline in an equation
* Avoid undo step when using backspace in macro mode
 * Use recordUndoInset when entering macro mode (if one enters something like \hline, the outer inset itself will be modified)
 * Use recordUndoInset when pasting in an INsetMathGrid (same reason as above)
2012-04-17 22:21:45 +02:00
Jean-Marc Lasgouttes
201dcc8ec3 Revert "Fix undo of entering \hline"
This reverts commit 1fa39e1f95.
2012-04-17 22:21:45 +02:00
Richard Heck
88d9fc574e Use InsetLayout instead of hardcoding forcePlainLayout and
allowParagraphCustomization.
2012-04-17 09:43:29 -04:00
Richard Heck
33022ebb5a Use InsetLayout for LaTeX output. 2012-04-17 09:35:25 -04:00
Richard Heck
1c33d95adf Use InsetLayout to style the XHTML output.
Note that we have also changed the layout name to uppercase, but
this should be fine, since it was so far unused.
2012-04-17 09:16:34 -04:00
Richard Heck
ab873c14a5 Whitespace. 2012-04-17 09:14:53 -04:00
Georg Baum
27733452f7 Native support for \lstlistoflistings 2012-04-16 21:40:59 +02:00
Enrico Forestieri
ea31541848 Fix bugs #6871 and #8119.
Both bugs above were due to a missing screen update. This patch
updates the current view after dispatching a lyxserver command
and thus solves both.

The patch is quite strightforward and the only difficulty was due
to the fact that the lyxserver needs the result of the dispatched
command. Now, GuiApplication::dispatch(FuncRequest const &) does
right this, but does not return the result, while
GuiApplication::dispatch(FuncRequest const &, DispatchResult &)
is called by the former but does not return the result. So, I
split the first one, isolating the code performing the update,
such that the second one can also update the current view when
the caller is the lyx server. When the action is initiated by
anything different from the lyx server, the behavior is unchanged.
2012-04-13 02:57:25 +02:00
Enrico Forestieri
d07f9eec20 Fix bug #8105: Crash when deleting math macro from the inside
It seems that parameterless macros are not wrapped into a MathAtom.
Rather than touching the macro code (which is tantamount to opening
a can of worms, IMHO), I prefer this solution.
2012-04-12 16:28:29 +02:00
Enrico Forestieri
3285ce1d5c Use the right latex backend when a converter needs aux files.
If a converter specifies the needaux flag, latex (or xelatex) is
always run to produce the needed auxiliary files. This is wrong
because there are documents that can only be compiled with a specific
backend and thus the conversion may fail. On the other hand, even if
the document specifies the backend to be used, LyX ignores this info.

This commit rectifies this behavior by letting LyX run the same flavor
of the latex backend that shall be used for previewing the document
also for producing the auxiliary files.
2012-04-11 18:38:32 +02:00
Georg Baum
a2e8cb758b Translations for listings insets
The listings inset and include inset of type listings use two english terms
that are not localized yet: "Listing" for the caption and "Listings" for the
list of listings (not supported natively by LyX yet). The existing layout
translation mechanism has been extended to translate these terms as well:

1) Support [[stuff]] context in lib/layouttranslations
2) Support BabelPreamble and LangPreamble in InsetLayout
3) Use a InsetLayout for InsetInclude of type listings
4) Define BabelPreamble and LangPreamble in the layouts for InsetInclude
   and InsetListings
2012-04-10 20:21:01 +02:00
Vincent van Ravesteijn
f0754582b8 Fix bug #8114: LyX does not retrieve negative bbox parameters
LyX fails to read the bounding box from an EPS file if it has
negative values. Adjusting the regex will overcome this problem.
Negative values do not pose big problems later on, but the GUI
doesn't handle it correctly yet (see bug #5718).
2012-04-08 23:20:01 +02:00
Vincent van Ravesteijn
91bc04946f Fix a copy-paste error introduced in b754fb02 2012-04-08 21:47:40 +02:00
Georg Baum
1fa39e1f95 Fix undo of entering \hline
It was broken with 6d75800f5d as noticed by Enrico. The fix is to use undo
groups (thanks Jean-Marc).
2012-04-08 19:15:49 +02:00
Richard Heck
7c5f28ad26 The logic of the endParagraph() routine is wrong. We should first
check if the parsep_tag is pending.
2012-04-08 10:05:44 -04:00
Richard Heck
8dd436b7dc We need to check, in closeFontTags(), for the case where we haven't
had any content.
2012-04-08 10:05:44 -04:00
Richard Heck
29cf7af6d3 The isTagOpen() routine can be const. 2012-04-08 10:05:44 -04:00
Richard Heck
313c9e0e5a Debugging code for the tag stack, disabled by default. 2012-04-08 10:05:43 -04:00
Richard Heck
d78560832a Fix error output for XHTML a bit. 2012-04-03 18:13:59 -04:00
Richard Heck
7b6b4c4598 Make index comparisons for XHTML output case insensitive. 2012-04-03 17:54:50 -04:00
Richard Heck
5db793ff30 Merge branch 'master' of git.lyx.org:lyx 2012-04-03 15:54:54 -04:00
Richard Heck
33f34e8ffb Clear local layout before reading BufferParams. Otherwise, you can't
delete the local layout.
2012-04-03 15:53:56 -04:00
Richard Heck
ec5735b144 Fix bug #8107. Just an oversight: We need to invalidate the file
cache, not just the BibInfo cache, when we create a new BibTeX
inset.
2012-04-01 18:22:37 -04:00
Georg Baum
d88f7727e9 Fix tex2lyx table output.
It is broken since the latest file format update (neither did Uwe run a test
after updating the file format, nor did I after undoing my accidental change).
The reason it was broken: the bool version of write_attribute() is chosen
for "0" instead of the string version, so each table used rotate="true".
2012-03-25 18:46:00 +02:00
Georg Baum
1a6c599917 Extend the notermination flag to math as well.
Math commands need it as well as text commands. At the same time, this
further unifies the checking for termination and fixes cases of wrong
output (e.g. for 0x2005).
2012-03-25 15:57:38 +02:00
Georg Baum
e63f561c42 Revert unwanted change.
I have no idea how this was created. I hadf changed this file, but reverted
it with git chekout before committing.
2012-03-25 11:25:14 +02:00
Georg Baum
6d75800f5d Fix bug #6936.
If \hline is entered, do not create an unknown inset, but increase the number
of hlines of the current row if that is allowed. The same idea is applied to
copy-paste (not part of the bug report).
This is also a test for committing via git.
2012-03-25 11:16:32 +02:00
Vincent van Ravesteijn
7fbf23d916 Fix monolithic build (bug #8079) 2012-03-24 15:25:30 +01:00
Vincent van Ravesteijn
e409eedc5b Fix more possible crashes due to asInsetRef()
InsetMathHull has no method asInsetRef() and returns therefore 0.

See also 447e0d03.
2012-03-23 23:01:35 +01:00
Richard Heck
447e0d0308 Fix bug #8095.
The crash was due to the otherwise innocent looking 07924ac300. The cast
Vincent replaced was already wrong---it seems to have been a thinko in
7bbd67eb2679---but it worked kind of by accident before. Now it crashes.
2012-03-23 14:37:48 -04:00
Lars Gullik Bjønnes
c7bb190fd3 Setup .gitignore for generated files
Setting up .gitignore or .git/info/excludes is something that should
be done. Not doing it makes it a lot harder to see actual new files
that should be added.

Signed-off-by: Lars Gullik Bjønnes <larsbj@gullik.org>
2012-03-22 02:16:12 +01:00
Uwe Stöhr
138b615a3b again some things which cherry pick did not catch, sorry 2012-03-22 00:02:36 +01:00
Uwe Stöhr
ea54461d85 full support for table rotations; fileformat change 2012-03-21 23:04:45 +01:00
Uwe Stöhr
304655a759 step 1 2012-03-21 22:54:03 +01:00
Uwe Stöhr
e900dc9f73 GuiTabular.cpp: fix bug #8092 2012-03-20 01:40:07 +01:00
Uwe Stöhr
0332e90ed1 - lyx2lyx/lyx_2_1.py: remove wrong info (was a copy/paste mistake)
- GuiTabular.cpp: fix a comment
2012-03-20 01:26:55 +01:00
Richard Heck
9236a93894 Fix bug #7975 following suggestions made by JMarc there. 2012-03-19 18:00:25 -04:00
Uwe Stöhr
bdda095669 InsetTabular.cpp: code optimization; there is no need for a conversion 2012-03-19 01:28:38 +01:00
Vincent van Ravesteijn
96e854ab76 Fix bug #8083: Fix the selection of cells below multirows
Multirows were introduced in 8bb69f24 (Uwe Stoehr, 11 Feb 2010). In the
computation of the nearest cell, it was forgotten to account for the
vertical offset. tabular.cellHeight is the full height of the cell, while
the point that comes from the coordCache is offsetted by VOffset.
Therefore, we have to subtract the VOffset from o.y_.
2012-03-18 00:05:15 +01:00
Vincent van Ravesteijn
1d5204315e Clear the error list from previous errors
We only copied the error list to the cloned buffer when makeLatexfile
failed. This means that a second try will never clear the error list and
the user will be presented the same list again.

Therefore, we unconditionally copy the error list such that we also clear
the list on success.
2012-03-17 19:00:25 +01:00
Vincent van Ravesteijn
ea506d6a67 Replace #warning by something that is understood by MSVC
MSVC gives a warning when using #warning. However, it does
not show the actual warning.
2012-03-16 12:26:54 +01:00
Vincent van Ravesteijn
234ba2c419 Revert commenting the file format warnings
These warnings have been (accidentally) commented out in
42aeab2a (uwestoehr; support for table cell rotations;
16-03-2012). In the next commit the warning will be replaced
by a form which is also understood by MSVC.
2012-03-16 12:25:16 +01:00
Uwe Stöhr
7a46910f04 support for table cell rotations; fileformat change 2012-03-16 02:29:37 +01:00
Juergen Spitzmueller
1e0f2426ce Fix bug #8069: View/Update other formats button disabled with non-TeX fonts 2012-03-15 12:55:40 +01:00
Uwe Stöhr
11adfbf64d GuiTabular.cpp: fix bug #8084 2012-03-15 02:37:20 +01:00
Uwe Stöhr
8e72135a3f tex2lyx/text.cpp: code improvement as proposed by Georg 2012-03-15 02:10:13 +01:00
Richard Heck
0a0a837b70 Address bug 7975 by changing how toggling works, as suggested by
JMarc.
2012-03-13 12:08:25 -04:00
Richard Heck
f0255dae80 Style. 2012-03-13 12:07:48 -04:00
Stephan Witt
8be18455fd #7855 subversion 1.7.x support: use svn info to check if a file is under version control; this works for 1.6.x too; to avoid excessive forks of child processes check for the existence of a .svn directory in current dir and parent directories
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40911 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-11 11:12:12 +00:00
Vincent van Ravesteijn
281799d342 Fix typo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40910 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-10 21:45:01 +00:00
Vincent van Ravesteijn
1d721b6ea7 Fix typo and whitespace
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40909 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-10 21:20:25 +00:00
Richard Heck
354d9700f6 Accidentally removed this code at last commit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40908 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-10 16:49:20 +00:00
Jürgen Spitzmüller
2cf5de28a9 Add "notermination" flag to unicodesymbols. This tells us not to try any termination of the command (such as '{}' or ' ' ).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40905 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-10 13:34:42 +00:00
Georg Baum
4f6579e9d3 Update tex2lyx to file format 427. InsetIPA is not yet supported, but the
produced output is valid format 427.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40903 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-10 11:53:47 +00:00
Richard Heck
fa0c2d9631 Show backends rather than formats in the View>Source combo box.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40900 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-09 22:24:20 +00:00
Richard Heck
02f28635d3 Change the backends() routine so it only gives us backends that
are appropriate for the current document.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40899 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-09 22:24:17 +00:00
Jürgen Spitzmüller
43e1119a28 Clarify widget description (I had to consult the sources to find out what this does).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40896 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-09 12:31:16 +00:00
Jürgen Spitzmüller
38c29e4fa3 Consider specifics for TIPAs T3 font encoding and allow insertion of straight quote (stress shortcut) to IPA inset.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40893 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-09 11:14:39 +00:00
Jürgen Spitzmüller
84971fb27e * implement possibility to use IPA shortcut notation (the actual shortcuts will follow)
* do not terminate macros by {} if not necessary (prevent kerning violation)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40891 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-09 09:05:13 +00:00
Julien Rioux
d09f87c3ca Don't show citation engines in the list of modules. They are found under the bibliography settings.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40888 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-08 16:43:05 +00:00
Julien Rioux
1a6e951b4f Display the module category in the list of modules.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40887 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-08 16:43:04 +00:00
Julien Rioux
488b9ae3a2 Whitespace only.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40886 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-08 16:43:02 +00:00
Tommaso Cucinotta
9e57044ff1 More useful message (tells the user that ESC cancels the long operation in progress).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40878 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-06 23:26:19 +00:00
Tommaso Cucinotta
c324d6eae6 Now ESC cancels long Advanced Find and Replace operations.
(see #7217 and #7965 for related issues and discussion)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40877 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-06 23:21:12 +00:00
Jürgen Spitzmüller
8d55d452ff InsetIPA: fixes with non-tex-fonts.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40874 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-06 10:39:01 +00:00
Kornel Benko
8c29d00e11 Handling of libmagic for some mime-types leads to incorrect value 'text/plain'.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40873 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-06 09:41:41 +00:00
Jürgen Spitzmüller
d550bb116a Allow superscript (but not subscript) in IPA inset.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40869 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-06 09:14:24 +00: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
Uwe Stöhr
408728aed9 tex2lyx: support for inline listings (fixes last part of #8066)
OK also for branch?

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40860 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-05 22:04:22 +00:00
Uwe Stöhr
1a5891e1fd tex2lyx/text.cpp: don't parse catBegin in verbatim environments
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40859 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-05 21:04:21 +00:00
Uwe Stöhr
9c5a8b3224 tex2lyx/text.cpp: clarify a comment and add a question
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40857 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-05 01:51:19 +00:00
Uwe Stöhr
80d0710422 - text.cpp: full tex2lyx support for lstlisting (support for \lstinline will follow soon)
- test/test-insets.tex: add a more advanced examples

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40856 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-05 01:45:14 +00:00
Uwe Stöhr
b2a03f4e67 tex2lyx/text.cpp: whitespace fixes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40853 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-04 14:18:33 +00:00
Uwe Stöhr
06d9238f30 test/test-insets.tex: add examples for listings
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40852 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-04 14:06:13 +00:00
Uwe Stöhr
df95041141 - text.cpp: - fix tex2lyx parsing of verbatim environments
- Parser.cpp: - new function to parse verbatim environments
- test/test-structure.tex: updated example

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40850 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-04 13:27:53 +00:00
Vincent van Ravesteijn
1991488377 Fix handling of the add branch textfield in GuiBranches
- Enter in the textfield adds the branch,
- Make sure the dialog is not closed when pressing enter, 
- Pressing Ctrl+Enter or the Enter on the numpad closes the dialog.

Patch based on a patch from Scott Kostyshak.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40839 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-03 14:39:32 +00:00
Vincent van Ravesteijn
803e7a9cfa GuiCitation: Do not allow to add entries by pressing Enter when the Add button is disabled.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40835 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-03 12:39:19 +00:00
Jürgen Spitzmüller
a7caeda683 Implement access to hunspell's stemming function and let the Thesaurus use that (part of bug #8060).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40830 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-02 10:20:09 +00:00
Jürgen Spitzmüller
44ed83dd86 Work around qt bug that prevents the glyph LATIN CAPITAL LETTER SHARP S from being pasted (bug #8057).
Candidate for branch.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40829 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-02 09:06:09 +00:00
Enrico Forestieri
ae2adc9559 Since version 1.9 SumatraPDF supports forward search without DDE commands.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40828 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-02 02:35:30 +00:00
Georg Baum
c2748157bb Fix parsing of \sindex{stuff} and \sindex[]{stuff}
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40826 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-01 20:37:34 +00:00
Julien Rioux
1e947e3a18 Move the citation engine machinery to layouts.
Add a new layout syntax CiteEngine to define the citation commands
available for a given citation engine.

Also extend the CiteFormat syntax to allow more customization. This
mechanism, previously used to produce bibliography entries in the
citation GUI based on the BibTeX entrytype, is now also used to
produce the textual labels for citation insets in the buffer view.

Thus citation styles are almost completely customizable by modules.
Modules for the basic, jurabib and natbib engines are implemented.

Layout format incremented to 37.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40820 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-01 00:41:30 +00:00
Uwe Stöhr
0d165bf5d6 tex2lyx/text.cpp: a fix and a clarification
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40813 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-29 22:39:21 +00:00
Georg Baum
190ab4774d Import \sindex correctly
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40804 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-28 20:34:50 +00:00
Kornel Benko
3929a71cd0 Avoid crash in call to magic_file() if the checked file does not exist
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40803 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-28 15:21:46 +00:00
Uwe Stöhr
8bca3e510f - text.cpp: escape backslashes in verbatim, fix a thinko
- test-structure.tex: add verbatim testcase

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40798 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-27 00:55:57 +00:00
Pavel Sanda
c73d9adeb7 Simplify & fix InsetGraphics tooltip, DocFileName inherits from FileName.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40797 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-26 23:09:25 +00:00
Pavel Sanda
f27d015fa4 Add tooltip for graphics insets
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40796 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-25 23:05:28 +00:00
Pavel Sanda
78508399bc Greetings to Lars from Scott Kostyshak, cf r40585.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40792 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-22 12:11:21 +00:00
Kornel Benko
f5daafc02b Added libmagic to cmake build. Should to be also adapted to windows
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40791 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-22 10:07:04 +00:00
Georg Baum
de6e4a2937 Make guessFormatFromContents() a bit more private, since it is not supposed
to be used in new code.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40790 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-21 20:46:37 +00:00
Georg Baum
26e5f1a8ec Use libmagic for file format detection if available.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40789 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-21 20:29:44 +00:00
Pavel Sanda
15e42e93ee Fix #7787
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40786 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-21 13:54:55 +00:00
Uwe Stöhr
05446b232f support for verbatim: step 2: tex2lyx support
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40785 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-20 23:38:13 +00:00
Uwe Stöhr
6869d5205f support for verbatim: step 1: the layout and the lyx2lyx code,;fileformat change (next step is the beamer issue and last step tex2lyx support)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40784 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-20 02:10:33 +00:00
Enrico Forestieri
3018614da1 On *nix, a proper forward definition of docstring is necessary for
overriding a pure virtual method (part of bug #8032).
I wonder why it was working on Windows and why it works for QString.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40783 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-19 21:44:47 +00:00
Enrico Forestieri
1eb41a88f2 Fix bug #8032 (timeout when using the Sweave module)
After the timeout elapses, the user is notified that a command is taking
a long time to complete and is given the choice to stop it. If the user
decides to let the command run, the timeout is increased, otherwise the
command is killed. One is prompted a first time after 3 mins, a second
time after 9 mins, a third time after 27 mins, and so on, i.e., the n-th
prompt occurs after 3^n minutes.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40775 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-18 14:16:25 +00:00
Enrico Forestieri
dd2185a4a6 Call lyxpak.py using the original (not mangled) document file name.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40773 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-18 13:49:33 +00:00
Jean-Marc Lasgouttes
586e0e6b8a Set use_non_tex_fonts buffer parameter and default encoding correctly when we detect that xetex or luatex is used.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40765 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-16 10:40:02 +00:00
Georg Baum
481acc66e7 Forgot that in r40694: There is no {} needed after \nobreakdash-
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40758 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-15 20:56:40 +00:00
Georg Baum
9fe72c3501 Move readBB_from_PSFile() out of support (no code change),
since it soon will need to use the Formats class.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40757 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-15 20:50:52 +00:00
Jean-Marc Lasgouttes
5d3461b10f Sort out usage of INset::has Settings and Inset::clickable
* now hasSettings only means... that the inset has a settings dialog
 * and clickable means that something should happen with left-clicking on the inset

Some inset behaviours are changed:
 * (V)Space insets are not clickable anymore (the settings dialog is still accessible via context menu and Edit menu)
 * TOC inset is now shown as active
 * FloatList inset is shown as active and clicking on it opens the relevant part of the TOC dialog

This could be a candidate for branch (2.0.4)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40755 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-15 09:42:13 +00:00
Jean-Marc Lasgouttes
ec3aed75ad Fix bug #6367: Screen jumps around when using undo/redo
http://www.lyx.org/trac/ticket/6367

* Undo.cpp: 
 - rename cur member of UndoElement to cur_before
 - add new member cur_after, which is set by Undo::endUndoGroup
 - create a new Undo::endUndoGroup variant that takes a Cursor as parameter. We cannot get rid of the old one because it is used for LFUN_COMMAND_SEQUENCE.
* Cursor.cpp: 
 - use endUndoGroup(Dociterator const &) for dispatch
 - update Cursor::endUndoGroup to pass cursor.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40713 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-07 14:56:16 +00:00
Richard Heck
2627eb26e5 Convert InsetMathCancel.* to UTF-8.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40712 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-06 22:38:46 +00:00
Richard Heck
23832ce191 HTML output for InsetMathCancel.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40711 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-06 22:38:41 +00:00
Uwe Stöhr
cf4e6ddad9 InsetMathCancel: add MathML output
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40710 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-06 17:35:29 +00:00
Jean-Marc Lasgouttes
98cd6c60f7 * InsetMathScript::doDispatch : properly record undo information before
changing limits status (fixes bug #8007)
* InsetMathScript::getStatus (new) : handle properly status for LFUN_MATH_LIMITS here, along with checkmark support for the menu)



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40700 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-02 13:39:05 +00:00
Lars Gullik Bjønnes
e770e95861 Fixup multi-line comment to use block-comment
The small ascii art in InsetMathCancel::draw has line continuation characters at
eol, this make consecutive lines be andled as one. The use of a block comment
instead of single line comments makes this less of a "problem." Also it removes
a warning with gcc 4.7.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40699 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-02 00:25:13 +00:00
Georg Baum
f483fb8e9d Fix bug #7998 and related issues:
- 0x200c is equivalent to \textcompwordmark
- 0x2011 is equivalent to \nobreakdash-
- 0x2009 is a breakable thin space (the old definition was non-breakable) 
- 0x202f is a non-breakable thin space
- add spaces 0x2007, 0x2008, 0x200a and 0x200b


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40694 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-31 20:49:49 +00:00
Jürgen Spitzmüller
72f56d7309 Fix bug #8013: updateDefaultFormat() checks the osFontsCB state, so the fonts UI needs to be set in advance of the output UI.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40689 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-31 11:30:52 +00:00
Julien Rioux
b6eb780d64 Small fixups to r40663
lyx2lyx: Clean up the convert/revert queue.
LaTeXFeatures: Just add cancel to the list of packages that are
               simply used with a \usepackage{} line.

Uwe: In case cancel needs to be loaded after amsmath or something,
     please revert my changes to LaTeXFeatures and add a comment
     about package ordering to the source. Thanks.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40667 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-23 17:20:07 +00:00
Uwe Stöhr
11da53414e version.h: fix typos
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40666 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-23 02:00:36 +00:00
Uwe Stöhr
65f26a7a14 add support for the package cancel in math (fixes #6819); fileformat change only for the preamble handling
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40663 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-23 01:49:49 +00:00
Vincent van Ravesteijn
67ed71619e Whitespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40660 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-22 22:20:50 +00:00
Vincent van Ravesteijn
adb70a1fe0 Reuse the same code for the append* and copy* functions
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40659 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-22 22:16:03 +00:00
Vincent van Ravesteijn
2206f1a655 Unify the parameters of the [append/copy][row/column] family
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40658 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-22 22:15:25 +00:00
Vincent van Ravesteijn
965d21bbab Unify the parameters of the [append/copy][row/column] family
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40657 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-22 22:15:11 +00:00
Vincent van Ravesteijn
13dea3bb4f Fix bug #7644: Crash when copying table column or row
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40656 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-22 21:44:27 +00:00
Georg Baum
5e47fc73d5 Enable the graphics converter to copy with identical in and out file names.
This is already supported in Converters::convert() and needed e.g. for
eps2->eps conversion.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40649 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-22 14:08:53 +00:00
Georg Baum
29627f1680 Fix converters with input redirection, such as the second htlatex one.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40647 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-22 12:35:07 +00:00
Jürgen Spitzmüller
b965edbb02 Fix crash when putting a float around multiple display maths (bug #7974).
This also fixes other float-related bugs, such as this:

* select two floats in two consecutive paragraphs and insert a new float around them
=> the master float's caption is put into the lower subfloat instead of below the subfloats.

In the long term, doInsertInset needs a thorough cleanup.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40639 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-21 07:02:09 +00:00
Jürgen Spitzmüller
af8cec47e9 Fix crash due to the attempt to access paragraph() from within mathed while doing forward-search (bug #7992).
This should go to branch as well.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40636 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-20 10:44:07 +00:00
Jürgen Spitzmüller
163bc119e6 Do not load font packages with encoding "utf8-plain" (bug #7766, #7782).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40633 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-20 06:07:12 +00:00
Richard Heck
49b838a320 If we don't have a tooltip in the TOC, then use the display string
as the tooltip. This isn't redundant, since the TOC itself might
truncate the display string.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40626 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-16 15:07:04 +00:00
Richard Heck
12b16d1ae9 Fix bug #7774. It should be fine to show the complete index entry
in the TOC, as these generally aren't that long.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40625 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-16 15:01:02 +00:00
Richard Heck
9af32c1740 Change minimum value in forToc().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40624 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-16 14:48:35 +00:00
Richard Heck
07c49ed324 Fix bug #7983: Do not modify params before we know we have
something valid!

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40615 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-15 16:43:03 +00:00
Enrico Forestieri
07b2898afe After r40612, the check for isFullUnicode is redundant. So, partially
revert r40607 and accordingly adapt the code.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40613 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-14 14:27:55 +00:00
Enrico Forestieri
76c376c427 Avoid \inputencoding altogether if the buffer encoding permits
(part of bug #7800).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40612 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-14 01:21:00 +00:00
Richard Heck
4026c0dccd If we switch via the mouse, we need to update the Buffer
after we switch.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40610 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-13 03:31:48 +00:00
Richard Heck
9283cbdbcb Fix crash reported on list when renaming a child buffer and
then trying to compile.

    There are really two problems here. One is that the renamed
    buffer needs to be reloaded. All kinds of files, etc, may not
    exist any more, if we've been saved to a new directory; our
    children e.g. may not be in the right place. And, in this case,
    we may no longer be a child of our old parent. Reloading will
    fix all of that.

    On reload, though, we need to clear our parent, since we may
    not have one any more. It will get reset if need be.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40609 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-13 03:31:01 +00:00
Richard Heck
28d7db3b9f Squash warning.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40608 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-13 03:16:46 +00:00
Enrico Forestieri
08ba2b9b45 Refine fix for bug #7800. Don't use \inputencoding with unicode backends.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40607 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-13 00:52:03 +00:00
Georg Baum
a6f843aacb get rid of dead code and silly function
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40605 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-12 19:48:08 +00:00
Stephan Witt
42dfd71197 #7789 unify and fix buffer statistics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40602 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-12 07:03:24 +00:00
Stephan Witt
576e8d0497 #7978 validate stored doc iterators for start position and selection range to avoid crashes in case the user does the spell check and unrelated changes in parallel
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40601 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-12 06:12:28 +00:00
Richard Heck
6f3dd321f3 Be a bit more careful here. In weird cases, this can be null.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40600 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-12 02:09:08 +00:00
Stephan Witt
20f61c7eb7 #7884 improved return code of EnchantChecker::check() when dictionaries are missing
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40598 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-11 17:03:49 +00:00
Julien Rioux
a99960cc04 Update tex2lyx to format 424.
The type of citation engine is determined by the citation package
being used and, in the case of natbib, its options.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40593 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-09 13:16:41 +00:00
Julien Rioux
e3f65fd088 Buffer param \cite_engine_type (authoryear|numerical).
To avoid duplicity, remove natbib_authoryear and natbib_numerical
and replace them by natbib, and keep track of the engine `type'
in the new \cite_engine_type document setting. This will make it
easier to add more citation engines.

LyX format incremented to 424.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40592 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-09 13:16:38 +00:00
Georg Baum
db9e633b7f Fix bug #5906 (missing -p command) by updating the man page.
tex2lyx does not need a -p command since it detects partial files automatically.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40591 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-08 17:38:48 +00:00
Georg Baum
45c831306d Fix bug #7013: Wrong paper size passed to dvips
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40590 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-08 17:00:33 +00:00
Georg Baum
187790135b Fix bug #5029: Support \smash, \mathclap, \mathllap and \mathrlap.
Also improve lyx2lyx roundtrip for automatically loaded packages.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40589 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-08 12:34:12 +00:00
Georg Baum
3dba00246c Quick fix bug #4267.
A real fix would be to ditch the home made file format detection and use libmagic.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40587 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-07 19:18:38 +00:00
Lars Gullik Bjønnes
d2f2148c90 Avoid narrowing in array initializator
Gcc 4.7 warns that this kind of narrowing is illegal in C++11, so
we can just as well fix that right now.

In GuiFontMetrics this is fixed by chaning the types in the AscendDescend struct
from short int to int.
In ParagraphMetrics it is fixed by addint explicit casts.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40586 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-07 18:29:07 +00:00
Lars Gullik Bjønnes
dfffb9a6d1 Change to avoid having different types in ?: operator
Gcc 4.7 warns rightly about the questionalble practise of having different types in
the ?: operator. This patch fixes that.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40585 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-07 18:29:04 +00:00
Tommaso Cucinotta
b4aadacc23 This makes the FindAndReplace replace-related buttons de-activate
also when switching from an editable buffer to a read-only buffer,
without waiting for the moment in which the dialog is focused.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40582 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-07 11:41:04 +00:00
Georg Baum
6332326cf6 Load mathtools.sty automatically (bug #7949) and make lyx2lyx reversion
more robust.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40574 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-05 20:53:48 +00:00
Stephan Witt
5a80aa6fcf #7884 add check for missing dictionaries when spell check starts... forgot to implement numDictionaries for Enchant in r40568
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40572 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-05 13:19:04 +00:00
Stephan Witt
c91e2c59f4 #7884 add check for missing dictionaries when spell check starts and popup a message box to tell the user this problem if there are no dictionaries; add /usr/share/myspell for hunspell dictionary lookup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40568 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-04 22:02:07 +00:00
Georg Baum
bf3f3f9816 Second step towards a more generic package off/auto/on handling:
File format change


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40563 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-03 21:26:09 +00:00
Georg Baum
6be6d9a947 First step towards a more generic package off/auto/on handling:
Internal machinery, no file format change and no UI change yet


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40562 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-03 20:51:07 +00:00
Pavel Sanda
9154bc99e3 Fix #7963, fullscreen corner case for tabbar visibility.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40560 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-03 14:21:48 +00:00
Stephan Witt
97d48fbd6a #6760 add UI to configure the minimal length of a word to be added to the list of words for text completion - using richards patch and rework it to match current trunk
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40557 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-02 22:47:04 +00:00
Stephan Witt
3a1c5d4431 #5585 disable spell checker dialog for empty documents
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40552 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-31 16:29:27 +00:00
Stephan Witt
70d4c1d774 #7969 verify cursor position when spell check is done
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40550 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-31 11:33:46 +00:00
Tommaso Cucinotta
6f0cc0cecd Moving the GUI consistency update to a more meaningful moment, i.e., when Dialog::updateView() is called.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40549 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-30 21:26:51 +00:00
Tommaso Cucinotta
7422c56d67 Fixing consistency of replace actions in GUI with readonly status of target document buffer
(i.e., it was possible to replace in readonly buffers!)
See also http://comments.gmane.org/gmane.editors.lyx.devel/140074


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40548 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-30 15:31:56 +00:00
Stephan Witt
26d7886cef #7952 add a check for current buffer to detect buffer switches while in spell checker process
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40546 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-24 12:47:46 +00:00
Jürgen Spitzmüller
d7266ac919 In recent biber version, the log message that tells us which bib files are used has been changed. Adapt the parser, so that bib files are tracked again.
This should go to BRANCH as well

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40542 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-23 09:24:31 +00:00
Tommaso Cucinotta
c3f3ead287 Fixing #7410 (weird stale selection leads to assertion after replace all).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40528 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-20 00:02:51 +00:00
Georg Baum
0da8a39a3b Ensure that head/foot cannot be unset as long is the row is a caption
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40527 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-19 21:28:11 +00:00
Georg Baum
efa0f19836 More sensible longtable caption handling (needed for bug #7412)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40522 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-18 21:27:17 +00:00
Georg Baum
b7fbcd0b30 Partial support for mathtools.sty (part of bug #7949)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40521 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-18 17:50:43 +00:00
Peter Kümmel
56cbb9eb11 cleanup before unsubscribing
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40517 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-18 12:03:42 +00:00
Abdelrazak Younes
7f14df4af4 increment lyxrc version following r40515.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40516 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-18 11:51:26 +00:00
Abdelrazak Younes
c5c0c22f6b Introduce new RC option for QImage backend instead of macro. This can later be changed at runtime though a command line option or by auto detecting the X11 remote status.
This option is set to true by default as this is the most widespread use case.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40515 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-17 21:53:46 +00:00
Enrico Forestieri
38f1106255 Fix bug #7941 (Translation of theorem-like environment names fails if language and buffer encoding differ)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40513 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-17 18:22:24 +00:00
Jean-Marc Lasgouttes
84c603255d further fix to #7909
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40505 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-16 14:36:31 +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
Pavel Sanda
278498f81b Experimental search for highest upper bound of inset-forall reported by user.
Fixes #7945.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40501 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-15 16:39:35 +00:00
Julien Rioux
e6051e1559 Update tex2lyx to format 420. Determine the default style
from the citation package being used or from a \bibliographystyle
command in the preamble, if any>

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40499 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-14 01:11:18 +00:00
Julien Rioux
9a101c7bef Remove extra whitespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40498 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-14 01:08:54 +00:00
Julien Rioux
3c41715774 Remove extra whitespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40497 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-14 00:20:41 +00:00
Georg Baum
67af5a5388 make it thread safe
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40493 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-13 19:56:00 +00:00
Georg Baum
9b8773826c do not hardcode packages loaded by external insets
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40491 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-13 19:40:05 +00:00
Richard Heck
d2e8a5b8eb Fix issue noted by Julien: With new files especially, we will find
the name we are trying to write in the BufferList, since the file
gets a name when it is created.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40489 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-13 19:18:09 +00:00
Julien Rioux
1cdd5fcb6f Initialize biblioChanged_ when we update the document settings dialog.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40488 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-13 12:50:16 +00:00
Julien Rioux
35fa802830 Move some code to applyView().
Previous commit did not distinguish whether the changes were applied or cancelled.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40487 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-12 16:38:04 +00:00
Julien Rioux
59e0cb8f85 Remove the .aux and .bbl files and update the citation labels
iff bibliography settings are changed in the document settings.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40486 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-12 16:04:00 +00:00
Julien Rioux
667ecbdd1d User frontend for the new document-wide bibliography style feature.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40485 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-12 14:45:30 +00:00
Julien Rioux
0f30a858f8 Add a document-wide default bibliography style \biblio_style.
This holds the name of a BibTeX style file for now. Any BibTeX inset
can set the style to "default" to use the document-wide style.

LyX format incremented to 420.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40484 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-12 14:40:34 +00:00
Uwe Stöhr
6682ae0d90 tex2lyx/text.cpp: remove development residue
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40481 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-11 23:20:23 +00:00
Uwe Stöhr
2cc4d6ae25 tex2lyx/text.cpp: add a missing ',' and use LyX's method to remove the file extension (thanks Georg)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40480 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-11 23:17:02 +00:00
Richard Heck
264cc1139c The View->Source pane resets the format every time you click into
a new paragraph, which is very annoying. This commit fixes this bug.

If anyone has a better idea, please let me know. I posted to devel
about it but got no response.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40456 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-09 19:48:50 +00:00
Richard Heck
2d8d85f47e Fix bug #7256. Reduce space around inset buttons by a pixel on each side.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40454 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-09 15:36:53 +00:00
Uwe Stöhr
fe8c185a6e support for Australian and Newzealand as document language; fileformat change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40452 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-08 23:58:30 +00:00
Richard Heck
8a226ec47a Comment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40449 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-08 23:07:40 +00:00
Georg Baum
bb0432d74a Beautify output of \usepckage statements (each statement is on its own line
now) and move more packages to the new exclude mechanism.
The remaining ones are not so easy.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40442 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-08 20:05:51 +00:00
Uwe Stöhr
b947a8eea1 tex2lyx/text.cpp: a method to fix #7897
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40431 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-07 22:48:44 +00:00
Richard Heck
cad2ffea44 Update tex2lyx to format 418. Nothing really to do other than write
what we expect to see.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40430 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-07 22:46:15 +00:00
Richard Heck
5d2d5e8ad5 Revert unintentional commit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40429 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-07 22:44:21 +00:00
Richard Heck
8ba08a53b2 Update all layouts to format 36.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40428 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-07 22:41:38 +00:00
Richard Heck
5a7672adec Fix bug #5805 and similar requests. Adds a document setting that
tells LyX not to show BLOCK text as justified, but still keeps
the usual paragraph indentation.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40427 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-07 22:33:25 +00:00
Uwe Stöhr
75cbb27e5c tex2lyx Preamble.cpp, text.cpp: fix #7845 also for spreadsheet template
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40424 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-07 21:21:22 +00:00
Richard Heck
fa19ec6ff9 Fix bug #6293 as suggested there: We change the title of the PDF
options pane if hyperref is already provided.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40422 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-07 21:14:41 +00:00
Richard Heck
4c1f1357c1 Fix bug #7921. We should not allow the user to save a file thereby
over-writing a file that is already open. So we issue a warning and
ask if they'd like to try a different name.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40420 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-07 20:35:29 +00:00
Pavel Sanda
2b36e0a860 - Add scalable icon into tarball
- let icons install into proper locations
- use theme routines to load proper icon
  (using this for loading toolbar icons would be another
  step how to synchronize LyX with its environment.)

Patch from Timo Kluck.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40418 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-07 16:47:43 +00:00
Peter Kümmel
f41057cae6 clang: std::string is used here, fwd is not enough
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40417 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-07 16:03:37 +00:00
Richard Heck
157319b3f6 New layout tags specifically for CSS information.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40411 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-06 22:38:46 +00:00
Richard Heck
b0601b540e UI for writing CSS to file.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40410 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-06 22:17:26 +00:00
Richard Heck
c3f0e21968 Activate ability to write CSS to a separate file. There is no UI
for this yet, however.

Includes elements of a patch by Rob Oakes.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40409 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-06 22:17:22 +00:00
Richard Heck
986222a754 Collect CSS information in a string before writing it to the header.
This will make it easier to write it to a separate file.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40408 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-06 22:17:18 +00:00
Richard Heck
38b9a4530e New methods in LaTeXFeatures specifically for collection of CSS
information on XHTML output.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40407 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-06 22:17:13 +00:00
Richard Heck
e7877f6fee Math output flavor was not set when viewing source code.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40406 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-06 22:17:06 +00:00
Peter Kümmel
c2ff9de084 timeout_min is platform independent
#7928

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40402 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-06 20:52:19 +00:00
Richard Heck
62dd071ce6 Improve output of XHTML comments.
(i)  Validate even for comments when outputting XHTML.
(ii) Output comments as divs hidden by default. Then people
     can display them other ways if they wish.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40400 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-06 20:44:37 +00:00
Pavel Sanda
4d541f8430 Don't hardcode /tmp in lyxclient, bug #7917.
Patch from Benjamin Piwowarski.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40380 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-05 19:09:24 +00:00
Vincent van Ravesteijn
7d98d770b1 Cleanup r40377
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40379 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-05 13:41:15 +00:00
Julien Rioux
467c955507 This is not limited to BibTeX. Missing citation keys can also happen for standard bibitem.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40378 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-05 13:17:55 +00:00
Vincent van Ravesteijn
a35e512e90 Fix bug #7916: Undo warning message when inserting plaintext file
LFUN_INSERT_PLAINTEXT is handled in GuiView because it might need to ask for a filename. But if the filename is given as a paramater we can handle it in BufferView immediately. Also, when we've asked for the filename in GuiView we should dispatch the LFUN to BufferView in order to properly use the Undo mechanism.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40377 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-05 13:12:57 +00:00
Vincent van Ravesteijn
a0d8157891 Fix bug #7755: Unknown tabular feature "from-dialog"
"from-dialog" is added to the LFUN_INSET_MODIFY function when it is issued from the table settings dialog. This is done to prevent the checking of the individual parameters, because it has to consider all parameters alltogether. Besides, when issued from the dialog it is already guaranteed that the parameters are valid.

This parameter should not be passed onto tabularfeatures.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40376 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-05 12:40:22 +00:00