Hi Uriel,

On Feb 11, 2011, at 5:48 PM, Uriel Avalos wrote:

On Fri, 11 Feb 2011 09:34:08 +0100
Carsten Dominik <carsten.domi...@gmail.com> wrote:


On Feb 10, 2011, at 9:25 PM, Uriel Avalos wrote:

How do you insert the actual & character in an HTML export?

I'm trying to write a macro to insert a MATHML snippet but org-mode
converts & to &amp;.

How can I prevent that behavior?

Hi Uriel,

do you really want everyone here to construct their own test case for
this?

Please provide an example file with the macro definition and its
use to make it as easy as possible for someone to try it out and fix it.

Thanks

- Carsten


Look, there isn't really a "test" case. I'm just asking if this feature is available.

But with a test line, it is soo much easier to understand what you are looking for even if your question itself might not be clear - as it was for me in this case.

The docs just say that & exports to &amp; in HTML export and \$ in latex export. I'm asking if there's a way to disable that feature on a case-by- case basis i.e., I want & to export to & in HTML export for some situations. Hope that's clear enough.

Here's a test macro:

#+MACRO: ANG @<math>@<mrow>@<mo>&x2220;@</mo>@<mi>$1@</mi>@</mrow>@/ math>

This should be "angle $1". The MATML snippet works fine in a HTML file in firefox linux but the macro does not. I get this in the HTML export:

<math> <mo> &amp; #x2220; </mo> <mi> ... </mi> </mrow> </math>

& gets incorrectly converted to &amp;


Now I see, thank you for the example.  Maybe you can use

#+MACRO: ANG @<math>@<mrow>@<mo> \angle @</mo>@<mi>$1@</mi>@</mrow>@/ math>

Org has a whole slew of special characters defined this way, and they translate correctly to both HTML and LaTeX.



- Carsten

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to