LyX file-format changes
-----------------------
+2008-11-07 José Matos <jamatos@lyx.org>
+ * Format incremented to 345: for docbook backend CharStyle: -> Element:
+ (fix bug 5411)
+
2008-10-12 Pavel Sanda <sanda@lyx.org>
* Format incremented to 344: sanitize backreference settings
for hyperref (fix bug 5340).
("1_2", [220], minor_versions("1.2" , 4)),
("1_3", [221], minor_versions("1.3" , 7)),
("1_4", range(222,246), minor_versions("1.4" , 5)),
- ("1_5", range(246,277), minor_versions("1.5" , 5)),
- ("1_6", [] , minor_versions("1.6" , 0))]
+ ("1_5", range(246,277), minor_versions("1.5" , 6)),
+ ("1_6", range(277,346), minor_versions("1.6" , 0))]
####################################################################
# This is useful just for development versions #
" For _textclass_ returns its backend."
if textclass == "linuxdoc" or textclass == "manpage":
return "linuxdoc"
- if textclass[:7] == "docbook":
+ if textclass.startswith("docbook") or textclass.startswith("agu-"):
return "docbook"
return "latex"
elif k != -1 and j != -1:
document.header[k] = "\\pdf_backref section"
+
+def convert_charstyle_element(document):
+ "Convert CharStyle to Element for docbook backend"
+ if document.backend != "docbook":
+ return
+ i = 0
+ while True:
+ i = find_token(document.body, "\\begin_inset Flex CharStyle:", i)
+ if i == -1:
+ return
+ document.body[i] = document.body[i].replace('\\begin_inset Flex CharStyle:',
+ '\\begin_inset Flex Element:')
+
+def revert_charstyle_element(document):
+ "Convert Element to CharStyle for docbook backend"
+ if document.backend != "docbook":
+ return
+ i = 0
+ while True:
+ i = find_token(document.body, "\\begin_inset Flex Element:", i)
+ if i == -1:
+ return
+ document.body[i] = document.body[i].replace('\\begin_inset Flex Element:',
+ '\\begin_inset Flex CharStyle:')
+
##
# Conversion hub
#
[341, []],
[342, []],
[343, [convert_default_options]],
- [344, [convert_backref_options]]
+ [344, [convert_backref_options]],
+ [345, [convert_charstyle_element]]
]
-revert = [[343, [revert_backref_options]],
+revert = [[344, [revert_charstyle_element]],
+ [343, [revert_backref_options]],
[342, [revert_default_options]],
[341, [revert_mongolian]],
[340, [revert_tabulators, revert_tabsize]],
// Do not remove the comment below, so we get merge conflict in
// independent branches. Instead add your own.
-int const LYX_FORMAT = 344; // ps: backref
+int const LYX_FORMAT = 345; // jamatos: xml elements
typedef map<string, bool> DepClean;
typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;