From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kyeong Soo (Joseph) Kim" Subject: Re: How to export the ampersand (&) symbol correctly for both LaTeX and HTML documents? Date: Fri, 24 Dec 2010 10:52:21 +0000 Message-ID: References: <8762ukwfww.fsf@norang.ca> <87vd2jam6e.fsf@norang.ca> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0096169981==" Return-path: Received: from [140.186.70.92] (port=56058 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PW5G5-0006l5-Sq for emacs-orgmode@gnu.org; Fri, 24 Dec 2010 05:52:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PW5G4-0002TK-Ek for emacs-orgmode@gnu.org; Fri, 24 Dec 2010 05:52:25 -0500 Received: from mail-gw0-f41.google.com ([74.125.83.41]:34648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PW5G4-0002T4-9a for emacs-orgmode@gnu.org; Fri, 24 Dec 2010 05:52:24 -0500 Received: by gwj22 with SMTP id 22so3774067gwj.0 for ; Fri, 24 Dec 2010 02:52:23 -0800 (PST) In-Reply-To: <87vd2jam6e.fsf@norang.ca> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bernt Hansen Cc: emacs-orgmode@gnu.org --===============0096169981== Content-Type: multipart/alternative; boundary=0023547c8bc7e51144049825c71c --0023547c8bc7e51144049825c71c Content-Type: text/plain; charset=UTF-8 That's cool! The new version automatically converts "\amp" to "\&" for LaTeX, not "$\amp$" as in my current version (comes with Emacs). Again, many thanks for your prompt response and I will update it per your guidance. Regards, Joseph On Fri, Dec 24, 2010 at 3:23 AM, Bernt Hansen wrote: > "Kyeong Soo (Joseph) Kim" writes: > > > I will try to upgrade and test it soon. > > Many thank. > > > > By the way, I wonder whether you have tested it with LaTeX export or not. > > The HTML export works perfectly in my case, too, but LaTeX export does > not as said. > > Sorry I misread your original post. > > I get the following for latex export using the same test.org > > ,---- > | ... > | \title{Export test for ampersand} > | \author{Bernt Hansen} > | \date{23 December 2010} > | \maketitle > | > | \setcounter{tocdepth}{3} > | \tableofcontents > | \vspace*{1cm} > | This \& that is cool. > | This \& that. > | ... > `---- > > -Bernt > > > > > Regards, > > Joseph > > > > On Thu, Dec 23, 2010 at 5:35 PM, Bernt Hansen wrote: > > > > "Kyeong Soo (Joseph) Kim" writes: > > > > > This may be a FAQ, but I couldn't find it mentioned either in the > Manual or in the mailing > > list. > > > > > > To use the ampersand symbol ('&') in HTML export, I use "\amp" per > the manual and the > > "Publishing > > > Org-mode files to HTML" tutorial at Worg site. Later, however, I > found that the "\amp" is > > exported > > > to "$\amp$" in LaTeX, which causes a compile error (i.e., > "undefined control sequence"); it > > should > > > be "\&" in a normal TeX/LaTeX document. > > > > > > I'm currently using 6.33x version of Org-mode with GNU Emacs 23.2.1 > on Windows 7. > > > > > > Any guidance on this issue would be greatly appreciated. > > > > Guidance: Upgrade your version of org-mode. > > > > Exporting the following subtree to HTML works for me > > > > ,----[ test.org ] > > | * Export test for ampersand > > | This & that is cool. > > | This \amp that. > > `---- > > > > ,----[ test.html ] > > | ... > > |

Export test for ampersand

> > | > > |

This & that is cool. > > | This & that. > > |

> > |

Author: Bernt Hansen > > |

> > | ... > > `---- > > > > My version of org-mode is Org-mode version 7.4 > > (release_7.4.89.g4ed00.dirty) > > > > HTH, > > Bernt > --0023547c8bc7e51144049825c71c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable That's cool!
The new version automatically converts "\amp"= ; to "\&" for LaTeX, not "$\amp$" as in my current = version (comes with Emacs).

Again, many thanks for= your prompt response and I will update it per your guidance.

Regards,
Joseph

On Fri, Dec 24, 2010 at 3:23 AM, Bernt Hansen <bernt@norang.ca> wrot= e:
"Kyeong Soo (Joseph)= Kim" <kyeongsoo.kim@gma= il.com> writes:

> I will try to upgrade and test it soon.
> Many thank.
>
> By the way, I wonder whether you have tested it with LaTeX export or n= ot.
> The HTML export works perfectly in my case, too, but LaTeX export does= not as said.

Sorry I misread your original post.

I get the following for latex export using the same test.org

,----
| ...
| \title{Export test for ampersand}
| \author{Bernt Hansen}
| \date{23 December 2010}
| \maketitle
|
| \setcounter{tocdepth}{3}
| \tableofcontents
| \vspace*{1cm}
| This \& that is cool.
| This \& that.
| ...
`----

-Bernt

>
> Regards,
> Joseph
>
> On Thu, Dec 23, 2010 at 5:35 PM, Bernt Hansen <bernt@norang.ca> wrote:
>
> =C2=A0 =C2=A0 "Kyeong Soo (Joseph) Kim" <kyeongsoo.kim@gmail.com> writes:
>
> =C2=A0 =C2=A0 > This may be a FAQ, but I couldn't find it menti= oned either in the Manual or in the mailing
> =C2=A0 =C2=A0 list.
> =C2=A0 =C2=A0 >
> =C2=A0 =C2=A0 > To use the ampersand symbol ('&') in HT= ML export, I use "\amp" per the manual and the
> =C2=A0 =C2=A0 "Publishing
> =C2=A0 =C2=A0 > Org-mode files to HTML" tutorial at Worg site.= Later, however, I found that the "\amp" is
> =C2=A0 =C2=A0 exported
> =C2=A0 =C2=A0 > to "$\amp$" in LaTeX, which causes a comp= ile error (i.e., "undefined control sequence"); it
> =C2=A0 =C2=A0 should
> =C2=A0 =C2=A0 > be "\&" in a normal TeX/LaTeX documen= t.
> =C2=A0 =C2=A0 >
> =C2=A0 =C2=A0 > I'm currently using 6.33x version of Org-mode w= ith GNU Emacs 23.2.1 on Windows 7.
> =C2=A0 =C2=A0 >
> =C2=A0 =C2=A0 > Any guidance on this issue would be greatly appreci= ated.
>
> =C2=A0 =C2=A0 Guidance: Upgrade your version of org-mode.
>
> =C2=A0 =C2=A0 Exporting the following subtree to HTML works for me
>
> =C2=A0 =C2=A0 ,----[ tes= t.org ]
> =C2=A0 =C2=A0 | * Export test for ampersand
> =C2=A0 =C2=A0 | This & that is cool.
> =C2=A0 =C2=A0 | This \amp that.
> =C2=A0 =C2=A0 `----
>
> =C2=A0 =C2=A0 ,----[ test.html ]
> =C2=A0 =C2=A0 | ...
> =C2=A0 =C2=A0 | <h1 class=3D"title">Export test for am= persand</h1>
> =C2=A0 =C2=A0 |
> =C2=A0 =C2=A0 | <p>This &amp; that is cool.
> =C2=A0 =C2=A0 | This &amp; that.
> =C2=A0 =C2=A0 | </p><div id=3D"postamble">
> =C2=A0 =C2=A0 | <p class=3D"author"> Author: Bernt Han= sen
> =C2=A0 =C2=A0 | </p>
> =C2=A0 =C2=A0 | ...
> =C2=A0 =C2=A0 `----
>
> =C2=A0 =C2=A0 My version of org-mode is Org-mode version 7.4
> =C2=A0 =C2=A0 (release_7.4.89.g4ed00.dirty)
>
> =C2=A0 =C2=A0 HTH,
> =C2=A0 =C2=A0 Bernt

--0023547c8bc7e51144049825c71c-- --===============0096169981== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============0096169981==--