unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* how to handle rtf
@ 2014-07-29 13:07 renato.pontefice
  2014-07-29 15:39 ` Danil Orlov
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: renato.pontefice @ 2014-07-29 13:07 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,
I need to handle some .rtf file, saved by MS office. I'm wondering if, I can use emacs to do that, and, if yes, how.

can someone help me?

TIA

Renato


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

* Re: how to handle rtf
  2014-07-29 13:07 how to handle rtf renato.pontefice
@ 2014-07-29 15:39 ` Danil Orlov
       [not found] ` <mailman.6237.1406648406.1147.help-gnu-emacs@gnu.org>
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 16+ messages in thread
From: Danil Orlov @ 2014-07-29 15:39 UTC (permalink / raw)
  To: renato.pontefice; +Cc: help-gnu-emacs

On Tue, Jul 29, 2014 at 06:07:01AM -0700, renato.pontefice@gmail.com wrote:
> Hi,
> I need to handle some .rtf file, saved by MS office. I'm wondering if, I can use emacs to do that, and, if yes, how.
> 
> can someone help me?
> 
> TIA
> 
> Renato


You can use emacs eshell for converting rtf files to some emacs-editable format, for example html. Use this http://sourceforge.net/projects/rtf2html/ .



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

* Re: how to handle rtf
       [not found] ` <mailman.6237.1406648406.1147.help-gnu-emacs@gnu.org>
@ 2014-07-29 16:46   ` Emanuel Berg
  2014-07-29 17:39     ` Grant Rettke
       [not found]     ` <mailman.6241.1406655598.1147.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 16+ messages in thread
From: Emanuel Berg @ 2014-07-29 16:46 UTC (permalink / raw)
  To: help-gnu-emacs

Danil Orlov <zargener@gmail.com> writes:

> You can use emacs eshell for converting rtf files to
> some emacs-editable format, for example html

Or, check out unrtf in your repositories:

    UnRTF is a moderately complicated converter from
    RTF to other formats, including HTML, LaTeX, and
    text. Converting to HTML, it supports tables,
    fonts, colors, embedded images, hyperlinks,
    paragraph alignment among other things. All other
    conversions are "alpha"--just begun.

-- 
underground experts united


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

* Re: how to handle rtf
  2014-07-29 16:46   ` Emanuel Berg
@ 2014-07-29 17:39     ` Grant Rettke
       [not found]     ` <mailman.6241.1406655598.1147.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 16+ messages in thread
From: Grant Rettke @ 2014-07-29 17:39 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: Emacs Help

Pandoc is great

http://johnmacfarlane.net/pandoc/index.html
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson


On Tue, Jul 29, 2014 at 11:46 AM, Emanuel Berg <embe8573@student.uu.se> wrote:
> Danil Orlov <zargener@gmail.com> writes:
>
>> You can use emacs eshell for converting rtf files to
>> some emacs-editable format, for example html
>
> Or, check out unrtf in your repositories:
>
>     UnRTF is a moderately complicated converter from
>     RTF to other formats, including HTML, LaTeX, and
>     text. Converting to HTML, it supports tables,
>     fonts, colors, embedded images, hyperlinks,
>     paragraph alignment among other things. All other
>     conversions are "alpha"--just begun.
>
> --
> underground experts united



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

* Re: how to handle rtf
       [not found]     ` <mailman.6241.1406655598.1147.help-gnu-emacs@gnu.org>
@ 2014-07-30  8:49       ` Joost Kremers
  2014-07-30  8:58         ` renato.pontefice
  0 siblings, 1 reply; 16+ messages in thread
From: Joost Kremers @ 2014-07-30  8:49 UTC (permalink / raw)
  To: help-gnu-emacs

Grant Rettke wrote:
> Pandoc is great

Except it can only write rtf, not read it.


-- 
Joost Kremers                                   joostkremers@fastmail.fm
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)


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

* Re: how to handle rtf
  2014-07-30  8:49       ` Joost Kremers
@ 2014-07-30  8:58         ` renato.pontefice
  2014-07-30 13:18           ` Emanuel Berg
  2014-07-30 16:50           ` Rusi
  0 siblings, 2 replies; 16+ messages in thread
From: renato.pontefice @ 2014-07-30  8:58 UTC (permalink / raw)
  To: help-gnu-emacs

Il giorno mercoledì 30 luglio 2014 10:49:17 UTC+2, Joost Kremers ha scritto:
> Grant Rettke wrote:
> 
> > Pandoc is great
> 
> 
> 
> Except it can only write rtf, not read it.
> 
> 
> 
> 
> 
> -- 
> 
> Joost Kremers                                   joostkremers@fastmail.fm
> 
> Selbst in die Unterwelt dringt durch Spalten Licht
> 
> EN:SiS(9)

No, I need to read, modify eand write .rtf

Renato


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

* Re: how to handle rtf
  2014-07-30  8:58         ` renato.pontefice
@ 2014-07-30 13:18           ` Emanuel Berg
  2014-07-30 16:50           ` Rusi
  1 sibling, 0 replies; 16+ messages in thread
From: Emanuel Berg @ 2014-07-30 13:18 UTC (permalink / raw)
  To: help-gnu-emacs

renato.pontefice@gmail.com writes:

> No, I need to read, modify eand write .rtf

Why?

There seems to be only problems associated with that
and no advantages.

-- 
underground experts united


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

* Re: how to handle rtf
  2014-07-30  8:58         ` renato.pontefice
  2014-07-30 13:18           ` Emanuel Berg
@ 2014-07-30 16:50           ` Rusi
  2014-07-30 21:28             ` Emanuel Berg
  1 sibling, 1 reply; 16+ messages in thread
From: Rusi @ 2014-07-30 16:50 UTC (permalink / raw)
  To: help-gnu-emacs

On Wednesday, July 30, 2014 2:28:12 PM UTC+5:30, renato.p...@gmail.com wrote:
> Il giorno mercoledì 30 luglio 2014 10:49:17 UTC+2, Joost Kremers ha scritto:
> > Grant Rettke wrote:
> > > Pandoc is great
> > Except it can only write rtf, not read it.

> No, I need to read, modify eand write .rtf

Why not use the right tool for the job?
libreoffice --writer for example?


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

* Re: how to handle rtf
  2014-07-30 16:50           ` Rusi
@ 2014-07-30 21:28             ` Emanuel Berg
  2014-07-31 10:03               ` renato.pontefice
  0 siblings, 1 reply; 16+ messages in thread
From: Emanuel Berg @ 2014-07-30 21:28 UTC (permalink / raw)
  To: help-gnu-emacs

Rusi <rustompmody@gmail.com> writes:

>> No, I need to read, modify eand write .rtf
>
> Why not use the right tool for the job? libreoffice
> --writer for example?

To be an Emacs user, Rusi sure have an odd taste in
software.

The OP wants to use Emacs. My advice is to take the
document you (the OP) currently have, convert it to
plain text, use Emacs to edit it, and from then on,
don't use the .rtf format. Keep it text (best) or do
LaTeX if you have advanced stuff to tell. Do HTML/CSS
if you want to go web. Etc.

No Emacs user should abandon Emacs for a Word mockoff,
and for such a lame reason (the format) at that! If
anyone does that, he should be excommunicated for 8
years. (If you think that was a silly joke, that is
exactly what happens if you defect from Cuba: just
imagine.)

-- 
underground experts united


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

* Re: how to handle rtf
  2014-07-30 21:28             ` Emanuel Berg
@ 2014-07-31 10:03               ` renato.pontefice
  2014-07-31 10:30                 ` Rusi
  0 siblings, 1 reply; 16+ messages in thread
From: renato.pontefice @ 2014-07-31 10:03 UTC (permalink / raw)
  To: help-gnu-emacs

Il giorno mercoledì 30 luglio 2014 23:28:54 UTC+2, Emanuel Berg ha scritto:
> Rusi <rustompmody@gmail.com> writes:
> 
> 
> 
> >> No, I need to read, modify eand write .rtf
> 
> >
> 
> > Why not use the right tool for the job? libreoffice
> 
> > --writer for example?
> 
> 
> 
> To be an Emacs user, Rusi sure have an odd taste in
> 
> software.
> 
> 
> 
> The OP wants to use Emacs. My advice is to take the
> 
> document you (the OP) currently have, convert it to
> 
> plain text, use Emacs to edit it, and from then on,
> 
> don't use the .rtf format. Keep it text (best) or do
> 
> LaTeX if you have advanced stuff to tell. Do HTML/CSS
> 
> if you want to go web. Etc.
> 
> 
> 
> No Emacs user should abandon Emacs for a Word mockoff,
> 
> and for such a lame reason (the format) at that! If
> 
> anyone does that, he should be excommunicated for 8
> 
> years. (If you think that was a silly joke, that is
> 
> exactly what happens if you defect from Cuba: just
> 
> imagine.)
> 
> 
> 
> -- 
> 
> underground experts united

I try to explain, why do I do I need to use .rtf, and why do I'd like to do with emacs:
In the company where I work, I have to open rtf files, insert some text (plain text), save it, upload on a server, that will elaborate that file, replace the text tha I've inserted (that is a  a variable name) with the content of the variable.
The prob to use MS Word or LO, is that, when I open this file with this program, the insert some rtf code, that let the server app not to process the replacement. (i.e., my program look for [**VARIABLE_NAME**] and replaces it with the real content of the variable), but, when I save from MS or LO, my variable will be corrupted (i.e., is no more [**VARIABLE_NAME**-], but... [**VAR(\hich\af1\dbch\af37\loch\f1_IABLE_NAME**])
of course, in this way, my parser, will not recognize the variable name.

So, my prob is to try to edit this rtf in the more plain text as possible. But, not be confused, with the .rtf code.

This is why, I'm lookin for sothings that let me edit .rtf in emacs, but with sothings that let me read without the rtf code.

Have I been more clear?

TIA

Renato


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

* Re: how to handle rtf
  2014-07-31 10:03               ` renato.pontefice
@ 2014-07-31 10:30                 ` Rusi
  2014-07-31 13:15                   ` renato.pontefice
  0 siblings, 1 reply; 16+ messages in thread
From: Rusi @ 2014-07-31 10:30 UTC (permalink / raw)
  To: help-gnu-emacs

On Thursday, July 31, 2014 3:33:26 PM UTC+5:30, renato wrote:
> I try to explain, why do I do I need to use .rtf, and why do I'd like to do with emacs:
> In the company where I work, I have to open rtf files, insert some text (plain text), save it, upload on a server, that will elaborate that file, replace the text tha I've inserted (that is a  a variable name) with the content of the variable.
> The prob to use MS Word or LO, is that, when I open this file with this program, the insert some rtf code, that let the server app not to process the replacement. (i.e., my program look for [**VARIABLE_NAME**] and replaces it with the real content of the variable), but, when I save from MS or LO, my variable will be corrupted (i.e., is no more [**VARIABLE_NAME**-], but... [**VAR(\hich\af1\dbch\af37\loch\f1_IABLE_NAME**])
> of course, in this way, my parser, will not recognize the variable name.

> So, my prob is to try to edit this rtf in the more plain text as possible. But, not be confused, with the .rtf code.

> This is why, I'm lookin for sothings that let me edit .rtf in emacs, but with sothings that let me read without the rtf code.

> Have I been more clear?

Yes

You need to clarify one important thing: How much of the 'r' in the 'rtf'
(aka the formatting) you really need.

It appears from your description to be very little or none at all.
In which case saving (from MSO or LO) as (plain not rich) text and working with
that would be the natural way.  After that munging that text-file in emacs or
python or ... is a different question.

If however you *do* need the formatting one way that comes to mind offhand is:
Use org mode and the odt exporter.

In general, rtf is nominally text with 'richness' ie formatting.
However the formatting is WAY WAY too much for you to be able to do normal
text processing on it and maintain your sanity


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

* Re: how to handle rtf
  2014-07-31 10:30                 ` Rusi
@ 2014-07-31 13:15                   ` renato.pontefice
  2014-07-31 15:02                     ` Rusi
  0 siblings, 1 reply; 16+ messages in thread
From: renato.pontefice @ 2014-07-31 13:15 UTC (permalink / raw)
  To: help-gnu-emacs

Il giorno giovedì 31 luglio 2014 12:30:02 UTC+2, Rusi ha scritto:
> On Thursday, July 31, 2014 3:33:26 PM UTC+5:30, renato wrote:
> 
> > I try to explain, why do I do I need to use .rtf, and why do I'd like to do with emacs:
> 
> > In the company where I work, I have to open rtf files, insert some text (plain text), save it, upload on a server, that will elaborate that file, replace the text tha I've inserted (that is a  a variable name) with the content of the variable.
> 
> > The prob to use MS Word or LO, is that, when I open this file with this program, the insert some rtf code, that let the server app not to process the replacement. (i.e., my program look for [**VARIABLE_NAME**] and replaces it with the real content of the variable), but, when I save from MS or LO, my variable will be corrupted (i.e., is no more [**VARIABLE_NAME**-], but... [**VAR(\hich\af1\dbch\af37\loch\f1_IABLE_NAME**])
> 
> > of course, in this way, my parser, will not recognize the variable name.
> 
> 
> 
> > So, my prob is to try to edit this rtf in the more plain text as possible. But, not be confused, with the .rtf code.
> 
> 
> 
> > This is why, I'm lookin for sothings that let me edit .rtf in emacs, but with sothings that let me read without the rtf code.
> 
> 
> 
> > Have I been more clear?
> 
> 
> 
> Yes
> 
> 
> 
> You need to clarify one important thing: How much of the 'r' in the 'rtf'
> 
> (aka the formatting) you really need.
> 
> 
> 
> It appears from your description to be very little or none at all.
> 
> In which case saving (from MSO or LO) as (plain not rich) text and working with
> 
> that would be the natural way.  After that munging that text-file in emacs or
> 
> python or ... is a different question.
> 
> 
> 
> If however you *do* need the formatting one way that comes to mind offhand is:
> 
> Use org mode and the odt exporter.
> 
> 
> 
> In general, rtf is nominally text with 'richness' ie formatting.
> 
> However the formatting is WAY WAY too much for you to be able to do normal
> 
> text processing on it and maintain your sanity

I need  many 'r'...
the doc, are normaly .doc text. Imean:
- formatting (text, tab, margin...etc)
- fonts
-etc.

I need to format in .rtf, because:
- it is well formatted text
- are plain text
- the parser can find e subsiuite variable

I cannot use other format, because the server side application, already use this format (because, is text format, and can also support formatting).

So you tell me to look at org-mode?
wich package can I use in org mode?

TIA

Renato


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

* Re: how to handle rtf
  2014-07-31 13:15                   ` renato.pontefice
@ 2014-07-31 15:02                     ` Rusi
  0 siblings, 0 replies; 16+ messages in thread
From: Rusi @ 2014-07-31 15:02 UTC (permalink / raw)
  To: help-gnu-emacs

On Thursday, July 31, 2014 6:45:40 PM UTC+5:30, renato.p...@gmail.com wrote:
> Il giorno giovedì 31 luglio 2014 12:30:02 UTC+2, Rusi ha scritto:
> > On Thursday, July 31, 2014 3:33:26 PM UTC+5:30, renato wrote:
> > > I try to explain, why do I do I need to use .rtf, and why do I'd like to do with emacs:
> > > In the company where I work, I have to open rtf files, insert some text (plain text), save it, upload on a server, that will elaborate that file, replace the text tha I've inserted (that is a  a variable name) with the content of the variable.
> > > The prob to use MS Word or LO, is that, when I open this file with this program, the insert some rtf code, that let the server app not to process the replacement. (i.e., my program look for [**VARIABLE_NAME**] and replaces it with the real content of the variable), but, when I save from MS or LO, my variable will be corrupted (i.e., is no more [**VARIABLE_NAME**-], but... [**VAR(\hich\af1\dbch\af37\loch\f1_IABLE_NAME**])
> > > of course, in this way, my parser, will not recognize the variable name.
> > > So, my prob is to try to edit this rtf in the more plain text as possible. But, not be confused, with the .rtf code.
> > > This is why, I'm lookin for sothings that let me edit .rtf in emacs, but with sothings that let me read without the rtf code.
> > > Have I been more clear?
> > Yes
> > You need to clarify one important thing: How much of the 'r' in the 'rtf'
> > (aka the formatting) you really need.
> > It appears from your description to be very little or none at all.
> > In which case saving (from MSO or LO) as (plain not rich) text and working with
> > that would be the natural way.  After that munging that text-file in emacs or
> > python or ... is a different question.
> > If however you *do* need the formatting one way that comes to mind offhand is:
> > Use org mode and the odt exporter.
> > In general, rtf is nominally text with 'richness' ie formatting.
> > However the formatting is WAY WAY too much for you to be able to do normal
> > text processing on it and maintain your sanity

> I need  many 'r'...
> the doc, are normaly .doc text. Imean:
> - formatting (text, tab, margin...etc)
> - fonts
> -etc.

> I need to format in .rtf, because:
> - it is well formatted text
> - are plain text
> - the parser can find e subsiuite variable

> I cannot use other format, because the server side application, already use this format (because, is text format, and can also support formatting).

> So you tell me to look at org-mode?
> wich package can I use in org mode?

I am not sure that this will be at all easy
Its just that its probably easier than what you were earlier trying.

1. You will need to install a recent org mode (into emacs).
2. Make a text file with some minimal formatting
3. Then exercise the odt exporter
4a. Use LO to convert the odt file to rtf. Check that it works for you
4b. Then try these instructions to export directly from emacs to rtf
    http://orgmode.org/manual/Extending-ODT-export.html

It may be a good idea to get onto the orgmode mailing list
http://orgmode.org/community.html 

[I know very little of this so dont expect much help from me ;-) ]


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

* Re: how to handle rtf
  2014-07-29 13:07 how to handle rtf renato.pontefice
  2014-07-29 15:39 ` Danil Orlov
       [not found] ` <mailman.6237.1406648406.1147.help-gnu-emacs@gnu.org>
@ 2014-08-08 12:26 ` Hans BKK
  2014-08-08 13:41   ` Eli Zaretskii
  2014-08-08 14:09 ` Hans BKK
  3 siblings, 1 reply; 16+ messages in thread
From: Hans BKK @ 2014-08-08 12:26 UTC (permalink / raw)
  To: help-gnu-emacs

On Tuesday, July 29, 2014 9:07:01 AM UTC-4, renato.p...@gmail.com wrote:
> I need to handle some .rtf file, saved by MS office. I'm wondering if, I can use emacs to do that, and, if yes, how.

RTF is not an open standard, it is a legacy of proprietary Microsoft software and has had many many changing versions over the years.

Therefore you won't find much interest among free software developers in helping you code tools to work with RTF, especially IMO in the emacs community. Not saying emacs couldn't be programmed to do what you want, but you'd likely have to figure out how to do that by yourself since the community's philosophy is opposed to supporting this kind of format.

As others have suggested, if you can't get the developers of your server-side tool to support a plain-text format like one of the markdown flavors, then you're probably better off pursuing support from one of the Libre/Open Office forums, perhaps using their macro functionality.

Hope this helps.


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

* Re: how to handle rtf
  2014-08-08 12:26 ` Hans BKK
@ 2014-08-08 13:41   ` Eli Zaretskii
  0 siblings, 0 replies; 16+ messages in thread
From: Eli Zaretskii @ 2014-08-08 13:41 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Fri, 8 Aug 2014 05:26:32 -0700 (PDT)
> From: Hans BKK <hansbkk@gmail.com>
> 
> RTF is not an open standard, it is a legacy of proprietary Microsoft software and has had many many changing versions over the years.

What is "an open standard"?  The RTF spec for the latest version is
freely available on the Internet.



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

* Re: how to handle rtf
  2014-07-29 13:07 how to handle rtf renato.pontefice
                   ` (2 preceding siblings ...)
  2014-08-08 12:26 ` Hans BKK
@ 2014-08-08 14:09 ` Hans BKK
  3 siblings, 0 replies; 16+ messages in thread
From: Hans BKK @ 2014-08-08 14:09 UTC (permalink / raw)
  To: help-gnu-emacs

> What is "an open standard"?

One aspect would be that it isn't passed down from a for-profit corporation, but created and maintained by a group of volunteers 'open' to input from the user community.

If the RTF standard has evolved to that point I stand corrected, but still maintain the gist of my above points still stands wrt the OP from a practical POV.


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

end of thread, other threads:[~2014-08-08 14:09 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-29 13:07 how to handle rtf renato.pontefice
2014-07-29 15:39 ` Danil Orlov
     [not found] ` <mailman.6237.1406648406.1147.help-gnu-emacs@gnu.org>
2014-07-29 16:46   ` Emanuel Berg
2014-07-29 17:39     ` Grant Rettke
     [not found]     ` <mailman.6241.1406655598.1147.help-gnu-emacs@gnu.org>
2014-07-30  8:49       ` Joost Kremers
2014-07-30  8:58         ` renato.pontefice
2014-07-30 13:18           ` Emanuel Berg
2014-07-30 16:50           ` Rusi
2014-07-30 21:28             ` Emanuel Berg
2014-07-31 10:03               ` renato.pontefice
2014-07-31 10:30                 ` Rusi
2014-07-31 13:15                   ` renato.pontefice
2014-07-31 15:02                     ` Rusi
2014-08-08 12:26 ` Hans BKK
2014-08-08 13:41   ` Eli Zaretskii
2014-08-08 14:09 ` Hans BKK

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