Some BufferParams for XHTML output.

These are not actually implemented yet, but I wanted to make sure to get
them into the format now, so even if I can't implement them before the
1.7 release, I can do so during the release cycle, without a format
change. I don't expect that to happen, but you never know....


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32683 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2009-12-30 22:22:33 +00:00
parent 82e07a4185
commit 28e9474f7a
4 changed files with 31 additions and 5 deletions

View File

@ -1131,6 +1131,16 @@ def revert_gbrief(document):
document.set_textclass() document.set_textclass()
def revert_html_options(document):
" Remove html options "
i = find_token(document.header, '\\html_use_mathml', 0)
if i != -1:
del document.header[i]
i = find_token(document.header, '\\html_be_strict', 0)
if i != -1:
del document.header[i]
## ##
# Conversion hub # Conversion hub
# #
@ -1163,10 +1173,12 @@ convert = [[346, []],
[370, []], [370, []],
[371, []], [371, []],
[372, []], [372, []],
[373, [merge_gbrief]] [373, [merge_gbrief]],
[374, []]
] ]
revert = [[372, [revert_gbrief]], revert = [[373, [revert_html_options]],
[372, [revert_gbrief]],
[371, [revert_fontenc]], [371, [revert_fontenc]],
[370, [revert_mhchem]], [370, [revert_mhchem]],
[369, [revert_suppress_date]], [369, [revert_suppress_date]],

View File

@ -127,7 +127,7 @@ namespace {
// Do not remove the comment below, so we get merge conflict in // Do not remove the comment below, so we get merge conflict in
// independent branches. Instead add your own. // independent branches. Instead add your own.
int const LYX_FORMAT = 373; // jspitzm: merge g-brief class int const LYX_FORMAT = 374; // rgheck: HTML output options
typedef map<string, bool> DepClean; typedef map<string, bool> DepClean;
typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache; typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;

View File

@ -375,6 +375,8 @@ BufferParams::BufferParams()
} }
// default index // default index
indiceslist().addDefault(B_("Index")); indiceslist().addDefault(B_("Index"));
html_be_strict = true;
html_use_mathml = true;
} }
@ -768,6 +770,10 @@ string BufferParams::readToken(Lexer & lex, string const & token,
toktmp << endl; toktmp << endl;
return toktmp; return toktmp;
} }
} else if (token == "\\html_use_mathml") {
lex >> html_use_mathml;
} else if (token == "\\html_be_strict") {
lex >> html_be_strict;
} else { } else {
lyxerr << "BufferParams::readToken(): Unknown token: " << lyxerr << "BufferParams::readToken(): Unknown token: " <<
token << endl; token << endl;
@ -967,8 +973,10 @@ void BufferParams::writeFile(ostream & os) const
} }
} }
os << "\\tracking_changes " << convert<string>(trackChanges) << "\n"; os << "\\tracking_changes " << convert<string>(trackChanges) << "\n"
os << "\\output_changes " << convert<string>(outputChanges) << "\n"; << "\\output_changes " << convert<string>(outputChanges) << "\n"
<< "\\html_use_mathml " << convert<string>(html_use_mathml) << "\n"
<< "\\html_be_strict " << convert<string>(html_be_strict) << "\n";
os << pimpl_->authorlist; os << pimpl_->authorlist;
} }

View File

@ -361,6 +361,12 @@ public:
PDFOptions & pdfoptions(); PDFOptions & pdfoptions();
PDFOptions const & pdfoptions() const; PDFOptions const & pdfoptions() const;
/// whether to use MathML for math output, or instead images
bool html_use_mathml;
/// whether to attempt to be XHTML 1.1 compliant or instead be
/// a little more mellow
bool html_be_strict;
private: private:
/// ///
void readPreamble(Lexer &); void readPreamble(Lexer &);