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.
The objective is to identify common operations and place them
in functions in order to improve the readability and correctness of the code.
is_document_option(document, option):
Find if _option_ is a document option (\\options in the header).
insert_document_option(document, option):
Insert _option_ as a document option.
remove_document_option(document, option):
Remove _option_ as a document option.
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.
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)
Don't insert empty line when translating QuoteInsets to literal
quotes.
Fix regexp pattern in re/convert_dashligatures.
Adjust logic in re/convert_dash(ligatur)es.
* use unicode.transform() instead of loop over replacements
* telling variable names
* remove trailing whitespace
* documentation update
* don't set use_ligature_dashes if both dash types are found
* remove spurious warning, normalize indentation, and use
Python idioms in revert_baselineskip()
Fix cases where lyx2lyx adds changes with every round cycle
uncovered by recent ctest change.
Add optional `delete` argument to parser_tools.get*value():
If True, delete the matching line.
More efficient "allowbreak" con/reversion.
New lyx2lyx parser tools find_complete_lines() (replaces find_slice),
del_complete_lines(), and find_across_lines(). Default value 0
for start argument in utility functions.
Rework the implementation of dash-conversion.
Fix failure of revert_dashes() found by lyx2lyx ctests
using an efficient function to find a given sequence of lines
in a list of lines.
Some optimizations using Python idioms instead of C-like code.
Insert ligature breaks between hyphens where
they are separate in 2.2 but ligated by TeX in 2.1.
This fixes output with LyX 2.1 and prevents -- and --- becoming
en and em dash in the LyX source after a round-trip to 2.1
and back.
Solves lyx2lyx ctest failures with a warning about
possible line-break changes.
Code is by default rendered as typewriter and should be treated
similar:
In text marked up as code, -- or --- is typically part of a
command (e.g. "lyx --help" or "x--") and not a transliteration
for en dash, see #10961.
This is already handled so for text in typewriter font
(see Text.cpp:500).
The current spelling is not strictly wrong, but flagged as unusual or
historical by some authorities. It is also found fault with many
spell checkers. Thus we decided to move to the more standard "-ible"
form once and for all.
See #10678 for discussion
This part only covers the usage in comments and the like. More to follow.
This will all also all be backported to 2.3.x, for the sake of backwards
compatibility (cherry-picking).
Update the listings inset to optionally use the minted package
(instead of the listings one) for typesetting code listings.
Only one of the two packages can be used in a document, but it
is possible to switch packages without issues if the used options
are the same. If a switch is made and the options differ, one needs
to manually adjust them if they were entered in the advanced options
tab, or apply again the gui settings.
Note that minted requires the -shell-escape option for the latex
backend and the installation of additional software (python pygments).
Do not treat them as non-verbatim in conversion. This keeps math $...$
as math.
There will be problems with characters that are outside the given
encoding, but as long as there is no way to convert them to the
respective LaTeX macros from within lyx2lyx, I don't know how to solve
this.
New special character to mark an optional line break
without inserting a hyphen (ZWSP). See #10585.
Corresponds to the Unicode character U+200B ZERO WIDTH SPACE
This isn't a “space”. It is an invisible character that can be used
to provide line break opportunities.
http://unicode.org/notes/tn27/
While the literal Unicode character can be used in the LyX
file, it is invisible in the GUI.
For visible feedback, the patch adds a new special character "allowbreak".
The small mark is inspired by LibereOffice.
A tooltip is added.