del document.header[i]
+def convert_html_quotes(document):
+ " Remove quotes around html_latex_start and html_latex_end "
+
+ i = find_token(document.header, '\\html_latex_start', 0)
+ if i != -1:
+ line = document.header[i]
+ l = re.compile(r'\\html_latex_start\s+"(.*)"')
+ m = l.match(line)
+ if m != None:
+ document.header[i] = "\\html_latex_start " + m.group(1)
+
+ i = find_token(document.header, '\\html_latex_end', 0)
+ if i != -1:
+ line = document.header[i]
+ l = re.compile(r'\\html_latex_end\s+"(.*)"')
+ m = l.match(line)
+ if m != None:
+ document.header[i] = "\\html_latex_end " + m.group(1)
+
+
+def revert_html_quotes(document):
+ " Remove quotes around html_latex_start and html_latex_end "
+
+ i = find_token(document.header, '\\html_latex_start', 0)
+ if i != -1:
+ line = document.header[i]
+ l = re.compile(r'\\html_latex_start\s+(.*)')
+ m = l.match(line)
+ document.header[i] = "\\html_latex_start \"" + m.group(1) + "\""
+
+ i = find_token(document.header, '\\html_latex_end', 0)
+ if i != -1:
+ line = document.header[i]
+ l = re.compile(r'\\html_latex_end\s+(.*)')
+ m = l.match(line)
+ document.header[i] = "\\html_latex_end \"" + m.group(1) + "\""
+
##
# Conversion hub
#
[386, []],
[387, []],
[388, []],
- ]
+ [389, [convert_html_quotes]]
+ ]
-revert = [[387, [revert_pagesizes]],
+revert = [[388, [revert_html_quotes]],
+ [387, [revert_pagesizes]],
[386, [revert_math_scale]],
[385, [revert_lyx_version]],
[384, [revert_shadedboxcolor]],
// Do not remove the comment below, so we get merge conflict in
// independent branches. Instead add your own.
-int const LYX_FORMAT = 388; // uwestoehr: support for more page sizes
+int const LYX_FORMAT = 389; // rgh: change how html_latex_* is stored
typedef map<string, bool> DepClean;
typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;
} else if (token == "\\html_math_img_scale") {
lex >> html_math_img_scale;
} else if (token == "\\html_latex_start") {
- lex >> html_latex_start;
+ lex.eatLine();
+ html_latex_start = lex.getString();
} else if (token == "\\html_latex_end") {
- lex >> html_latex_end;
+ lex.eatLine();
+ html_latex_end = lex.getString();
} else {
lyxerr << "BufferParams::readToken(): Unknown token: " <<
token << endl;
<< "\\html_math_output " << html_math_output << '\n'
<< "\\html_be_strict " << convert<string>(html_be_strict) << '\n'
<< "\\html_math_img_scale " << convert<string>(html_math_img_scale) << '\n'
- << "\\html_latex_start \"" << html_latex_start << "\"\n"
- << "\\html_latex_end \"" << html_latex_end << "\"\n";
+ << "\\html_latex_start " << html_latex_start << "\n"
+ << "\\html_latex_end " << html_latex_end << "\n";
os << pimpl_->authorlist;
}