mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
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:
parent
82e07a4185
commit
28e9474f7a
@ -1131,6 +1131,16 @@ def revert_gbrief(document):
|
||||
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
|
||||
#
|
||||
@ -1163,10 +1173,12 @@ convert = [[346, []],
|
||||
[370, []],
|
||||
[371, []],
|
||||
[372, []],
|
||||
[373, [merge_gbrief]]
|
||||
[373, [merge_gbrief]],
|
||||
[374, []]
|
||||
]
|
||||
|
||||
revert = [[372, [revert_gbrief]],
|
||||
revert = [[373, [revert_html_options]],
|
||||
[372, [revert_gbrief]],
|
||||
[371, [revert_fontenc]],
|
||||
[370, [revert_mhchem]],
|
||||
[369, [revert_suppress_date]],
|
||||
|
@ -127,7 +127,7 @@ namespace {
|
||||
|
||||
// Do not remove the comment below, so we get merge conflict in
|
||||
// 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<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;
|
||||
|
@ -375,6 +375,8 @@ BufferParams::BufferParams()
|
||||
}
|
||||
// default 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;
|
||||
return toktmp;
|
||||
}
|
||||
} else if (token == "\\html_use_mathml") {
|
||||
lex >> html_use_mathml;
|
||||
} else if (token == "\\html_be_strict") {
|
||||
lex >> html_be_strict;
|
||||
} else {
|
||||
lyxerr << "BufferParams::readToken(): Unknown token: " <<
|
||||
token << endl;
|
||||
@ -967,8 +973,10 @@ void BufferParams::writeFile(ostream & os) const
|
||||
}
|
||||
}
|
||||
|
||||
os << "\\tracking_changes " << convert<string>(trackChanges) << "\n";
|
||||
os << "\\output_changes " << convert<string>(outputChanges) << "\n";
|
||||
os << "\\tracking_changes " << convert<string>(trackChanges) << "\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;
|
||||
}
|
||||
|
@ -361,6 +361,12 @@ public:
|
||||
PDFOptions & pdfoptions();
|
||||
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:
|
||||
///
|
||||
void readPreamble(Lexer &);
|
||||
|
Loading…
Reference in New Issue
Block a user