Yuriy Skalko
7d38a4d126
Loop refactoring
2020-10-09 09:04:20 +03:00
Thibaut Cuvelier
6a0e93f162
Amend 249d899
...
Non-ASCII characters make std::isspace crash, but not lyx::isSpace.
2020-10-07 04:49:20 +02:00
Thibaut Cuvelier
249d899298
DocBook: clean output when fonts span over text that ends with a space
2020-10-05 16:22:58 +02:00
Yuriy Skalko
fe85162a29
Refactoring
2020-10-05 14:55:00 +02:00
Yuriy Skalko
715b8cda54
Refactoring based on cppcheck suggestions
2020-10-03 13:39:51 +02:00
Juergen Spitzmueller
b38500353c
Amend 448e5efab4
...
Only set langClosed to true if it really has been closed.
2020-09-26 12:12:09 +02:00
Juergen Spitzmueller
b814c4fda7
Fix unnecessary cprotect
2020-09-20 08:45:42 +02:00
Thibaut Cuvelier
44a7d2bc88
DocBook: adapt code for older GCC.
2020-09-19 23:55:07 +02:00
Thibaut Cuvelier
9a48c8d22b
DocBook: fix handling of new lines and fonts.
...
Only the font variable was restored to the right state, not fs.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
594a4763b7
Fix a few warnings.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
e995414917
DocBook: avoid generating fonts for "special cases" like equations.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
654559feb8
DocBook: fix line issues around programlisting.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
9d3a717ef1
DocBook: fix font issues when a paragraph has an InsetNewline.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
39ad6e84f0
DocBook: improve equation formatting (new lines for block equations).
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
52b2d3f683
DocBook: make Paragraph::simpleDocBookOnePar return a list of paragraphs.
...
Before, it directly wrote to the XMLStream, but it made implementation of new lines tricky. Now, it returns the XML for each sub-paragraph (delimited by new lines) as a string, so that the caller can adopt a more precise behaviour (such as in lists).
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
87dae26e4a
Simplify code to generate only one paragraph at a time.
2020-09-19 20:43:37 +02:00
Stephan Witt
3c1b4a5d7e
#6401 avoid use of lyxCode()
2020-08-25 10:54:49 +02:00
Juergen Spitzmueller
448e5efab4
Do not attempt to close language twice
2020-08-21 11:07:22 +02:00
Juergen Spitzmueller
3aefd7477c
Fix font and encoding switch problem with directionality change at inset
...
Also fixes #10110
2020-08-17 13:25:02 +02:00
Juergen Spitzmueller
4d1d07ea10
Amend 92f6e4806e
...
This was too general
2020-08-17 13:11:46 +02:00
Juergen Spitzmueller
812ff7de75
Take out inheritFont() condition
2020-08-16 11:18:49 +02:00
Juergen Spitzmueller
92f6e4806e
Fix language closing before inset
2020-08-16 10:47:46 +02:00
Juergen Spitzmueller
24af4ffcb3
Redo "Move some tests upstream, since we'll need it there" properly
2020-08-16 10:47:08 +02:00
Juergen Spitzmueller
6876a306b9
Consider encoding when re-setting language
2020-08-15 19:21:20 +02:00
Juergen Spitzmueller
3c5c41ddc2
Only exclude ERT from language switch doing
2020-08-15 16:46:18 +02:00
Juergen Spitzmueller
1c3ccc0ac2
Revert "Move some tests upstream, since we'll need it there"
...
This reverts commit 0a44c1687e
.
2020-08-15 15:32:15 +02:00
Juergen Spitzmueller
fb2077df11
Revert "Fix a lang edgecase"
...
This reverts commit dc4b11b0e9
.
2020-08-15 15:21:19 +02:00
Juergen Spitzmueller
dc4b11b0e9
Fix a lang edgecase
2020-08-15 12:29:55 +02:00
Juergen Spitzmueller
0a2fce358d
Do not attempt to use switches around PassThur insets.
...
This is bound to break with ERT snippets f. ex.
2020-08-15 12:29:55 +02:00
Juergen Spitzmueller
0a44c1687e
Move some tests upstream, since we'll need it there
2020-08-15 12:29:55 +02:00
Juergen Spitzmueller
04ba887e2c
Correctly re-set font before and after non-multipar inset
2020-08-15 07:06:20 +02:00
Stephan Witt
012c0f6bac
#6401 avoid unnecessary inset to string conversions in Paragraph::find while skipping invisible letters
2020-08-14 21:32:24 +02:00
Stephan Witt
5bce66b1a3
#6401 more robust processing on special char code insets when looking for spell checker ranges
2020-08-14 21:28:24 +02:00
Enrico Forestieri
836300cd33
Revert "Correctly set font decorations for multipar insets"
...
This reverts commit 5791b8bff8
.
2020-08-14 18:01:26 +02:00
Enrico Forestieri
5791b8bff8
Correctly set font decorations for multipar insets
...
Font decorations such as underline cannot be set for a whole inset
that allows paragraph breaks. This commit allows to still set the
font main properties for the whole inset but decorations are applied
to each paragraph inside the inset.
2020-08-14 12:04:23 +02:00
Juergen Spitzmueller
70eb8c37cb
Do not close language before PassThru insets
2020-08-14 09:50:40 +02:00
Juergen Spitzmueller
ef11fdc77d
Assure language is properly closed before non-inheriting inset.
2020-08-14 09:08:46 +02:00
Juergen Spitzmueller
24c46cbd19
Remove obsolete FIXME
2020-08-12 17:38:57 +02:00
Juergen Spitzmueller
e3a72156f9
Fix too general application of \cprotect
2020-08-12 17:38:20 +02:00
Enrico Forestieri
f5672a4843
Switch font for multipar insets
...
Use font switches for insets that allow paragraph breaks rather
than insets that do not inherit outer font settings. No change of
behavior is intended with respect to the current status, but this
will allow a simple and effective fix for #10263 .
2020-08-12 16:25:35 +02:00
Juergen Spitzmueller
49e8e3567c
Font switches in \cprotect'ed context need to be \cprotect'ed themselves
2020-08-12 15:26:23 +02:00
Juergen Spitzmueller
008766fe4e
Pass proper font
2020-08-12 14:05:22 +02:00
Juergen Spitzmueller
1af67974ff
Properly close and reopen font before insets with inheritFont() false
2020-08-12 11:04:17 +02:00
Stephan Witt
0fa4b7e736
#9376 prepare use of Length in lyxrc - move the class Length to support
2020-08-07 09:24:31 +02:00
Juergen Spitzmueller
7250aad280
Revert [9370135c3e/lyxgit] and fix #8499 properly
...
Fixes #11920
2020-08-04 16:52:58 +02:00
Juergen Spitzmueller
aba8c81290
Next attempt at correctly setting fonts in insets depending on inheritFont()
2020-08-02 10:12:19 +02:00
Thibaut Cuvelier
d3e1f2a6d4
DocBook: fix bug about fonts (tag not closed at the right place).
...
Yes, this was just a reference issue! Also includes support for XOUT text, and some styling consistency.
2020-08-01 22:45:56 +02:00
Richard Kimberly Heck
4ce9e784b4
Fix warnings
2020-08-01 02:01:01 -04:00
Richard Kimberly Heck
219773dd55
Move META_INSET declaration to header file
2020-08-01 01:53:36 -04:00
Thibaut Cuvelier
06675b853b
Fix CI…
2020-07-31 02:23:22 +02:00
Thibaut Cuvelier
37b2115d2e
DocBook: refactor font handling.
...
This only hides a lot of complexity behind a function. It is a good candidate for future refactoring (code highly similar to the XHTML code path).
2020-07-30 23:18:31 +02:00
Juergen Spitzmueller
50b2120438
Use switches where possible around non-inheriting insets
...
Fixes rest of #8384
2020-07-29 16:25:19 +02:00
Juergen Spitzmueller
d2a162ce3d
Instatiate right font
2020-07-29 11:44:33 +02:00
Thibaut Cuvelier
8dd2e7e681
DocBook: solve issue with formulae within font tags.
...
This is not valid DocBook either!
2020-07-26 23:23:02 +02:00
Juergen Spitzmueller
3b6fec3835
Do not terminate size switches in front of insets with InheritFont() false
...
and inherit the size.
This reduces formatting clutter (#8384 ) in table and fixes some wrongly
set sizes (#9923 , #9285 ) in tables.
2020-07-15 09:11:05 +02:00
Richard Kimberly Heck
8ae0841826
Whitespace
2020-07-08 12:38:05 -04:00
Pavel Sanda
7175a87f14
comment only
2020-07-08 14:05:54 +02:00
Thibaut Cuvelier
3883b85f49
New DocBook support
2020-07-08 08:42:16 +02:00
Juergen Spitzmueller
e4ef8ddc0f
Properly fix handling of title layouts within insets ( #11787 )
2020-07-03 16:20:38 +02:00
Pavel Sanda
86387120bc
Rename-XHTMLStream-to-XMLStream #2 .
...
Refactor font-related stuff to come closer to the previous xHTML output.
Patch from Thibaut Cuvelier.
2020-06-15 23:37:27 +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
Juergen Spitzmueller
6057fba90a
Fix indentation
2020-05-17 15:18:38 +02:00
Juergen Spitzmueller
0328ecd019
Properly close and reopen lyxdeleted macro at font change
...
Fixes #11867 , amends [28da0f4360a/lyxgit]
2020-05-17 14:54:59 +02:00
Richard Kimberly Heck
cf14e81412
Fix some warnings
2020-03-16 02:12:16 -04:00
Juergen Spitzmueller
e6105275af
Consider change tracking in setBeginOfBody()
...
Fixes #11749
2020-03-06 11:49:32 +01:00
Juergen Spitzmueller
21567a260c
Use range-based loop
2020-03-06 11:20:46 +01:00
Juergen Spitzmueller
228d738868
Account for changes in insets when checking changes in selection
...
This is not ideal, see FIXME.
Fixes #11774
2020-03-06 10:53:54 +01:00
Juergen Spitzmueller
ff85641cc0
Whitespace
2020-01-13 09:21:32 +01:00
Jean-Marc Lasgouttes
dba1e40b52
Revert "Automatically show the review toolbar if the document has tracked changes"
...
We will replace this with a better solution
For now, only keep
- Changes::isChanged()
- Buffer::areChangesPresent(), replaced by a dummy function
Next step will be to provide a working areChangesPresent() and to
compute Inset::isChanged in updateBuffer.
This reverts commit 6d4e6aad24
.
2020-01-12 20:26:35 +01:00
Jean-Marc Lasgouttes
ce950f1ea5
Fixup b321bb1a
: set changebar when inset contains changes
...
Add Paragraph::isChanged() and InetText::isCgchanged() which indicate
the presence of a change in the relevant object.
Sets Row::needsChangebar() when adding an inset that contains changes.
Related to bug #8645 .
2020-01-12 20:26:35 +01:00
Enrico Forestieri
45f8254cbd
Fix bug #11716
...
Close \lyx*displayobjdeleted so that the correct macro is used for
the following deleted material.
2020-01-12 18:35:15 +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
28da0f4360
Properly nest \lyxdeleted within text markup
...
Fixes #8807
2019-12-27 13:56:53 +01:00
Juergen Spitzmueller
6964886daf
Consider deleted spaces in spell checking
...
Addresses part of #11470
2019-12-27 13:01:35 +01:00
Juergen Spitzmueller
c096382beb
Initialize correct font in description label with ct
...
Fixes #10811
2019-12-27 08:42:43 +01:00
Juergen Spitzmueller
afb442c76c
Correctly show merged paragraphs with change tracking
...
Fixes #3136
2019-12-26 13:47:50 +01:00
Juergen Spitzmueller
b32615d1ce
Tiny cleanup
...
No change in functionality
2019-08-16 11:48:57 +02:00
Juergen Spitzmueller
231b36d950
Fix text direction of references with XeTeX/bidi
...
Fixes : #11626
2019-08-05 16:30:01 +02:00
Juergen Spitzmueller
04bd57a86a
Factor out test for bidi package (= XeTeX + polyglossia)
2019-07-11 10:31:10 +02:00
Juergen Spitzmueller
d3aa102260
Brackets reversion differs in luabidi (LuaTeX) from bidi (XeTeX)
...
This amends [195f62ac93/lyxgit]
2019-07-11 08:25:18 +02:00
Juergen Spitzmueller
a95339c6e1
LuaTeX (luabidi) does not correct directions
...
This amends [9d20bc4e98/lyxgit].
2019-07-10 19:10:16 +02:00
Juergen Spitzmueller
b6f0c1de3d
Fix right and left layout alignment (in workarea) with RTL
...
Fixes : #11606
2019-07-10 14:50:08 +02:00
Jean-Marc Lasgouttes
2b1515a936
Rename LM_ST_* to *_STYLE and FONT_SIZE_* to *_SIZE
...
This makes code more uniform. This is typically something that is done
at end of cycle to limit backport issues later.
2019-06-14 17:05:49 +02:00
Günter Milde
c83765163f
CJK package is never used with non-TeX fonts.
...
Prepare for languages that use CJK with TeX fonts and Polyglossia
with non-TeX fonts.
Korean is already supported by Polyglossia,
LyX support will follow (file version change).
2019-05-26 01:45:35 +02:00
Juergen Spitzmueller
c9432ccbbc
\cprotect some content in captions
...
Fixes : #6243
2019-04-21 16:44:29 +02:00
Juergen Spitzmueller
96e4001d01
Handle orphaned bibitems
...
Fixes #7160
2019-04-21 11:17:44 +02:00
Juergen Spitzmueller
0a4686d8d3
update buffer after fixBiblio
...
fixes : #2743
2019-04-20 19:53:24 +02:00
Juergen Spitzmueller
4f884fc92d
Pass proper text to TeXOnePar in Paragrapgh::Private::validate
...
This fixes InPreamble layouts in insets (#11557 )
2019-04-20 17:51:06 +02:00
Günter Milde
d6d98ffbe4
Fix remainder of #9681 (textcyrillic and textgreek handling).
...
* Fix macro termination if \textcyrillic or \textgreek is not required
for Greek or Cyrillic letter.
* Replace "writeScriptChars" with conditionals in the character-output loop in
"Paragraph::latex" (solves "FIXME: modifying i here is not very nice...").
The font changing commands \textcyrillic and \textgreek are no longer
part of the textcommand in "lib/unicodesymbols" but added when required
in Paragraph::Private::latexSpecialChar.
2019-03-19 22:46:33 +01:00
Günter Milde
406b1e7fcf
Small formatting and comments update.
2019-03-16 12:59:34 +01:00
Juergen Spitzmueller
262e436fc3
Move labels and insets out of moving arguments
...
Fixes : #2154
2019-03-14 14:24:43 +01:00
Günter Milde
68b6198d63
Fix/simplify "if" clause for application of \textcyrrillic or \textgreek.
...
Also with Xe/LuaTeX only required with non-native font encodings.
2019-03-04 00:04:03 +01:00
Günter Milde
7dfc6c7f8b
Update latex export of combining characters.
...
* Remove exception for polytonikogreek (drop braces)
no longer required since the fixes to #6463 and #9637 .
* Update comments.
2019-03-04 00:04:03 +01:00
Juergen Spitzmueller
cd6229ee5c
Fix copy-paste error
2019-01-13 11:38:28 +01:00
Juergen Spitzmueller
143703f927
Amend 7b639d2db2
...
Not the (ASCII) encoding matters here, but the (TU) font encoding.
2019-01-13 11:25:17 +01:00
Juergen Spitzmueller
7b639d2db2
Script wrapper is needed with ASCII encoding
2019-01-12 18:45:41 +01:00
Juergen Spitzmueller
f6a77d5d82
"Script chars" also need to be output as macro with full utf8 engines and TeX fonts
...
Fixes rest of #9681
2019-01-11 10:08:49 +01:00
Juergen Spitzmueller
52371c969b
Improve readability
...
No functional change.
2019-01-07 17:02:06 +01:00
Juergen Spitzmueller
9d20bc4e98
When using polyglossia (bidi), paragraph directions don't need to be swapped
...
Bidi does that.
Fixes : #11399
2019-01-07 13:54:23 +01:00
Richard Kimberly Heck
ba8cf1a50b
Also pay attention to OutputParams::free_spacing.
2019-01-03 19:16:48 -05:00