* How to write special LaTeX symbols
@ 2011-01-16 3:01 Xin Shi
2011-01-16 3:53 ` Nick Dokos
0 siblings, 1 reply; 10+ messages in thread
From: Xin Shi @ 2011-01-16 3:01 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 455 bytes --]
Hello experts,
I want to export org file to PDF using LaTeX for certain special symbols.
For example, in the plain LaTeX:
Shr\"odinger will give the o with two dots on top. Notice that the " is a
double quotation mark.
However, when org translate that into LaTeX, it will become two single
quotation mark! \'' (it's very hard to see the difference, but the pdf
version will see the wrong result).
Could someone tell me how to do that?
Thanks!
Xin
[-- Attachment #1.2: Type: text/html, Size: 643 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How to write special LaTeX symbols
2011-01-16 3:01 How to write special LaTeX symbols Xin Shi
@ 2011-01-16 3:53 ` Nick Dokos
2011-01-16 4:05 ` Nick Dokos
2011-01-17 22:33 ` Bastien
0 siblings, 2 replies; 10+ messages in thread
From: Nick Dokos @ 2011-01-16 3:53 UTC (permalink / raw)
To: Xin Shi; +Cc: nicholas.dokos, emacs-orgmode
Xin Shi <shixin111@gmail.com> wrote:
>
> Shr\"odinger will give the o with two dots on top. Notice that the " is a double quotation mark.
>
> However, when org translate that into LaTeX, it will become two single quotation mark! \'' (it's very hard to see the difference, but the pdf version will
> see the wrong result).
>
> Could someone tell me how to do that?
>
It works correctly in headlines, but not in running text. I think [fn:1]
that it is a bug and that the following patch fixes it:
--8<---------------cut here---------------start------------->8---
diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index 4085d6e..a2ff517 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -2417,6 +2417,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
"\\Styles"
"\\\\"
"\\`"
+ "\\\""
"\\addcontentsline"
"\\address"
"\\addtocontents"
--8<---------------cut here---------------end--------------->8---
but I have not tested it extensively and it may do more harm than good:
I'd wait for a more definitive opinion.
Alternatively, you can use UTF-8 in your org file and write Schrödinger
explicitly. This will survive the LaTeX export intact and the
\usepackage[utf8]{inputenc} in the LaTeX file will do the right thing
with it.[fn:2]
Nick
Footnotes:
[fn:1] but I'm really not sure: I've lost track of how things work in
LaTeX export - sigh...
[fn:2] I'm not sure whether it will survive the email trip
though. Here's hoping that it will.
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: How to write special LaTeX symbols
2011-01-16 3:53 ` Nick Dokos
@ 2011-01-16 4:05 ` Nick Dokos
2011-01-16 13:54 ` Eric S Fraga
2011-01-17 22:33 ` Bastien
1 sibling, 1 reply; 10+ messages in thread
From: Nick Dokos @ 2011-01-16 4:05 UTC (permalink / raw)
To: nicholas.dokos; +Cc: emacs-orgmode, Xin Shi
[-- Attachment #1: Type: text/plain, Size: 576 bytes --]
Nick Dokos <nicholas.dokos@hp.com> wrote:
> Alternatively, you can use UTF-8 in your org file and write Schr=C3=B6dinger
> explicitly. This will survive the LaTeX export intact and the
> \usepackage[utf8]{inputenc} in the LaTeX file will do the right thing
> with it.[fn:2]
>
> [fn:2] I'm not sure whether it will survive the email trip
> though. Here's hoping that it will.
>
Well, it didn't survive the email trip: I messed up the encoding I
guess, but I can't fight with email right now. Sorry about that.
I'm attaching my test file: I hope that will survive.
Nick
[-- Attachment #2: umlaut tests --]
[-- Type: text/plain, Size: 73 bytes --]
* Schr\"odinger's cat
Schr\"odinger's equation.
Schrödinger.
[-- Attachment #3: Type: text/plain, Size: 201 bytes --]
_______________________________________________
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How to write special LaTeX symbols
2011-01-16 4:05 ` Nick Dokos
@ 2011-01-16 13:54 ` Eric S Fraga
2011-01-17 3:03 ` Xin Shi
0 siblings, 1 reply; 10+ messages in thread
From: Eric S Fraga @ 2011-01-16 13:54 UTC (permalink / raw)
To: nicholas.dokos; +Cc: emacs-orgmode, Xin Shi
Nick Dokos <nicholas.dokos@hp.com> writes:
> Nick Dokos <nicholas.dokos@hp.com> wrote:
>
>> Alternatively, you can use UTF-8 in your org file and write Schr=C3=B6dinger
>> explicitly. This will survive the LaTeX export intact and the
>> \usepackage[utf8]{inputenc} in the LaTeX file will do the right thing
>> with it.[fn:2]
>>
>> [fn:2] I'm not sure whether it will survive the email trip
>> though. Here's hoping that it will.
>>
>
> Well, it didn't survive the email trip: I messed up the encoding I
> guess, but I can't fight with email right now. Sorry about that.
> I'm attaching my test file: I hope that will survive.
Well, actually, that's strange as it did survive the email trip as far
as I can see! Schrödinger came out just fine when I viewed your
original email. Are you sure it's not a problem with your email viewer?
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.4 (release_7.4.199.g8be1.dirty)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How to write special LaTeX symbols
2011-01-16 13:54 ` Eric S Fraga
@ 2011-01-17 3:03 ` Xin Shi
2011-01-17 3:55 ` Nick Dokos
2011-01-17 4:05 ` Chris Gray
0 siblings, 2 replies; 10+ messages in thread
From: Xin Shi @ 2011-01-17 3:03 UTC (permalink / raw)
To: Eric S Fraga; +Cc: nicholas.dokos, emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1355 bytes --]
Hello all,
Thanks for your response!
I can go with the UTF-8 method. The only problem for me now is I don't know
how to input the ö from Emacs.
I've tried the C-x 8 RET, but don't know the name or hex. Any suggestions?
Xin
On Sun, Jan 16, 2011 at 8:54 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
> Nick Dokos <nicholas.dokos@hp.com> writes:
>
> > Nick Dokos <nicholas.dokos@hp.com> wrote:
> >
> >> Alternatively, you can use UTF-8 in your org file and write
> Schr=C3=B6dinger
> >> explicitly. This will survive the LaTeX export intact and the
> >> \usepackage[utf8]{inputenc} in the LaTeX file will do the right thing
> >> with it.[fn:2]
> >>
> >> [fn:2] I'm not sure whether it will survive the email trip
> >> though. Here's hoping that it will.
> >>
> >
> > Well, it didn't survive the email trip: I messed up the encoding I
> > guess, but I can't fight with email right now. Sorry about that.
> > I'm attaching my test file: I hope that will survive.
>
> Well, actually, that's strange as it did survive the email trip as far
> as I can see! Schrödinger came out just fine when I viewed your
> original email. Are you sure it's not a problem with your email viewer?
>
> --
> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
> : using Org-mode version 7.4 (release_7.4.199.g8be1.dirty)
>
[-- Attachment #1.2: Type: text/html, Size: 2050 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How to write special LaTeX symbols
2011-01-17 3:03 ` Xin Shi
@ 2011-01-17 3:55 ` Nick Dokos
2011-01-17 4:05 ` Chris Gray
1 sibling, 0 replies; 10+ messages in thread
From: Nick Dokos @ 2011-01-17 3:55 UTC (permalink / raw)
To: Xin Shi; +Cc: nicholas.dokos, emacs-orgmode
Xin Shi <shixin111@gmail.com> wrote:
> Hello all,
>
> Thanks for your response!
>
> I can go with the UTF-8 method. The only problem for me now is I don't know
> how to input the =F6 from Emacs.
>
> I've tried the C-x 8 RET, but don't know the name or hex. Any suggestions?
>
I've no idea what the hex codes are: what I did was change my input
method to german-prefix[fn:1] and typed ``Schr"odinger'': the input
method changes the concatenation of the double quote and the o to the
internal representation of o-umlaut. The buffer is utf-8, so the utf-8
representation of ``o umlaut'' is saved. At least, I think that's the
way it works.
Nick
Footnotes:
[fn:1] With C-x RET C-\ german-prefix RET
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How to write special LaTeX symbols
2011-01-17 3:03 ` Xin Shi
2011-01-17 3:55 ` Nick Dokos
@ 2011-01-17 4:05 ` Chris Gray
2011-01-17 8:59 ` Eric S Fraga
1 sibling, 1 reply; 10+ messages in thread
From: Chris Gray @ 2011-01-17 4:05 UTC (permalink / raw)
To: emacs-orgmode
Xin Shi wrote:
> Hello all,
> Thanks for your response!
> I can go with the UTF-8 method. The only problem for me now is I don't know
> how to input the ö from Emacs.
> I've tried the C-x 8 RET, but don't know the name or hex. Any
> suggestions?
The key combinations are pretty intuitive once you learn a few. For
example, ö is C-x 8 " o, and é is C-x 8 ' e.
Cheers,
Chris
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Re: How to write special LaTeX symbols
2011-01-17 4:05 ` Chris Gray
@ 2011-01-17 8:59 ` Eric S Fraga
0 siblings, 0 replies; 10+ messages in thread
From: Eric S Fraga @ 2011-01-17 8:59 UTC (permalink / raw)
To: emacs-orgmode
Chris Gray <chrismgray@gmail.com> writes:
> Xin Shi wrote:
>
>> Hello all,
>
>> Thanks for your response!
>
>> I can go with the UTF-8 method. The only problem for me now is I don't know
>> how to input the ö from Emacs.
>
>> I've tried the C-x 8 RET, but don't know the name or hex. Any
>> suggestions?
>
> The key combinations are pretty intuitive once you learn a few. For
> example, ö is C-x 8 " o, and é is C-x 8 ' e.
Another approach is to change the input method to tex (C-u C-\ tex RET)
which then allows you to type in utf characters using tex (or latex?)
escape sequences. This is quite useful, especially if you are writing
latex documents in any case so are up to speed with latex command...
So, to type in ö, you would type '\ " o' (without the single quotes) and
you would get what you want. You also get TAB completion in this mode
so that typing in '\ " TAB' would show you all the valid characters that
can be defined by starting with \".
Further, you can use describe-input-method to see information about what
the input method provides and, in the case of tex, you get all the
relevant character sequences that the mode understands.
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.4 (release_7.4.201.g82108.dirty)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How to write special LaTeX symbols
2011-01-16 3:53 ` Nick Dokos
2011-01-16 4:05 ` Nick Dokos
@ 2011-01-17 22:33 ` Bastien
2011-01-21 3:01 ` Xin Shi
1 sibling, 1 reply; 10+ messages in thread
From: Bastien @ 2011-01-17 22:33 UTC (permalink / raw)
To: nicholas.dokos; +Cc: emacs-orgmode, Xin Shi
Nick Dokos <nicholas.dokos@hp.com> writes:
> It works correctly in headlines, but not in running text. I think [fn:1]
> that it is a bug and that the following patch fixes it:
I've tested and applied your patch -- thanks for the fix!
The only problematic situation I can think of is if someone gives this
as an example:
"C:\Program File\"
... where the string `\"' will not be properly exported; quite a
borderline case I'd say.
Best,
--
Bastien
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How to write special LaTeX symbols
2011-01-17 22:33 ` Bastien
@ 2011-01-21 3:01 ` Xin Shi
0 siblings, 0 replies; 10+ messages in thread
From: Xin Shi @ 2011-01-21 3:01 UTC (permalink / raw)
To: Bastien; +Cc: nicholas.dokos, emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 779 bytes --]
Thanks for all your response!
I've found this page and it explains the name and hex:
http://www.unicode.org/charts/PDF/U0080.pdf
00F6 ö LATIN SMALL LETTER WITH DIAERESIS
Xin
On Mon, Jan 17, 2011 at 5:33 PM, Bastien <bastien.guerry@wikimedia.fr>wrote:
> Nick Dokos <nicholas.dokos@hp.com> writes:
>
> > It works correctly in headlines, but not in running text. I think [fn:1]
> > that it is a bug and that the following patch fixes it:
>
> I've tested and applied your patch -- thanks for the fix!
>
> The only problematic situation I can think of is if someone gives this
> as an example:
>
> "C:\Program File\"
>
> ... where the string `\"' will not be properly exported; quite a
> borderline case I'd say.
>
> Best,
>
> --
> Bastien
>
[-- Attachment #1.2: Type: text/html, Size: 1376 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
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
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-01-21 3:01 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-16 3:01 How to write special LaTeX symbols Xin Shi
2011-01-16 3:53 ` Nick Dokos
2011-01-16 4:05 ` Nick Dokos
2011-01-16 13:54 ` Eric S Fraga
2011-01-17 3:03 ` Xin Shi
2011-01-17 3:55 ` Nick Dokos
2011-01-17 4:05 ` Chris Gray
2011-01-17 8:59 ` Eric S Fraga
2011-01-17 22:33 ` Bastien
2011-01-21 3:01 ` Xin Shi
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.