Commit Graph

29208 Commits

Author SHA1 Message Date
Thibaut Cuvelier
8e0bc01d50 DocBook: when a similar tag is present multiple times in the bibliography entry, output it only once.
Other copies have an error message.
2024-02-26 16:06:26 +01:00
Thibaut Cuvelier
2be72a1534 DocBook: in bibliographies, fix support for editors.
Also, add TODOs for similar problems lurking around.
2024-02-26 15:52:35 +01:00
Thibaut Cuvelier
6b1441036f Use C++11 string literals to make code easier to read. 2024-02-26 15:24:36 +01:00
Thibaut Cuvelier
3fdf3aafe8 DocBook: restore index ranges. 2024-02-26 15:15:32 +01:00
Thibaut Cuvelier
5dd36404f2 DocBook: simplify building an error message. 2024-02-26 15:09:10 +01:00
Thibaut Cuvelier
c71f703914 DocBook: update bibliography handling for 337f953426. 2024-02-26 14:58:35 +01:00
Thibaut Cuvelier
e311606a30 Update comment: a function was renamed. 2024-02-26 02:17:48 +01:00
Juergen Spitzmueller
ce27f5beca Consider biblatex author -> bookauthor mapping in preview 2024-02-25 08:10:23 +01:00
Juergen Spitzmueller
43ee724fcf update tex2lyx tests
in all these cases, though, typographic rather than plain quotes should
be used.
2024-02-25 07:03:06 +01:00
Juergen Spitzmueller
82064f7bff Properly parse biblatex crossref'ed book titles 2024-02-24 15:51:35 +01:00
Juergen Spitzmueller
3eaa374506 Fix name type parsing 2024-02-24 15:27:56 +01:00
Juergen Spitzmueller
5b11066a37 Properly resolve crossref'ed data in BiblioInfo
This needs to take the mappings into account as well, not just
plain fields.
2024-02-24 15:26:41 +01:00
Juergen Spitzmueller
1f48af5f55 tex2lyx: simplify babel shorthands detection 2024-02-24 10:48:34 +01:00
Juergen Spitzmueller
9a3fe51474 tex2lyx: properly import \tikzset 2024-02-24 08:28:40 +01:00
Juergen Spitzmueller
a600ca5389 tex2lyx: consider recently added babel shorthands 2024-02-24 08:15:40 +01:00
Richard Kimberly Heck
16e7e93d54 Fix return value. Committed wrong version. 2024-02-09 20:40:56 -05:00
Richard Kimberly Heck
88e739b44b Do not error out if -geometry is used with QPA_XCB defined. 2024-02-09 20:34:33 -05:00
Richard Kimberly Heck
91bd457a67 Fix display of counters for included listings. 2024-02-09 19:54:56 -05:00
Juergen Spitzmueller
61aa19ef9c Amend ad6aa8ba4b
Apparently, the cell is not queried in all cases.
2024-02-08 09:00:57 +01:00
Juergen Spitzmueller
ad6aa8ba4b Restrict caption insertion in tables to where it makes sense (#13037)
This requires to move insetAllowed() to the cell level, as only cells
in the caption row of a longtable actually can take a caption.
2024-01-28 12:13:27 +01:00
Juergen Spitzmueller
ae423757e9 Amend 37dce94086
PassThruChars should also be considered
2024-01-26 10:16:13 +01:00
Enrico Forestieri
48a065e89e Always use utf-8 in scripts with Python3
In order to perform a conversion of graphic format LyX generates
a python script containing the path of the original file to convert.
While Python2 needs the file in the native encoding of the OS, in
Python3 the encoding has to strictly be how announced by the first
line of a script, in our case utf-8.
2024-01-25 10:17:23 +01:00
Jean-Marc Lasgouttes
b08cb7fb30 Initialize members correctly.
Spotted by coverity.
2024-01-22 11:20:36 +01:00
Juergen Spitzmueller
4cfa3488e5 Restore parent after buffer reload (#13031) 2024-01-19 09:09:28 +01:00
Juergen Spitzmueller
b29b0f8754 Only strip outer braces in listings options
trim stripped also multiple subsequent braces
2024-01-17 14:45:09 +01:00
Juergen Spitzmueller
7b5fe0321e Prevent crash with statistics while view is busy (#12935) 2024-01-16 14:14:04 +01:00
Juergen Spitzmueller
153be65d14 Restrict Adv. Search pane to sides and floating (#12982)
The horizontal reordering for bottom and top is too broken.

This needs some major investigation (probably for 2.5).
2024-01-14 11:34:05 +01:00
Juergen Spitzmueller
3b7f6d614d AdvFind: fix alignment of checkboxes (#13020) 2024-01-13 12:20:18 +01:00
Juergen Spitzmueller
6f4054222c Only fix simple search height if there are no other widgets in the dock area (#13005) 2024-01-13 11:58:35 +01:00
Juergen Spitzmueller
37dce94086 Don't add \text<script> wrapper in pass-thru context (#13022) 2024-01-12 16:28:37 +01:00
Jean-Marc Lasgouttes
8dd9cfcf5c Pass two string parameters as reference
Spotted by coverity
2024-01-12 16:02:36 +01:00
Jean-Marc Lasgouttes
1599c503df Pass a two parameters parameter by reference
Note that there is also a vector parameter that is passed by value.
However it is modified as a local copy and I do not want to change
this now.

Spotted by coverity.
2024-01-12 15:55:45 +01:00
Jean-Marc Lasgouttes
765c380a5b Pass strings as reference
Spotted by coverity.
2024-01-12 14:34:45 +01:00
Jean-Marc Lasgouttes
952851a9bc Do not pass list of columns parameter by value
There is no need for copying this information.

Noticed by coverity scan.
2024-01-12 12:16:31 +01:00
Richard Kimberly Heck
59b08c8171 Fix bug #13017.
The problem is caused by removing temporary aux, etc, files while
we are in the process of exporting. As Jürgen suggested, we really
do not need to remove these files until we are preparing to export:
They are not used internally. So now we just schedule the removal
and do it then.
2024-01-11 17:23:52 -05:00
Jean-Marc Lasgouttes
4a2474c246 Remove obsolete comment 2024-01-04 18:44:33 +01:00
Udi-Fogiel
9ebc7d9512 Amend 7441172d
colswitch was checking for oldstyle instead of normalcolor
to see if we need \normalcolor, which lead to appearence
of \color{none} in some cases, but "none" is not a known
color.
2023-12-29 20:10:50 +01:00
Enrico Forestieri
24cc72266e Change the way a filepath is displayed
Instead of displaying the complete path, display the file name
first and then the path enclosed in parenthesis.

In this way files with same name but different path can still be
distinguished and, at the same time, files with different names
but same path are more easily spotted in case the complete path
is truncated by file managers.
2023-12-29 19:20:25 +01:00
Koji Yakota
1e6b5448c1 Temporary fix for #11723. 2023-12-25 11:44:21 -05:00
Richard Kimberly Heck
1a214f2380 Remove redundant code 2023-12-23 13:17:56 -05:00
Juergen Spitzmueller
378397a6c6 Amend 782f6eae00
Rows should only be removed in ct mode if they have been added
in ct mode by the same author (otherwise mark them deleted)
2023-12-20 08:49:54 +01:00
Jean-Marc Lasgouttes
2d5fa181a1 Fix previews in yellow notes and disabled branches
While it is not necessary to run validate() on insets that do not
produce output (yellow notes and disabled branches), it has to be done
for previewing, since a construct inside the inset may require some
support.

This is done in two steps:

1. in PreviewLoader::dumpPreamble, indicate that a preview is being
   prepared. It is not clear why the `for_preview' boolean was not set
   before.

2. in Inset(Branch|Note)::validate, always call the parent's validate
   method when previewing.

It should have been possible to move the code from 2. to
InsetText::validate, but the weird code in handling
InsetNoteParams::Comment in html makes it difficult.
2023-12-19 17:56:18 +01:00
Jean-Marc Lasgouttes
3695b631c6 Remove unused variables 2023-12-19 17:32:55 +01:00
Juergen Spitzmueller
782f6eae00 Fix tracking of table row/column deletion with added material (#12984) 2023-12-19 16:45:16 +01:00
Daniel Ramoeller
a67a58036f Don't inherit font in Label inset
Fix for #12404.
2023-12-19 16:10:33 +01:00
Juergen Spitzmueller
1aa131de87 Output added par break marker inside argument for commands (#13014) 2023-12-19 15:48:07 +01:00
Jean-Marc Lasgouttes
8832f816ce Show change bar for an end-of-paragraph change
Fixes bug #13003.
2023-12-11 17:57:44 +01:00
Jean-Marc Lasgouttes
94118b865e Disable properly math inset locking
It is not clear whether this feature was once documented and used (it
would have been 20 years ago).

It is mostly disable now, but there was a remaining bit that is
annoying now.

I'll try to restore this later.
2023-12-08 15:32:21 +01:00
Juergen Spitzmueller
ac5cc01717 Amend 3698281943 once more
We need to trim off tabs and spaces
2023-12-03 11:18:42 +01:00
Juergen Spitzmueller
4ba94f74a5 Amend 3698281943 for the sake of the (not exceptionally bright) layout test 2023-12-03 10:36:59 +01:00
Jean-Marc Lasgouttes
a635e461a1 Remove code that has been dead for almost 20 years 2023-11-30 10:07:44 +01:00
Richard Kimberly Heck
1aa890629b Better variable name
I think this one must be a leftover from before the ranges.
2023-11-27 21:35:54 -05:00
Richard Kimberly Heck
1bc5453cab Amend 28e8bf742.
The default 'empty' layout has "UNDEFINED" for the LabelString.
2023-11-17 19:32:49 -05:00
Enrico Forestieri
ee19d67524 Amend 58103cf2
- Do not clear the initial selection to allow consecutive changes
  (this is in line with the behavior in texted)
- Make the color changes last so that the underline is the right color
- Allow to operate on selections that span multiple cells in a grid
- Use \boldsymbol instead of \mathbf to make everything bold
2023-11-17 19:03:46 +01:00
Richard Kimberly Heck
ac0a12de68 Let label strings work with branches.
A better patch will be attached to bug #12974.
2023-11-16 20:23:12 -05:00
Richard Kimberly Heck
28e8bf742c Fix layout names for branches. 2023-11-16 20:05:38 -05:00
Jean-Marc Lasgouttes
149a34a483 fixup 2b0841b0: forgot to add new file 2023-11-10 14:39:27 +01:00
Jean-Marc Lasgouttes
2b0841b0c9 Move LYX_(BEGIN|END)_MUTE_GCC_WARNING macros to their own header.
It was not nice to other build systems to define that in configure.ac.
2023-11-10 13:14:34 +01:00
Jean-Marc Lasgouttes
c2653e451c Avoid dangling-reference warning in several places
This new warning in gcc 13 is annoying because it happens in certain
parts of our code where it is harmless to pass a temporary variable to
a function that returns a reference.

This patch introduces a new pair of macros,
LYX_BEGIN_MUTE_GCC_WARNING(warn) and LYX_END_MUTE_GCC_WARNING, which
can be used to define a block of code where a given GCC warning is disabled.

The macros are no-ops with compilers other than gcc, although some
compilers that pretend to be GCC make be mis-detected. The worse that
can happen AFAIU is a bunch of warnings.

The macro relies on an intimidating set of for nested macros. The goal
of these macros is to build a nested string bit by bit. Here is how it
works:

PRAGMA_IGNORE(dangling-reference)
  => PRAGMA_IGNORE_1(-Wdangling-reference)
  => PRAGMA_IGNORE_2("-Wdangling-reference")
  => PRAGMA_IGNORE_3(GCC diagnostic ignored "-Wdangling-reference")
  => _Pragma("GCC diagnostic ignored \""-Wdangling-reference\"")

The next question is: what is _Pragma() good for? Well, it is a
version of #pragma that can be used in a macro.

And finally, what are those pragmas good for? The 'push' and 'pop'
ones make changes to warnings local. The 'ignored' ones allow
to disable some warnings. And disabling -Wpragmas ensures that we do
not have a warning if we try to disable a warning that is not
supported by the compiler.
2023-11-10 10:36:52 +01:00
Juergen Spitzmueller
3698281943 Read separated required arg without enquoting 2023-11-09 22:06:39 +01:00
Enrico Forestieri
039de52ad9 Amend 58103cf2
The \underbar macro is a text mode macro that can also be used
in math mode. However, when inserting it in mathed, LyX helpfully
wraps it in a \text inset. One can dissolve such text inset and
the macro would appear in math mode without any problem. But the
output routine thinks that the user is shooting itself in the
foot and tries to protect him by wrapping \underbar in the
\lyxmathsym macro, whose definition is normally added to the
preamble when an unicode character is used in math mode.

Of course, this is not the case for \underbar and a compile
error arises. The easier solution is to simply add lyxmathsym as
a requirement for \underbar in lib/symbols, but this means
that the definition of \lyxmathsym would be added even when not
necessary (because in the validation routine we miss the info
about the current mode). The correct solution is acknowledging
the dual nature of \underbar as a text-mode macro that can also
be used in math mode. Luckily the correct solution is almost as
easy as the easier one and is what is done in this commit.
2023-11-09 00:21:21 +01:00
Yuriy Skalko
53784b90ae Better dialog resizing behavior 2023-11-09 00:15:16 +01:00
Pavel Sanda
6d19388ab8 Fix mangling names in temp directory (amends eef0c8e8).
Separate mangled-name tables for xhtml and latex exports.

LaTeX route should stay as it were (counter+mangled path within filenames in
temp directory)

xHTML route uses hash of path + filename only. We won't use counters because
(unlike in LaTeX export) they stay visible in final export directory and
generally change across LyX sessions.
Hash is short with collision handling because path-length limits of Windows.

cf https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg220582.html
2023-11-08 21:42:54 +01:00
Juergen Spitzmueller
f74cc0ec92 Limit nomencl backwards support to case when old package is really used
This is only needed for very old versions of the nomencl package
(before March 2005)

No need to output compatibility code with newer versions

Furthermore, this breaks the use of the glossary package which also
has .glo extension (#12968)
2023-11-08 16:17:58 +01:00
Enrico Forestieri
bdaad03a45 Do not accumulate underline changes
If an element is underlined in mathed by using the text properties
dialog, the changes accumulate. So, for example, to change a single
underline to a double one, one would need removing the previous
underline first. This commit allows using the text properties
dialog and simply replace an underline type with another one.

However, this works only if the underlined element is not included
in some other inset. For example, given "\uline{\text{abc}}",
selecting the 'b' and choosing a double underline produces
"\uline{\text{a\uuline{b}c}}". But, given "\text{\uline{abc}}", and
operating as before produces "\text{\uline{a}\uuline{b}\uline{c}}".
2023-11-08 09:17:38 +01:00
Enrico Forestieri
ea30f1feb1 Amend 58103cf2
Give a variable a more meaningful name and fix a typo.
2023-11-08 08:56:40 +01:00
Jean-Marc Lasgouttes
9c3d9cded0 Update math macro display when entering from above/balow
This change forces metrics computation in all cases when cursor enters
a math inset from above/below, but I do not have a better idea right now.

Fixes bug #12952.
2023-11-07 15:46:04 +01:00
Enrico Forestieri
f8f2355445 Silence compiler warning 2023-11-06 21:03:23 +01:00
Enrico Forestieri
9d95147528 Amend 58103cf2
Correct file name.
2023-11-06 18:46:22 +01:00
Enrico Forestieri
58103cf214 Allow using the text properties dialog in mathed
Until now only the color of the text could be changed by using
the text properties dialog. This commit allows changing all
other properties except for strikethrough. It is possible to
also add underlining with the limitation that the changes
accumulate. This requires other work but I think that underlining
and strikethrough are not so important in mathed and can be
refined at a later time.

Fixes #12958
2023-11-06 18:04:44 +01:00
Juergen Spitzmueller
d2db3d4578 escape spaces in labels
refstyle doesn't work with these. See
https://marc.info/?l=lyx-users&m=169926958114185&w=2
2023-11-06 14:18:03 +01:00
Jean-Marc Lasgouttes
04a24211a6 Fix word selection expansion when going to the left
The proper way to do word-wise selection is to compute the words
around both the cursor and the anchor.

Note that code is uglier than it should because CursorData::normalAnchor()
returns a CursorSlice instead of a DocIterator.

Fixes bug #12533.
2023-11-06 11:53:03 +01:00
Juergen Spitzmueller
27033f41aa Fix comment 2023-11-05 12:38:09 +01:00
Juergen Spitzmueller
098b4f3348 Amend ec2da3a509 2023-11-05 12:28:27 +01:00
Juergen Spitzmueller
ec2da3a509 Prevent data loss when closing LyX while document dialog has unapplied changes (#12955)
Entails new strings, but I think the severity allows for that.
2023-11-05 12:09:33 +01:00
Enrico Forestieri
75a08df529 Inherit outer font in text-in-math environments
Some text-in-math environments such as \text, \mbox, \fbox, and
\makebox, inherit the outer text font. This commit reflects this
in the on-screen representation.

Fixes #12950.
2023-11-02 17:54:02 +01:00
Juergen Spitzmueller
5d193c7b62 Revert "Show full inset context-menu when clicking on text part of collapsible (#10370)"
This reverts commit 6c4afc1ccb.

This needs more thinking to get the menus sane.
2023-11-02 10:17:06 +01:00
Enrico Forestieri
e0e1350b7e Revert "Inherit outer font in text-in-math environments"
This reverts commit d72b9b0238.

Unfortunately, the font taken into account is the font at the
current cursor position rather than the font of the corresponding
math inset.
2023-11-02 01:59:54 +01:00
Enrico Forestieri
d72b9b0238 Inherit outer font in text-in-math environments
The text-in-math environments such as \text, \mbox, \fbox, \makebox
and so on, inherit the outer text font. This commit reflects this
in the on-screen representation.

Fixes #12950.
2023-11-01 22:21:49 +01:00
Juergen Spitzmueller
07c99393be Consider PackageOptions with parskip 2023-10-30 12:54:29 +01:00
Juergen Spitzmueller
6c5dc39cd5 Amend 9de9ec1e88
When setting halfline parskip with parskip provided, we still need
to set this explicitly, as we don't know the current \parskip value.

Also improve code readability.
2023-10-30 12:17:14 +01:00
Juergen Spitzmueller
9de9ec1e88 Do not add empty \parskip definition (reported in #12946) 2023-10-30 09:22:14 +01:00
Pavel Sanda
28f81d1be5 Revert "MathML: don't output delimiters in InsetMathBinom and InsetMathDelim if the delimiter is a space."
This reverts commit be44cb8516, see #12891.
2023-10-27 21:18:45 +02:00
Juergen Spitzmueller
e9998fb1cc Enter table after insertion (#12101)
posForward() jumped over the inset, which is not what is wanted here,
I think (cf. other inset insertion methods)
2023-10-22 10:19:50 +02:00
Juergen Spitzmueller
8e619462e1 Disable OUTLINE functions when min or max toclevel is reached 2023-10-21 13:49:50 +02:00
Juergen Spitzmueller
2b33da5944 Let OUTLINE functions jump from section to part if there is no chapter
Fixes #12938
2023-10-21 13:48:50 +02:00
Juergen Spitzmueller
bf0152185b Make string translatable 2023-10-21 12:52:49 +02:00
Juergen Spitzmueller
4658cf95f7 Disambiguate "Language"
Some translations need a different term for programming languages.
2023-10-21 12:34:47 +02:00
Juergen Spitzmueller
906f2b8507 Fix tautology spotted by coverity
The if and else paths have been identical since the removal of dvipost
(a450797b2a)
2023-10-20 09:53:38 +02:00
Juergen Spitzmueller
33da28e5a5 Fix coverity-detected issue CID 403672
Error handling issues  (CHECKED_RETURN)
Calling "translateString" without checking return value
(as is done elsewhere 15 out of 18 times).

AFAICS we do not need the boolean return value in these two cases.
2023-10-20 09:35:55 +02:00
Jean-Marc Lasgouttes
99ecdd6ceb Fixup 65cb9fa4: avoid extra spacing when selecting math
This was happening whenever a selection started/ended after a fraction
inset.
2023-10-18 12:30:55 +02:00
Juergen Spitzmueller
72e242267b Only apply ui_style if it has changed 2023-10-15 11:20:49 +02:00
Juergen Spitzmueller
81fda3ac55 Warn user that uistyle reset to default requires restart 2023-10-15 11:02:45 +02:00
Juergen Spitzmueller
cfcc57bd89 Simplify 2023-10-15 11:02:35 +02:00
Juergen Spitzmueller
462a701e62 Make new gui element translatable 2023-10-15 09:40:58 +02:00
Juergen Spitzmueller
41e3f1ec98 complement tooltip 2023-10-15 09:17:31 +02:00
Eugene Chornyi
d2132751a7 Implement ui style selection dialog 12832 attempt 2 2023-10-15 08:46:12 +02:00
Daniel Ramoeller
5a9ea580e4 Correctly update Outliner icon size
Fix for #12453
2023-10-14 12:48:09 +02:00
Jean-Marc Lasgouttes
ff7696f184 Do not use Color_selectionmath when selection is gone
It might happen that the selection goes away without recomputing
metrics (for example with char-forward). The added test is a bit of a
band-aid for this situation. A better solution would be to understand
better when metrics computation is triggered in mathed.
2023-10-12 11:30:47 +02:00
Jean-Marc Lasgouttes
174dc2c8be Use Color_selectionmath as needed for multi-cell selection in math
This is complementary to partial selection implemented at 65cb9fa4.
2023-10-12 11:30:47 +02:00
Eugene Chornyi
a99a16ae58 Revert 072ba7bd and f1deb1c6 2023-10-11 23:22:17 +02:00
Eugene Chornyi
f1deb1c658 amend 072ba7bd 2023-10-11 22:03:29 +02:00
Pavel Sanda
c9c5a2a9d8 Add space padding around word count forgotten part of (#12625).
Again from Daniel.
2023-10-11 21:07:12 +02:00
Pavel Sanda
5ed59b3c09 Remove ugly frame around word count (#12625).
Requested and tested by Daniel.
2023-10-11 21:01:56 +02:00
Thibaut Cuvelier
be44cb8516 MathML: don't output delimiters in InsetMathBinom and InsetMathDelim if the delimiter is a space. 2023-10-11 20:37:38 +02:00
Eugene Chornyi
072ba7bd2e Implement ui style selection dialog 12832 2023-10-11 20:06:52 +02:00
Scott Kostyshak
1273f25c76 Fix three sign-compare compiler warning
Fixes three similar warnings. One of them is the following:

src/insets/InsetInfo.cpp:1583:20: error: comparison of integers of different signs: 'int' and 'std::basic_string<wchar_t>::size_type' (aka 'unsigned long') [-Werror,-Wsign-compare]
        for (int i = 0; i < sequence.length(); ++i) {
                        ~ ^ ~~~~~~~~~~~~~~~~~
2023-10-10 10:13:37 -04:00
Thibaut Cuvelier
531a37baee XHTML: implement InsetInfo. 2023-10-10 09:57:17 -04:00
Thibaut Cuvelier
d8a0f1aadd DocBook: fix a crash in docbookSimpleAllParagraphs.
When having the code preview pane open with examples/Language_Support/Mixing_Japanese_with_other_Languages_(with_CJKutf8), clicking at random on paragraphs sometimes yielded a crash: *par when par is the end of the iterator. LyX could output the whole document as DocBook without this patch and still generates the same output with it (i.e. no text is missing).
2023-10-10 09:57:17 -04:00
Thibaut Cuvelier
43921861b9 DocBook: in InsetInfo, ensure that no db:date is inserted within a db:date. 2023-10-10 09:57:17 -04:00
Thibaut Cuvelier
78b157b61e DocBook: fix closing formatting after deleted text.
Previously, when closing font tags, only the previous character's font was used. However, if that character is deleted, it had no change of having the right font tags opened/closed. Hence, look further to compare the font of the current character to output with the font of the previously output character.
2023-10-10 09:57:17 -04:00
Thibaut Cuvelier
b9fc4bae44 DocBook: fix formatting of TODOs.
The lines were very long; this commit truncates them to 120 characters.
2023-10-10 09:57:17 -04:00
Thibaut Cuvelier
0c2f3dedd6 DocBook: add support for InsetInfo.
A similar patch would be required for LyXHTML, but it will come later. The main impact is that some text isn't output in XHTML (like DocBook before this patch).

The code isn't as clean as it could be. I avoided touching anything not related to DocBook, as the release of 2.4 is nearing, while leaving comments for parts to improve for the next release cycle. Given that the code compiles, there are no risks for TeX or XHTML outputs; for DocBook, less content is skipped, which is a net improvement for users.
2023-10-10 09:57:17 -04:00
Pavel Sanda
cc257b4927 Few string fixes from Dan. 2023-10-09 20:41:57 +02:00
Juergen Spitzmueller
90307cf212 Amend 3f0bb8aa43
Account for the paragraph marker
2023-10-04 13:49:34 +02:00
Juergen Spitzmueller
3f0bb8aa43 Fix assertion on paste with empty pars 2023-10-04 13:40:38 +02:00
Juergen Spitzmueller
5cb53606b6 Introduce color_selectionmath
To have a distinctive color for selected math which works in both modes

Also, link color_selectionmath with QPalette::HighlightedText, so we
won't need to special-case on lyxrc.use_system_colors any longer
2023-10-04 13:10:07 +02:00
Jean-Marc Lasgouttes
65cb9fa4df Use Color_selectiontext as needed for partial selection in math
Currently, selected math hull insets use Color_selectiontext when
system colors are in use. This commit implements the same behavior
for partial selection.

This is done by introducing two element types (BEGIN_SEL and END_SEL)
to MathRow.
2023-10-03 12:51:11 +02:00
Juergen Spitzmueller
2b69dc54da Revert the logic of 343a9749ab
It might be better to be explicit also with black, after all.
2023-10-01 12:20:40 +02:00
Juergen Spitzmueller
242381464b Simplify 2023-10-01 11:38:10 +02:00
Juergen Spitzmueller
6df25c3585 When box background is "none", frame color != black and page color has been set
then use the page color as box background, not white
2023-10-01 11:08:11 +02:00
Juergen Spitzmueller
343a9749ab No need to use \fcolorbox with explicit black frame and no background
White background, however, is always treated explicit (think non-white
page background)
2023-10-01 10:12:52 +02:00
Juergen Spitzmueller
2854355fe3 Require xcolor whenever we use an \fcolorbox 2023-10-01 09:35:53 +02:00
Juergen Spitzmueller
3e063daeab Revert "Amend 087f6bce"
This reverts commit a6882a1db0.
2023-10-01 09:26:26 +02:00
Scott Kostyshak
a6882a1db0 Amend 087f6bce
Explanation from Udi:

  There is a missing validation for the requirement of xcolor in
  InsetBox::validate, the case we use Boxed with non-default color.

Patch from Udi.
2023-09-30 20:22:59 -04:00
Scott Kostyshak
10403b7959 Amend 04bfbc0f
Patch from Udi.
2023-09-30 20:20:03 -04:00
Udi-Fogiel
48eda746da proper unicode support for hebrew in 8bit engines 2023-09-30 17:09:41 +02:00
Juergen Spitzmueller
04bfbc0f7a Limit RTL hack to classic engines (#12919)
It breaks with LuaTeX, is definitely not needed with XeTeX, and it is
doubted whether it is needed at all (but this needs further testing).
2023-09-30 17:00:51 +02:00
Juergen Spitzmueller
8b1f1c29ff Style 2023-09-30 13:58:57 +02:00
Udi Fogiel
7ccdc6edf5 fix nested uwave 2023-09-30 13:44:03 +02:00
Juergen Spitzmueller
fc9684a130 Prevent access to null local_font 2023-09-30 13:01:20 +02:00
Juergen Spitzmueller
1d00389bf8 Update tex2lyx tests after recent format change 2023-09-30 09:59:36 +02:00
Juergen Spitzmueller
087f6bce71 Introduce default box frame color (#12921)
This better aligns with dark mode
2023-09-30 09:56:27 +02:00
Juergen Spitzmueller
7aa00f0b92 Fix quote menu item, from Dan
Current language is relevant here, not main language
2023-09-29 13:09:20 +02:00
Pavel Sanda
6141b437b1 pdfcolmk is an empty stub for many years now (bug #12920).
Patch from Udi.
2023-09-28 00:36:35 +02:00
Scott Kostyshak
ff9dfa96f2 DocBook: fix case with emphasis at end of footnote
For ML discussion, see here:

  https://www.mail-archive.com/search?l=mid&q=CAK0LPyiusCMu-X7KpgO0d1-rh4e3%3DRwR5ooXE_fdb7UVuB0VUA%40mail.gmail.com

Patch from Thibaut Cuvelier.
2023-09-25 10:41:21 -04:00
Jean-Marc Lasgouttes
549969a563 Improve comments 2023-09-25 12:51:33 +02:00
Jean-Marc Lasgouttes
71d9f6e90d Avoid row breaking at inconvenient places.
When it turns out that breaking a STRING row element was not
sufficient in Row::shortenIfNeeded, we still remember the shortest
width that one can obtain. Later, when we try to split a previous
element of the row, we have a better idea of how much of the row
remains after it.

To this end, change the signature of Element::splitAt to use an enum:
FIT (was: force=false), FORCE (was: force= true) and BEST_EFFORT
(split at max_width, but do not return an error if the string is too
large).

Fixes bug #12660.
2023-09-25 12:46:54 +02:00
Jean-Marc Lasgouttes
1ca43e1938 Revert "Avoid row breaking at inconvenient places."
The solution did create new issues.

Fixes bug #12899.
Unfixes bug #12660.

This reverts commit f7de345f85.
2023-09-25 12:28:51 +02:00
Jean-Marc Lasgouttes
9156712895 Make sure that caret width is not null in mathed
The same test exists in texted.

Fixes bug #12904.
2023-09-24 13:07:55 +02:00
Enrico Forestieri
ddf81b4e19 Amend 12e3d46b
Also account for alerts regarding documents that are explicitly
allowed to execute external commands through the settings.
2023-09-23 16:18:28 +02:00
Enrico Forestieri
12e3d46b5b Do not change font in html text without gui
As reported here:
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg220399.html
if an alert is displayed when the gui is not available Qt6 crashes
when the text contains html directives and the font is changed.
2023-09-23 13:48:01 +02:00
Jean-Marc Lasgouttes
94c6d45b74 When drawing macro names, enforce LtR direction
Add a Direction parameter to the Painter::text methods that take a
FontInfo parameter.

In drawStrRed and drawStrBlack, force the direction to LtR.

Fixes bug #12905.
2023-09-22 12:41:44 +02:00
Juergen Spitzmueller
cd5a88029c Remove unneeded method
which is also not available in Qt < 5.13, as it turns out.
2023-09-18 11:36:16 +02:00
Juergen Spitzmueller
b13685d9bb Prefer following, not previous, item in selection manager after deletion (#12871) 2023-09-18 10:02:34 +02:00
Juergen Spitzmueller
d3102380bc Amend ac275a66b5
Set depth correctly in the active branch
2023-09-18 09:27:38 +02:00
Juergen Spitzmueller
63b99beedd Bit refactoring 2023-09-18 08:13:23 +02:00
Juergen Spitzmueller
ac275a66b5 Get rid of unnecessary flickering when clicking in outliner
No need to collapse and re-expand the node where the currently selected
item is in.
2023-09-17 19:17:12 +02:00
Juergen Spitzmueller
610e2f501b Fix double-click expansion of outliner 2023-09-17 16:45:19 +02:00
Juergen Spitzmueller
013d52ed2b Fix readability
here, "custom" was exactly the opposite (non-custom, i.e., default
margins)
2023-09-17 14:31:36 +02:00