Hello
I'm trying to port a big 300+ pages math course full of macros from
plain XeTEX to ConTeXt mark IV (ubuntu 12.04+ stand alone beta)
and I'm having some difficulties, could you please help ?
My questions :
1) does lxml.att("#1","some tag") really work ?
the next snipet doesn't work for me:
\startluacode
function set(node)
p = lxml.att(node,"p") -- or p = lxml.att(lxml.id(node),"p")
end
\stopluacode
\startxmlsetups xml:section
\ctxlua{set("#1")}
\stopxmlsetups
it looks like it returns the p attribute of the node before #1
the following snipet works though (which is strange because I looked in
the context source and it gives
\def\xmlatt#1#2{\ctxlua{lxml.att("#1","#2")}}...)
\startxmlsetups xml:section
\ctxlua{p = \xmlatt{"#1","p"}}
\stopxmlsetups
2) I'm trying to export to xml and have set
\setupbackend[export=yes, xhtml=yes, css=mkiv-export.css]
But
a) my Metafun/Tikz pictures aren't exported to svg :/
b) the exported xml has namespaces problems (like error on line 63 at
column 20: Namespace prefix m on math is not defined error on line 64 at
column 22: Namespace prefix m on mrow is not defined)
What am I doing wrong ? (I'm compiling with "context mydoc.tex")
Is there some \csname tex4ht\endcsname command or some other directive
that I should use to get my xml export right ?
Am I missing some namespace commands (there are lots of m:math and
m:mrow mathml tags int the exported xml source, this smells like a
tex4ht issue)
3) I have defined some framed text with metafun overlays (like in the
Context manual)
and I'm trying to type something like
\inmargin{some label}
\startMyFramedText...\stopMyFramedText
Yet, the text in the margin is after the framed text :(
(fiddling with the "location" setting (low, ..) doesn't allow me to have
the in margin text right next the top of the framed text
I somehow found a dirty workaround with typing a blank space
\defineframedtext[Property][frame=off,background=OverlayProperty,before={}]
and
\inmargin{some label}\noindent\startMyFramedText...\stopMyFramedText
but it's not really satisfying. (hate to lose vertical space with
wandering blank spaces)
Is there a better way ?
4) I'm trying to port the following TeX code to ConTeXt
$$\eqalign{x&=1\cr y&=2\cr}\qquad \hbox{haha}$$
it looks like \startformula\startalign.. doesn't allow me to do that
I somehow managed to have it by typing
\startformula
\vcenter{\starttabular[|rM|lM|]
\NC x \NC =1\NC\NR
\NC y \NC =2\NC\NR
\stoptabular}\qquad\text{haha}
\stopformula
the pdf export is fine, but the xml export is awfull (because of
\vcenter I guess)
a) Is there a way to use tables inside math mode alongside other stuff
(would be handy) ?
b) what is the correct way to type the previous text, so the pdf and xml
are fine in Context ?
Best regards
Olivier... really enjoying utf, xml, lua inside TeX as well as other
nice ConTeXt features
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________