emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* export html -> doc
@ 2010-12-20  9:42 Eric Abrahamsen
  2010-12-20  9:54 ` Holger Wenzel
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Eric Abrahamsen @ 2010-12-20  9:42 UTC (permalink / raw)
  To: emacs-orgmode

I know this is an awfully tired topic, and I'll be thrilled when the odt
exporter is ready, but in the meantime exporting to HTML and then either
opening or copying/pasting into OpenOffice is not working for me, while
it does seem to be working for other people.

I'm on Ubuntu, Emacs 23.3 and yesterday's org-mode. I export to html
just fine. Then I figure I have two options: open the html directly with
OpenOffice, or copy and paste the text. Opening the html directly just
shows me an unrendered html document. Copying and pasting into
OpenOffice turns all the italics into funny little grey boxes (one on
either side of the meant-to-be-italics text), and no actual italics.

I'm translating fiction, I don't need squat in the way of formatting
besides the paragraphs getting unfilled, and italics and bold coming
through properly. Has anyone seen this happen before, and have a
potential solution?

Thanks!

Eric

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

* Re: export html -> doc
  2010-12-20  9:42 export html -> doc Eric Abrahamsen
@ 2010-12-20  9:54 ` Holger Wenzel
  2010-12-20 11:37   ` Christian Moe
  2010-12-20 11:05 ` William Gardella
  2010-12-20 14:19 ` export html -> doc Chris Thompson
  2 siblings, 1 reply; 10+ messages in thread
From: Holger Wenzel @ 2010-12-20  9:54 UTC (permalink / raw)
  To: emacs-orgmode

Hi Eric,

> I know this is an awfully tired topic, and I'll be thrilled when the odt
> exporter is ready, but in the meantime exporting to HTML and then either
> opening or copying/pasting into OpenOffice is not working for me, while
> it does seem to be working for other people.
>
> I'm on Ubuntu, Emacs 23.3 and yesterday's org-mode. I export to html
> just fine. Then I figure I have two options: open the html directly with
> OpenOffice, or copy and paste the text. Opening the html directly just
> shows me an unrendered html document. Copying and pasting into
> OpenOffice turns all the italics into funny little grey boxes (one on
> either side of the meant-to-be-italics text), and no actual italics.


Did you try to suppress the xml declaration in the exported html?

#+OPTIONS: org-export-html-xml-declaration (quote (("php" . "<?php echo \"<?xml version=\\\"1.1\\\" encoding=\\\"%s\\\" ?>\"; ?>")))

At least MS-Word and Chromium don't seem to like that xml version line
and refuse to render the document.


Hth,

Holger

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

* Re: export html -> doc
  2010-12-20  9:42 export html -> doc Eric Abrahamsen
  2010-12-20  9:54 ` Holger Wenzel
@ 2010-12-20 11:05 ` William Gardella
  2010-12-20 14:19 ` export html -&gt; doc Chris Thompson
  2 siblings, 0 replies; 10+ messages in thread
From: William Gardella @ 2010-12-20 11:05 UTC (permalink / raw)
  To: emacs-orgmode

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> I know this is an awfully tired topic, and I'll be thrilled when the odt
> exporter is ready, but in the meantime exporting to HTML and then either
> opening or copying/pasting into OpenOffice is not working for me, while
> it does seem to be working for other people.
>
> I'm on Ubuntu, Emacs 23.3 and yesterday's org-mode. I export to html
> just fine. Then I figure I have two options: open the html directly with
> OpenOffice, or copy and paste the text. Opening the html directly just
> shows me an unrendered html document. Copying and pasting into
> OpenOffice turns all the italics into funny little grey boxes (one on
> either side of the meant-to-be-italics text), and no actual italics.
>
> I'm translating fiction, I don't need squat in the way of formatting
> besides the paragraphs getting unfilled, and italics and bold coming
> through properly. Has anyone seen this happen before, and have a
> potential solution?
>
> Thanks!
>
> Eric
>

Eric,

I think you will be better off using a tool such as `latex2rtf'
(available as a package here in Debian Sid, maybe in Ubuntu too?)  to
convert your LaTeX exporting output into a format OpenOffice can
understand.  Unlike taking your chances with the copy/paste behavior of
apps that aren't Emacs (egads!), latex2rtf will try to preserve the
formatting in a fairly consistent (if far from perfect) way.

Best,

Followup-To: poster
-- 
William Gardella
J.D. Candidate
Class of 2011, University of Pittsburgh School of Law

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

* Re: Re: export html -> doc
  2010-12-20  9:54 ` Holger Wenzel
@ 2010-12-20 11:37   ` Christian Moe
  2010-12-21  2:04     ` Eric Abrahamsen
  0 siblings, 1 reply; 10+ messages in thread
From: Christian Moe @ 2010-12-20 11:37 UTC (permalink / raw)
  To: Holger Wenzel; +Cc: Eric Abrahamsen, emacs-orgmode

On 12/20/10 10:54 AM, Holger Wenzel wrote:
> Did you try to suppress the xml declaration in the exported html?
>
> #+OPTIONS: org-export-html-xml-declaration (quote (("php" . "<?php echo \"<?xml version=\\\"1.1\\\" encoding=\\\"%s\\\" ?>\"; ?>")))

Maybe that works for a publishing setup? It doesn't for ordinary export.

This does work:

#+BIND: org-export-html-xml-declaration ()

Yours,
Christian

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

* Re: export html -&gt; doc
  2010-12-20  9:42 export html -> doc Eric Abrahamsen
  2010-12-20  9:54 ` Holger Wenzel
  2010-12-20 11:05 ` William Gardella
@ 2010-12-20 14:19 ` Chris Thompson
  2 siblings, 0 replies; 10+ messages in thread
From: Chris Thompson @ 2010-12-20 14:19 UTC (permalink / raw)
  To: emacs-orgmode

Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
> 
> I'm translating fiction, I don't need squat in the way of formatting
> besides the paragraphs getting unfilled, and italics and bold coming
> through properly. Has anyone seen this happen before, and have a
> potential solution?
> 

Eric, for your needs, you may find that Pandoc (which now supports Org files) is
a simpler solution that works now.

-- Chris

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

* Re: export html -> doc
  2010-12-20 11:37   ` Christian Moe
@ 2010-12-21  2:04     ` Eric Abrahamsen
  2010-12-21  8:12       ` Christian Moe
  0 siblings, 1 reply; 10+ messages in thread
From: Eric Abrahamsen @ 2010-12-21  2:04 UTC (permalink / raw)
  To: emacs-orgmode

On Mon, Dec 20 2010, Christian Moe wrote:

> On 12/20/10 10:54 AM, Holger Wenzel wrote:
>> Did you try to suppress the xml declaration in the exported html?
>>
>> #+OPTIONS: org-export-html-xml-declaration (quote (("php" . "<?php echo \"<?xml version=\\\"1.1\\\" encoding=\\\"%s\\\" ?>\"; ?>")))
>
> Maybe that works for a publishing setup? It doesn't for ordinary export.
>
> This does work:
>
> #+BIND: org-export-html-xml-declaration ()

That did the trick! Thank you.

One small follow-up question: this produces iso-8859-1 encoded text by
default; how do I go about asking for utf-8?

And I'll check out both pandoc and latex2rtf for more complicated
exports, thanks to all!

Eric

>
> Yours,
> Christian
>
> _______________________________________________
> 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: Re: export html -> doc
  2010-12-21  2:04     ` Eric Abrahamsen
@ 2010-12-21  8:12       ` Christian Moe
  2010-12-21  8:21         ` Eric Abrahamsen
  0 siblings, 1 reply; 10+ messages in thread
From: Christian Moe @ 2010-12-21  8:12 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-orgmode

On 12/21/10 3:04 AM, Eric Abrahamsen wrote:
>> #+BIND: org-export-html-xml-declaration ()
> That did the trick! Thank you.
>
> One small follow-up question: this produces iso-8859-1 encoded text by
> default; how do I go about asking for utf-8?

With the same setup I still get utf-8. Though the XML declaration is 
lost, it's still there in the line:

<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>

What values do you have for the following?

org-export-html-coding-system
buffer-file-coding-system
current-language-environment

Yours,
Christian

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

* Re: Re: export html -> doc
  2010-12-21  8:12       ` Christian Moe
@ 2010-12-21  8:21         ` Eric Abrahamsen
  2010-12-21  9:27           ` Christian Moe
  0 siblings, 1 reply; 10+ messages in thread
From: Eric Abrahamsen @ 2010-12-21  8:21 UTC (permalink / raw)
  To: mail; +Cc: emacs-orgmode

On Tue, Dec 21 2010, Christian Moe wrote:

> On 12/21/10 3:04 AM, Eric Abrahamsen wrote:
>>> #+BIND: org-export-html-xml-declaration ()
>> That did the trick! Thank you.
>>
>> One small follow-up question: this produces iso-8859-1 encoded text by
>> default; how do I go about asking for utf-8?
>
> With the same setup I still get utf-8. Though the XML declaration is
> lost, it's still there in the line:
>
> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
>
> What values do you have for the following?
>
> org-export-html-coding-system
> buffer-file-coding-system
> current-language-environment

Aha! It's that first one I was looking for (I must not be using apropos
correctly). I had:

org-export-html-coding-system > nil
buffer-file-coding-system > utf-8-with-signature-unix
current-language-environment > "UTF-8"

Setting org-export-html-coding-system to 'utf-8 resulted in a correct
coding system in the html export, but from the docs you'd think it would
have picked that up from buffer-file-coding-system to begin with…

Thanks,
Eric


>
> Yours,
> Christian

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

* Re: Re: export html -> doc
  2010-12-21  8:21         ` Eric Abrahamsen
@ 2010-12-21  9:27           ` Christian Moe
  2010-12-21  9:54             ` Eric Abrahamsen
  0 siblings, 1 reply; 10+ messages in thread
From: Christian Moe @ 2010-12-21  9:27 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-orgmode

On 12/21/10 9:21 AM, Eric Abrahamsen wrote:
> On Tue, Dec 21 2010, Christian Moe wrote:
>
>> On 12/21/10 3:04 AM, Eric Abrahamsen wrote:
>>>> #+BIND: org-export-html-xml-declaration ()
>>> That did the trick! Thank you.
>>>
>>> One small follow-up question: this produces iso-8859-1 encoded text by
>>> default; how do I go about asking for utf-8?
>>
>> With the same setup I still get utf-8. Though the XML declaration is
>> lost, it's still there in the line:
>>
>> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
>>
>> What values do you have for the following?
>>
>> org-export-html-coding-system
>> buffer-file-coding-system
>> current-language-environment
>
> Aha! It's that first one I was looking for (I must not be using apropos
> correctly). I had:
>
> org-export-html-coding-system>  nil
> buffer-file-coding-system>  utf-8-with-signature-unix
> current-language-environment>  "UTF-8"
>
> Setting org-export-html-coding-system to 'utf-8 resulted in a correct
> coding system in the html export, but from the docs you'd think it would
> have picked that up from buffer-file-coding-system to begin with…

Mine does pick it up. I have

  org-export-html-coding-system > nil
  buffer-file-coding-system > utf-8-unix

and get correct utf-8 html output in Org 7.4, GNU Emacs 23.2.1 on a Mac.

I don't have any further clues why it doesn't work for you.

Yours,
Christian

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

* Re: Re: export html -> doc
  2010-12-21  9:27           ` Christian Moe
@ 2010-12-21  9:54             ` Eric Abrahamsen
  0 siblings, 0 replies; 10+ messages in thread
From: Eric Abrahamsen @ 2010-12-21  9:54 UTC (permalink / raw)
  To: mail; +Cc: emacs-orgmode

On Tue, Dec 21 2010, Christian Moe wrote:

> On 12/21/10 9:21 AM, Eric Abrahamsen wrote:
>> On Tue, Dec 21 2010, Christian Moe wrote:
>>
>>> On 12/21/10 3:04 AM, Eric Abrahamsen wrote:
>>>>> #+BIND: org-export-html-xml-declaration ()
>>>> That did the trick! Thank you.
>>>>
>>>> One small follow-up question: this produces iso-8859-1 encoded text by
>>>> default; how do I go about asking for utf-8?
>>>
>>> With the same setup I still get utf-8. Though the XML declaration is
>>> lost, it's still there in the line:
>>>
>>> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
>>>
>>> What values do you have for the following?
>>>
>>> org-export-html-coding-system
>>> buffer-file-coding-system
>>> current-language-environment
>>
>> Aha! It's that first one I was looking for (I must not be using apropos
>> correctly). I had:
>>
>> org-export-html-coding-system>  nil
>> buffer-file-coding-system>  utf-8-with-signature-unix
>> current-language-environment>  "UTF-8"
>>
>> Setting org-export-html-coding-system to 'utf-8 resulted in a correct
>> coding system in the html export, but from the docs you'd think it would
>> have picked that up from buffer-file-coding-system to begin with…
>
> Mine does pick it up. I have
>
>  org-export-html-coding-system > nil
>  buffer-file-coding-system > utf-8-unix
>
> and get correct utf-8 html output in Org 7.4, GNU Emacs 23.2.1 on a Mac.
>
> I don't have any further clues why it doesn't work for you.

Thanks for getting me this far!

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

end of thread, other threads:[~2010-12-21  9:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-20  9:42 export html -> doc Eric Abrahamsen
2010-12-20  9:54 ` Holger Wenzel
2010-12-20 11:37   ` Christian Moe
2010-12-21  2:04     ` Eric Abrahamsen
2010-12-21  8:12       ` Christian Moe
2010-12-21  8:21         ` Eric Abrahamsen
2010-12-21  9:27           ` Christian Moe
2010-12-21  9:54             ` Eric Abrahamsen
2010-12-20 11:05 ` William Gardella
2010-12-20 14:19 ` export html -&gt; doc Chris Thompson

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