Commit Graph

46676 Commits

Author SHA1 Message Date
José Matos
5abe42f6d3 Tweak ruff configuration
Add I - isort rules (order of imports);
Ignore line too long warnings.
2024-06-18 10:24:09 +01:00
Enrico Forestieri
fe64db4b70 Add xcb lib if x11extras is detected
In this case we use directly some xcb api outside of the Qt framework
and hence we have to add the xcb library by ourselves.
2024-06-17 21:57:24 +02:00
Jean-Marc Lasgouttes
5d76b4bb8f Support qmake with Qt5 too
This extends the support of qmake to Qt5. Currently, the other
configuration methods are tried if qmake fails, but a message is
printed.

A nice goal would be to get rid of those legacy methods (pkg-config,
plain autoconf-style), if this proves possible.
2024-06-17 17:09:04 +02:00
José Matos
4534a20f1a Fix functions that used functions but did not defined it
The functions were selected from the parser files where document is
always defined.

The only case was this code was used was on document.warning.

Since our documents are well formed this code was never active and thus
the reason why we did not saw this before.

One possible solution to assure that these type of errors do not occur
is to make the convention that all the functions in lyx2lyx_tools have
as the first argument document.
2024-06-17 11:31:10 +01:00
Scott Kostyshak
1a87c5313d Adapt to deprecation of \DeclareCollectionInstance
Change LaTeX output of smallLetterFrac. For more information, see:

  https://tex.stackexchange.com/questions/720579/do-i-need-to-replace-declarecollectioninstance-after-recent-package-change/

This fixes 44 failing tests from 074-76-letterlike-numberforms-arrows.lyx
that started failing after a tlmgr update around 2024-06-04.
2024-06-16 11:50:34 -04:00
Juergen Spitzmueller
9d3bd6a3a2 more indentation fixes 2024-06-16 16:16:59 +02:00
Juergen Spitzmueller
c243126eb4 GuiDocument: do not ask switch-back question on document closing 2024-06-16 15:54:50 +02:00
Juergen Spitzmueller
3fa2623ca0 Fix indentation 2024-06-16 15:54:50 +02:00
Juergen Spitzmueller
3d78d8734d Fix indentation 2024-06-16 15:54:50 +02:00
José Matos
160ac7242e Remove undisclosed imports (from xxx import *)
This was the last example in this directory.
2024-06-16 07:45:43 +01:00
José Matos
b80ccaa417 Add common pattern in linter exclusion list
# ambiguous-variable-name (E741)

Derived from the **pycodestyle** linter.

## What it does
Checks for the use of the characters 'l', 'O', or 'I' as variable names.

## Why is this bad?
In some fonts, these characters are indistinguishable from the
numerals one and zero. When tempted to use 'l', use 'L' instead.

## Reason to ignore in LyX?
With appropriated fonts that is not an issue. In our case we just use
the 'l', in particular in the context of iterators: 'i', 'j', 'k', 'l'.
2024-06-16 07:34:34 +01:00
Juergen Spitzmueller
0fc8ee5ace Prevent division by zero
Fixes crash reported at
https://marc.info/?l=lyx-users&m=171842978728676
2024-06-15 14:48:37 +02:00
Juergen Spitzmueller
9fff7bdd5a de/UserGuide: updates 2024-06-15 14:29:26 +02:00
José Matos
a0a5892ae8 Fix code
Run "ruff check --fix"

Remove unneeded imports;
Reword code to make clear the "not in" operator;
Put imports in its own line (readability);
2024-06-15 11:26:28 +01:00
José Matos
b4db3ea137 Reformat lyx2lyx code using ruff 2024-06-15 10:06:06 +01:00
José Matos
aaef6d2693 Add pyproject.toml file to manage some options for tools
This file is only relevant for tools that use it, in development, and so
it is not supposed to be installed. It does not harm but there is no
purpose.
2024-06-15 10:04:31 +01:00
Pavel Sanda
1e5c366d53 Add comment from dev list. 2024-06-14 22:40:22 +02:00
Pavel Sanda
e5b027759c * UG - note about gnuplot from Tobias Hilbricht 2024-06-14 21:18:29 +02:00
Daniel Ramoeller
92aeaf5d73 Fix depth bar optics 2024-06-14 16:28:04 +02:00
José Matos
ef5f142b9a Update python requirements notice in INSTALL 2024-06-13 10:44:56 +01:00
Juergen Spitzmueller
ea1f3099cf update tex2lyx tests 2024-06-13 07:49:32 +02:00
Udi Fogiel
3854086e59 Remove hebrew letter document class
The only difference from regular letter is the alignment of
"Send To Address" layout, but it no longer reflect the output
corrctly, probably because LyX revert the alignment of layouts
in RTL context now.
2024-06-11 21:14:27 +03:00
Jean-Marc Lasgouttes
b54d352075 InsetMathMacoTemplate: recompute metrics on editXY too
This inset can change dimensions when edited (like macros can).
Therefore Update::SinglePar should be set with editXY() like it is
already set for edit().
2024-06-11 17:04:58 +02:00
Jean-Marc Lasgouttes
f48cf46101 Add "full" drawing strategy
With this patch, 3 draw strategies (set in prefs with
\draw_strategy partial|backingstore|full) are available:

- "partial": only draw the parts of text that have changed since last
  paint event (default for X11 and windows)

- "backingstore": the same, but drawing happens on an offspring
  pixmap; this breaks subpixel rendering (default for Wayland and
  macOS)

- "full": the screen is fully redrawn at each paint event and should
  therefore always be correct; this is presumably slower but
  introducing it will allow to test it.

This would deserve a proper UI eventually.
2024-06-11 15:17:22 +02:00
Kornel Benko
9ace073cc5 Update sk.po 2024-06-11 13:27:46 +02:00
Jean-Marc Lasgouttes
30338ec6b3 Remove debug code that is not very useful as it is. 2024-06-10 20:33:27 +02:00
Alexander Dunlap
8c501308c3 FindAdv: Omitting cursor advance at start of search if in mathed.
Fixes #13070 Advanced S&R does not find math symbols at start of document
2024-06-10 14:46:07 +02:00
Udi Fogiel
a5749b9c1f Fix change tracking colors with RTL languages (#12923) 2024-06-10 15:19:08 +03:00
Udi Fogiel
ee43584140 Fix greyedout with RTL languages (#8647) 2024-06-10 15:03:05 +03:00
José Matos
c92b481a44 Reformat imports for easier reading
This is in line with the current hints for better readability:

* one import per line;
* order the imports alphabetically to be easier to search;

Take the chance to remove unused imports.
2024-06-10 12:05:03 +01:00
José Matos
aeee6b373e Update generate contributions to Python 3+ 2024-06-10 11:43:04 +01:00
José Matos
04ecabef60 Update Python scripts to Python 3+
Remove support for Python 2

Use formatted strings where appropriated
2024-06-10 11:29:56 +01:00
José Matos
f9ec4186d7 Update lyx2lyx folder to Python 3+
Remove support for Python 2
Take advantage of new features (euphemism) not possible before due to
python 2 compatibility
2024-06-10 10:55:40 +01:00
José Matos
df0e337684 Update configure.py to Python3+
Remove Python 2 support

This simplifies the code and allows to use other more modern features,
like formatted strings, that were not possible while keeping Python 2
compatibility.
2024-06-10 10:38:28 +01:00
José Matos
b86059ee6d Update build time Python requirement to 2.8 (cmake edition) 2024-06-10 10:33:33 +01:00
José Matos
1d2f8b94cb Update Python build time requirement to 3.8 2024-06-10 10:10:39 +01:00
José Matos
1c458dc121 Python runtime detection requirement upgraded to 3.8
Remove -tt option that is a no-op in Python 3.

Remove search for Python 2
2024-06-10 10:04:26 +01:00
Richard Kimberly Heck
4372f1b58f Brackets.
I read somewhere that comments after an if-statement without brackets
is dangerous.
2024-06-09 21:02:24 -04:00
Richard Kimberly Heck
8655c83a90 Fix bug #13028.
Bindings for 'join lines.
2024-06-09 14:13:12 -04:00
Udi Fogiel
61bee11a62 ammend 64aad586f4
Remove an empty auxiliary file that snuck in (sorry...)
2024-06-09 21:06:25 +03:00
Enrico Forestieri
afb70c905b Fix textstyle-update handling in mathed
The code was expecting that all properties were specified
in the argument and not only some. Simply do not process
those properties not specified in the argument.
2024-06-09 13:06:35 +02:00
Udi-Fogiel
64aad586f4 missing background in xetex and fix RTL stuff in preview
* previwes with xetex did not produce any background (\pagecolor does not work for some reason), adding the direct command for that, \special{background <color>} inside the preview box solved it.

* similar to #12923 we should push the color node in horizontal mode

* there is a bug in preview with LuaTeX with main RTL language, this commit fix this bug, but it should be removed when it is fixed upstream (the code related to \pr@set@pagerightoffset)
2024-06-09 13:36:35 +03:00
Juergen Spitzmueller
2a9648fc4c Return false on invalid input in Font::fromString()
Fixes crash with invalid font-update lfun
2024-06-09 08:09:01 +02:00
Juergen Spitzmueller
747a4a7946 rename function 2024-06-09 07:29:37 +02:00
Scott Kostyshak
325f1429f8 Fix Python warning of invalid escape in lyx_pot.py
Newer Python versions (e.g., Python 3.12.3) gave the following
warning:

  po/lyx_pot.py:607: SyntaxWarning: invalid escape sequence '\w'

An alternative fix would be to double the backslash, but that might
be less readable than this fix.
2024-06-08 11:57:58 -04:00
Juergen Spitzmueller
f1742ee269 Implement InsetLayout::requiresPackage() 2024-06-08 13:02:26 +02:00
Jean-Marc Lasgouttes
a185642746 Text::dispatch: ignore single par update when there is a full update
Reorder the tests so that, when the flag Update::SinglePar has been
specified, it does not take precedence over Update::Force flag.

This fixes the crash with inset-split.
2024-06-07 16:52:04 +02:00
Jean-Marc Lasgouttes
c96d3a0340 Fixup 7acfbe0fcc: forgot to change one location 2024-06-06 17:27:24 +02:00
Jean-Marc Lasgouttes
7acfbe0fcc Do not draw appendix lines below en of document
This bug is pretty old, but it was not visible because the grey area
below the document would overwrite it.

It would be better to close the frame at the end of the document, but
this is for later.
2024-06-06 14:38:20 +02:00
Jean-Marc Lasgouttes
92ef555abd Fixup de5f63eeb: the code did not do what it was supposed to 2024-06-06 08:40:50 +02:00