Commit Graph

223 Commits

Author SHA1 Message Date
Richard Heck
1db883e183 In lib/lyx2lyx/: s/while 1/while True/ 2016-06-25 17:38:06 -04:00
Georg Baum
166420d02c Make lyx2lyx infrastructure python3 ready
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.
2016-06-12 21:21:15 +02:00
Georg Baum
9558d863c8 Some python 3 fixes for lyx2lyx
These were found by 2to3 and later adapted to use the compatibility code
which was already used in some parts of lyx2lyx, e.g. lyx_1_5.py.
2016-06-11 11:06:11 +02:00
Georg Baum
a2f127f8c3 Fix lyx2lyx unicodesymbols escaping
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().
2015-06-14 12:44:44 +02:00
José Matos
9a0d70a45f First step to make lyx2lyx code support both python 2 and python 3 (3.3+)
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.
2015-03-11 12:09:18 +00:00
Uwe Stöhr
14bcaa5f9d lyx2lyx/lyx_1_6.py: fix a typo (port from branch)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40451 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-08 23:16:34 +00:00
Julien Rioux
72cface90f Update links to the bug tracker.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40445 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-08 20:19:10 +00:00
Richard Heck
b87297b8a0 Fix infinite loop reported on the list, which revealed another, which
revealed another. So fix a bunch of such things.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39530 a592a061-630c-0410-9148-cb99ea01b6c8
2011-08-26 23:06:19 +00:00
Pavel Sanda
aef6b16811 Update FSF address, patch from cornelisbb, #7735.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39523 a592a061-630c-0410-9148-cb99ea01b6c8
2011-08-25 23:10:36 +00:00
Pavel Sanda
fe5f90b556 typo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39224 a592a061-630c-0410-9148-cb99ea01b6c8
2011-07-01 22:31:42 +00:00
Pavel Sanda
51c4b0761e Comment only
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39223 a592a061-630c-0410-9148-cb99ea01b6c8
2011-07-01 21:53:18 +00:00
Richard Heck
05df2a7cc6 Fix python 3 deprecation warning.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36267 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-12 15:42:50 +00:00
Richard Heck
23499e63ba Move get_value_string to lyx_1_6, since it is only used there. A more
suitable replacement is forthcoming.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36112 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-05 15:07:32 +00:00
Richard Heck
4d2b6ffc78 Fix another infinite loop.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35997 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-02 15:22:16 +00:00
Richard Heck
d7c31dfff3 Prevent infinite loop.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35996 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-02 14:55:33 +00:00
Jürgen Spitzmüller
71001a8087 Fix bug 6179 ("|" in index entries not embraced in ERT by lyx2lyx).
* OutputParams.{cpp,h}:
	- new param inIndexEntry
* InsetIndex.cpp (latex):
	- set param.
* InsetErt.cpp (plainText):
	- output active chars in IndexInsets

* lib/lyx2lyx/lyx_1_6.py:
	- embrace "|" in ERT when converting old index entries to collapsables.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31360 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-10 12:07:42 +00:00
Jürgen Spitzmüller
3a8121ddee * lyx2lyx/lyx_1_6.py: fix convert_url routine (bug 6121).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30869 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-06 08:05:31 +00:00
Jürgen Spitzmüller
5ef8c7bc54 * lyx_1_6.py:
- Fix reversion of aligned tables in subfloats to LyX 1.5 (bug 5918).
	- Fix reversion of info insets with a backslash to LyX 1.5.
	- Fix unicode characters > LaTeX macro reversion to LyX 1.5.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29421 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-27 09:50:10 +00:00
Uwe Stöhr
0e8f00dbe1 lyx_1_6.py: remove wrong comment
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29219 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-11 21:17:58 +00:00
Richard Heck
376853cd7a Fix problem with conversion of empty insets. Also, fix problem with error message.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28753 a592a061-630c-0410-9148-cb99ea01b6c8
2009-03-11 18:58:38 +00:00
Jürgen Spitzmüller
3d018a6d94 * lyx2lyx/lyx_1_6.py:
- (convert_latexcommand_index): do not stop if a print_index inset is found,
	  but just skip this inset and proceed. There might be index insets after this (bug 5713).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28273 a592a061-630c-0410-9148-cb99ea01b6c8
2009-01-25 10:55:06 +00:00
Jürgen Spitzmüller
8382d7a9dc * lyx_1_6.py (revert_wrapplacement):
- fix reversion of placement argument (bug 5618).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27875 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-15 09:45:52 +00:00
Jürgen Spitzmüller
cf6e817709 * lyx_1_6.py:
- fix the conversion of some more complex index insets.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27759 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-02 07:40:23 +00:00
Jürgen Spitzmüller
c86be3e543 * lyx_1_6.py:
- another bug manifesting in the UG reversion: \slash and \nobreakdash can also occur
               in the middle of a line.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27394 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-12 09:42:37 +00:00
Richard Heck
0ff926b77b Fix lyx2lyx problem connected with subfloats that prevented the User Guide from being exported.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27390 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-12 01:17:47 +00:00
Richard Heck
d5d1987d99 Avoid infinite loop.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27387 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-11 17:44:55 +00:00
Jürgen Spitzmüller
24fe5b08c0 * lyx_1_6.py:
- fix reversion of info insets.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27386 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-11 17:24:07 +00:00
José Matox
bd64e75489 Fix bug 5411
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27329 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-07 19:17:35 +00:00
José Matox
c7b7331315 Do not reload unicode symbols each time they are used
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27166 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-28 16:00:42 +00:00
José Matox
c014f26820 Remove unneeded whitespaces (to help with another patch)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27154 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-27 16:51:51 +00:00
Richard Heck
e171ec6929 Fix for problem when subfigures in 1.5 don't have captions.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27108 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-25 13:43:07 +00:00
Richard Heck
f67069ed4d Stupider still.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27061 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-23 19:18:42 +00:00
Richard Heck
cf06f04955 Stupid.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27060 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-23 19:18:21 +00:00
Richard Heck
d6a0a94883 Revert unintentional commit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27059 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-23 18:16:12 +00:00
Richard Heck
87f291c706 Fix issue with convert_macro_global reported by Enrico.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27058 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-23 18:08:26 +00:00
Uwe Stöhr
14adc7047d lyx2lyx/lyx_1_6.py: fix lyx2lyx for MathMacro conversions, fixes part of http://bugzilla.lyx.org/show_bug.cgi?id=5371
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26964 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-19 10:50:32 +00:00
Uwe Stöhr
263e72d53a lyx2lyx/lyx_1_6.py: fix remaining lyx2lyx issue of r26882
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26890 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-14 00:56:17 +00:00
Uwe Stöhr
2fe68fa743 lyx2lyx/lyx_1_6.py: fixes for r26882 as promised
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26885 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-13 21:43:14 +00:00
Pavel Sanda
308e2d9df3 Sanitize backreferences in hyperref.
http://bugzilla.lyx.org/show_bug.cgi?id=5340
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg144958.html



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26882 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-13 16:01:02 +00:00
Jürgen Spitzmüller
cc12f477d2 * lyx2lyx/lyx_1_6.py:
- fix reversion of aligned subfloats (bug 5352).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26879 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-13 07:51:02 +00:00
Jürgen Spitzmüller
d45ca67d1d ** fix bug 2114. Fileformat change.
** fix bug 5343 (patch from Richard, prerequisite for the other fix)

* Buffer.cpp:
	- increment format to 343
* src/BufferParams.{cpp,h}:
	- new param \use_default_options that allows to select/deselect
	  the "Other" class options defined in the layout file.
* src/frontends/qt4/GuiDocument.cpp:
* src/frontends/qt4/ui/LaTeXUi.ui:
	- add GUI to set \use_default_options, display predefined options in the dialog
	- update dialog correctly on class change.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26860 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-12 09:36:00 +00:00
Jürgen Spitzmüller
41c028cce5 * lyx2lyx/lyx_1_6.py:
- fix conversion of empty index insets.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26859 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-12 08:58:42 +00:00
Uwe Stöhr
d30e01fd08 Support for Mongolian, fileformat change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26848 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-11 23:52:31 +00:00
José Matox
e90f9ea0f7 preview comes always after a latecommand
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26826 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-09 12:51:37 +00:00
Uwe Stöhr
7382c55fd7 add support for TABs in Listings, fileformat change, fixes http://bugzilla.lyx.org/show_bug.cgi?id=3629 , patch by Vincent, lyx2lyx and UI stuff by me
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26647 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-30 18:00:02 +00:00
Richard Heck
87d4bd72b3 Don't use '\n'.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26095 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-08 15:22:43 +00:00
Uwe Stöhr
0b115f57db lyx2lyx/lyx_1_6.py: fix bug 5137 and another bug
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26094 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-07 22:37:27 +00:00
Richard Heck
c451eefaf8 Fix bug 5129.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26080 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-06 12:59:54 +00:00
Uwe Stöhr
35bfca8f60 lyx2lyx/lyx_1_6.py: fix reversion of PDF properties
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26077 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-05 22:37:28 +00:00
Richard Heck
e5a783d853 Polish the index conversion routine a bit, fixing bug 5119.
We had been assuming too much about the format. Reference.lyx violated it, maybe because it is so old. But anyway, this is a bit more reliable.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26068 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-05 15:07:37 +00:00