Commit Graph

3299 Commits

Author SHA1 Message Date
Thibaut Cuvelier
3883b85f49 New DocBook support 2020-07-08 08:42:16 +02:00
Pavel Sanda
28968b1f0d Add required elements in the layouts to support DocBook.
Slightly modified patch from Thibaut Cuvelier.
2020-07-07 09:49:48 +02:00
Juergen Spitzmueller
d0cbcda3b9 Fix yet another thinko in the math grid paste code
This is a Hydra!
2020-06-30 17:23:58 +02:00
Juergen Spitzmueller
b84e497ab6 Fix cursor positioning with specific matrix pastings 2020-06-30 09:25:59 +02:00
Juergen Spitzmueller
7869960888 Fix math matrix column insertion on paste 2020-06-29 18:05:46 +02:00
Juergen Spitzmueller
5c663849d1 Update cursor idx after grid paste if columns are appended 2020-06-29 17:57:18 +02:00
Juergen Spitzmueller
3b895bb47a Fix math grid paste when needing more cells 2020-06-29 16:30:49 +02:00
Juergen Spitzmueller
16d0785e67 Fix pasting of math grid with more rows in source than target (#11897) 2020-06-29 09:48:05 +02:00
Jean-Marc Lasgouttes
3c4e567d44 Run codespell on src/mathed
codespell -w -i 3 -S Makefile.in -L mathed,afe,tthe,ue,fro,uint,larg,alph,te,thes,alle,Claus,wit,nd,numer  src/mathed/
2020-06-25 23:31:42 +02:00
Jean-Marc Lasgouttes
ba738d0167 Use new rowFlags() values to remove some inset hardcoding.
The enum DisplayType is replaced with the flags RowFlags that can be
combined. Here is the correspondence between the old DisplayType and
the new Inset::RowFlags:

DisplayType   RowFLags             Meaning
 Inline        Inline               plain inline inset
  --           BreakBefore          row ends before this inset
  --           BreakAfter           the row ends after this inset
 AlignCenter   Display	            the inset is centered on its own row
 AlignLeft     Display | AlignLeft  the inset is left-aligned on its row
 AlignRight    Display | AlignRight the inset is right-aligned on its row
  --           RowAfter             an extra row is needed after this inset

Display is just a shortcut for BreakBefore | BreakAfter.

The flags for the newline inset will be BreakAfter | RowAfter,
while the separator inset will just use BreakAfter.

This groundwork does not introduce any new feature at this point. It
aims to remve the numerous isNewLine and isSeparator all over the
code, and to eventually optional break after some insets like spaces
(see #11621).

Most display() methods are renamed to rowFlags(). Some are removed
because they returned Inline.

Now display() is only a helper function for hull insets.
2020-06-22 23:11:40 +02:00
Thibaut Cuvelier
8f89768211 Fix in symbols handling: parse the XML entity with \def. 2020-06-19 08:22:56 +02:00
Thibaut Cuvelier
718eede94b MathML: Convert HTML entities to XML entities. 2020-06-18 19:37:08 +02:00
Thibaut Cuvelier
054bdc5d18 MathML stream allows for name spaces. 2020-06-18 19:32:51 +02:00
Thibaut Cuvelier
a6b07608d8 Rename XHTMLStream to XMLStream, move it to another file, and prepare for DocBook adoption.
xml.cpp/h also merges functionalities from sgml.cpp/h.
2020-06-15 13:01:56 +02:00
Thibaut Cuvelier
c8d0492194 MathML: generate only a mathvariant for double-struck font, no redundant class 2020-06-11 23:22:48 +02:00
Enrico Forestieri
5a80f7bb6a Add support for the doublestroke package
This commit adds the mathed command \mathds that selects a
font more appropriate than \mathbb for typesetting the
mathematical symbols for the natural (N), whole numbers (Z),
rational numbers (Q), real numbers (R), complex numbers (C),
and some others.

As in the \mathbb case, only capital letters are supported,
but in addition one can also typeset a symbol often used for
representing the indicator function (\mathds{1}) and the
letters a, h, k.

Fixes bug #11887.
2020-06-11 16:42:31 +02:00
Thibaut Cuvelier
716e3dc1a8 Output double-struck fonts as such in MathML, not in bold 2020-06-11 10:30:48 +02:00
Jean-Marc Lasgouttes
2d48072e66 Get rid of Qt resources
It turns out that the resources were mostly not used anyway. Removing
them shrinks LyX binary by ~6MB.

Only autotools have been adapted. cmake will require the same
simplification.
2020-06-07 01:15:28 +02:00
Richard Kimberly Heck
acc3f2cef8 Forgot this part. 2020-06-01 12:27:32 -04:00
Kornel Benko
38ec7471e7 Amend 44816adce6: Be careful before using buffer parameters in colAlign
The LASSERT(isBufferValid()..) leads to crash in find-adv dialog
2020-06-01 10:20:38 +02:00
Jean-Marc Lasgouttes
e06e2e24e7 Revert part of 56e012be: hardcode again "too small" preview size
It seems that the use of zoom in determining the size of the minimal
value was a bad idea.

It still think that the situation is not very satisfying, we need a new idea.
2020-05-28 20:43:01 +02:00
Richard Kimberly Heck
91265c1f46 Missing include according to VC19 2020-05-04 14:19:29 -04:00
Richard Kimberly Heck
d6a7ec506e s/requires_/required_/ for code consistency 2020-05-04 14:05:44 -04:00
Richard Kimberly Heck
3b09ef61a6 Fix remaining (I think) requires keyword issues. 2020-05-04 13:46:01 -04:00
Richard Kimberly Heck
c94a97e36c Fix declaration 2020-04-26 03:37:20 -04:00
Juergen Spitzmueller
ed137ee435 Disable append-column with gathered
Fixes #11812
2020-04-04 09:27:24 +02:00
Richard Kimberly Heck
2d0ad7d308 Remove code disabled since 2005.
No one knew then what it was supposed to do.
2020-03-28 23:52:55 -04:00
Stephan Witt
0885098bd3 #11747 follow-up of change d94b708a0f to fix a compiler warning 2020-03-08 13:33:30 +01:00
Juergen Spitzmueller
d94b708a0f Tell updateBuffer whether an inset is deleted.
Fixes #11747
2020-03-06 13:23:01 +01:00
Richard Kimberly Heck
62af7ee772 More requires --> required, for C++2a. 2020-02-28 00:36:55 -05:00
Stephan Witt
3ee1bcad04 Remove another unnecessary assignment 2020-02-12 12:28:18 +01:00
Enrico Forestieri
926c846abb Remove unnecessary assignments 2020-02-10 21:59:52 +01:00
Enrico Forestieri
536d476d38 Make sure to not dereference a null pointer. 2020-02-10 21:54:07 +01:00
Stephan Witt
59fa0b2592 Fix a crash with uninitialized buffer member of MathData
See the details here: https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg210294.html
2020-02-07 10:17:33 +01:00
Jean-Marc Lasgouttes
a187cbeb64 Rename PainterMetrics::change_ to change
This is not a private variable.
2020-01-14 11:50:44 +01:00
Juergen Spitzmueller
a450797b2a Rest in peace, dvipost! 2020-01-13 08:59:26 +01:00
Jean-Marc Lasgouttes
bf7f4d716c Avoid blinking change tracking cur for math inset.
Since there is a margin above and below the inset, there is no problem
for putting it higher.

Fixes bug #11684.
2020-01-11 13:39:20 +01:00
Juergen Spitzmueller
affc006bae Honor change tracking when automatically renaming refs to labels
Fixes rest of #11556
2019-12-31 12:29:53 +01:00
Juergen Spitzmueller
89b5607e0a Centralize code to markup deleted complex objects (with tikz) in output
This fixes #9293
2019-12-28 13:43:17 +01:00
Juergen Spitzmueller
e5a9d09870 Mark deleted graphics in output
Fixes #11687
2019-12-26 07:15:37 +01:00
Jean-Marc Lasgouttes
49ed5b4626 Add a setBuffer method to InsetArgumentProxy
This is needed to set the buffer of default values of optional arguments.

Fixes bug #11695.
2019-11-15 20:43:00 +01:00
Jean-Marc Lasgouttes
067d6dc759 Mark insets with invalid buffer() in red in devel-mode.
We tend to have insets which buffer() member is invalid. To help
debugging, this commit paints their background in red when devel-mode
is on.

To this end, a new method develMode() is added to the Painter class.

With this commit, it is easy to see that macro template do not have a
proper buffer set!
2019-10-21 17:24:24 +02:00
Jean-Marc Lasgouttes
44816adce6 Be careful before using buffer parameters in colAlign
Make InsetGrid::colAlign a normal method and make it check whether
buffer is valid before using it. This avoids crashes as we have seen
in 2.3.3 (see e.g. #11686).

There is still an assertion so that failure is noticeable before release.
2019-10-21 17:02:39 +02:00
Jean-Marc Lasgouttes
19abf29ea0 Set buffer when expanding macro
This avoids a crash in InsetMathSplit which uses the buffer() value.

Fixes bug #11686.
2019-10-20 12:54:59 +02:00
Enrico Forestieri
0573bf92e0 Fix bug 11667
When automatic command termination was added to texstream it was
forgotten to reset its status after a math inset.
2019-09-28 16:08:06 +02:00
Jean-Marc Lasgouttes
8d080364d2 Clarify calculation precedence for '&' and '?'
Spotted by cppcheck
2019-09-15 23:57:57 +02:00
Jean-Marc Lasgouttes
decd2c74f1 Mark constructors with only one parameter as explicit
Spotted by cppcheck
2019-09-15 23:56:17 +02:00
Jean-Marc Lasgouttes
19fb4db71e Make code more obvious
- use propoer parenthesis
- do not store in variable something we do not use

Spotted by cppcheck.
2019-09-15 23:31:32 +02:00
Jean-Marc Lasgouttes
02d55ab0b3 Avoid useless test
Spotted by cppcheck
2019-09-15 23:30:29 +02:00
Jean-Marc Lasgouttes
b42e6e96d8 Pass variable by reference
Spotted by cppcheck
2019-09-15 23:29:47 +02:00