void CQDifferentialEquations::saveTeX(const QString outfilename)
{
  QString latexStr(FROM_UTF8(mml.str()));

#ifdef DEBUG_UI
  qDebug() << latexStr;
#endif

  CMathMLToTeX::convert(latexStr);

  std::ofstream ofile;
  ofile.open(utf8ToLocale(TO_UTF8(outfilename)).c_str(), std::ios::trunc);
  ofile << TO_UTF8(latexStr);
  ofile.close();
}
void CQExpressionMmlStackedWidget::saveTeX(const QString outfilename)
{
  std::ostringstream mml;
  mpExpressionWidget->writeMathML(mml);

  QString latexStr(FROM_UTF8(mml.str()));

  CMathMLToTeX::convert(latexStr);

  std::ofstream ofile;
  ofile.open(CLocaleString::fromUtf8(TO_UTF8(outfilename)).c_str(), std::ios::trunc);

  ofile << TO_UTF8(latexStr);

  ofile.close();
}