Commit Graph

25468 Commits

Author SHA1 Message Date
Kornel Benko
5c2f29d024 findadv: Output language chage in ANY case, if outputting for search
Without this, the first \item entry in a list does not specify the language
in latex output. But we need it if we do not ignore language in search.
2018-11-03 15:05:38 +01:00
Kornel Benko
e6418431dd Findadv: Handle the problem with list environments
The problem was, that the different list ennvironments
did not look different in tha latex output used for
search.
So the input of "\item ..." did not give information
if it is description, lyxlist, enumeration or labeling.

In search modus we use now "\item{enumeration}" etc.
2018-11-03 11:15:12 +01:00
Kornel Benko
5c83ad37d0 Findadv: Use '\n' as delimiter for end of data with same features
This allows to use '.' in regex without matching also wrong data.

Also added modified patch from ajd (see #11241).
2018-11-02 10:32:28 +01:00
Kornel Benko
5af8ec3240 Findadv: Allow multiple math statements in a line 2018-10-30 20:54:32 +01:00
Juergen Spitzmueller
b8932afed5 Dispay pre- and posttext widgets if non-empty also if unapplied
Fixes: #11352
2018-10-30 17:23:08 +01:00
Juergen Spitzmueller
0ec295d63e Fix parentheses with Hebrew
Patch by Guy Rutenberg, with some changes of mine.

Fixes: #11191
2018-10-30 12:33:35 +01:00
Kornel Benko
f0d7432608 Findadv: Remaining findadv tests pass now
Exception: findadv-21, but it is not a regression,
because this one never passed.
The problem here is, that we cannot differentiate
between enumeration, itemize, description and labeling
environment here.
2018-10-29 13:17:54 +01:00
Kornel Benko
aecd98dc46 Findadv: Adapt search for special chars '[', ']', '%' and '#' 2018-10-29 07:37:32 +01:00
Kornel Benko
2d477c5e0a Changes to match math equations
Now tests findadv-01 ... findadv-20 pass too.

keytest.py: Expanded time for controll keys (like \[Return])
findadv*: expanded time for normal keys
lyxfind.cpp: Handle math equations
2018-10-28 19:40:14 +01:00
Scott Kostyshak
645d42f451 Revert "Comment out unused functions to restore -Werror"
This reverts commit bceb2390b4.

For details, see:

https://www.mail-archive.com/search?l=mid&q=4724814.5HqUF52VLN%40amd64
2018-10-28 11:43:47 -04:00
Scott Kostyshak
bceb2390b4 Comment out unused functions to restore -Werror
This commit restores compilation with -Werror and g++ version 7.3.0.

Consistent with 6dc450bc.
2018-10-27 20:59:26 -04:00
Kornel Benko
0f72179a07 Amend(4) 74c849d Advanced search with format
Prepare for use with func request. For instance to
ignore language while searching:
	setIgnoreFormat("language", true);
2018-10-27 16:57:42 +02:00
Stephan Witt
d470477ab0 Add dummy implementation for Messages::getIfFound (used when ENABLE_NLS is false) 2018-10-27 16:12:02 +02:00
Kornel Benko
0b3f644469 Amend(3) 74c849d Advanced search with format
* Discard now unneeded code
* Remove macro '\uldepth=...'
2018-10-24 11:07:11 +02:00
Kornel Benko
2dd522472a Amend(2) 74c849d Advanced search with format
Added missing handling for chapter/chapter*
Also added frontmatter (title, author etc), but disabled ATM
2018-10-23 21:12:22 +02:00
Kornel Benko
ff9c32b382 Amend 74c849d, Advanced search with format
Remove macros like '\tiny ' or '\tiny{}' or '\tiny' followed by
any other non-alpha char correctly
2018-10-23 20:03:50 +02:00
Scott Kostyshak
73b1c658a2 Use underline in (+ bold) for char match in layout
When showing the match characters in, e.g., the layout box, we now
underline (in addition to bold) the matched characters. This makes
the matched characters stand out even more.

See 4b716dd6 and the following ML thread:

  https://www.mail-archive.com/search?l=mid&q=20181019155649.dqqk6u25wdcdimrj%40barna
2018-10-22 21:16:56 -04:00
Kornel Benko
74c849d651 Advanced search with format, preparing for selective searching
As it is now, searching with format needs ALL the features set
in order to match the pattern.
What needs to be done is a GUI specifying which of the features are
important.
1.) language
2.) font (series, shape)
3.) markup, underline, strikeout
4.) color
Having this info, the implementation is easy. Set
some variables and be done
2018-10-22 20:19:36 +02:00
Jean-Marc Lasgouttes
9e7832915f Amend 8d8988de: it is too early for skipping the updateMacros call 2018-10-22 15:29:56 +02:00
Kornel Benko
140f843690 Advanced search with format, consider also sectioning macros 2018-10-20 12:47:37 +02:00
Kornel Benko
0be01de61f Advanced search with format, refactoring 2018-10-19 19:11:20 +02:00
Kornel Benko
6dc450bc46 Commented out an unused function to please a picky compiler 2018-10-19 11:10:54 +02:00
Jean-Marc Lasgouttes
557c2f2bf0 Compilation fix (with qt4 at least). 2018-10-19 10:02:02 +02:00
Richard Kimberly Heck
4b716dd63d Use bold instead of underlining to mark the characters we're matching. 2018-10-18 21:49:31 -04:00
Richard Kimberly Heck
1410eeb10e Simplify the code that adds underlining to the layout combo. 2018-10-18 21:49:31 -04:00
Richard Kimberly Heck
1cc859d713 Refactor 2018-10-18 21:49:31 -04:00
Richard Kimberly Heck
35fac4ab51 Re-organize and simplify now. 2018-10-18 21:49:31 -04:00
Richard Kimberly Heck
ae65fb2c98 Whitespace. 2018-10-18 21:49:31 -04:00
Richard Kimberly Heck
d7f4346a19 Fix bug #6096.
We used to need a hack to set the size of the layout combo, but
the code was changed in Qt 4.5 or so. Hence the appearance of this
bug in 2009. We can now just remove this hack, and all seems to
work correctly.
2018-10-18 21:49:31 -04:00
Richard Kimberly Heck
938ef60258 Filter on consecutive sequences of characters.
The filters for the layout combo and document class combo share a
problem: If you type "beam", e.g, in the latter case, then we will
show any document class that contains those letters, in that order,
but not necessarily consecutively. This is extremely confusing and,
as José put it, just weird. So let's fix it.

I'd call this a bug so would be happy to see this in stable, too.
2018-10-18 21:49:31 -04:00
Kornel Benko
d6cc58f4a3 Amend(4) 7a03fa6: Advanced search with format:
Further normalize the latex input in case of enabled format search.

It was not enough to split the latex input on \foreignlanguage and \textcolor
macros only.
Instead also macros like \textt, or \noun etc had to be accounted for.

This patch uses therefore a different algorithm.
2018-10-18 17:37:15 +02:00
Kornel Benko
162c1f316b Amend(3) 7a03fa6: Advanced search with format:
Grrr... enable the search without format again
2018-10-15 08:09:19 +02:00
Kornel Benko
8b21b2f8fb Amend(2) 7a03fa6: Advanced search with format:
Further tweeking.
2018-10-14 20:39:13 +02:00
Kornel Benko
1967d5411c Amend edca2e0: copy && paste error 2018-10-13 22:22:48 +02:00
Kornel Benko
edca2e0c4a Amend 7a03fa6: Advanced search with format:
In the latexified text:
* Check and handle contained regex properly
* Discard superfluos '{' preventing our search engine
  to match with the search pattern
2018-10-13 21:08:26 +02:00
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
Juergen Spitzmueller
b3c57aded7 tex2lyx/TODO: cleanup
Remove items that are done or not relevant to tex import.
2018-08-12 09:09:23 +02:00
Juergen Spitzmueller
c12fe77c94 Remove inclusion of obsolete header 2018-08-12 08:29:16 +02:00
Juergen Spitzmueller
d6a93143ec InsetInfo: enable inset dissolve 2018-08-11 17:43:25 +02:00
Juergen Spitzmueller
521d7c2e0b tex2lyx: fix option parsing of listings
the tricky thing was to decide whether [foo] is taken as option or as
verbatim content.

Candidate for stable.
2018-08-11 16:55:44 +02:00
Juergen Spitzmueller
07d760ef30 Rework BibTeX dialog
Fixes concerns reported in #11239
2018-08-11 12:17:42 +02:00
Kornel Benko
366e37c851 Added latex-DejaVu fonts to lyx-GUI.
Increment lyx-format to 561
2018-08-10 19:38:06 +02:00
Juergen Spitzmueller
806f742263 Amend 5f45b3ed9c 2018-08-09 17:23:05 +02:00
Juergen Spitzmueller
5f45b3ed9c Fix shortcuts info output on the Mac
QKeySequence returns special characters for keys on the mac rather than
textual key names (as on other OSes).

Since these symbols are not included in many fonts, we re-translate them
to textual names

Fixes: #10641
2018-08-09 16:59:06 +02:00
Juergen Spitzmueller
fd7490762d Support key symbols via menukeys package 2018-08-09 15:05:19 +02:00
Juergen Spitzmueller
b8ed202658 Consider default output format 2018-08-08 15:50:04 +02:00
Juergen Spitzmueller
7c5d243e71 Revert that part
We don't want to lose the shortcuts.
2018-08-08 15:14:26 +02:00
Juergen Spitzmueller
91a5263d68 Extend list of accessible menu info
When searching for and item in the menu, also try to consider those that
require a BufferView (such as View/Update formats).

Also, be explicit for the default format in order to find it.

Fixes: #9851
2018-08-08 15:05:58 +02:00
Juergen Spitzmueller
d1fbbb78a8 Disable Immediate Apply if no inset is modified. 2018-08-08 10:34:57 +02:00
Juergen Spitzmueller
44718e0e8c GuiInfo: Show "Unknown" only if issued from an unknown info. 2018-08-08 09:52:03 +02:00
Richard Kimberly Heck
2896441dbb Update buffer after preferences change.
Fixes missing update after new InsetInfo stuff.
2018-08-07 23:38:55 -04:00
Enrico Forestieri
cf5f2661dc Fix LyX server on Windows
On some recent Windows versions, GetLastError() may also return
NO_ERROR instead of ERROR_IO_PENDING during an overlapped write
operation to a pipe. This was confusing the state machine in
Server.cpp so that replies to commands were scheduled but were
never actually output.
2018-08-07 17:56:07 +02:00
Juergen Spitzmueller
781b10306a update tex2lyx tests 2018-08-07 15:42:22 +02:00
Juergen Spitzmueller
dd3ae00f74 Disambiguate time (period) from time (of day). 2018-08-07 15:24:40 +02:00
Juergen Spitzmueller
c6d8efba6c Add user name and email to Insert > Fields
This is a low hanging fruit, since it's already available (although
quite hidden)

Generally, output "not set" i a pref is not set rather than an empty
string.
2018-08-07 14:57:44 +02:00
Juergen Spitzmueller
2315bdad41 Fix small UI glitch 2018-08-07 14:48:51 +02:00
Juergen Spitzmueller
2cd7aab7cf Validate (fix) date vs. time specifier 2018-08-07 12:56:43 +02:00
Juergen Spitzmueller
37279f6681 Typos 2018-08-07 12:41:00 +02:00
Juergen Spitzmueller
7efdf98fc8 Further extend Info insets:
* Add time type (time, modtime, fixtime)
* Add "name-noext" buffer type (file name w/o extension)
2018-08-07 12:14:45 +02:00
Juergen Spitzmueller
307319e95e Introduce InsetInfoParams
This allows to open the dialog without having an inset already.
2018-08-06 20:07:15 +02:00
Juergen Spitzmueller
b75f716b73 Capitalization fixes
Fixes: #11237
2018-08-05 10:11:38 +02:00
Kornel Benko
ed8dfa3fa0 Expand tilde meaning in front of a path name.
This allows to address data in the current lyx-system-directory.
The additional prefix is '~:s/'
The original prefix '~/' still addresses current users home directory.
2018-08-05 10:03:52 +02:00
Juergen Spitzmueller
e730234e57 Add date-related info insets
With this commit, info insets leave the dark backstage room of an opaque
and quite hidden dev-only feature and come frontstage.

In the UI, they present themselves as "Fields" since this is what people
know from word processors. Other user-related fields that could be
implemented next: time, user name (I plan to do that for 2.4).

Since this supersedes date-insert, I removed Insert > Date from
the menu and propose to ditch date-insert and the corresponding rc.

The lyx2lyx reversion routine has lots of room for improvement and
attractive tasks for pythons (file timestamp, switch of localization).
Please feel invited!

This is a file format change.
2018-08-05 10:01:36 +02:00
Kornel Benko
5c303abf1c Amend f3b89e4: Use correct end-layout
Also correct indentation of innner values
2018-08-04 07:51:53 +02:00
Juergen Spitzmueller
b286c6d235 Change size policy of buffer combo in refs dialog
Fixes: #9316
2018-08-02 09:08:11 +02:00
Juergen Spitzmueller
87a7f728ca reorder entries 2018-08-01 16:51:38 +02:00
Juergen Spitzmueller
1cf1eaf1fe Pass languages also if babel is provided by class.
This is needed to load all used languages.
2018-08-01 15:46:00 +02:00
Juergen Spitzmueller
abaccece15 InsetInfo: use localized shortcuts 2018-08-01 15:17:46 +02:00
Kornel Benko
8233b3f593 Amend 7f3fd5a: Missed changes in version.h 2018-08-01 12:09:42 +02:00
Juergen Spitzmueller
8d45179403 More GuiInfo usability work 2018-08-01 09:28:03 +02:00
Juergen Spitzmueller
d70468a3b2 Update info-insert documentation 2018-07-30 17:18:38 +02:00
Juergen Spitzmueller
a76c69dea8 Typo.
Thanks, Kornel.
2018-07-30 17:02:28 +02:00
Juergen Spitzmueller
358436ea1e Split vcs Info inset from buffer Info inset
This should go separately in the GUI, and thus in the inset.
2018-07-29 19:41:34 +02:00
Juergen Spitzmueller
5075ce0297 InsetInfo: add useful shortcuts. 2018-07-29 18:28:18 +02:00
Juergen Spitzmueller
372712cfd9 Fix problem of unwanted spaces caused by macro definitions
Patch by Gilbert J. M. Forkel

Fixes: #11216
2018-07-29 15:17:48 +02:00
Juergen Spitzmueller
a8b0e64094 Try to please windows compiler 2018-07-28 10:26:52 +02:00
Scott Kostyshak
d12798759a Fix crash when selecting text with changes
When selecting text, in some cases a DocIterator could be forwarded
to a (non-existant) paragraph after the end. The critical part of
this fix is to break the loop at the correct place. The following
are additional improvements:

- increase readability by defining a bool named "in_last_par"
- use cur.selectionEnd().pit() instead of cur.selectionEnd().paragraph().id()
- use it.lastpos() instead of it.paragraph().size()

This commit fixes a regression introduced by 23de5e5e, and reported
at #11204.

Thanks to Jürgen and JMarc.
2018-07-27 15:39:39 -04:00
Juergen Spitzmueller
803a88f243 Sort out problems with InsetInfo language settings
* use the context language of the info inset (rather than the buffer
language), and translate strings accordingly

* for menu and shortcuts, use the Gui language instead

* actually care that all translatable strings end in po
(this wasn't the case).

Fixes: #5348, rest of #10463
2018-07-27 12:14:37 +02:00
Juergen Spitzmueller
b6eacd8d4f Make the InsetInfo dialog a bit less esoteric. 2018-07-26 16:02:03 +02:00
Juergen Spitzmueller
f8e286b823 Use footnotehyper rather than footnote if hyperref is used
Fixes: #11212
2018-07-25 18:01:22 +02:00
Jean-Marc Lasgouttes
ab2b5e02f9 Revert "Make formal table lines exagerately thick to identify \cmidrule"
This not the correct solution. Let's see if we find a better one.

This reverts commit d900b1fcec.
2018-07-25 17:40:42 +02:00
Juergen Spitzmueller
d1ec35a0dc Amend 79cf3f5ec1
Some InfoInsets have to be LTR always.
2018-07-25 11:38:56 +02:00
Juergen Spitzmueller
79cf3f5ec1 Fix text direction issue for InsetInfo in RTL context
Fixes: #10463
2018-07-25 11:00:00 +02:00
Juergen Spitzmueller
99aefa5fd2 Implement tri-state in GuiSetBorder
A new UNDECIDED state is used if multiple cells with differing border
settings are selected.

This prevents additional borders to be set without being asked.

Fixes: #10010
2018-07-24 13:49:27 +02:00
Juergen Spitzmueller
1883c4346d Revert "Fix toggle-line for multi-cell selection"
This changes the behavior of the table border toolbar in a way I am not sure everybody appreciates.

This reverts commit 022228e56f.
2018-07-24 08:48:33 +02:00
Jean-Marc Lasgouttes
d900b1fcec Make formal table lines exagerately thick to identify \cmidrule
Width is now 3 for top/bottomrule, 2 for midrule and 1 for cmidrule.
These numbers are bogus of course, but the goal is to help the user
see what he is doing.
2018-07-24 00:07:59 +02:00
Jean-Marc Lasgouttes
c54fe6c584 Amend 20976e81: remove debug messages 2018-07-23 23:48:52 +02:00
Jean-Marc Lasgouttes
ad954a32a5 Aesthetics: off-by-one in line drawing
It is a general problem when doing graphics to know where a line
begins and where it ends pixel-wise. At the instigation of Scott, and
with the use of the kmag magnifier, this commit corrects 3 areas:

* foreign marks were larger than the row element they were supposed to
  mark. This could lead to moving lines, depending on paint ordering.

* visible spaces were drawn outside of their box (select a single
  space to see this).

* the `L' blinking caret would leave a cursor dropping because the
  horizontal part was too wide.
2018-07-23 17:16:03 +02:00
Juergen Spitzmueller
022228e56f Fix toggle-line for multi-cell selection 2018-07-23 17:00:31 +02:00
Juergen Spitzmueller
91254472e6 Allow to change multiple columns' width at once
Fixes: #11205
2018-07-23 16:36:19 +02:00
Jean-Marc Lasgouttes
e4dba53232 Do not remove character at start of paragraph when cutting
The part of code that removed space at start of paragraph have been
there forever, but its intent is unclear. For example, cutting text at
the end of a paragraph will lead to remove space at the start of this
same paragraph.

The removal of this functionality is offset by a rewrite of DEPM that
makes it more thorough.

Fixes bug #10503.
2018-07-22 23:20:21 +02:00
Jean-Marc Lasgouttes
20976e81fb Improve DEPM
Now any sequence of spaces around old cursor will be removed, even at
start or end of paragraph. Sequences of more than 2 characters are
also taken into account.

The version of DEPM which acts on a sequence of paragraphs is also
rewritten to match the local one.
2018-07-22 23:20:21 +02:00
Enrico Forestieri
16ca5290c0 Fix bug #11203
Minted does not have a language option but it is possible to enter
this option in the LyX interface for compatibility with the listings
package, and also for letting to enter a language not present in the
gui. So, this option is only used for properly specifying a language
in a listing, unless it is entered in the document settings dialog.
This case was not foreseen and thus the option was being passed to
the package as is, causing havoc. With this commit the option is
still available but is used to set a default language for a new
listing in place of the default "tex" language used so far.
2018-07-22 22:22:13 +02:00
Juergen Spitzmueller
8ef7d1aaec Amend d41c3f27d9
Quote insets are allowed in ERT.
2018-07-22 20:04:19 +02:00
Juergen Spitzmueller
611df441b6 Consider EuropeanNumberTerminator property when determining text direction
Also, use EuropeanNumberSeparator information rather than relying on an
own (incomplete) list of number separators.

Fixes: #4057
2018-07-22 12:38:22 +02:00
Jean-Marc Lasgouttes
05d3a64952 Use swap in InsetText::updateBuffer for notes ad friends
Avoid as much as possible to do full copies of all counters, since
that can be exensive. Unfortunately, it is just posible when we want
to restore the saved counters.

Explanations why we use friend swap is here:
https://stackoverflow.com/questions/5695548/public-friend-swap-member-function

Part of bug #5973.
2018-07-22 12:35:05 +02:00
Jean-Marc Lasgouttes
84328c8538 Amend 8651cd89: only full top/bottom rules are thicker 2018-07-21 20:07:33 +02:00
Juergen Spitzmueller
0bf7b3211d (a)mend edb2d14124 2018-07-21 18:33:49 +02:00
Juergen Spitzmueller
edb2d14124 Set RTL tooltips RTL
Fixes: #10672
2018-07-21 18:23:47 +02:00
Juergen Spitzmueller
114ebf00c4 Fix nesting problem with numbers in RTL text
\textcolor must precede any \beginL

Fixes: #6283
2018-07-21 15:50:35 +02:00
Jean-Marc Lasgouttes
8e9e050670 Fix disappearing blue language underline.
Make sure that the blue language underline is not below the bottom of
the row. Otherwise, it can disappear when the next row is painted.
2018-07-20 15:23:55 +02:00