emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Uriel Avalos <amscopub-mail@yahoo.com>
Cc: emacs <emacs-orgmode@gnu.org>
Subject: Re: Insert ampersand in HTML export?
Date: Sat, 12 Feb 2011 15:13:32 +0100	[thread overview]
Message-ID: <85398FB5-8210-46C9-A9E5-55F1EAF22A2E@gmail.com> (raw)
In-Reply-To: <20110211114831.2a53a9ffamscopub-mail@yahoo.com@dove.localdomain>

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.dominik@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

  parent reply	other threads:[~2011-02-12 14:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20110210152542.26383056amscopub-mail@yahoo.com@dove.localdomain>
2011-02-11  8:34 ` Insert ampersand in HTML export? Carsten Dominik
2011-02-11 16:48   ` Uriel Avalos
     [not found]   ` <20110211114831.2a53a9ffamscopub-mail@yahoo.com@dove.localdomain>
2011-02-12 11:51     ` Bastien
2011-02-12 14:08       ` Carsten Dominik
2011-02-12 15:24         ` Bastien
2011-02-12 20:51           ` Uriel Avalos
     [not found]           ` <20110212155103.16e82a76uriavalos@yahoo.com@dove.localdomain>
2011-02-13  9:10             ` Bastien
2011-02-13 18:53               ` Uriel Avalos
     [not found]               ` <20110213135347.58c0c882uriavalos@yahoo.com@dove.localdomain>
2011-02-14  0:04                 ` Bastien
2011-02-17  2:50                   ` Uriel Avalos
     [not found]                   ` <20110216215007.51a0a126uriavalos@yahoo.com@dove.localdomain>
2011-02-17  3:24                     ` Bastien
2011-02-17 18:41                       ` Uriel Avalos
     [not found]                       ` <20110217134138.059f9051amscopub-mail@yahoo.com@dove.localdomain>
2011-02-17 21:57                         ` Nick Dokos
2011-02-18  9:04                           ` Bastien
2011-02-22 16:21                             ` Uriel Avalos
2011-02-22 16:28                             ` Uriel Avalos
2011-02-12 14:13     ` Carsten Dominik [this message]
2011-02-10 20:25 Uriel Avalos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85398FB5-8210-46C9-A9E5-55F1EAF22A2E@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=amscopub-mail@yahoo.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).