Commit Graph

46885 Commits

Author SHA1 Message Date
Juergen Spitzmueller
90a876a049 enhance debug message (see #13087) 2024-08-07 14:46:30 +02:00
Juergen Spitzmueller
473180ec10 de.po 2024-08-07 10:55:18 +02:00
Kornel Benko
765ad2760c Update sk.po 2024-08-07 10:46:04 +02:00
Juergen Spitzmueller
1efdc11296 lyx_pot.py: Fix regex for \Format
Each token could be delimited by quotation marks or not. The previous
regexes only considered this for two tokens and hence produced wrong
matches for cases such as

\Format gnuplot     "gp, gnuplot, plt"    "Gnuplot"     "" "" ""  "vector"	"text/plain"

where the extension list wasn't parsed as a single token.
2024-08-07 09:11:35 +02:00
Richard Kimberly Heck
337a94a425 Restore obvious shortcut 2024-08-06 14:50:29 -04:00
Richard Kimberly Heck
b494286a9c 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.
2024-08-06 11:31:35 -04:00
Juergen Spitzmueller
f2e6a9b4ae Add plt as gnuplot extension (#11148)
This seems to be the common one on Windows
2024-08-06 16:29:55 +02:00
Juergen Spitzmueller
8aeee03e3a set toc_string_ before the label is being truncated
We do not want truncated items in the outliner.
2024-08-06 10:57:11 +02:00
Richard Kimberly Heck
1de4645286 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.
2024-08-05 18:13:07 -04:00
Pavel Sanda
c4d5a01787 * README.localization - add description from Juergen's reply in #1308. 2024-08-05 23:08:39 +02:00
Juergen Spitzmueller
b630abb4b0 Update Polish translation (from Tomasz Kołodziejski) 2024-08-05 10:31:20 +02:00
Juergen Spitzmueller
43baae382c Add Tomasz Kołodziejski to the credits 2024-08-05 10:28:31 +02:00
Kornel Benko
19e02ed102 Update sk.po 2024-08-02 08:58:44 +02:00
Juergen Spitzmueller
7ac4e53e37 Disambiguate string
At least in German "label" in a form and "label" as in \label
translate differently
2024-08-01 12:16:10 +02:00
Juergen Spitzmueller
6c867b1367 de.po 2024-08-01 12:07:03 +02:00
Juergen Spitzmueller
9fc1194494 Amend 9464f0526e
Simplify function
2024-07-30 15:30:41 +02:00
Juergen Spitzmueller
9464f0526e Fixup LFUN_REFERENCE_TO_PARAGRAPH for captions in other buffers
The movement to the caption is now done in the LFUN function itself,
as we need the DocIterator in the caption

This greatly simplifies the code in the TocWidget and shifts all the
complexity to the LFUN itself
2024-07-30 12:36:20 +02:00
Juergen Spitzmueller
4ed822925f fixup REFERENCE_TO_PARAGRAPH:
* par id actually can be 0
* properly move on in the buffer list if paragraph is not found
  in the current buffer
* use dit to get label (as this might be in a different buffer)
2024-07-30 09:49:34 +02:00
Juergen Spitzmueller
2c4536c709 typo 2024-07-29 09:11:42 +02:00
Juergen Spitzmueller
7d46ddaa95 rename Paragraph::getLabel()
getLabel() usually refers to a paragraph label (e.g. \item) in this
context, not \label as in the case here.
2024-07-29 09:08:13 +02:00
Juergen Spitzmueller
2fdeee4bf7 fixup definition of LFUN_REFERENCE_TO_PARAGRAPH 2024-07-29 08:46:43 +02:00
Juergen Spitzmueller
143e534d1e Implement reference-to-paragraph in outliner (#1624)
This allows to insert a cross-reference to headings, figures or tables
by right-clicking on the outliner item.

If the item in question does not have a label yet, it is inserted.
2024-07-28 15:59:06 +02:00
Juergen Spitzmueller
3fe99bf6f5 Implement LFUN_REFERENCE_TO_PARAGRAPH
This function checks whether a paragraph (specified by ID) has a label.
If so, it simply inserts a reference to this at cursor position, if
not it inserts a label to that paragraph (pos 0) and then inserts
a reference at cursor position.

Needed to implement #1624 (insert cross references to items that do not
have yet a label)
2024-07-28 15:54:55 +02:00
Juergen Spitzmueller
e3b36208ed Allow DocIterator::paragraphGotoArgument() to return id() without pos()
We need this for the forthcoming reference-to-paragraph function
2024-07-28 15:53:05 +02:00
Juergen Spitzmueller
a303600b54 Implement Paragraph::getLabel()
This function returns the first label (as string) if there is any
2024-07-28 15:52:19 +02:00
José Matos
52295693d6 Clean python code (lyx2lyx)
Please linter where it makes sense:

* Avoid bare exceptions;
* Use formatted strings instead of string interpolation
2024-07-28 09:56:29 +01:00
Juergen Spitzmueller
181c8ce7c1 re-implement LFUN_REFERENCE_INSERT
this is in preparation of another feature
2024-07-28 10:37:30 +02:00
Juergen Spitzmueller
5c3b788999 amend d4f58c96b5
avoid having to validate the whole buffer just for this information
2024-07-27 13:34:38 +02:00
Juergen Spitzmueller
ca4fc01847 Load geometry after graphics
Newer graphics driver overwrite some (output) page settings otherwise
See https://tex.stackexchange.com/a/384952/19291

Re-fixes #10970
2024-07-27 12:46:12 +02:00
Juergen Spitzmueller
b6d3066ad2 GuiLog: show also log files of additional indices 2024-07-26 18:48:31 +02:00
Juergen Spitzmueller
d4f58c96b5 Add support for multiple indexes in Memoir
As with almost everything, this class bakes its own cake also with
multiple indexes. So we need to account for this to produce
compilable output.

Not very nice, but there you go!
2024-07-26 12:48:12 +02:00
Jean-Marc Lasgouttes
fe1a3b57df Fixup 999fb37e: always run updateMacros when in batch mode
The optimization is useful in GUI mode only, and it turns out that it
creates weird crashes otherwise.

Thanks to Juergen Spitzmuller for the idea.
2024-07-25 18:37:50 +02:00
Juergen Spitzmueller
003bbd3483 Avoid loop in math parsing function 2024-07-25 09:18:01 +02:00
Jean-Marc Lasgouttes
0d50a8417f Do not update statisitics if buffer has not changed
Rely on the newly-introduced Buffer::id() to skip statistics
computation if the id is the same as last time. This will reduce the
annoyance of updates triggering at random times.

Take this occasion to clean code up:

- add 'skip' parameter (true by default) to Statistics::update to indicate
  that the insets that do not produce output should be skipped.

- use a trailing underscrore for private members
2024-07-24 22:38:39 +02:00
Juergen Spitzmueller
823d290036 amend 9291fc465b
XHTML wants LaTeX math, nothing converted to unicode
2024-07-24 21:44:02 +02:00
Jean-Marc Lasgouttes
a042d6a9d2 fix warning 2024-07-24 21:10:22 +02:00
Pavel Sanda
307d59cdb9 Squash gcc warning. 2024-07-24 19:55:05 +02:00
Jean-Marc Lasgouttes
393f65c737 Fixup 6e81f317: cut and paste error 2024-07-24 18:51:35 +02:00
Jean-Marc Lasgouttes
999fb37ebb Do not run updateMacros if the buffer has not changed
Each buffer now has an id which is increased when it is marked dirty
(or when one of its relatives is marked dirty).

This can be a big win since updateMacros is very expensive.
2024-07-24 18:29:43 +02:00
Jean-Marc Lasgouttes
6e81f31722 Rewrite statistics code
The statistics code is known to be very slow, because it relies on
DocIterator to go through the buffer.

This commit introduces a new Statistics class that encapsulates the
main code, along a virtual method Inset::updateStatistics() that
allows to fine-tune how counting is done inset by inset.

This is a faithful bug-for-bug reimplementation.

The new code appears to be 3x faster than the old one.

See bug #12929 for a discussion about statistics update woes.
2024-07-24 18:07:04 +02:00
Scott Kostyshak
8c3d378217 Amend previous commit (4b33e603)
Jürgen confirmed that the layout change to the last file is indeed
expected [1].

[1] https://www.mail-archive.com/search?l=mid&q=e00fb2e29dfd77b992761aaa1f822fc979059728.camel%40lyx.org
2024-07-24 11:00:51 -04:00
Scott Kostyshak
4b33e60346 Update layouts
I do not commit the update to the following file since it has a
non-trivial change:

  lib/layouts/jlreq-common.inc

I'll ask for confirmation on the list before updating that file.
2024-07-24 10:19:31 -04:00
Jean-Marc Lasgouttes
1186d90edf 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.
2024-07-23 23:44:58 +02:00
Jean-Marc Lasgouttes
1385f0fddd Fixup 216a6fb348: close <mtext> when quitting text mode
This fixes malformed documents on UserGuide export.

Related to bug #13069.
2024-07-23 22:02:50 +02:00
Jean-Marc Lasgouttes
a268fe096a Fixup 216a6fb3: 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.
2024-07-23 19:52:12 +02:00
Richard Kimberly Heck
fb919e653d Typo 2024-07-22 16:21:37 -04:00
Jean-Marc Lasgouttes
1cc1f0ba27 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.
2024-07-22 22:02:04 +02:00
Jean-Marc Lasgouttes
216a6fb348 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.
2024-07-22 20:53:29 +02:00
Jean-Marc Lasgouttes
fbd4b0a13f 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.
2024-07-22 20:53:29 +02:00
Jean-Marc Lasgouttes
d7ba7bceb3 Revert "Fix bug #13069."
This reverts commit fafe3ea5d7.
2024-07-22 20:53:29 +02:00