]> git.lyx.org Git - features.git/blob - lib/lyx2lyx/lyx_2_1.py
New lyx2lyx file for 2.0 --> 2.1 conversions.
[features.git] / lib / lyx2lyx / lyx_2_1.py
1 # -*- coding: utf-8 -*-
2 # This file is part of lyx2lyx
3 # -*- coding: utf-8 -*-
4 # Copyright (C) 2011 The LyX team
5 #
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License
8 # as published by the Free Software Foundation; either version 2
9 # of the License, or (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19
20 """ Convert files to the file format generated by lyx 2.1"""
21
22 import re, string
23 import unicodedata
24 import sys, os
25
26 # Uncomment only what you need to import, please.
27
28 #from parser_tools import find_token, find_end_of, find_tokens, \
29   #find_token_exact, find_end_of_inset, find_end_of_layout, \
30   #find_token_backwards, is_in_inset, get_value, get_quoted_value, \
31   #del_token, check_token, get_option_value
32   
33 #from lyx2lyx_tools import add_to_preamble, insert_to_preamble, \
34 #  put_cmd_in_ert, lyx2latex, latex_length, revert_flex_inset, \
35 #  revert_font_attrs, hex2ratio, str2bool
36
37 ####################################################################
38 # Private helper functions
39
40 #def remove_option(lines, m, option):
41     #''' removes option from line m. returns whether we did anything '''
42     #l = lines[m].find(option)
43     #if l == -1:
44         #return False
45     #val = lines[m][l:].split('"')[1]
46     #lines[m] = lines[m][:l - 1] + lines[m][l+len(option + '="' + val + '"'):]
47     #return True
48
49
50 ###############################################################################
51 ###
52 ### Conversion and reversion routines
53 ###
54 ###############################################################################
55
56
57
58 ##
59 # Conversion hub
60 #
61
62 supported_versions = ["2.1.0","2.1"]
63 convert = [#[414, []]
64           ]
65
66 revert =  [#[413, []]
67           ]
68
69
70 if __name__ == "__main__":
71     pass