Commit Graph

39895 Commits

Author SHA1 Message Date
Günter Milde
cc84fa6173 unicodesymbols: Use \r{A} instead of \AA for "Latin letter A with ring" and "Ångström sign".
Xe/LuaTeX convert \AA to the deprecated character u212B (which is missing
in the default LatinModern font) instead of the recommended u00C5.

Also fix some of the "missing character" errors in Math.lyx if compiled with
Xe/LuaTeX which were caused by the replacement of \AA with literal u212B characters
in math-insets due to the old definitions in unicodesymbols.

Update the minimal example for failures of Math.lyx with system fonts.
2019-03-08 18:36:56 +01:00
Juergen Spitzmueller
2078a02ce9 Silence compiler warning 2019-03-08 16:48:49 +01:00
Scott Kostyshak
18c56516bc ctests: invert luainputenc-utf8_pdf5_texF
From Günter:

> OK, so in TL18 the Ukrainean "auto-date" (7 березня 2019 р.) fails with
> PDF (XeTeX) and DVI (LuaTeX) but not PDF (LuaTeX).
> Strange. Feel free to invert.
2019-03-07 17:23:47 -05:00
Günter Milde
24b675783f Ensure \LyX macro works also with non-standard font encodings (Greek, ...).
Babel provides the \textlatin macro to ensure Latin letter ASCII characters are
output as Latin letters.

Instead of 8 different definitions for the several variants of the macro definition,
wrappers are individually added if required and available.
2019-03-07 17:01:05 +01:00
Scott Kostyshak
b596b71723 ctests: invert an unreliable test
We try to make it so that the test passes on the most up-to-date TL.
2019-03-06 20:46:12 -05:00
Scott Kostyshak
6b4adc6d7a ctests: ignore a texF test
The document has "use_non_tex_fonts true" set.
2019-03-06 20:14:47 -05:00
Scott Kostyshak
26a2c27cc3 ctests: uninvert languagenesting2_pdf5_systemF
This export succeeds.
2019-03-06 20:03:59 -05:00
Scott Kostyshak
c11ab897a7 ctests: correct an inverted pattern
Amends 65fbd585.
2019-03-05 14:02:55 -05:00
Günter Milde
316b49c158 Re-invert failing tests with Hebrew, LuaTeX and 8-bit fonts. 2019-03-05 10:00:46 +01:00
Günter Milde
f674f563da ctest update: compilation errors due to #6463 are fixed. 2019-03-05 10:00:46 +01:00
Scott Kostyshak
65fbd58516 ctests: invert ja ps2pdf Additional, UserGuide
These exports did not have correct output before, and now (with an
updated TL18), ps2pdf gives an error.
2019-03-05 02:45:42 -05:00
Scott Kostyshak
7b8f87e172 ctests: uninvert LuaTeX texF es/EmbeddedObjects
With updated TL 2018, there is no longer an error (however, the
output is still incorrect).
2019-03-04 22:31:06 -05:00
Günter Milde
ff8cec5ea5 ctests: Problem with auto-date for Ukrainian with Xe/LuaTeX and TeX fonts.
New bug in TeXLive 18.
Missing characters with XeTeX and wrong characters with LuaTeX.

Also:
* Remove spurious (Latin) characters from uk/Intro.lyx
* "wrong-output" tag for Cyrillic documents with XeTeX and TeX fonts.
2019-03-04 16:22:00 +01:00
Kornel Benko
b702eda4ed FindAdv: Amend cd4ae51f
Prevent to match only part of a macro.
For instance, we want find '\imath' but not '\imathxxxx'
while checking for accents.
2019-03-04 14:37:10 +01:00
Kornel Benko
cd4ae51f77 FindAdv: Amend b21c8b21: Expand the list for handled latin characters
1.) Added for 'breve' and 'grave' accents
2.) Corrected handling for 'i'-accents (allowed \hat{i} _and_ \hat{\imath})
	because of problems with ignoring case
3.) Spaces: Changed some indents in source
2019-03-04 14:05:44 +01:00
Günter Milde
fd106637be ctest and documentation update
The special test "arabic_simple.lyx" is no longer required,
"examples/ar/splash.lyx" works with 8-bit fonts now.

Update tagging patterns and comments.
2019-03-04 00:04:04 +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
Kornel Benko
99bacf006e FindAdv: Handle some more accented latin characters.
Also try to use UTF8 encoded chars instead of their
latex equivalent if possible.
2019-03-03 14:08:27 +01:00
Kornel Benko
b21c8b214d FindAdv: Expand the list for handled latin characters 2019-03-02 22:00:20 +01:00
Kornel Benko
d50923d48a Typo 2019-03-02 21:59:29 +01:00
Kornel Benko
3541a49db4 FindAdv: Try to add the possibility to search for accented characters in regex
The problem is the handling of regex as using math-mode. That is
any accented character is converted to a math macro.
For instance "ä" --> "\\ddot{a}".
Outside of math or regex it is not converted (if used xetex flavour),
but there are other chars which are converted in math and in text (but differently)
For instance "ů"
	in math --> "\\mathring{u}"
	in text --> "\\r{u}"

TODO: determine the still not handled conversions.
It would be nice, if we could persuade math factory to not convert
these characters, but I was unable to find the place where the
conversion actually takes place.
2019-03-02 15:42:38 +01:00
Günter Milde
9ad8c25d7b unicodesymbols: Add force flags for arabic codepage. 2019-03-01 18:52:12 +01:00
Günter Milde
1c57fc31aa Minor documentation fix. 2019-02-28 23:01:14 +01:00
Günter Milde
9abd46b4d5 Fix AttributeError with Python 3.
At least since Python 3.5, `output` is already a
(unicode) string and does not have a "decode" method.
2019-02-28 22:59:30 +01:00
Günter Milde
e665715fc4 Don't switch encodings when a document wide encoding is specified.
Remove special code for CJK that is no longer required after
we use CJKutf8 document-wide with inputenc "utf8-cjk"
(and "utf8" for languages requiring CJK) (since 7bbf333fa1).

CJK characters can no longer be used with a document-wide 8-bit encoding.
(Hint: Use utf8-cjk or one of the CJK legacy encodings if your document contains CJK characters.)
2019-02-28 22:55:43 +01:00
Kornel Benko
9d6b71c6b3 FindAdv: Use isAlnumASCII() instead of std::isalnum()
Thanks Jean-Marc
2019-02-28 13:00:12 +01:00
Jean-Marc Lasgouttes
32d6396f88 Use || instead of or operator
It is more consistent and visual studio seems to dislike it anyway.
2019-02-28 12:03:34 +01:00
Kornel Benko
2c5c397afa Amend aaffcd0b: Remove some remnants ... 2019-02-27 10:33:25 +01:00
Kornel Benko
aaffcd0b39 FindAdv: Do not use data from included listing if in search mode
Fixes #11496 	"Find and replace (advanced)" is too slow
2019-02-27 10:17:56 +01:00
Kornel Benko
b1f93e0982 FindAdv: Try to use a better algorithm to find begin of a searched string 2019-02-26 23:00:31 +01:00
Günter Milde
6ee140f413 ctest update
* Do not change font choices when testing with non-TeX fonts.
* Add "nonstandard" tag for documents with requirements outside TeXLive.
* Ignore missing character in legacy Basque document.
2019-02-26 19:13:15 +01:00
Jean-Marc Lasgouttes
954531f247 Update screen as needed when preferences are changed
This commit removes the adhoc code in GuiPrefs and moves it to LyXRC,
so that it triggers in every preference change.

The code has also been updated to trigger on more variables, e.g.
font_*_foundry.

Note that the actual function that are called have not been changed
(addPreviews and LFUN_SCREEN_FONT_UPDATE), although there are doubts
that they behave as needed (see FIXMEs).

Fixes bug #11498.
2019-02-26 16:53:14 +01:00
Kornel Benko
babb291ef3 FindAdv: Partially revert e69f7022
The slowness returns, but the search works again
2019-02-26 13:24:36 +01:00
Kornel Benko
016c7d6260 Amend 4028eefe: Make callstack printing useful and optional
Added the option to cmake too
2019-02-26 09:50:58 +01:00
Richard Kimberly Heck
5b959033d2 Fix bad error message (bug 11486). 2019-02-25 21:56:40 -05:00
Jean-Marc Lasgouttes
4028eefe61 Make callstack printing useful and optional
When callback printing is enabled, link lyx with -rdynamic, so that
stacks have LyX symbols available.

Add option --disable-callstack-printing to configure.

Running "size" on binary:
 * with callstack printing support
   text	   data	    bss	    dec	    hex	filename
20891684	  34680	 107796	21034160	140f4b0	src/lyx

 * without callstack printing support
    text	   data	    bss	    dec	    hex	filename
17953640	  34648	 107796	18096084	1141fd4	src/lyx
2019-02-25 17:58:06 +01:00
Jean-Marc Lasgouttes
e78a5bd1a8 Fix help message for --disable-qt5 2019-02-25 16:24:30 +01:00
Jean-Marc Lasgouttes
bc128e7bf8 Use range-based loops in BufferList 2019-02-25 15:19:58 +01:00
Jean-Marc Lasgouttes
7f0525e9e0 Change the way scrolled rows are tracked
The goal of this commit is to simplify the logic in TextMetrics::draw.
Now, rows are repainted depending on their changed() status.

Instead of checking whether rows have been scrolled horizontally at
draw time, the code marks the row as changed when testing for
horizontal scrolling.

To this end a new method TestMetrics::setRowChanged is added, that
searches a row in the text metrics cache and marks it changed if
found.

The old code that remembered the previously scrolled row can now be
removed.
2019-02-25 15:19:58 +01:00
Kornel Benko
e69f702275 FindAdv: Fix #11496 -- too slow find
Also added some more macros to handle
2019-02-25 12:12:19 +01:00
Jean-Marc Lasgouttes
ab02a907f0 Move some TextMetrics code around.
No change intended.
2019-02-25 11:58:50 +01:00
Günter Milde
4de4263f93 ctest update.
* set required non-TeX fonts in the documents
* update comments for inverted tests
* update some tags
2019-02-25 01:19:14 +01:00
Kornel Benko
6a6b670bbd FindAdv: Correctly match '\[' and '\]' in regular expressions with format enabled
We have to check for instances of '{[}' and '{]}' and
omit removing the enclosing parentheses
2019-02-23 13:11:34 +01:00
Pavel Sanda
b1132a3438 Add few hints for varwidth module. 2019-02-22 16:51:14 +01:00
Pavel Sanda
852896da33 rebuild credits 2019-02-22 16:43:51 +01:00
Kornel Benko
44a06adb6c FindAdv: debug info
1.) Fill the 'head'-member to easier recognize the macro. May be discarded
 later, although it does not take too much run-time
2.) Add some comment
3.) Ignore any macro inside the regex.
2019-02-22 13:21:23 +01:00
Kornel Benko
01fd1f7679 FindAdv: Discard \parbox, \input macros
The languge of these macros does not matter. What's more,
without removing them we may obtain wrong matching.
2019-02-21 20:32:08 +01:00
Kornel Benko
8a0db92523 FindAdv: Handle \shortcut
Essentially remove the header and handle the language inside
\shortcut{...} appropriately
2019-02-21 14:45:41 +01:00
Jean-Marc Lasgouttes
9bdc0dab31 Honor Update::SinglePar properly
The SinglePar update flags has been a no-op for a long time without
naybody noticing. This means that the current paragraph was
always rebroken and redrawn, even when only moving the cursor around.

Now we only do that when Update::SinglePar has been specified. This
means that there may be cases where update will not be correct
anymore, because this flag has not been specified. These places will
have to be found and fixed.

Update PAINTING_ANALYSIS.
2019-02-20 14:41:22 +01:00