emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Export special characters to LaTeX and HTML
@ 2010-03-28  7:22 Thomas S. Dye
  2010-03-28  8:29 ` Sven Bretfeld
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas S. Dye @ 2010-03-28  7:22 UTC (permalink / raw)
  To: emacs-orgmode list


[-- Attachment #1.1: Type: text/plain, Size: 778 bytes --]

Aloha all,

Is there a way to insert special characters in org-mode so they export  
correctly to both LaTeX and HTML?  I'm interested in characters that  
don't appear on the long list of LaTeX special characters that export  
to HTML listed here: http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.php#sec-9

I use Hawaiian words extensively and they often require a macron over  
vowels, so Ā ā Ē ē etc. in HTML or \=A, \=a, \=E,  
\=e, etc. in LaTeX.

My idea is to have a single org-mode document that I can export to  
LaTeX to interact with my colleagues, and then export to HTML for  
journals that require submissions in Word format.  I'm using tex4ht  
now, but an org-mode solution would be simpler and more direct.

All the best,
Tom

[-- Attachment #1.2: Type: text/html, Size: 1125 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] 6+ messages in thread

* Re: Export special characters to LaTeX and HTML
  2010-03-28  7:22 Export special characters to LaTeX and HTML Thomas S. Dye
@ 2010-03-28  8:29 ` Sven Bretfeld
  2010-03-28 16:20   ` Thomas S. Dye
  2010-03-29 14:01   ` Magnus Henoch
  0 siblings, 2 replies; 6+ messages in thread
From: Sven Bretfeld @ 2010-03-28  8:29 UTC (permalink / raw)
  To: emacs-orgmode list

Hi Tom

"Thomas S. Dye" <tsd@tsdye.com> writes:

> Aloha all,

You aren't Thomas Magnum, are you?

> Is there a way to insert special characters in org-mode so they export
> correctly to both LaTeX and HTML? I'm interested in characters that
> don't appear on the long list of LaTeX special characters that export
> to HTML listed here: http://
> orgmode.org/worg/org-tutorials/org-publish-html-tutorial.php#sec-9

> I use Hawaiian words extensively and they often require a macron over
> vowels, so &#256; &#257; &#274; &#275; etc. in HTML or \=A, \=a, \=E,
> \=e, etc. in LaTeX.

I use the same characters for Sanskrit. They export just fine to LaTeX.
To type them I have the following in my .emacs:

(define-key global-map [(meta a)] nil) ;;make Alt-a free as a prefix
(define-key org-mode-map [(meta a)] nil)

(defun insert-lang-a ()
(interactive)
(ucs-insert "0101"))
(global-set-key "\M-aa" 'insert-lang-a)

(defun insert-lang-i ()
(interactive)
(ucs-insert "012B"))
(global-set-key "\M-ai" 'insert-lang-i)

This binds a-macron and i-macron to M-aa and M-ai. The same can be done
for all other characters (M-aA = A-macron etc.). 

For LaTeX-export you should set inputenc to utf8x.

Hope it helps

Sven

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Export special characters to LaTeX and HTML
  2010-03-28  8:29 ` Sven Bretfeld
@ 2010-03-28 16:20   ` Thomas S. Dye
  2010-03-28 17:04     ` sven.bretfeld
  2010-03-29 14:01   ` Magnus Henoch
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas S. Dye @ 2010-03-28 16:20 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: emacs-orgmode list


On Mar 27, 2010, at 10:29 PM, Sven Bretfeld wrote:

> Hi Tom
>
> "Thomas S. Dye" <tsd@tsdye.com> writes:
>
>> Aloha all,
>
> You aren't Thomas Magnum, are you?
>
>> Is there a way to insert special characters in org-mode so they  
>> export
>> correctly to both LaTeX and HTML? I'm interested in characters that
>> don't appear on the long list of LaTeX special characters that export
>> to HTML listed here: http://
>> orgmode.org/worg/org-tutorials/org-publish-html-tutorial.php#sec-9
>
>> I use Hawaiian words extensively and they often require a macron over
>> vowels, so &#256; &#257; &#274; &#275; etc. in HTML or \=A, \=a, \=E,
>> \=e, etc. in LaTeX.
>
> I use the same characters for Sanskrit. They export just fine to  
> LaTeX.
> To type them I have the following in my .emacs:
>
> (define-key global-map [(meta a)] nil) ;;make Alt-a free as a prefix
> (define-key org-mode-map [(meta a)] nil)
>
> (defun insert-lang-a ()
> (interactive)
> (ucs-insert "0101"))
> (global-set-key "\M-aa" 'insert-lang-a)
>
> (defun insert-lang-i ()
> (interactive)
> (ucs-insert "012B"))
> (global-set-key "\M-ai" 'insert-lang-i)
>
> This binds a-macron and i-macron to M-aa and M-ai. The same can be  
> done
> for all other characters (M-aA = A-macron etc.).
>
> For LaTeX-export you should set inputenc to utf8x.
>
> Hope it helps
>
> Sven
>

Hi Sven,

This is brilliant.  Thanks!  I tried to find this solution in the  
documentation last night but came up empty.  Did I miss something?   
Seems like it should be there someplace.

Actually, I harbor a grudge against Thomas Magnum :)  I've been a  
Detroit Tigers fan for more than 50 years.  For many of those years  
I've worn a Tiger's cap in the summer, but once Magnum started doing  
it, people began to accuse me of aping him.  I had to find a friend  
with a TV to find out what people were asking me.  You are the first  
to ask in at least a decade.

Thanks again for your help.

Tom

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Export special characters to LaTeX and HTML
  2010-03-28 16:20   ` Thomas S. Dye
@ 2010-03-28 17:04     ` sven.bretfeld
  0 siblings, 0 replies; 6+ messages in thread
From: sven.bretfeld @ 2010-03-28 17:04 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: emacs-orgmode list

Hi Thomas

"Thomas S. Dye" <tsd@tsdye.com> writes:

> This is brilliant.  Thanks!  I tried to find this solution in the
> documentation last night but came up empty.  Did I miss something?
> Seems like it should be there someplace.

This wont show up in the Org manual, since it consists of usual Emacs
code. It took me a while to find the command ucs-insert when I shifted
to Emacs from Kile some years ago. The only org-specific part is the
detachment of M-a as a prefix, because this key is bound to some
function in the org-keymap.

> Actually, I harbor a grudge against Thomas Magnum :)  I've been a
> Detroit Tigers fan for more than 50 years.  For many of those years
> I've worn a Tiger's cap in the summer, but once Magnum started doing
> it, people began to accuse me of aping him.  I had to find a friend
> with a TV to find out what people were asking me.  You are the first
> to ask in at least a decade.

Hehe. This really amuses me. T.M. is one of my heroes. He comes to my
mind whenever I think of Hawaii.

Greetings,

Sven

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Export special characters to LaTeX and HTML
  2010-03-28  8:29 ` Sven Bretfeld
  2010-03-28 16:20   ` Thomas S. Dye
@ 2010-03-29 14:01   ` Magnus Henoch
  2010-03-29 15:56     ` Thomas S. Dye
  1 sibling, 1 reply; 6+ messages in thread
From: Magnus Henoch @ 2010-03-29 14:01 UTC (permalink / raw)
  To: emacs-orgmode

"Sven Bretfeld" <sven.bretfeld@gmx.ch> writes:

> I use the same characters for Sanskrit. They export just fine to LaTeX.
> To type them I have the following in my .emacs:
>
> (define-key global-map [(meta a)] nil) ;;make Alt-a free as a prefix
> (define-key org-mode-map [(meta a)] nil)
>
> (defun insert-lang-a ()
> (interactive)
> (ucs-insert "0101"))
> (global-set-key "\M-aa" 'insert-lang-a)
>
> (defun insert-lang-i ()
> (interactive)
> (ucs-insert "012B"))
> (global-set-key "\M-ai" 'insert-lang-i)

An alternative to the above is to use an input method, e.g. M-x
set-input-method RET latin-alt-postfix.  Then typing "a-" gives you "ā"
(and typing "a--" gives you "a-").

-- 
Magnus Henoch

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re: Export special characters to LaTeX and HTML
  2010-03-29 14:01   ` Magnus Henoch
@ 2010-03-29 15:56     ` Thomas S. Dye
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas S. Dye @ 2010-03-29 15:56 UTC (permalink / raw)
  To: Magnus Henoch; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 884 bytes --]


On Mar 29, 2010, at 4:01 AM, Magnus Henoch wrote:

> "Sven Bretfeld" <sven.bretfeld@gmx.ch> writes:
>
>> I use the same characters for Sanskrit. They export just fine to  
>> LaTeX.
>> To type them I have the following in my .emacs:
>>
>> (define-key global-map [(meta a)] nil) ;;make Alt-a free as a prefix
>> (define-key org-mode-map [(meta a)] nil)
>>
>> (defun insert-lang-a ()
>> (interactive)
>> (ucs-insert "0101"))
>> (global-set-key "\M-aa" 'insert-lang-a)
>>
>> (defun insert-lang-i ()
>> (interactive)
>> (ucs-insert "012B"))
>> (global-set-key "\M-ai" 'insert-lang-i)
>
> An alternative to the above is to use an input method, e.g. M-x
> set-input-method RET latin-alt-postfix.  Then typing "a-" gives you  
> "ā"
> (and typing "a--" gives you "a-").
>
> -- 
> Magnus Henoch
>

Thanks Magnus,

This is very helpful.

All the best,
Tom

[-- Attachment #1.2: Type: text/html, Size: 1876 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] 6+ messages in thread

end of thread, other threads:[~2010-03-29 15:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-28  7:22 Export special characters to LaTeX and HTML Thomas S. Dye
2010-03-28  8:29 ` Sven Bretfeld
2010-03-28 16:20   ` Thomas S. Dye
2010-03-28 17:04     ` sven.bretfeld
2010-03-29 14:01   ` Magnus Henoch
2010-03-29 15:56     ` Thomas S. Dye

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).