Commit Graph

29446 Commits

Author SHA1 Message Date
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
Jean-Marc Lasgouttes
cd4d54f76a Revert "Cmake build: Add Qt?Xml modules to build."
This reverts commit 0116048697.
2024-07-22 20:53:29 +02:00
Jean-Marc Lasgouttes
095bb18331 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.
2024-07-22 20:36:20 +02:00
Juergen Spitzmueller
5bc4c11fd6 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
2024-07-22 09:51:54 +02:00
Jean-Marc Lasgouttes
23379bb1d5 Store spellchecker_esc_chars as a docstring
This is a minor optimization to avoid calling from_utf8() repeatedly
on a hot path.
2024-07-21 21:35:14 +02:00
Juergen Spitzmueller
f1ba6559f2 update tex2lyx tests 2024-07-21 18:06:58 +02:00
Juergen Spitzmueller
ae1e1cb069 Add possibility to manually specify longest label in nomenclature
File format change
2024-07-21 17:59:34 +02:00
Juergen Spitzmueller
eb1ac06a9a Consider masked modifiers (~S etc.) when writing to bind file
Fixes #12973
2024-07-21 10:18:58 +02:00
Jean-Marc Lasgouttes
3040eb0fa2 Use background to make math comments more visible 2024-07-20 23:37:24 +02:00
Juergen Spitzmueller
c4001c7022 update comment 2024-07-20 17:47:47 +02:00
Juergen Spitzmueller
d62f1723a5 Improve calculation of longest nomencl string
This tries o convert LaTeX macros before estimating the length
2024-07-20 17:39:58 +02:00
Juergen Spitzmueller
9291fc465b mode convertLaTeXCommands from BiblioInfo to Encodings
So it can also be used in other contexts.

This includes also an improvement of math parsing
2024-07-20 17:39:58 +02:00
Jean-Marc Lasgouttes
485f5afc21 Fixup 2bdd691130: 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.
2024-07-20 17:13:40 +02:00
Jean-Marc Lasgouttes
82f387dabc 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.
2024-07-16 15:43:11 +02:00
Juergen Spitzmueller
cca68d0614 Fix crash when attempting to search in selection that contains only math 2024-07-15 17:41:10 +02:00
Jean-Marc Lasgouttes
281744d24f Sort entries in src/Makefile.am
Remove also STANDALONEFILES variable, which is a remain of monolithic
builds.
2024-07-15 12:10:25 +02:00
Juergen Spitzmueller
2bf3124f25 GuiTabular: add missing connections 2024-07-14 14:20:05 +02:00
Juergen Spitzmueller
723a38be35 Improve tex2lyx for style-specific biblatex citation commands 2024-07-14 14:02:10 +02:00
Juergen Spitzmueller
55d60ee24f Rename function 2024-07-14 09:42:36 +02:00
Juergen Spitzmueller
25dd2e29b7 Fix non-biblatex style checks 2024-07-14 09:39:54 +02:00
Juergen Spitzmueller
08c0377f0c consider style-specifics for citation alias 2024-07-13 17:21:27 +02:00
Juergen Spitzmueller
6603c5362f Provide reversed style specifier for citation commands
This lets you exclude given variants for specific citation styles only
2024-07-13 17:20:29 +02:00
Juergen Spitzmueller
660ec568ef Check for uppercase marker after style prefix has been stripped 2024-07-13 17:16:34 +02:00
Jean-Marc Lasgouttes
ed2e5554d8 missing quote in message 2024-07-12 19:04:18 +02:00
Juergen Spitzmueller
a1e11fff44 update tex2lyx tests 2024-07-11 10:33:39 +02:00
Juergen Spitzmueller
2dac89aca0 Add support for biblatex-apa's \nptextcite 2024-07-11 10:28:38 +02:00
Juergen Spitzmueller
f7cc716861 Allow to pass several styles for style-specific cite commands 2024-07-11 10:09:26 +02:00
Juergen Spitzmueller
5c2652fa12 BiblioInfo: Ability to distinguish '&' and 'and' author separation
Finicky styles such as APA use both in different context, and we need
to represent this to make style choice differentiatable
2024-07-11 09:13:43 +02:00
Juergen Spitzmueller
a1e57a8fe5 BiblioInfo: Add citestyle conditional 2024-07-11 07:41:47 +02:00
Juergen Spitzmueller
40d644a7f9 Implement possibility to define citestyle-specific commands with biblatex
Not yet used.
2024-07-10 16:58:34 +02:00
Jean-Marc Lasgouttes
8bc3799b35 Fixup 145af7c2: remove unused method
TextMetrics::firstVisible(), introduced in this commit, is actually unused.
2024-07-10 13:42:57 +02:00
Juergen Spitzmueller
22332e35d8 update tex2lyx tests 2024-07-09 15:27:27 +02:00
Juergen Spitzmueller
8941b05774 Add support for biblatex-chicago (#12240)
File format change
2024-07-09 15:18:06 +02:00
Juergen Spitzmueller
a4b99aee94 BiblioInfo: provide macro for ellipses 2024-07-09 06:39:15 +02:00
Juergen Spitzmueller
f37448206a Fix string 2024-07-07 15:22:40 +02:00
Juergen Spitzmueller
8322622efa Add "notes" CiteEngine Type
This is needed for (forthcoming) biblatex-chicago support (see #12240)
2024-07-07 15:14:05 +02:00
Juergen Spitzmueller
666304633a Improve 0f35e3141b
* also handle replace string case-insensitively in case-insensitive mode
* leaner code
2024-07-06 09:25:57 +02:00
Juergen Spitzmueller
7d2d26132b 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.
2024-07-05 17:19:24 +02:00
Jean-Marc Lasgouttes
6f6d9b631d 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 buffer language when no language has been specified. It
might have been better to use the GUI language.

A consequence of the commit is that "elsewhere" will be in the po
files and now really translatable ;)
2024-07-05 16:18:09 +02:00
Juergen Spitzmueller
8ba74fe958 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.
2024-07-05 14:05:26 +02:00
Jean-Marc Lasgouttes
89ab9eb569 Make BufferView::singeParUpdate more robust
In some cases, it might happen that this method is called in cases
where no metrics is know for the current paragraph or where its
position is not set.

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) os the method that sets
everything right with minimal effort.
2024-07-03 17:43:00 +02:00
Jean-Marc Lasgouttes
2bdd691130 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.
2024-07-03 17:31:38 +02:00
Jean-Marc Lasgouttes
a7204098cf comment 2024-07-03 16:23:30 +02:00
Jean-Marc Lasgouttes
29597f600e fix comment 2024-07-03 15:43:12 +02:00
Jean-Marc Lasgouttes
6e0ea4269a 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.
2024-07-03 00:34:11 +02:00
Pavel Sanda
65a5c3989f cosmetics - synchronize with the rest of strings 2024-07-02 23:47:42 +02:00
Juergen Spitzmueller
4ed8bfb974 Do not check for diverging input encoding if the files use XeTeX/LuaTeX
Fixes the problem reported at
https://marc.info/?l=lyx-users&m=171986173131406
2024-07-02 16:59:28 +02:00
Jean-Marc Lasgouttes
c84c59eaec Avoid crash when InsetBibitem::updateCommand shows a dialog
This is one of the places where a dialog is shown (indicating that
some bibtems have been renamed) while the metrics are not up to date.
Then a draw operation can be triggered too early and a crash can ensue.

Use ad-hoc solution for this case and use Buffer::setBusy(). The
Alert::warning helper cannot really do that since it doe snot know the
current buffer.
2024-07-02 14:54:20 +02:00
Juergen Spitzmueller
574db22025 GuiDocument::onBufferViewChanged(): exit early if dialog is not open
This should fix the bug reported at
https://marc.info/?l=lyx-users&m=171957953801548&w=2
2024-07-02 11:02:36 +02:00
Richard Kimberly Heck
e7af6afb01 Add temporary directory to About LyX dialog 2024-06-25 11:32:36 -04:00
Jean-Marc Lasgouttes
e653907b84 fix comment 2024-06-25 12:01:53 +02:00
Pavel Sanda
fe9573ee8b Let the middle button pasting respect newlines by default.
This makes it in sync with the new default for Edit > Paste operation.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg222233.html
2024-06-24 22:35:01 +02:00
Juergen Spitzmueller
c394a1ccf9 Amend fd78a25a7c
This way, it is a bit more plausible what we're doing
2024-06-23 18:53:14 +02:00
Kornel Benko
0116048697 Cmake build: Add Qt?Xml modules to build.
Cmake part of the fix to #13069 XHTML output for InsetMathBox can loop forever
2024-06-23 12:37:32 -04:00
Richard Kimberly Heck
fafe3ea5d7 Fix bug #13069.
Use XML parser to handle <mtext> issues.

Some of the config/qt.m4 code by JMarc.
2024-06-23 12:37:25 -04:00
Juergen Spitzmueller
b5260a3a0f Remove unneeded cycle checks (#12954) 2024-06-23 14:53:07 +02:00
Juergen Spitzmueller
fd78a25a7c Only issue currentWorkareaChanged() if the work area really changed.
(this function can be called repeatedly while the work area doesn't
change any further)
2024-06-23 14:52:02 +02:00
Juergen Spitzmueller
026c4bd726 Fixup [152811a27d242/lyxgit]
tabBarClicked() should really only reset focus if a click in a different
TabBarGroup happened. And no need to issue workAreaChanged() again.

This has lead to extra and erroneous focus changes (see #12954)
2024-06-23 14:47:43 +02:00
Juergen Spitzmueller
8659924abd \cprotect amendment
\cprotect'ed insets do not need forced local font switch; in fact files
with this break in compilation. E.g. a caption with an URL containing
the char '#' and caption text set to a secondary language.
2024-06-22 13:38:47 +02:00
Jean-Marc Lasgouttes
45dce93af7 redoParagraph: avoid extra cache accesses
To this end, CoordCacheBase::add returns true when a change was made.
This uses the return value of std::unordered_map::insert.
2024-06-21 17:02:13 +02:00
Jean-Marc Lasgouttes
608929a857 Rename DocumentCLass:plainInsetLayout() to InsetLayout::undefined()
This makes the code easier to understand.
2024-06-20 18:29:41 +02:00
Jean-Marc Lasgouttes
c4531741a9 Fix cursor when undoing accept/reject all changes
Before this change, the whole document would remain selected.

This relies on the new UndoGroupHelper constructor introduced at e7b1ee47.
2024-06-20 18:02:33 +02:00
Jean-Marc Lasgouttes
e7b1ee47ea Add a constructor of UndoGroupHelper that uses a CursorData parameter
This aloows to se the the `before' cursor of the undo group.

Not used for now.
2024-06-20 17:52:19 +02:00
Jean-Marc Lasgouttes
f643057779 Remove useless cursor parameter to global undo actions
Add a Cursor-less version of Undo::recordUndoBufferParams (we don't
use an optional arument to avoir #includ'ing Cursor.h).

The version with CursorData parameter has been kept for the case of
local dictionary lfuns that have some kind of locality.

Remove Cursor argument to Undo::recordUndoFullBuffer().
2024-06-20 17:25:25 +02:00
Jean-Marc Lasgouttes
c7c16fe9fa Remove trailing underscore on members x and y of Point class.
These members are not private.
2024-06-20 16:37:05 +02:00
Jean-Marc Lasgouttes
b78d2a4eda Add missing override keyword 2024-06-19 15:05:45 +02:00
Jean-Marc Lasgouttes
c263463cad Move DrawStrategy enum to update_flags.h.
Introduce new drawStrategy() and drawStrategyDescription() methods to
frontend::Application.

Show the current draw strategy in About dialog.
2024-06-18 18:26:34 +02: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
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
Pavel Sanda
1e5c366d53 Add comment from dev list. 2024-06-14 22:40:22 +02:00
Daniel Ramoeller
92aeaf5d73 Fix depth bar optics 2024-06-14 16:28:04 +02: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
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
b86059ee6d Update build time Python requirement to 2.8 (cmake edition) 2024-06-10 10:33:33 +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
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
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
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
Juergen Spitzmueller
1449fbf9ae Strip quotes from PackageOptions. Amends a77c84a0b4 2024-06-06 06:58:33 +02:00
Richard Kimberly Heck
b8cdfd1e1d Use ranges 2024-06-03 22:05:15 -04:00
Udi-Fogiel
51453c61d6 avoid adding redundant preamble to double column hebrew documents (#12919) 2024-06-03 21:06:10 +03:00
Juergen Spitzmueller
7a85b1b7ca Show full inset context-menu when clicking on text part of collapsible (#10370)
Re-fix this since #12907 has been resolved
2024-06-03 16:12:15 +02:00
Kornel Benko
a8a408223a Adv. F&R: strange dialog text
Fixes #12997
Added 'Scope' to better indicate the searched area.
2024-06-03 08:13:28 +02:00
Richard Kimberly Heck
0c70f340c0 Fix bug #13066
Patch from Lorenzo
2024-06-02 23:07:34 -04:00
Richard Kimberly Heck
3e796c680a Fix table crash reported on Windows. 2024-06-02 23:07:34 -04:00
Scott Kostyshak
2e227cceaf Whitespace 2024-06-02 22:52:18 -04:00
Juergen Spitzmueller
2a7ec054be Support half und full line parskip class options (#12946)
Currently only employed by the KOMA classes.

Layout format change.
2024-06-02 11:41:54 +02:00
Richard Kimberly Heck
40ae8644f9 Put new citation after selected item rather than at end of list.
Fixes bug #12940.

Patch from Daniel.
2024-06-01 20:26:06 -04:00
Daniel Ramoeller
a114f12868 Extend tab context menu features
Add

- Close Other Tabs
- Close Tabs to Left/Right
- Move Tab to Start/End
- Show Enclosing Folder

to the tabs context menus.

Fix for bug #11963
2024-06-01 19:25:14 +02:00
Richard Kimberly Heck
6484dce51b Fix bug #12934 2024-06-01 13:05:12 -04:00
Richard Kimberly Heck
42a8463aab Fix bug #11796.
Toolbars are now locked by default. Unlocked state should be saved
by Qt as a session variable.

Patch from Daniel.
2024-06-01 12:43:56 -04:00
Richard Kimberly Heck
2a1c3dce57 Fix bug #8856.
Show values of cross-references in tooltips.
2024-06-01 12:36:00 -04:00
Richard Kimberly Heck
66cfc6af3c Remove setBuffer call in Cursor::push.
This is potentially slow. It also should be unnecessary after
some of JMarc's recent commits. See bug #13050.
2024-06-01 12:06:39 -04:00
Richard Kimberly Heck
61181a3977 Fix bug #12981 2024-06-01 11:52:05 -04:00
Richard Kimberly Heck
20ea874c17 Fix bug #12981 2024-06-01 11:48:04 -04:00
Juergen Spitzmueller
2e1c800eb8 update tex2lyx tests 2024-06-01 13:50:41 +02:00
Juergen Spitzmueller
d2db74f9ee Add support for glue length in parskip (#12867) 2024-06-01 13:47:39 +02:00
Juergen Spitzmueller
e1cb15ee5d Reset require_fresh_start_ after buffer has been viewed/exported
The LFUN buffer-reset-export states to start afresh the export for the
next run, but in fact, the boolean was never reset, so that this was
done for all subsequent runs unless the buffer had been closed and
reopened.

Now the lfun does what it states and only acts on the next pass.
2024-06-01 09:06:44 +02:00
Kornel Benko
f248b003a9 Amend 6c3447c8: FindAdv: sometimes a space is added on some math symbols
Restrict the removing to math insets
2024-05-31 09:15:59 +02:00
Kornel Benko
6c3447c8a6 FindAdv: sometimes a space is added on some math symbols
For example '\int '.
Should fix regression #13070
Spotted  by Alexander Dunlap

(cherry picked from commit 4730ec78f5)
2024-05-29 14:21:03 +02:00
Juergen Spitzmueller
ae1ddcbda0 InsetNote: pass on inset-modify lfuns addressed at other insets (#13068) 2024-05-24 14:19:18 +02:00
Thibaut Cuvelier
ce5f84ff02 XHTML: in InsetGraphics, use the bounding box that LyX computes for each image instead of using the scale. 2024-05-20 17:00:15 +02:00
Juergen Spitzmueller
44633c7f72 Address Qt 6.7 deprecation warning 2024-05-20 09:49:10 +02:00
Juergen Spitzmueller
10b5f03d95 Initialize is_long_tabular before updateIndexes() (which employs it) 2024-05-20 08:50:39 +02:00
Juergen Spitzmueller
6ef18c3583 Limit the nopassthurchars case in beamer to URL
and also generally extend to classes that provide hyperref
2024-05-20 08:26:03 +02:00
Thibaut Cuvelier
2d86b88124 XHTML: export paragraph IDs also for list items, but not for the opening tag of the list.
The IDs are used to link to specific elements (for instance, the User's guide nomenclature).

The beginning of the list (<ul> or <ol>) has the same magic ID as the first item of the list.
2024-05-20 03:21:00 +02:00
Thibaut Cuvelier
a4f675a040 XHTML: fix typo in comment. 2024-05-20 03:11:41 +02:00
Thibaut Cuvelier
f2660d172c InsetGraphics: use the scale CSS property instead of width with percentages.
The effect is closer to what LyX offers. Previously, the percentage was of the HTML container (often, the whole page), meaning that images were oversized. Now, the scale is respected in the same way as LyX, but its bounding box is off. Overall, the result is better, but not what users expect.
2024-05-20 01:10:05 +02:00
Richard Kimberly Heck
de5f63eeb3 Return a reference, not a copy.
Stupid mistake from 2009. Thanks to Scott and JMarc for tracking
it down.
2024-05-19 16:55:48 -04:00
Thibaut Cuvelier
7cfe36e6aa InsetInfo: no need to output + explicitly in a shortcut, it is already contained in the sequence. 2024-05-18 19:41:44 +02:00
Thibaut Cuvelier
e3f2b10842 Make comment clearer. 2024-05-18 19:38:52 +02:00
Scott Kostyshak
05bb851adf Comment typo 2024-05-17 12:18:09 -04:00
Jean-Marc Lasgouttes
145af7c2ac Fix up a4d9315b: handle metrics of not visible paragraphs
The code is not ready for situations where some paragraphs that are
not visible have metrics available. This has been made visible by
a4d9315b, which removes a couple of full metrics updates: the screen
was not correctly scrolled after a scrollToCursor() call.

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.
2024-05-17 17:39:09 +02:00
Jean-Marc Lasgouttes
b469c142ad Fix display of math hull inset in RTL context
The inversion of margin was done in the wrong way for RTL support.
2024-05-16 14:56:28 +02:00
Juergen Spitzmueller
2d95f8fc16 Amend 207eaeee90
The upstream encoding needs to be updated after this routine
(see comment in OutputParams.h:183ff.)
2024-05-16 07:33:29 +02:00
Juergen Spitzmueller
9d43fd2ae1 # and % need to be escaped in hyperref URL as well
Also fix some lyx2lyx glitches

This hopefully fixes the test issues.
2024-05-15 13:15:08 +02:00
Scott Kostyshak
c18f02967d Update tex2lyx tests
Needed after the file format change.
2024-05-15 00:27:27 -04:00
Juergen Spitzmueller
af59551b1b Amend a716fb96b5 2024-05-14 13:54:00 +02:00
Juergen Spitzmueller
a716fb96b5 NeedCProtect -1 also for InsetLayouts 2024-05-14 13:37:29 +02:00
Juergen Spitzmueller
2306082787 Revert false chunk 2024-05-14 13:21:55 +02:00
Juergen Spitzmueller
9dae88a15a Whitespace 2024-05-14 13:18:05 +02:00
Juergen Spitzmueller
52d31155c1 Properly escape backslash in URLs with hyperref (#13012) 2024-05-13 09:17:30 +02:00
Juergen Spitzmueller
ed62816eb6 Handle URL escaping in beamer frames
File format change -- this introduces the first LyX 2.5 format and
hence sets up the lyx2lyx machinery
2024-05-13 07:26:41 +02:00
Juergen Spitzmueller
207eaeee90 Introduce NeedCProtect -1 layout option
It turns out beamer frame does not allow \cprotect and errors if it is
used. Hence we need to prevent it in this context entirely.
2024-05-12 07:52:16 +02:00
Juergen Spitzmueller
fe4f0dbf0b Consider CT in dash mechanism (#13062) 2024-05-11 13:07:32 +02:00
Jean-Marc Lasgouttes
6b3ced7c07 one less place where metrics have to be recomputed 2024-05-09 11:50:18 +02:00
Jean-Marc Lasgouttes
d4f3e87b14 typo 2024-05-09 11:45:55 +02:00
Jean-Marc Lasgouttes
ec9d0a9420 Fixup 527984ed: fix initial screen size when using backing store
When using a back store, it is obviously important to resize it
whenever the buffer view is resized. The new code path added in
527984ed skipped this part, so that the window was wrong when creating
a new window.
2024-05-07 12:01:34 +02:00
Jean-Marc Lasgouttes
9f33db8f53 Fix up 5577e877: remove logic error
Commit 5577e877 introduces forceUpdateBuffer() to delay actual
updatBuffer() calls to a central place.

In Cursor::upDownInText, the updateNeeded flag (which triggers
Update::Force update flag) is set to true when Cursor::checkDepm
returns true. This is fine, except that checkDepm also leads to a
forceBufferUpdate() call.

The logic in the method was such that, when updateNeeded is already
true when entering, forceBufferUpdate() will be called even though
checkDepm did not request it.

Fixes a slight delay with selecting in MergedManual (the manual of
manuals).
2024-05-03 14:38:32 +02:00
Jean-Marc Lasgouttes
f58957747a Fixup 2660df9b99: missing stuff after moving Lexer to support/ 2024-05-01 16:54:10 +02:00
Jean-Marc Lasgouttes
a4d9315bc4 Avoid full metrics computation with Update:FitCursor
The handling of Update::FitCursor traditionnally recomputes all
metrics once or twice. Now that updateMetrics(false) ensures that all
paragraphs that require it have a metrics, we might as well use that.

Take this occasion to move handling of Update::SinglePar earlier,
before the check for Update::ForceDraw.
2024-04-30 15:18:13 +02:00
Jean-Marc Lasgouttes
527984ed2e Fix up 'Reduce metrics updates from 4 to 1 when loading file'
The missing metrics computation meant that, when loading a file, the
workarea would not be scrolled correctly to show the cursor.

The resizeBufferView does not create an additional metrics
computation, it just triggers it earlier.
2024-04-29 18:02:14 +02:00
Scott Kostyshak
23c45f76ad CMake: adapt to new location of Lexer
Lexer is now in support/. See 2660df9b.
2024-04-28 09:13:55 -04:00