More up to date patch. Untested.
- Martin
Now really going...
Index: src/Buffer.cpp
===================================================================
--- src/Buffer.cpp (revision 18254)
+++ src/Buffer.cpp (working copy)
@@ -141,7 +141,7 @@
namespace {
-int const LYX_FORMAT = 269;
+int const LYX_FORMAT = 270;
} // namespace anon
Index: lib/lyx2lyx/LyX.py
===================================================================
--- lib/lyx2lyx/LyX.py (revision 18254)
+++ lib/lyx2lyx/LyX.py (working copy)
@@ -74,7 +74,7 @@
("1_2", [220], generate_minor_versions("1.2" , 4)),
("1_3", [221], generate_minor_versions("1.3" , 7)),
("1_4", range(222,246), generate_minor_versions("1.4" , 4)),
- ("1_5", range(246,270), generate_minor_versions("1.5" , 0))]
+ ("1_5", range(246,271), generate_minor_versions("1.5" , 0))]
def formats_list():
Index: lib/lyx2lyx/lyx_1_5.py
===================================================================
--- lib/lyx2lyx/lyx_1_5.py (revision 18254)
+++ lib/lyx2lyx/lyx_1_5.py (working copy)
@@ -1210,6 +1210,27 @@
document.inputencoding = get_value(document.header, "\\inputencoding", 0)
+def revert_beamer_alert(document):
+ " Revert beamer's \\alert etc insets back to ERT. "
+ i = 0
+ while 1:
+ i = find_token(document.body, "\\begin_inset CharStyle Alert", i)
+ if i == -1:
+ return
+ document.body[i] = "\\begin_inset ERT"
+ # Seach for a line starting 'begin_layout'
+ # If it is not there, break with a warning message
+ i = i + 1
+ while 1:
+ if (document.body[i][:13] == "\\begin_layout"):
+ # Insert the \alert command
+ document.body[i + 1] = "\\alert{" + document.body[i + 1] +
'}'
+ break
+ i = i + 1
+
+ i = i + 1
+
+
def convert_changes(document):
" Switch output_changes off if tracking_changes is off. "
i = find_token(document.header, '\\tracking_changes', 0)
@@ -1513,6 +1534,7 @@
[268, []],
[269, []]]
+revert = [[269, [revert_beamer_alert]],
revert = [
[268, [revert_preamble_listings_params, revert_listings_inset,
revert_include_listings]],
[267, [revert_CJK]],
Index: lib/layouts/beamer.layout
===================================================================
--- lib/layouts/beamer.layout (revision 18254)
+++ lib/layouts/beamer.layout (working copy)
@@ -1056,8 +1056,17 @@
End
+# Charstyles:
+CharStyle Alert
+ LatexType Command
+ LatexName alert
+ Font
+ Color red
+ EndFont
+End
+
# Input lyxmacros.inc
Float