Commit Graph

47108 Commits

Author SHA1 Message Date
Juergen Spitzmueller
40dd37089d Fix erroneous whitespace before and after math preview (#13127) 2024-12-15 09:49:36 +01:00
Koji Yokota
0c004a7566 Fix typos in Japanese Welcome.lyx 2024-12-14 13:37:05 +09:00
Jean-Marc Lasgouttes
e3ec44ffe7 Fixup 5e857883: update screen when clicking away from preview
This is a regression in 5e857883 that comes from the fact that the
Update::singlePar flag does not operate on the paragraph that may be
modified but on the one where the cursor currently lies.

Until this is fixed, we do a full update when this situation is encountered.

Fixes bug #13128.
2024-12-10 17:43:19 +01:00
Koji Yokota
6bfa5f2e38 Make upLaTeX a default compiler for Japanese documents 2024-12-08 11:12:26 +09:00
Koji Yokota
291a62263e Add front/main/backmatter styles to JLReq layout 2024-12-08 11:11:49 +09:00
Kornel Benko
e6c49c127f Cmake build: Remove warning about deprecated Compatibility with cmake <
3.10

Also use NEW policy CMP0177, since we already should not use '..' or '.'
in destination paths.
2024-12-07 15:24:15 +01:00
Pavel Sanda
ac90ebad04 * doxy - amend 1e5c366d53 2024-12-06 23:31:49 +01:00
Pavel Sanda
c05e5d3a34 * doxy - amend 154b4fdece 2024-12-06 23:19:08 +01:00
Richard Kimberly Heck
81f5fc80b5 Use buffer language 2024-12-05 17:21:40 -05:00
Richard Kimberly Heck
945251a6c5 Word count for references 2024-12-05 17:17:54 -05:00
Enrico Forestieri
556efce34b Account for extensions when creating a LyX archive
LyX archives created after importing a LaTeX document may not
include bibliography style and catalog files. This is because
tex2lyx does not remove extensions, but the lyxpak script
expects files without extensions. So, teach lyxpak to also take
possible extensions into account.

Fixes #13129
2024-12-05 10:05:53 +01:00
Stephan Witt
391ed04cd2 support for more modern macos versions 2024-12-02 08:47:28 -08:00
Stephan Witt
bdaf1dbe99 #12224 improved palette change event for macos 2024-12-02 08:46:04 -08:00
Jean-Marc Lasgouttes
8e29ad433d Fixup 91d1ad31: beware of the reurn values of getPosNearX
The pair returned by TextMetrics;;getPosNearX is (position, boundary).
Here one had to use short variable names p and b because 'pos' and
'boundary' are a members of Cursor, and [b, p] was use dinstead of
[p,b].

Here, we added a bool & version of boundary() instead to the usual
getter/setter paradigm, because pos() is already like that. It might
be that the setter should be removed later.

Using these two members, it is now possible to use std::tie instead of
auto [,].
2024-12-02 15:24:38 +01:00
Jean-Marc Lasgouttes
629a692ce2 Cleanup Row::findElement and introduce Row::pos2x
Remove the functionality of findElement of also computing a pixel
position and introduce a function that only does that.
2024-11-29 12:14:52 +01:00
Jean-Marc Lasgouttes
d19f4319dc Try to reduce the use of CoordCache::insets().dim()
The debug code does not needed it. The code in Cursor is only used in
mathed.
2024-11-29 11:52:57 +01:00
Jean-Marc Lasgouttes
6701a5d55c Get rid of TextMetrics::x2pos
Replace it with code that uses getPosNearX.
2024-11-25 17:34:43 +01:00
Jean-Marc Lasgouttes
4c72def295 Forgot that 2024-11-25 17:01:30 +01:00
Jean-Marc Lasgouttes
1dbe589b27 Use setCursorFromCoordinates when scrolling
This is better that rewriting yet another version of the same code.
2024-11-25 16:59:20 +01:00
Jean-Marc Lasgouttes
91d1ad319d Cleanup TextMetrics::getPosNearX
This function mostly iterates though a row. Therefore it makes sense
to turn it into a wrapper around an new Row::x2pos() function.

Take this opportunity to use the C++17 structured bindings declaration
instead of passing a bool variable by address (which is only an output
variable).

No change intended.
2024-11-25 15:55:20 +01:00
Juergen Spitzmueller
80d731e119 Add missing refprefix includes (#13125) 2024-11-25 11:07:59 +01:00
Jean-Marc Lasgouttes
ecac032a94 Improve cursor movement with boundaries
Introduce a new NoEndBoundary flag for insets like InsetNewline.

Indroduce Row::start_boundary() that is true when previous Row has
end_boundary() set.

Use this to improve cursor movement around row boundaries (both for
logical ad visible cursor movement). The new code remove some of the
newline/separator hardcoding.
2024-11-22 16:30:48 +01:00
Jean-Marc Lasgouttes
33442b17ee Insert a real empty row before display math at start of paragraph
In LaTeX, when a displayed equation is at the start of a paragraph,
there is an empty row in front of it. Up to now, this was mimicked in
LyX by increasing the metrics on top of the inset. This commit creates
a real empty row, accessible by the cursor.

To make this work, many small unrelated changes are needed.

* Introduce new AlwaysBreakBefore inset row flag that means "I want a
  break before myself, even if that means creating an empty row".

* Let InsetMathHull use that for display math.

* Remove the workaround that was added for InsetMathHull metrics. This
  means that MetricsInfo::vmode is not used anymore. I decided to keep it,
  since it may prove useful later.

* Handle the flag in TextMetrics::breakParagraph. This requires to add
  a new flag 'ignore_contents' to TextMetrics::leftMargin, because we
  want the empty row to have a normal left indentation, not the one of
  display math (which is also at pos==0).

* In the initial empty row, do not inherit from the centered alignment
  of the math inset, although both are at position 0.

* Concerning cursor positioning with mouse, two methods need fixing:

  For the vertical part, handle in TextMetrics::getRowIndex the cursor
  boundary at position 0 when it is set. Basically, with cursor
  boundary true, the cursor will be in the empty row, whereas it will
  be in font of the math inset otherwise.

  For the horizontal part, handle empty row in TextMetrics::getPosNearX.

Fixes bugs 11593 and 11093.
2024-11-22 15:29:00 +01:00
Jean-Marc Lasgouttes
6727022b05 Code factorization around getRow()
Rename ParagraphMetrics::pos2row to getRowIndex and add a 'boundary'
parameter. Simplify code that handles boundaries.

No change intended.
2024-11-22 10:33:03 +01:00
Scott Kostyshak
6cc9638dc2 Initial commit of lyx-tester
These scripts help with building and testing LyX, mostly with the
ctest framework.

"lyxbuild" is a build script that has different options (e.g., to
compile with Clang/GCC, Qt 5/6, CMake/autotools). The build script
also has an option to cherry-pick compiler fixes which make it
easier to build older commits on newer compiler versions (useful
when performing a "git bisect"). See "lyxbuild --help" for more
information.

The previous home of lyx-tester was:

  https://gitlab.com/scottkosty/lyx-tester
2024-11-18 16:20:40 +01:00
Juergen Spitzmueller
d42a300dfe Quote file name to table style in LFUN_TABULAR_STYLE_INSERT
This might fix the woes with table styles on windows, where the path
to the system directory has blanks IIRC (C:\Program Files\...)
2024-11-18 10:23:31 +01:00
Juergen Spitzmueller
7016f0c676 Remove unused variables
Probably relicts from development
2024-11-18 10:11:41 +01:00
Juergen Spitzmueller
db3f127e0d de.po 2024-11-17 17:12:32 +01:00
Enrico Forestieri
094bfce437 Update it.po 2024-11-17 16:12:47 +01:00
Koji Yokota
b30ccafb46 Fix a wrong UTF-8 character in a comment 2024-11-16 00:50:02 +09:00
Kornel Benko
3fe6163d74 Update sk.po 2024-11-14 12:08:02 +01:00
Thibaut Cuvelier
4d4888aba8 Added mrow to InsetMathCases::mathmlize
Co-authored-by: Lorenzo Bertini <lorenzobertini97@gmail.com>
2024-11-13 20:08:09 +01:00
Juergen Spitzmueller
51f4fc7f67 Revert unintended change
This has only been done locally to test for the fallback
2024-11-13 09:29:37 +01:00
Juergen Spitzmueller
360bb1fa7c Implement support for classico font package (#13124)
This is only an alternative to the classico font we already support
(uop), hence no file format change.
2024-11-13 09:04:56 +01:00
Juergen Spitzmueller
833c372931 Fixup logic in LaTeXFonts::getUsedFont()
Allow for unavailable switchdefault fonts fall back to AltFonts

Prerequisite to implement #13124
2024-11-13 09:02:49 +01:00
Thibaut Cuvelier
1381e3e575 docbook2epub: make the output of the parameters easier to read. 2024-11-11 23:50:43 +01:00
Thibaut Cuvelier
637ae9528f docbook2epub: create the OEBPS and META-INF folders that Saxon seems unable to create. 2024-11-11 23:46:27 +01:00
Scott Kostyshak
92b656c17b Revert "Amend a83159f0: Use logical operator ||."
This reverts commit 48c069fa8a.

The commit unintentionally changed behavior. See #13116.
2024-11-11 21:32:18 +01:00
Juergen Spitzmueller
7bf14813d7 Introduce dark/light mode preference (#12224)
This requires Qt 6.8 and only works on Win and Mac.
2024-11-10 10:42:20 +01:00
Scott Kostyshak
25cc10a04c ctests: uninvert some three systemF tests
These Astronomy_%26_Astrophysics tests now succeed:

  export/examples/Articles/Astronomy_%26_Astrophysics_dvi3_systemF
  export/examples/Articles/Astronomy_%26_Astrophysics_pdf4_systemF
  export/examples/Articles/Astronomy_%26_Astrophysics_pdf5_systemF
2024-11-09 15:13:19 +01:00
Kornel Benko
f784f3fe6f Update sk.po 2024-11-07 14:18:12 +01:00
Kornel Benko
695b2f485c Cmake tests: Add test for possible wrong used constants in our ui-files 2024-11-07 14:16:03 +01:00
Juergen Spitzmueller
d75ab6d6f0 One more Qt enum fix 2024-11-07 12:38:19 +01:00
Juergen Spitzmueller
9ffacb341d Fix spacing problems in previews with math macros (#13120)
This occurs on the legacy path when no cropping tools are available.
2024-11-06 18:26:14 +01:00
Jean-Marc Lasgouttes
b40aa80517 Reorganize file list in Makefile
The separation between cpp files and .h files was only necessary for
the monolithic build feature.

Moreover, try to move the stuff in lyx_SOURCES to liblyxcore_a_SOURCES.
Two issues though:

- Box::contains creates a link error, so put all the code in Box.h

- Compare::Compare is an issue too, and I am not sure how to fix it.
  For now, it is thus kept in lyx_SOURCES.

Moreover, version.{cpp,h} are moved to lyx_SOURCES to avoid rebuilding
liblyxcore.a at every commit.
2024-11-05 15:11:11 +01:00
Kornel Benko
c5d6f2eae9 Amend d86dbf66 and 159e8f2d for cmake build. 2024-11-04 20:18:14 +01:00
Richard Kimberly Heck
e1bbb57f62 Fix copy and paste error 2024-11-04 13:37:02 -05:00
Jean-Marc Lasgouttes
8c43a134fd With Qt 5.9, we need to include <functional>
Also remove 'using' statements (to be avoided in header files) and
refer to std::xxx instead of lyx:xxx.
2024-11-04 18:25:31 +01:00
Jean-Marc Lasgouttes
d86dbf6675 LYX_BEGIN_MUTE_GCC_WARNING: disable for gcc <= 7
I do not know until which version gcc has complained when trying to
mute a warning that it does not support. Recent versions do not do
that.

For now let's just do gcc 7, the limit should be higher.
2024-11-04 17:40:15 +01:00
Jean-Marc Lasgouttes
159e8f2dde Re-instate support for Qt 5.9.4
It was a bit overkill to require support for Qt 5.12 at 6ba2b5c5 and
c39d5b76. Revert partly these commits.
2024-11-04 17:22:21 +01:00