I got my markup routines working fine after several bugfixes which I've committed today. As for tex.cc/h, they should be modified as follows (from the original version before the inclusion of markup.cc/h):
tex.cc:
1. Before "#ifndef NO_NAMESPACE_GIAC namespace giac {", insert
Code : Tout sélectionner
#if defined USE_GMP_REPLACEMENTS || defined GIAC_GGB || defined EMCC
inline bool has_improved_latex_export(const gen &g,string &s,GIAC_CONTEXT) { return false; }
#else
#include "markup.h"
#endif
Code : Tout sélectionner
string s;
if (use_improved_latex_export && has_improved_latex_export(e,s,contextptr))
return s;
Before "std::string gen2tex(const gen & e,GIAC_CONTEXT);", insert
Code : Tout sélectionner
static bool use_improved_latex_export=true;
Since texmacs uses a heuristic trying to detect and typeset implied multiplication when importing latex code, markup.h provides the routine enable_texmacs_compatible_latex_export(bool yes) which should be called with yes=true for texmacs compatibility (currently enabled by default) or with yes=false to put a thin space whenever a multiplication is implied (if typesetting is done by LaTeX itself). Using texmacs compatibility prevents multiple thin spaces instead of a single one in texmacs sessions.
Maybe a switch -texmacs-compatible-latex-output or something similar could be included when running the giac executable to enable the compatibility at startup. Hence the texmacs plugin for Giac could be modified to use the switch, and the compatibility would be disabled by default.
As for mathml export, there is a new command export_mathml which uses the improved export routines. Its second argument may be "display" for presentation markup or "content" for content MathML. By default, it exports both within a "semantics" block.
[Edit] I have also updated the docs (cascmd_en.tex and aide_cas).