The functions were selected from the parser files where document is
always defined.
The only case was this code was used was on document.warning.
Since our documents are well formed this code was never active and thus
the reason why we did not saw this before.
One possible solution to assure that these type of errors do not occur
is to make the convention that all the functions in lyx2lyx_tools have
as the first argument document.
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()
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).
Remove the duplicated \# -*- coding: utf-8 -*-
lines that show in the third line.
As far as I know they are not used, the first line though is used
by python and text editors (emacs, vi & co) to get the file encoding.
That will also work in the second lines (because of the shebang convention)
but not in other lines.
Remove trailing whitespaces.
Previously the commandline arguments were processed in an operating system
dependent encoding if running under python 2. Now they are converted to
unicode during the parsing, using the more modern argpase instead of optparse.
The individual conversion methods do no longer need to know anything about
commandline encoding. This fixes a bug similar to #10218 if running under
python 2 which I probably introduced during the python 3 conversion.
The LyX class works now with python 3. Certain file format conversions may
still fail (convert_multiencoding() is a hot candidate), but this will need
to be fixed in the individual modules.
This is the same as the parbreak separator and is represented on screen
as the old parbreak. Old parbreak separators are converted to latexpar
separators when they are used for introducing blank lines in the
latex output rather than for separating environments.
Instead, parbreak separators are now represented on screen by a
double line. In essence, latexpar and parbreak separators produce
the same output but are represented differently on screen.
The context menu does not account for latexpar separators and only
"true" separators can be turned each into the other one.
The term LongTable has been deprecated and moreover the renaming makes the interface easier to the eye.
File format updated to 507. (conversion based on jamatos patch)
Layout format updated to 60.
tex2ylx tests updated.
Document EmbeddedObjects.lyx has been updated.
* Increase LyX format
* New function convert_info_insets in lyx2lyx_tools.py
Use this function in the future for future updates of info insets
* Convert "inset-modify tabular" to "tabular-feature" in info insets
* Remove icon naming hack regarding "inset-modify tabular"