Commit Graph

46742 Commits

Author SHA1 Message Date
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
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
jpc
8664e2fa4d Update fr.po 2024-07-22 17:40:48 +02:00
Kornel Benko
d655213bcf Update sk.po 2024-07-22 13:59:27 +02:00
Juergen Spitzmueller
9f31d562bf UserGuide: fix two nomencl entries 2024-07-22 10:42:54 +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
2f7d759108 de.po 2024-07-21 18:10:33 +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
Kornel Benko
0f5f80e0ba Update sk.po 2024-07-17 08:33:58 +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
ccb3663332 de.po 2024-07-14 14:06:21 +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
f58a442380 Make headlesscite an alias of MLA's autocite
As in biblatex-mla itself
2024-07-14 08:57:02 +02:00
Scott Kostyshak
4d15427935 ctests: invert a failing xhtml test
Explanation from Jürgen:

the author-specific keys now can have a trailing &
(after the key as in "abbrvciteauthor&" or at the start of the type
subtag, as in "abbrvnames:&author" (see 5c2652fa12). This indicates
that we want "&" rather than "and" (in APA context).

See: https://www.mail-archive.com/search?l=mid&q=ildx4xd4o7ybeqroh3blxgnxqnsqnte256utip2fbmcwi4zolz%40wsh7ez36kkhl
2024-07-14 00:16:19 -04:00
Juergen Spitzmueller
369c871609 Support MLA's \autocite variants 2024-07-13 17:32: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
Jean-Marc Lasgouttes
31cde72476 Add explicit check for EGREP in configure.ac
It is used in lib/Makefile.am and we were relying some autoconf macros
to define it as a side-effect. This is not the case anymore as of
autoconf 2.72.
2024-07-12 16:02:53 +02:00
Juergen Spitzmueller
29b36dd0b8 Improve on-screen representation with MLA style
This style is quite unique, so we need to accommodate that
2024-07-11 13:39:17 +02:00
Kornel Benko
d036c651d5 Update sk.po 2024-07-11 10:57:59 +02:00
Juergen Spitzmueller
9df0c7dbac de.po 2024-07-11 10:37:08 +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
04d8616c0a Fix cut and paste error in fbbe1eb013 2024-07-11 09:56:08 +02:00
Juergen Spitzmueller
d2ad0618bb Amend fbbe1eb013
Include apa6
2024-07-11 09:47:37 +02:00
Juergen Spitzmueller
fbbe1eb013 Improve representation of APA citation 2024-07-11 09:20:19 +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