File format change caused by 34eadf5d4.

This commit is contained in:
Juergen Spitzmueller 2015-04-09 11:01:44 +02:00
parent d4718b18b6
commit 319ee3296a
4 changed files with 37 additions and 8 deletions

View File

@ -11,6 +11,10 @@ adjustments are made to tex2lyx and bugs are fixed in lyx2lyx.
-----------------------
2015-04-09 Jürgen Spitzmüller <spitz@lyx.org>
* Format incremented to 485: new par layout for sigplanconf.layout:
DOI.
2015-04-06 Uwe Stöhr <uwestoehr@web.de>
* Format incremented to 484: support for Georgian:
\lang georgian

View File

@ -85,7 +85,7 @@ format_relation = [("0_06", [200], minor_versions("0.6" , 4)),
("1_6", list(range(277,346)), minor_versions("1.6" , 10)),
("2_0", list(range(346,414)), minor_versions("2.0" , 8)),
("2_1", list(range(414,475)), minor_versions("2.1" , 0)),
("2_2", list(range(475,485)), minor_versions("2.2" , 0))
("2_2", list(range(475,486)), minor_versions("2.2" , 0))
]
####################################################################

View File

@ -29,9 +29,9 @@ import sys, os
# find_token_exact, find_end_of_inset, find_end_of_layout, \
# find_token_backwards, is_in_inset, get_value, get_quoted_value, \
# del_token, check_token, get_option_value
from lyx2lyx_tools import add_to_preamble, put_cmd_in_ert#, \
# insert_to_preamble, lyx2latex, latex_length, revert_flex_inset, \
from lyx2lyx_tools import add_to_preamble, put_cmd_in_ert, lyx2latex#, \
# insert_to_preamble, latex_length, revert_flex_inset, \
# revert_font_attrs, hex2ratio, str2bool
from parser_tools import find_token, find_token_backwards, find_re, \
@ -703,7 +703,30 @@ def revert_georgian(document):
else:
l = find_token(document.header, "\\use_default_options", 0)
document.header.insert(l + 1, "\\options georgian")
def revert_sigplan_doi(document):
" Reverts sigplanconf DOI layout to ERT "
if document.textclass != "sigplanconf":
return
i = 0
while True:
i = find_token(document.body, "\\begin_layout DOI", i)
if i == -1:
return
j = find_end_of_layout(document.body, i)
if j == -1:
document.warning("Malformed LyX document: Can't find end of DOI layout")
i += 1
continue
content = lyx2latex(document, document.body[i:j + 1])
add_to_preamble(document, ["\\doi{" + content + "}"])
del document.body[i:j + 1]
# no need to reset i
##
# Conversion hub
@ -723,10 +746,12 @@ convert = [
[481, [convert_dashes]],
[482, [convert_phrases]],
[483, [convert_specialchar]],
[484, []]
[484, []],
[485, []]
]
revert = [
[484, [revert_sigplan_doi]],
[483, [revert_georgian]],
[482, [revert_specialchar]],
[481, [revert_phrases]],

View File

@ -32,8 +32,8 @@ extern char const * const lyx_version_info;
// Do not remove the comment below, so we get merge conflict in
// independent branches. Instead add your own.
#define LYX_FORMAT_LYX 484 // uwestoehr: support for Georgian
#define LYX_FORMAT_TEX2LYX 484
#define LYX_FORMAT_LYX 485 // spitz: support DOI in sigplanconf
#define LYX_FORMAT_TEX2LYX 485
#if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
#ifndef _MSC_VER