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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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).
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.
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?
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.
* 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)
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.
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.
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.
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
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).
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".
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).
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.
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.
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>
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_.
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.
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.
* 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
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
- 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
- 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
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
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
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
* 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
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
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
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
- 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
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
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
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
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
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
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
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
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
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
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
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
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