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.
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.
The escaping of symbols read from unicodesymbols was inconsistent, which lead
to wrong replacements (bug 9559). Now the escaping is consistent: unicode_reps
contains unescaped LaTeX commands, the needed escaping for LyX files is
applied in put_cmd_in_ert() and lyx2latex().
Most of the changes are related with dictionaries returning views instead of
lists.
xrange -> range (since xrange is gone in python 3)
The code that is special to support both python 2 and 3 is enclosed in a comment
\# Provide support for both python 2 and 3
and
\# End of code to support for both python 2 and 3
And so later it can be removed safely when python 2 is no longer supported.
I should have had a closer look much earlier, since the fix is simple and
safe, but at that time I did not notice. The problem was that an invalid
.lyx document was created when converting unicode characters with two
backslashes in their LaTeX definition from lib/unicodesymbols to pre-unicode
LyX format.
- implement wrapper around normalize that handles specific cases
that must not be normalized (rest of bug 3313).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23227 a592a061-630c-0410-9148-cb99ea01b6c8
(multi-encoding -> utf8); specifically, the language was being
incorrectly identified in certain insets, which of course led to
encoding problems.
This fixes part of bug 3613 (http://bugzilla.lyx.org/show_bug.cgi?id=3613).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19151 a592a061-630c-0410-9148-cb99ea01b6c8
* src/support/docstring.{cpp,h}:
- rename normalize_kc to normalize_c and use normalization form C (instead of KC)
* src/callback.cpp:
* src/Trans.cpp:
* src/frontends/qt4/GuiClipboard.cpp:
* src/frontends/qt4/GuiSelection.cpp:
* lib/lyx2lyx/lyx_1_5.py:
- use normalization forms C and D instead of KC and KD.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18991 a592a061-630c-0410-9148-cb99ea01b6c8
- Split the language Arabic into "arabic_arabi" that uses the arabi-package and "arabic-arabtex" that uses the arabTeX-package to typeset Arabic. This is needed because both packages have some advantages over the other people need.
(This change is a consequence of a long and fruitful discussion with Mostafa, Dov, and me.)
Patch by Dov and me.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18887 a592a061-630c-0410-9148-cb99ea01b6c8
language to be in the paragraph's language. This is necessary due to format
change 259, but the language was forgotten in lyx2lyx back then. It's important
for Bidi documents.
(fixes bug http://bugzilla.lyx.org/show_bug.cgi?id=3789)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18766 a592a061-630c-0410-9148-cb99ea01b6c8