46693 Commits

Author SHA1 Message Date
Juergen Spitzmueller
7ec52ec846 Add plt as gnuplot extension (#11148)
This seems to be the common one on Windows

(cherry picked from commit f2e6a9b4aed4125284712ff041b6443e0ba01c57)
2024-08-06 11:38:11 -04:00
Richard Kimberly Heck
1ddd148b06 Fix bug with display of reference tooltips.
Previously, the tooltip was assigned during updateBuffer. But then
we could not determine the value for forward references.

(cherry picked from commit b494286a9c271b1f39d6248d977d2ef14a71f64c)
2024-08-06 11:35:20 -04:00
Richard Kimberly Heck
8f6c41a110 temp 2024-08-06 11:18:51 -04:00
Juergen Spitzmueller
f37bd183ab set toc_string_ before the label is being truncated
We do not want truncated items in the outliner.

(cherry picked from commit 8aeee03e3ad61b437fb8ef9a4b5c4744f5b18c22)
2024-08-06 11:08:03 -04:00
Richard Kimberly Heck
91b085d5ad Use the old-style sorts of label strings in the TOC.
There are several reasons to do it this way, among which is odd
behavior of the TOC filter if we put anything else there. This also
allows for filtering of the references themsevles in a natural way.

The change, I think, was really an unintended consequence of other
changes connected to showing formatted references in the work area.

(cherry picked from commit 1de4645286e5e51d2e5f6084ee53f3fcb463475d)
2024-08-05 18:23:25 -04:00
Juergen Spitzmueller
366efa9e61 Oops 2024-08-05 13:43:51 +02:00
Juergen Spitzmueller
cb3d88e22c update status 2024-08-05 13:20:23 +02:00
Juergen Spitzmueller
a46aa9bdc9 Add Tomasz Kołodziejski to the credits 2024-08-05 10:42:06 +02:00
Juergen Spitzmueller
eab7eebe41 Update Polish translation (from Tomasz Kołodziejski) 2024-08-05 10:40:19 +02:00
Juergen Spitzmueller
220b3c51eb Update Polish translation (from Tomasz Kołodziejski) 2024-08-05 10:40:19 +02:00
Juergen Spitzmueller
03741f4bd1 Add Tomasz Kołodziejski to the credits
(cherry picked from commit 43baae382c201beff9d967e72dbf9ec699980c88)
2024-08-05 10:36:38 +02:00
Kornel Benko
cbc9022af6 Update sk.po 2024-08-02 09:14:27 +02:00
Juergen Spitzmueller
a5aa413256 de.po 2024-08-01 17:10:54 +02:00
Juergen Spitzmueller
2277a9a557 Disambiguate string
At least in German "label" in a form and "label" as in \label
translate differently

(cherry picked from commit 7ac4e53e37d10dc2e4b99fc5527db366bcc504f4)
2024-08-01 17:05:29 +02:00
Juergen Spitzmueller
451f3b2784 Consider masked modifiers (~S etc.) when writing to bind file
Fixes #12973

(cherry picked from commit eb1ac06a9ad9bafd50c26fb951dd38a8d970c199)
2024-07-29 18:14:45 +02:00
Richard Kimberly Heck
f6074c329a Status 2024-07-27 11:19:19 -04:00
Juergen Spitzmueller
c16f99c524 Load geometry after graphics
Newer graphics driver overwrite some (output) page settings otherwise
See https://tex.stackexchange.com/a/384952/19291

Re-fixes #10970

(cherry picked from commit ca4fc01847c721b0ed23ef7a486444d47ff70cf0)
2024-07-27 11:17:20 -04:00
Jean-Marc Lasgouttes
73bfef16f3 Make scrolling-by-selection smoother
This trivial patch makes scrolling-by-selection smoother by dividing
the step size and the time between steps by 8 when generating
synthetic events in work area.

The scrolling speed is unchanged, but the result is visually better.

(cherry picked from commit 1cc1f0ba27d1846ba244507529d4795ecfa29a39)
2024-07-25 18:20:38 +02:00
Pavel Sanda
df313e9920 Squash gcc warning. 2024-07-25 11:52:20 +02:00
Jean-Marc Lasgouttes
2baa292314 Do not export the content of InsetMathBoxed as text in MathML
\boxed{} is the only box in LaTeX that contains math. It is amusing
that the example file that we had for ticket #13609 should not have
been a problem since there is no reason to force <mtext> there.

(cherry picked from commit 1186d90edf9a6702573f296d5642c5e61ceaaedf)
2024-07-24 18:26:53 +02:00
Jean-Marc Lasgouttes
458ce0fdba Fixup b29b3eb1: close <mtext> when quitting text mode
This fixes malformed documents on UserGuide export.

Related to bug #13069.

(cherry picked from commit 1385f0fddd0229770496b1e50b76782892032d18)
2024-07-24 18:17:20 +02:00
Jean-Marc Lasgouttes
8ea0987644 Fixup b29b3eb1: fix broken xml syntax
This commit addresses two issues:

1/ the embarassing one: the member SetMode::old_text_level_ was
   declared as bool instead of int. This means that is was definitely
   not a proper backup variable!

2/ a robustness issue: replace two consecutive test for isTest() by a
   boolean veriable that is used twice. This makes sure that <mrow>
   cannot be output without the corresponding </mrow>.

Part of bug #13069.

(cherry picked from commit a268fe096a58a7818554a7da4da85896bb289c81)
2024-07-24 18:17:13 +02:00
jpc
a0752e4dfc Update fr.po 2024-07-24 16:25:00 +02:00
Jean-Marc Lasgouttes
b29b3eb1fc Fix crash when generating MathML with InsetMathBox
Instead of generating code and parsing it to add <mtext>...</mtext> at
the right spots, this commit honors the text mode setting that was
already present in the codebase to generate it automatically.

This is the work of two helper methods in MathMLStream:

* beforeText() notices when the stream is in text mode and that a
  <mtext> has not yet been generated. In this case it inserts it, so
  that raw text can be emitted afterwards.

* beforeTag() checks whether a <mtext> needs to be closed at this
  point, and does it if needed.

To make this work, the code now tracks the nesting level in the
stream, and compares it the what the level was when text mode has been
enabled using the SetMode helper function.

In order to avoid later bugs, member os() that allows to access the
underlying stream of MathMLStream is removed. This required many <<
operators to become friends of MathMLStream.

In InsetMathBox, rename splitAndWrapInMText() to mathmlizeHelper(),
which is not just a method that sets text mode inside a <mrow>
element.

In InsetMathFont and InsetMathHull, the explicit generation of nesting
in <mtext>...</mtext> can be removed now.

Fixes bug #13069.

(cherry picked from commit 216a6fb348dedac3230f651287a0ccfb48b88818)
2024-07-22 22:08:58 +02:00
Jean-Marc Lasgouttes
17bc6d05b3 Cleanup MathMLStream
This is preparatory work for fixing ticket #13069.

Remove direct accesses to the underlying stream of MathMLStream in
InsetMathChar, InsetMathSpecialChar, and in all << operators other
than MathMLStream << docstring. This will allow to add a hook later in
this operator.

Move default values of MathMLStream private members to their definition.

Get rid of line_ member, which is not used.

(cherry picked from commit fbd4b0a13fae4263cc88aa76bc4fbba5178b15fa)
2024-07-22 22:06:02 +02:00
Jean-Marc Lasgouttes
2999061e38 Remove alpha component of system colors
When using system colors it may happen (on windows 11 in particular)
that the background color is actually translucid. This is not
something we are prepared to handle and it creates ghosts on screen.

The fix is easy: the alpha channel of the colors is set to 255.

Fixes bug #13084.

(cherry picked from commit 095bb18331f8eb4653691a64520d89d4a2d60fc4)
2024-07-22 15:55:46 -04:00
Juergen Spitzmueller
4a796889e9 tex2lyx: Fix two bugs in nomencl import
* The comment character % is made active to serve as an escape char
* quotation marks need to be escaped

(cherry picked from commit 5bc4c11fd601773a7ffba850524afa03eafe13f9)
2024-07-22 19:03:10 +02:00
Juergen Spitzmueller
40ac463724 UserGuide: fix two nomencl entries
(cherry picked from commit 9f31d562bfbfbc3432c74ed3330447de70d21329)
2024-07-22 10:44:13 +02:00
Jean-Marc Lasgouttes
0867aaf5c5 Fixup f4364c75: remove two more Update::SinglePar instances
They do not do what the author(s) of these lines thought it would do,
and can create crashes.

(cherry picked from commit 485f5afc21ba553fd16465231de7570b0c631298)
2024-07-20 23:50:48 +02:00
Pavel Sanda
5ba197d2f6 * status.24x 2024-07-19 23:52:04 +02:00
Pavel Sanda
33b1d7e39f Status bar did not show font info anymore.
This line from commit 1d1f95d2e seem to inadvertedly
slipped into commit 76dbb9dc.

https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg222405.html
2024-07-19 23:51:20 +02:00
Jean-Marc Lasgouttes
e57ccede18 Fix faulty undo recording
The recordUndo() call is very wrong, since we may be inserting over a
selection covering several paragraphs (undo itself works at paragraph
granularity).

recordUndoSelection() is the right operation in this case. It is
equivalent to recordUndo() when there is no selection.

(cherry picked from commit 82f387dabc2b18de6a9917192f4304e92bff8bc1)
2024-07-18 23:40:39 +02:00
Pavel Sanda
de2970a7d0 * status.24x 2024-07-17 16:06:47 +02:00
Pavel Sanda
f590902f26 * lib/RELEASE-NOTES 2024-07-17 15:07:53 +02:00
Juergen Spitzmueller
f8949079ef Fix crash when attempting to search in selection that contains only math
(cherry picked from commit cca68d0614269edfc256db82b3849afde4640dd7)
2024-07-15 18:22:13 +02:00
Jean-Marc Lasgouttes
2882bed1ab Add explicit check for EGREP in configure.ac
It is used in lib/Makefile.am and we were relying some autoconf macros
to define it as a side-effect. This is not the case anymore as of
autoconf 2.72.

(cherry picked from commit 31cde7247638a50c2302744984732064505b7d85)
2024-07-15 17:46:07 +02:00
Juergen Spitzmueller
d15f4fe5ec GuiTabular: add missing connections
(cherry picked from commit 2bf3124f25bd7f71ad37adcf710b66dfb52192ff)
2024-07-14 19:09:21 +02:00
Udi Fogiel
3c0e6b72a7 remove language switches from index entries in fr Additional.lyx 2024-07-10 23:14:25 +03:00
Jean-Marc Lasgouttes
aadf3d8a5d Make BufferView::singeParUpdate more robust
In some cases, it might happen that this method is called with no
metrics or position known for the current paragraph.

Take care of these cases to avoid assertions.

Remove setting of inset positions in the method, but make sure that
updateMetrics(false) is always called to get everything right.

In the new code, updateMetrics(bool) is the method that sets
everything right with minimal effort.

(cherry picked from commit 89ab9eb569ec0eea87d9a8c269eb87507934e1c5)
2024-07-10 17:18:48 +02:00
Jean-Marc Lasgouttes
f4364c7593 Remove useless SinglePar update when scrolling in text
Using SinglePar does not majke sense here since the paragraph is not
modified and it might even not have a position yet.

This fixes a crash in BufferView::singleParUpdate, which is not
prepared (yet) to such situations.

(cherry picked from commit 2bdd691130e5507fc5cc2ca81e71eef189e90fc5)
2024-07-10 17:18:48 +02:00
Jean-Marc Lasgouttes
2886843560 Make sure paragraph positions are updated when scrolling
Sometimes quick selection-scrolling could cause a crash because the
position of some paragraphs is not computed. To fix that, in
BufferView::showCursor, make sure that the metrics are always kept
clean using updateMetrics(false), which is lighweight.

As a consequence, the 'update' parameter of showCursor and
scrollDocView is not needed anymore. Its removal is mechanical and
accounts for most of this commit.

The only other significant change is that, when creating synthetic
mouse events and relying on scroll() for small moves, the full metrics
recomputation is replaced by the lighter version.

More work is still to come on this code, but this should be going in
the right direction.

(cherry picked from commit 6e0ea4269ae792225bb4e0d0f0ffcb3236c3c5c9)
2024-07-10 17:18:47 +02:00
Jean-Marc Lasgouttes
10b8861d10 Handle metrics of not visible paragraphs
The code is not ready for situations where some paragraphs that are
not visible have metrics available.

In PararagraphMetrics, some methods are added to be able to handle the
fact that paragraphs have or do not have a position.

In TextMetrics, a new method returns the first visible paragraph.

Finally, in BufferView::updateMetrics, the paragraphs' positions are
reset (in the case where everything is not cleared) and some care is
taken to skip the ones that are not relevant.

The assumption outside of this method is that all the paragraphs that
are in the TextMetrics are visible (we are talking about top-level
TextMetrics here). This could be changed (in order to avoid
recomputing paragraph metrics), but the cost is high in terms of
complexity and it is not clear that the gain in terms of performance
would be important.

NOTE: contrary to the code in master which returns npos = -10000, this
code still returns -1 when the position of a paragraph is unknown.

(cherry picked from commit 145af7c2ac1eb2c5ec5102a7a11cb740be7b3c43)
(cherry picked from commit 05bb851adfb733c942d243800d7151c6b9194645)
(cherry picked from commit 8bc3799b354908f22270f9d96b2cce43ebd96d66)
2024-07-10 17:18:47 +02:00
Jean-Marc Lasgouttes
f64349db8d Fix display of page references when language is not specified
Using translateIfPossible with null language does not make sense (and
gives an error on console).

Using translateIfPossible there actually does not make sense at all: it
is only for string from layout files that may already be translated.

We use the GUI language when no language has been specified (this is
different and probably safer than what is done in master).

A consequence of the commit is that "elsewhere" will be in the po
files and now really translatable ;)

(cherry picked from commit 6f6d9b631d110fb71fcd99351b4f40d58451700a)
2024-07-10 15:23:46 +02:00
Kornel Benko
4b9e1d8b09 Update sk.po 2024-07-08 11:50:08 +02:00
jpc
35ec2ebcd1 Update fr.po 2024-07-08 11:30:22 +02:00
Pavel Sanda
a187940fd2 * cs.po 2024-07-07 12:07:04 +02:00
Kornel Benko
e2ded58d70 Update sk.po 2024-07-06 09:38:56 +02:00
Juergen Spitzmueller
070a71a603 document performance fixes 2024-07-05 18:56:59 +02:00
Juergen Spitzmueller
fcd61f90e7 Cut excessively long author lists before parsing them for the GUI
as they will be truncated anyway.

Fixes performance issues with long author lists in bib files.

(cherry picked from commit 7d2d26132b6bb285e96d65da5ca8269061af8d6c)
2024-07-05 18:54:27 +02:00
Juergen Spitzmueller
0f35e3141b Remove performance bottleneck in getAuthors()
The regex is expensive which is especially noticeable with very long
author lists.

This introduces a case-insensitive subst() variant which is much faster.

(cherry picked from commit 8ba74fe9589fca3b00134e4d4f1fc130ad960c69)
2024-07-05 18:54:03 +02:00