Commit Graph

25333 Commits

Author SHA1 Message Date
Juergen Spitzmueller
3a91fed269 Amend a754912 once more
Do not use LTR environment (bidi) at all, since it adds unwanted
paragraph breaks.

Fixes: #11338
2018-10-13 13:51:00 +02:00
Juergen Spitzmueller
4115d2487f Clear bibfile cache when set of bibliography files change
Part of #9158
2018-10-13 11:06:24 +02:00
Kornel Benko
7a03fa6f1d Advanced search with format: Prepare latex for find
Our findadv expects something like
	prefix + 'search'
so that the regex (which is latexified too)
can work on 'search'
(In the source, the prefix is denoted by lead_as_string)

The latex output contains structs like
	\foreignlaguage(abc}{xx\textbf{boldxx\textcolor{blue}{blue 1 blue 2} XX}}
which would never match the simple prefix.

Now the above is converted to
	\foreignlaguage(abc}{xx}\\
	\foreignlaguage(abc}{\textbf{boldxx}}
	\foreignlaguage(abc}{\textbf{\textcolor{blue}{blue 1 blue 2}}}\\
	\foreignlaguage(abc}{\textbf{ XX}}
Of course, more than one language or color in an inset can be searched for now.
2018-10-12 16:47:07 +02:00
Juergen Spitzmueller
9d8fbc7fd1 Amend a754912
Switch logic, since isStyle() does not cover inline math

Fixes: #11338
2018-10-09 18:04:51 +02:00
Juergen Spitzmueller
00ee54e694 Load covington later
This solves a loading order conflict with beamer-article.
2018-10-09 10:42:38 +02:00
Jean-Marc Lasgouttes
17e2ad927e Followup to 9fe101e8: remove unused method. 2018-10-08 16:04:32 +02:00
Jean-Marc Lasgouttes
9fe101e890 Remove support for pixmap cache
This code has issues and there is no evidence that it improves performance.

Remove LyXRC variable \use_pixmap_cache and update rc format to 29.

Now the global pixmap cache is only used by GuiCompleter. Therefore
there is no need to reset it when fonts change.
2018-10-07 14:56:55 +02:00
Kornel Benko
ff933b52f5 Amend(2) b78bdf8
Modified language handling

Still, there are problems, because sometimes the search pattern
does not contain the the requested info. So the 'find' often fails
for strings inside a list environment.
2018-10-06 23:50:50 +02:00
Kornel Benko
f2d82f879e Amend(1) b78bdf8
In advanced search:
* Ignore font sizes
* ignore \\[a-z]+par{} macros
* ignore \\inputencoding{...} macros
2018-10-06 09:58:29 +02:00
Kornel Benko
b78bdf80a8 Added better handling for languages and colors for advanced F&R
The change is significant if the search format is not disabled.
We try to analyze the pattern string first to get needed features
for the search.
We try to analyse the searched string and if it does not
contain all expected featers (color, language, char style, char decoration)

Still some problems though
2018-10-05 20:26:44 +02:00
Richard Kimberly Heck
b1f1b2321b Fix part of bug #8521. 2018-10-04 21:02:51 -04:00
Richard Kimberly Heck
4f0ccae399 Fix bug #9004.
I'm not entirely happy with this way of doing it. It seems messy.
But there is not another clear option right now.
2018-10-04 20:37:03 -04:00
Richard Kimberly Heck
944b0ae55d Update the Advanced F&R document class when switching buffers. 2018-10-04 20:30:01 -04:00
Richard Kimberly Heck
5064c09e9f Copy modules into the Advanced F&R pane as well. 2018-10-04 20:30:01 -04:00
Guillaume Munch
1979496399 Make tab movement visible (#10733)
The nice hand-made solution for moving tabs has made its time. Use Qt's feature
instead from now on.
2018-10-04 19:52:21 -04:00
Richard Kimberly Heck
17b7eab0cc Fix up e5fc7327. 2018-10-04 17:56:14 -04:00
Richard Heck
5f6332bf46 Fix bug 9798.
Nameref support for math references.
2018-10-04 14:04:48 -04:00
Richard Kimberly Heck
2553b0073f Fix bug #11275.
Show module name with description.
2018-10-04 14:02:01 -04:00
Richard Kimberly Heck
e5fc7327e3 Extend fix for #7404 to allow any inset collapsible to be edited
externally.
2018-10-04 13:41:41 -04:00
Jean-Marc Lasgouttes
7cb0284a3f Fix display of gather in lefteqn mode
The column is flushed when the display of equations is flushed.

Not sure what to do with RtL languages.

Fixes bug 11324.
2018-10-04 16:09:54 +02:00
Jean-Marc Lasgouttes
2617a4dd50 Fixup 38f09c177b: limit to paint rectangle 2018-10-04 14:27:43 +02:00
Jean-Marc Lasgouttes
38f09c177b When ignoring an update, request one for later
If we were not ready to paint the screen, this does not mean that we
should give up on repainting, just potpone it.

I thought that it was bad to call update() in the paint event, but I
cannot find reference to this anymore and everything seems to work as
intended.
2018-10-03 15:57:11 +02:00
Jean-Marc Lasgouttes
837bcbb043 Make sure inset buffer is correctly set in math grid
Make MathData::setBuffer set the buffer of insets that it contains.
Remove corresponding code from InsetMathNest.

update the buffer() property in the following tabular-feature
actions : copy-row, add-row, copy-col, add-col.
2018-10-03 10:43:20 +02:00
Kornel Benko
99174acff8 Increment version to 565 due to add of adobe source pro fonts 2018-10-02 17:24:47 +02:00
Kornel Benko
2348e0b615 Advaced search: Added handling to search for colored text
if used with format enabled
2018-10-02 11:53:01 +02:00
Kornel Benko
4eb5ac9a2c Amend(4) 73188e3
* Added textsl, texttt, uline, uuline, sout, xout to the list of possible
  leading strings.
* Account for correct number of open braces in regex.
  Now the search works for enbled format too.

This is hopefully the last amend
2018-10-01 12:06:42 +02:00
Kornel Benko
cc0c58839f Amend(3) 73188e3
Adapt the positional references in regex supplied by user
so that for instance '([a-z]+)\s\1' to find identical words in sequence
is changed to '([a-z]+)\s\2'.
2018-09-30 18:37:55 +02:00
Kornel Benko
2fdc52df19 Amend(2) 73188e3.
Added noun, textsf and texit to the list of possible
leading strings if searche with format enabled.
Searching seems to work as intended now.
2018-09-30 16:15:45 +02:00
Kornel Benko
0e61e6f014 Amend(1) 73188e3.
This is slightly better, but still not satisfying.

Enable format search
Given the latexified string
	\emph{Fox jUMps}
and using emphasized regex '\w*', we find 'Fox'. That is OK.
But the next find finds ' ', which is not OK.
In contrast, searching with '\w+', we find the correct string 'jUMps'.
2018-09-29 18:46:21 +02:00
Juergen Spitzmueller
f973855bde Amend cab46ff9d1 2018-09-29 10:29:02 +02:00
Kornel Benko
ded0dc4c1c Try to make findadv more robust if not ignoring format
If searching for instance '.+' , the found string expanded
to the end of search buffer. So we have to replace
'.' with '[^\}]'.
Also all constructs like '[^abc]' had to be changed to '[^abc\}]'
to not go behind the actual format.
There is still problem using '*', but constructs usin '+' seem to work now.
('.*' finds everything from first char in correct format
 to (including) end of next format change
 while '.+' find _only_ characters in correct format)
2018-09-29 09:38:45 +02:00
Juergen Spitzmueller
cab46ff9d1 GuiCitation: Add some tooltips for the sake of keyboard users
Addresses #11317
2018-09-29 09:18:26 +02:00
Juergen Spitzmueller
10c06f67c9 Use LTR environment for forceLTR content with polyglossia
Fixes: #10548
2018-09-28 08:36:44 +02:00
Richard Kimberly Heck
92ccf0a1a2 Allow 'module in child not used in master' warning to be disabled. 2018-09-27 21:58:37 -04:00
Enrico Forestieri
83fc0f924c Fix bug #11210
On Windows, start viewers in detached processes in order to avoid
a crash of the QProcess destructor when their thread terminates.
The opening of a console window is avoided by redirecting to the
null device all standard I/O channels.
2018-09-27 21:21:49 +02:00
Juergen Spitzmueller
a89e3c344b Add bibtex inset to outliner if "add to toc" is checked.
Fixes #11309
2018-09-25 15:24:46 +02:00
Juergen Spitzmueller
90b1345203 Do not store empty posttext for qualified citations
Fixes: #11308
2018-09-25 13:13:56 +02:00
Juergen Spitzmueller
9c33bbed10 Rework chessboard support
* Use a module rather than a layout, since this package can be used with
  any class
* Do not hardcode options and settings. The package is very flexible,
  there is no need to limit this in LyX
2018-09-23 12:26:43 +02:00
Juergen Spitzmueller
33d6499bbc GuiCitation: don't reset filter on show
Addresses #11291
2018-09-22 10:37:22 +02:00
Stephan Witt
d9c0807227 Add -headerpad_max_install_names option to linker calls and make run path configuration consistent.
This avoids failures when running install_name_tool on Mac when creating relocatable binaries using the bundled private frameworks.
2018-09-21 21:46:47 +02:00
Jean-Marc Lasgouttes
1b5ccecd65 Avoid space before completion in mathed
This can happen if the current element has space after it (e.g. before
a relation).

Fixes bug #11283.
2018-09-20 23:51:21 +02:00
Jean-Marc Lasgouttes
2cfbc5ecf6 Ignore horizontal wheel scrolling in workarea
We do not know what to do with horizontal scrolling events, so we ignore them.

Note that the code has to be different between Qt4 and Qt5.

Fixes bug #11257.
2018-09-20 23:25:42 +02:00
Jean-Marc Lasgouttes
17576fb83b Avoid crash with cursor down in math
This can happen when the inset that contains the cursor is outside of
the screen.

THis is only a workaround. The real solution would be a
processUpdateFlags(FitCursor) call, but the code is not ready for that
yet.

Fixes bug #11296.
2018-09-20 22:18:36 +02:00
Jean-Marc Lasgouttes
328ff9df3a Paint underline for insets too.
Fixes bug 11297.
2018-09-20 11:58:08 +02:00
Juergen Spitzmueller
5e26a3a633 Implement layout format in insetinfo
The docs refer to the outdated layout formats. The inset prevents this.
2018-09-20 11:33:03 +02:00
Juergen Spitzmueller
4648f39a1e info-insert without arg is valid
it opens the info dialog.
2018-09-20 11:11:44 +02:00
Juergen Spitzmueller
92bfa07a62 Avoid infinite loop
Fixes: #11295
2018-09-19 10:19:19 +02:00
Jean-Marc Lasgouttes
82516e356b Use std::move in InsetText::updateBuffer for notes and friends
Avoid as much as possible to do full copies of all counters, since
that can be expensive. Unfortunately, it is only posible when we want
to restore the saved counters.

An earlier version (05d3a649) defined swap() for Counter, but caused
problems on windows.

Part of bug #5973.
2018-09-18 23:18:17 +02:00
Jean-Marc Lasgouttes
f5f2f5b7ea Revert "Use swap in InsetText::updateBuffer for notes ad friends"
This reverts commit 05d3a64952.
2018-09-18 23:07:48 +02:00
Jean-Marc Lasgouttes
0920872ebd Revert "Try to please windows compiler"
This reverts commit a8b0e64094.
2018-09-18 23:06:36 +02:00
Jean-Marc Lasgouttes
ad29b0067f Revert "Use new display() values to remove some inset hardcoding."
This is a work in progress that committed by mistake.

This reverts commit b28ec44476.
2018-09-12 15:26:15 +02:00
Jean-Marc Lasgouttes
b28ec44476 Use new display() values to remove some inset hardcoding.
The enum is now made of flags that can be combined.

This introduces several new values for Inset::DisplayType:
BreakBefore, BreakAfter and Display=BreakBefore|BreakAfter. This
last value replaces AlignCenter.

Additionally the flags NoBoundary and CanBreakAfter are introduced for
future use.

Now a left aligned displayed inset will be defined as Display|LeftAlign.

A newline inset is characterized as BreakAfter.

This structure is used in breakRow to avoid explicit calls to
isNewline() or isEnvSeparator(). More improvements will be built on
top of this.

Additionally several redundant display() methods (which returned
Inline) have been removed.
2018-09-12 11:38:01 +02:00
Jean-Marc Lasgouttes
7485225cc6 Place the depth bar correctly in screen mode
In full screen mode, it is possible to restrict the text width. In
this case, the paint bar should not be painted outside of this
restricted area.

Fixes bug #11286.
2018-09-11 16:45:48 +02:00
Juergen Spitzmueller
e158d661b9 Amend 2d4ac90fd2 once more
Only use local switch in RTL environment.
2018-09-10 12:29:22 +02:00
Jean-Marc Lasgouttes
819cf53c22 Handle branches with space in their name
1/ Handle space in color name in set-color (with quoting)

2/ read properly branch inset when name has a space

Fixes bug #11108.
2018-09-08 13:07:07 +02:00
Juergen Spitzmueller
1116335977 Amend 2d4ac90fd2
Properly close local language switch.
2018-09-08 12:50:42 +02:00
Jean-Marc Lasgouttes
6cfd733dea Fixup 7b7ed64a: allow toggling limits of (over|under)brace 2018-09-05 17:31:05 +02:00
Jean-Marc Lasgouttes
7b7ed64a0e Allow toggling (no)limits only after mathop symbol
In particular, introduce the new InsetMathScript::allowLimits method
that checks for that and honor it in getStatus/ddoDispatch.
2018-09-03 17:55:27 +02:00
Richard Kimberly Heck
6014492699 Try yet again try to fix bug #9158.
The problem with the previous attempt was that, every time through
updateBuffer, we looked up the file location using kpsewhich, which
took too long on Windows. The new solution is to cache that info, and
to look it up only when we need it.

Previously, this info would have been re-read whenever we parsed the
bibfiles. So we re-read it now whenever the bibinfo cache is invalid,
which is less often, but should be good enough. We can add more such
re-reads if need be.
2018-09-02 11:50:03 -04:00
Juergen Spitzmueller
5f7b553a1c use masterBuffer() rather than parent()
This also catches grandparents.

Thanks, Riki.
2018-09-02 10:17:23 +02:00
Richard Kimberly Heck
2bb8bd3ec4 Signal need for reload of bibinfo cache rather than doing it. 2018-09-02 00:16:45 -04:00
Richard Kimberly Heck
a3e87dad80 Revert "Try yet again try to fix bug #9158."
(Unintentionally committed.)

This reverts commit 7b29d4e7aa.
2018-09-02 00:09:19 -04:00
Richard Kimberly Heck
7b29d4e7aa Try yet again try to fix bug #9158.
The problem with the previous attempt was that, every time through
updateBuffer, we looked up the file location using kpsewhich, which
took too long on Windows. The new solution is to cache that info, and
to look it up only when we need it.

Previously, this info would have been re-read whenever we parsed the
bibfiles. So we re-read it now whenever the bibinfo cache is invalid,
which is less often, but should be good enough. We can add more such
re-reads if need be.
2018-09-01 23:13:00 -04:00
Juergen Spitzmueller
bc644d131c Fix potential null pointer detected by Coverity 2018-09-01 10:45:03 +02:00
Juergen Spitzmueller
5279f3e11f Fix uninitialized value revealed by Coverity 2018-09-01 10:41:29 +02:00
Jean-Marc Lasgouttes
4727e2becf Move leaveInset and isInside from CursorData to DocIterator
They only touch the slices of the main DocIterator.
2018-08-30 14:17:53 +02:00
Jean-Marc Lasgouttes
86398b5d91 Cleanup: Rename textUndo to undoAction
This is not limited to text, but also handles math.

Same change to textRedo.
2018-08-30 14:17:53 +02:00
Jean-Marc Lasgouttes
dd8fd3d90a Get rid of monolithic build support for autoconf
It is not useful anymore on modern machines with several cores.
2018-08-30 11:35:37 +02:00
Juergen Spitzmueller
9c33723632 Improve comment 2018-08-28 12:39:23 +02:00
Juergen Spitzmueller
fe2e3841eb grammar 2018-08-28 10:36:47 +02:00
Juergen Spitzmueller
da62299f37 tex2lyx: fix import of unknown commands'/environments' options
If we detect options via hasOpt(), output the brackets as ERT.

Fixes: #8685
2018-08-28 10:31:29 +02:00
Juergen Spitzmueller
9f99f3073a Correct indentation 2018-08-27 12:13:55 +02:00
Juergen Spitzmueller
a3ed99b211 fix glitch with last border in table for custom arguments 2018-08-27 12:13:24 +02:00
Juergen Spitzmueller
64ad077c9c tex2lyx: support V table column type 2018-08-27 12:12:56 +02:00
Juergen Spitzmueller
8ef2558dc2 tex2lyx: support decimal alignment in tables 2018-08-26 16:17:54 +02:00
Juergen Spitzmueller
af42dfedf6 This has been done in f38816bf16 2018-08-26 11:13:00 +02:00
Juergen Spitzmueller
fc9b4fb6a8 tex2lx/TODO: minor clarifications 2018-08-26 10:54:04 +02:00
Juergen Spitzmueller
faf40fb408 tex2lyx: support for plural and capitalized refstyle
Also fix a glitch in non-refstyle import (getOpt() returns the option
with delimiter, so do not add them in ERT once more)

Candidate for stable
2018-08-26 09:48:23 +02:00
Juergen Spitzmueller
d10c3bceb0 whitespace 2018-08-24 15:33:48 +02:00
Juergen Spitzmueller
2d4ac90fd2 Fix text direction problem with polyglossia
If an RTL language is set via environment in polyglossia, only a nested
\\text<lang> command will reset the direction for LTR languages

Fixes rest of # 10111.
2018-08-24 15:02:26 +02:00
Juergen Spitzmueller
920e26916e tex2lyx: Fix import of Arabic polyglossia environment
Part of #10111
2018-08-24 14:20:43 +02:00
Juergen Spitzmueller
2f279b29ff Update tex2lyx tests
LyX itself also doesn't write "rotate" if it is 0. So tex2lyx is now
closer to LyX, and the new tests output is correct.
2018-08-24 10:19:55 +02:00
Juergen Spitzmueller
ab32a8319d tex2lyx: also support rotated non-long tables 2018-08-24 10:11:19 +02:00
Juergen Spitzmueller
20663fb3b8 tex2lyx: also support rotated xltabulars 2018-08-24 09:39:46 +02:00
Juergen Spitzmueller
766eb3f02c tex2lyx: support rotated longtable 2018-08-24 08:50:32 +02:00
Juergen Spitzmueller
30abecd437 tex2lyx: split huge else-if-clause
Use a loop instead and break out after a condition is met. This prevents
problems on windows where the number of else-if-conditions is limited.
2018-08-22 18:49:16 +02:00
Juergen Spitzmueller
68d48b0015 tex2lyx: Fixes to the btUnit import
1. Do not attempt to mix diverging btUnits (e.g., chapters and sections).
2. use parse_text to properly parse the contents.
2018-08-22 08:39:13 +02:00
Juergen Spitzmueller
5c97424a72 tex2lyx: simplify btUnit parsing 2018-08-21 17:33:30 +02:00
Juergen Spitzmueller
0ae68ae828 tex2lyx: support for btUnit (multibib) 2018-08-21 17:18:04 +02:00
Juergen Spitzmueller
f44a55c367 tex2lyx: add bib encoding support. 2018-08-21 08:19:24 +02:00
Juergen Spitzmueller
924a666166 Remove empty entry 2018-08-20 18:18:48 +02:00
Juergen Spitzmueller
23ea74a40b tex2lyx: support for Plex fonts 2018-08-20 11:13:13 +02:00
Juergen Spitzmueller
ed61ce74b7 So long, date-insert!
This function is superseded by info-insert date, which is much mightier
and more flexible.
2018-08-20 09:25:22 +02:00
Juergen Spitzmueller
43e26a562b Add prefs2prefs code for vcs info inset renaming 2018-08-18 16:11:08 +02:00
Juergen Spitzmueller
b0f579655c InsetInfo: Move validateArgument() to params
and use it for LFUN_INFO_INSERT validation
2018-08-18 14:29:15 +02:00
Juergen Spitzmueller
c5cab5a8f7 Update tex2lyx tests 2018-08-17 20:34:28 +02:00
Juergen Spitzmueller
6d71b9b69a Fix line break in tooltip
Fixes: #11252
2018-08-17 10:32:57 +02:00
Juergen Spitzmueller
b124adbd38 Introduce listpreamble argument type
This uses the InsetArgument interface to provide access to a document
part hitherto inaccessible by LyX: the part between \begin and the first
\item in a list (where lengths and counters can be redefined, for
instance).

Fixes: #11098

File format change, layout format change
2018-08-17 10:22:32 +02:00
Juergen Spitzmueller
74657a14a7 Disambiguate dialog buttons
Fixes: #11242
2018-08-14 17:05:40 +02:00
Juergen Spitzmueller
e9b187af08 New info-inset type l7n
This returns a localized version of a string (in the GUI language)
if available, removing trailing colons and accelerator marks.

This can be used to refer to dialog items in the docs in a portable way.
2018-08-13 17:18:44 +02:00