churchslavonic, and oldrussian.
2019-05-21 Pavel Sanda <sanda@lyx.org>
- * Format incremented to 575: add line numbering via lineno package
+ * Format incremented to 575:
+ - add line numbering via lineno package
+ - adapt class options in aa class documents to latin9 > utf8 default
+ encoding change.
2019-04-16 Günter Milde <milde@lyx.org>
* Format incremented to 574: Ruby inset, fixes for Japanese.
This builds on an extension of the natbib CiteEngine by tufte.
2018-05-10 Jürgen Spitzmüller <spitz@lyx.org>
- Format incremented to 552:
- * support for float alignment
+ * Format incremented to 552: support for float alignment
- add buffer param \float_alignment [class|left|center|right]
- add buffer param \float_placement class
- add float param alignment [class|document|left|center|right]
- add float param placement class (=> new param)
- add float param placement document(=> like formerly empty param)
- * adapt class options in aa class documents to latin9 > utf8 default
- encoding change.
2018-05-06 Jürgen Spitzmüller <spitz@lyx.org>
* format incremented to 551: add font info param \nospellcheck that prevents
i = j
-def convert_aaencoding(document):
- " Convert default document option due to encoding change in aa class. "
-
- if document.textclass != "aa":
- return
-
- i = 0
-
- i = find_token(document.header, "\\use_default_options true", i)
- if i == -1:
- return
- j = find_token(document.header, "\\inputencoding", 0)
- if j == -1:
- document.warning("Malformed LyX Document! Missing \\inputencoding header.")
- return
- val = get_value(document.header, "\\inputencoding", j)
- if val == "auto" or val == "latin9":
- document.header[i] = "\\use_default_options false"
- k = find_token(document.header, "\\options", 0)
- if k == -1:
- document.header.insert(i, "\\options latin9")
- else:
- document.header[k] = document.header[k] + ",latin9"
-
-
-def revert_aaencoding(document):
- " Revert default document option due to encoding change in aa class. "
-
- if document.textclass != "aa":
- return
-
- i = 0
-
- i = find_token(document.header, "\\use_default_options true", i)
- if i == -1:
- return
- j = find_token(document.header, "\\inputencoding", 0)
- if j == -1:
- document.warning("Malformed LyX Document! Missing \\inputencoding header.")
- return
- val = get_value(document.header, "\\inputencoding", j)
- if val == "utf8":
- document.header[i] = "\\use_default_options false"
- k = find_token(document.header, "\\options", 0)
- if k == -1:
- document.header.insert(i, "\\options utf8")
- else:
- document.header[k] = document.header[k] + ",utf8"
-
-
def revert_stretchcolumn(document):
" We remove the column varwidth flags or everything else will become a mess. "
"\\lineno_options %s" % options]
+def convert_aaencoding(document):
+ " Convert default document option due to encoding change in aa class. "
+
+ if document.textclass != "aa":
+ return
+
+ i = 0
+ i = find_token(document.header, "\\use_default_options true", i)
+ if i == -1:
+ return
+ j = find_token(document.header, "\\inputencoding", 0)
+ if j == -1:
+ document.warning("Malformed LyX Document! Missing \\inputencoding header.")
+ return
+ val = get_value(document.header, "\\inputencoding", j)
+ if val == "auto-legacy" or val == "latin9":
+ document.header[i] = "\\use_default_options false"
+ k = find_token(document.header, "\\options", 0)
+ if k == -1:
+ document.header.insert(i, "\\options latin9")
+ else:
+ document.header[k] = document.header[k] + ",latin9"
+
+
+def revert_aaencoding(document):
+ " Revert default document option due to encoding change in aa class. "
+
+ if document.textclass != "aa":
+ return
+
+ i = 0
+ i = find_token(document.header, "\\use_default_options true", i)
+ if i == -1:
+ return
+ j = find_token(document.header, "\\inputencoding", 0)
+ if j == -1:
+ document.warning("Malformed LyX Document! Missing \\inputencoding header.")
+ return
+ val = get_value(document.header, "\\inputencoding", j)
+ if val == "utf8":
+ document.header[i] = "\\use_default_options false"
+ k = find_token(document.header, "\\options", 0)
+ if k == -1:
+ document.header.insert(i, "\\options utf8")
+ else:
+ document.header[k] = document.header[k] + ",utf8"
+
+
def revert_new_languages(document):
"""Emulate support for Azerbaijani, Bengali, Church Slavonic, Korean,
and Russian (Petrine orthography)."""
[549, []],
[550, [convert_fontenc]],
[551, []],
- [552, [convert_aaencoding]],
+ [552, []],
[553, []],
[554, []],
[555, []],
[572, [convert_notoFonts]], # Added options thin, light, extralight for Noto
[573, [convert_inputencoding_namechange]],
[574, [convert_ruby_module, convert_utf8_japanese]],
- [575, [convert_lineno]],
+ [575, [convert_lineno, convert_aaencoding]],
[576, []],
[577, [convert_linggloss]],
[578, []],
[577, [revert_drs]],
[576, [revert_linggloss, revert_subexarg]],
[575, [revert_new_languages]],
- [574, [revert_lineno]],
+ [574, [revert_lineno, revert_aaencoding]],
[573, [revert_ruby_module, revert_utf8_japanese]],
[572, [revert_inputencoding_namechange]],
[571, [revert_notoFonts]],
[554, [revert_vcolumns]],
[553, [revert_stretchcolumn]],
[552, [revert_tuftecite]],
- [551, [revert_floatpclass, revert_floatalignment, revert_aaencoding]],
+ [551, [revert_floatpclass, revert_floatalignment]],
[550, [revert_nospellcheck]],
[549, [revert_fontenc]],
[548, []],# dummy format change