mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Rename \\quotes_language to\\quotes_style
File format change.
This commit is contained in:
parent
cce4639b55
commit
857506e992
@ -11,6 +11,9 @@ adjustments are made to tex2lyx and bugs are fixed in lyx2lyx.
|
||||
|
||||
-----------------------
|
||||
|
||||
2016-12-20 Jürgen Spitzmüller <spitz@lyx.org>
|
||||
* Format incremented to 519: rename \quotes_language to \quotes_style.
|
||||
|
||||
2016-12-13 Richard Heck <rgheck@lyx.org>
|
||||
* Format incremeneted to 518: iopart.layout now includes
|
||||
stdlayouts.inc.
|
||||
|
@ -646,6 +646,26 @@ def convert_iopart(document):
|
||||
document.header[k : l + 1] = []
|
||||
|
||||
|
||||
def convert_quotestyle(document):
|
||||
" Convert \\quotes_language to \\quotes_style "
|
||||
i = find_token(document.header, "\\quotes_language", 0)
|
||||
if i == -1:
|
||||
document.warning("Malformed LyX document! Can't find \\quotes_language!")
|
||||
return
|
||||
val = get_value(document.header, "\\quotes_language", i)
|
||||
document.header[i] = "\\quotes_style " + val
|
||||
|
||||
|
||||
def revert_quotestyle(document):
|
||||
" Revert \\quotes_style to \\quotes_language "
|
||||
i = find_token(document.header, "\\quotes_style", 0)
|
||||
if i == -1:
|
||||
document.warning("Malformed LyX document! Can't find \\quotes_style!")
|
||||
return
|
||||
val = get_value(document.header, "\\quotes_style", i)
|
||||
document.header[i] = "\\quotes_language " + val
|
||||
|
||||
|
||||
##
|
||||
# Conversion hub
|
||||
#
|
||||
@ -661,10 +681,12 @@ convert = [
|
||||
[515, []],
|
||||
[516, [convert_inputenc]],
|
||||
[517, []],
|
||||
[518, [convert_iopart]]
|
||||
[518, [convert_iopart]],
|
||||
[519, [convert_quotestyle]]
|
||||
]
|
||||
|
||||
revert = [
|
||||
[518, [revert_quotestyle]],
|
||||
[517, [revert_iopart]],
|
||||
[516, [revert_quotes]],
|
||||
[515, []],
|
||||
|
@ -828,10 +828,10 @@ string BufferParams::readToken(Lexer & lex, string const & token,
|
||||
if (pimpl_->defskip.kind() == VSpace::DEFSKIP)
|
||||
// that is invalid
|
||||
pimpl_->defskip = VSpace(VSpace::MEDSKIP);
|
||||
} else if (token == "\\quotes_language") {
|
||||
string quotes_style;
|
||||
lex >> quotes_style;
|
||||
quotes_style = quotesstyletranslator().find(quotes_style);
|
||||
} else if (token == "\\quotes_style") {
|
||||
string qstyle;
|
||||
lex >> qstyle;
|
||||
quotes_style = quotesstyletranslator().find(qstyle);
|
||||
} else if (token == "\\papersize") {
|
||||
string ppsize;
|
||||
lex >> ppsize;
|
||||
@ -1299,7 +1299,7 @@ void BufferParams::writeFile(ostream & os, Buffer const * buf) const
|
||||
os << "\n\\paragraph_indentation " << getIndentation().asLyXCommand();
|
||||
else
|
||||
os << "\n\\defskip " << getDefSkip().asLyXCommand();
|
||||
os << "\n\\quotes_language "
|
||||
os << "\n\\quotes_style "
|
||||
<< string_quotes_style[quotes_style]
|
||||
<< "\n\\papercolumns " << columns
|
||||
<< "\n\\papersides " << sides
|
||||
|
@ -1253,7 +1253,7 @@ bool Preamble::writeLyXHeader(ostream & os, bool subdoc, string const & outfiled
|
||||
os << "\\defskip " << h_defskip << "\n";
|
||||
else
|
||||
os << "\\paragraph_indentation " << h_paragraph_indentation << "\n";
|
||||
os << "\\quotes_language " << h_quotes_style << "\n"
|
||||
os << "\\quotes_style " << h_quotes_style << "\n"
|
||||
<< "\\papercolumns " << h_papercolumns << "\n"
|
||||
<< "\\papersides " << h_papersides << "\n"
|
||||
<< "\\paperpagestyle " << h_paperpagestyle << "\n";
|
||||
|
@ -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 518 // rgheck: changes to iopart.layout
|
||||
#define LYX_FORMAT_TEX2LYX 518
|
||||
#define LYX_FORMAT_LYX 519 // spitz: \\quotes_language -> \\quotes_style
|
||||
#define LYX_FORMAT_TEX2LYX 519
|
||||
|
||||
#if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
|
||||
#ifndef _MSC_VER
|
||||
|
Loading…
Reference in New Issue
Block a user