Compare commits

..

No commits in common. "75f467fa13c88da474f4a960a34f1da63b7a99ed" and "770362da97d28385bc3974891bf22d0fcb19be90" have entirely different histories.

5 changed files with 15 additions and 36 deletions

View File

@ -425,10 +425,6 @@ def main(argv):
if pdf_output:
lilypond_book += " --pdf"
lilypond_book += " --latex-program=%s" % latex.split()[0]
if pdf_output:
lilypond_book += " --lily-output-dir=ly-pdf"
else:
lilypond_book += " --lily-output-dir=ly-eps"
# Make a copy of the latex file
lytex_file = latex_file_re.sub(".lytex", latex_file)

View File

@ -239,12 +239,6 @@ void InsetMathChar::mathmlize(MathMLStream & ms) const
case '<': entity = "&lt;"; break;
case '>': entity = "&gt;"; break;
case '&': entity = "&amp;"; break;
case '-':
if (ms.version() == MathMLStream::mathmlCore) {
// U+2212 MINUS SIGN
entity = "&#x2212;";
}
break;
case ' ': {
ms << from_ascii("&#0160;");
return;

View File

@ -2417,7 +2417,7 @@ void InsetMathHull::docbook(XMLStream & xs, OutputParams const & runparams) cons
}
odocstringstream osmath;
MathMLStream ms(osmath, mathmlNamespacePrefix, MathMLStream::mathml3);
MathMLStream ms(osmath, mathmlNamespacePrefix);
// Output the MathML subtree.
// TeX transcription. Avoid MTag/ETag so that there are no extraneous spaces.
@ -2440,7 +2440,7 @@ void InsetMathHull::docbook(XMLStream & xs, OutputParams const & runparams) cons
// First, generate the MathML expression. If there is an error in the generation, this block is not fully
// executed, and the formula is not output to the DocBook stream.
odocstringstream ostmp;
MathMLStream mstmp(ostmp, ms.xmlns(), ms.version());
MathMLStream mstmp(ostmp, ms.xmlns());
mathmlize(mstmp);
// Choose the display style for the formula, to be output as an attribute near the formula root.
@ -2651,7 +2651,7 @@ docstring InsetMathHull::xhtml(XMLStream & xs, OutputParams const & op) const
// FIXME Eventually we would like to do this inset by inset.
if (mathtype == BufferParams::MathML) {
odocstringstream os;
MathMLStream ms(os, "", MathMLStream::mathmlCore);
MathMLStream ms(os);
try {
mathmlize(ms);
success = true;

View File

@ -288,8 +288,8 @@ TeXMathStream & operator<<(TeXMathStream & ws, unsigned int i)
//////////////////////////////////////////////////////////////////////
MathMLStream::MathMLStream(odocstream & os, std::string const & xmlns, MathMLVersion version)
: os_(os), xmlns_(xmlns), version_(version)
MathMLStream::MathMLStream(odocstream & os, std::string const & xmlns)
: os_(os), xmlns_(xmlns)
{
if (inText())
font_math_style_ = TEXT_STYLE;

View File

@ -376,15 +376,8 @@ class MathExportException : public std::exception {};
class MathMLStream {
public:
///
enum MathMLVersion {
mathml3,
mathmlCore
};
/// Builds a stream proxy for os; the MathML namespace is given by xmlns
/// (supposed to be already defined elsewhere in the document).
explicit MathMLStream(odocstream & os, std::string const & xmlns = "", MathMLVersion version = mathml3);
/// Builds a stream proxy for os; the MathML namespace is given by xmlns (supposed to be already defined elsewhere in the document).
explicit MathMLStream(odocstream & os, std::string const & xmlns = "");
///
void cr();
/// Indentation when nesting tags
@ -399,8 +392,6 @@ public:
bool inText() const { return text_level_ != nlevel; }
///
std::string xmlns() const { return xmlns_; }
///
MathMLVersion version() const { return version_; }
/// Returns the tag name prefixed by the name space if needed.
std::string namespacedTag(std::string const & tag) const {
return (xmlns().empty() ? "" : xmlns() + ":") + tag;
@ -429,8 +420,6 @@ private:
odocstringstream deferred_;
///
std::string xmlns_;
///
MathMLVersion version_;
/// The only important part of a FontInfo object.
MathStyle font_math_style_;
///