help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to handle rtf


From: Rusi
Subject: Re: how to handle rtf
Date: Thu, 31 Jul 2014 08:02:06 -0700 (PDT)
User-agent: G2/1.0

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 ;-) ]


reply via email to

[Prev in Thread] Current Thread [Next in Thread]