LyX file-format changes
-----------------------
+2007-10-03 Uwe Stöhr Uwe Stöhr <uwestoehr@web.de>
+ * Format incremented to 291: Add table wrap floats.
+
+2007-10-03 Martin Vermeer <martin.vermeer@tkk.fi>
+ * Format incremented to 290: ??
+
2007-09-25 Richard Heck <rgheck@bobjweil.com>
* Format incremented to 288: Change how command insets are
represented in LyX files.
("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" , 1)),
- ("1_6", range(277,290), minor_versions("1.6" , 0))] #MV, index collapsable
+ ("1_6", range(277,291), minor_versions("1.6" , 0))] # Uwe Stöhr, wrap table
def formats_list():
+def revert_wraptable(document):
+ "Revert wrap table to wrap figure."
+ i = 0
+ while True:
+ i = find_token(document.body, "\\begin_inset Wrap table", i)
+ if i == -1:
+ return
+ document.body[i] = document.body[i].replace('\\begin_inset Wrap table', '\\begin_inset Wrap figure')
+ i = i + 1
+
+
##
# Conversion hub
#
[287, [convert_wrapfig_options]],
[288, [convert_inset_command]],
[289, [convert_latexcommand_index]]
+ [290, []]
]
-revert = [
+revert = [[289, [revert_wraptable]],
[288, [revert_latexcommand_index]],
[287, [revert_inset_command]],
[286, [revert_wrapfig_options]],
Menu "insert_float"
FloatInsert
# This has got to be better than "Wrap", anyway
- Item "Text Wrap Float|W" "wrap-insert figure"
+ Item "Figure Wrap Float|F" "wrap-insert figure"
+ Item "Table Wrap Float|T" "wrap-insert table"
End
Menu "insert_toc"
namespace {
-int const LYX_FORMAT = 289; //MV, index collapsable
+int const LYX_FORMAT = 290; //Uwe Stöhr, wrap table
} // namespace anon
case LFUN_WRAP_INSERT: {
string const argument = to_utf8(cmd.argument());
- if (argument == "figure")
+ if (argument == "figure" || argument == "table")
return new InsetWrap(params, argument);
lyxerr << "Non-existent wrapfig type: " << argument << endl;
return 0;