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
Richard Kimberly Heck
6135824f40
Fix bug #11432 .
...
Take account of Layout::free_spacing.
2019-01-03 19:13:43 -05:00
Kornel Benko
32c6724fd6
FindAdv: Amend cd941804
...
Revert changes in Paragraph.cpp
2018-12-06 14:20:43 +01:00
Kornel Benko
cd94180492
FindAdv: Simplify search for chars '&', '%', '#' and '_'
...
This is not possible for '$', because of the latex-meaning to
start/end math inset.
Therefore, if not ignoring format, we still have to use
[\\][\$] in regex in order to find '$' in text.
2018-12-05 13:36:43 +01:00
Juergen Spitzmueller
0ec295d63e
Fix parentheses with Hebrew
...
Patch by Guy Rutenberg, with some changes of mine.
Fixes : #11191
2018-10-30 12:33:35 +01:00
Juergen Spitzmueller
3a91fed269
Amend a754912
once more
...
Do not use LTR environment (bidi) at all, since it adds unwanted
paragraph breaks.
Fixes : #11338
2018-10-13 13:51:00 +02:00
Juergen Spitzmueller
9d8fbc7fd1
Amend a754912
...
Switch logic, since isStyle() does not cover inline math
Fixes : #11338
2018-10-09 18:04:51 +02:00
Juergen Spitzmueller
10c06f67c9
Use LTR environment for forceLTR content with polyglossia
...
Fixes : #10548
2018-09-28 08:36:44 +02:00
Juergen Spitzmueller
3bacc3c6e7
Par alignment in floats must be swapped for all RTL langs, not only Hebrew
...
Fixes : #11029
2018-07-15 19:23:19 +02:00
Juergen Spitzmueller
195f62ac93
Fix bracket output in RTL languages
...
This is a real mess!
Fixes : #11187
2018-07-15 14:26:29 +02:00
Juergen Spitzmueller
57dc817581
Add \nospellcheck font property
...
This revives a ten year old idea (and patch) by Dov.
You can now mark in the character dialog text and exclude it from spell
checking.
Fixes : #1042
File format change
Remaining issue: The instant spell checking marks are not immediately
removed, but only after some editing.
2018-05-06 19:48:21 +02:00
Juergen Spitzmueller
a853dab61f
Check script char fontenc from main language.
2018-05-05 15:26:37 +02:00
Juergen Spitzmueller
768c9a552e
cprotect allows to place environments in fragile contexts.
...
use that possibility.
Fixes parts of #5128 .
2018-04-30 09:06:15 +02:00
Juergen Spitzmueller
0b2fae66e3
unicodesymbols: add general way to require a feature only for specific encodings
...
A feature can now be required only for specific input or font encodings:
- <feature>=enc1;enc2... Require the feature <feature> only if the
character is used in one if the specified font
or input encodings.
- <feature>!=enc1;enc2... Require the feature <feature> only if the
character is used in a font or input encoding
that is not among the specified.
2018-04-28 13:31:29 +02:00
Juergen Spitzmueller
1af0832f75
Do not require cprotect if we only have a cprotectible inset in the maintext.
2018-04-23 11:04:18 +02:00
Juergen Spitzmueller
a883133e8d
Paragraph on top level do not need cprotection.
2018-04-22 20:15:04 +02:00
Juergen Spitzmueller
26ea1e1496
Align fontenc with document fonts
...
Following a request by Günter, we consider the document fonts (only rm
for now) when selecting an appropriate font encoding.
See #9741
The new default font encoding setting "auto" does
* consider the font encoding needed by the language(s), which can now
have fallback alternatives
* Consider which font encoding is provided by the document font
Thus, cm now will result in OT1 fontenc, if the language can deal with
that.
The font_enc pref is ditched: it is no longer needed.
The automatism is still very basic and is subject to extension.
File format and prefs format change.
2018-04-22 19:06:46 +02:00
Juergen Spitzmueller
3457d9d25f
Output "textbaltic" definitions only if needed.
2018-04-22 10:08:07 +02:00
Juergen Spitzmueller
02d37932d0
\textcyr -> \textcyrillic
...
Use the command as defined by Babel. This allows us to use the (more
advanced) Babel command if provided instead of rolling our own.
I add a dummy file format change in case it turns out we need to
do something here for old documents (e.g. with user preamble definitions)
2018-04-21 16:28:15 +02:00
Juergen Spitzmueller
4010ccafbd
Factor out test for script wrapper in given font enc
2018-04-21 12:55:11 +02:00
Juergen Spitzmueller
b7223bc5d1
Handle script chars in latexSurrogatePair
...
If we have "script chars" (\textcyr or \textgreek) combined with
combining chars, the combining chars need to go inside the script
macro.
Fixes : #6463
2018-04-21 11:38:19 +02:00
Juergen Spitzmueller
4e5e1de086
Align \textgreek and \textcyr with font encoding, part II
...
Also embrace encodable chars to those macros if we don't have a font
encoding that can handle the glyphs.
Fixes the remaining part of #9637
2018-04-20 20:00:01 +02:00
Juergen Spitzmueller
d77c0707e0
Handle combining characters in writeScriptChars
...
They were output in the wrong order and thus produced wrong result.
2018-04-20 18:17:18 +02:00
Juergen Spitzmueller
a6c6bffbed
Align \textgreek and \textcyr with font encoding
...
Fixes part of #9637
2018-04-20 18:01:16 +02:00
Juergen Spitzmueller
6f2eda8a0c
Simplify
2018-04-15 12:37:41 +02:00
Juergen Spitzmueller
c082c3a0f6
needsCProtection(): check all insets.
2018-04-15 12:29:49 +02:00
Juergen Spitzmueller
ef359f58b5
Add cprotection support for paragraph layouts.
2018-04-14 12:57:23 +02:00
Juergen Spitzmueller
2ba584957c
Add basic support for cprotect
...
This allows (some) verbatim contents in macros, such as \url's with
specific chars (#, % etc.) in section headings or footnotes (#449 )
or comments in captions (#9313 ).
The mentioned two bugs are fixed by this commit.
Note that the implementation is still rather basic and might need
extension for other cases.
2018-04-13 17:46:37 +02:00
Richard Heck
e857fee741
Fix bug #10920 , and some for loops.
2018-02-24 00:04:34 -05:00
Juergen Spitzmueller
8a703573ea
Implement IsTocCaption for normal layouts.
...
But use default "true" to maintain current behavior if not explicitly
stated otherwise.
Fixes : #11045
2018-02-21 16:37:07 +01:00
Jean-Marc Lasgouttes
1dba36c7ce
Implement buffer-anonymize more efficiently
...
The work is done now in Paragraph::anonymize().
Move the handling of the lfun to Buffer class.
2018-02-12 14:38:28 +01:00
Juergen Spitzmueller
10f02c4160
Whitespace
2018-01-29 08:37:25 +01:00