convert syntax highlighted text to RTF?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

convert syntax highlighted text to RTF?

reckoner

Hi,

is there a way to convert syntax highlighted text to RTF? I have some code files that I need to embed in some powerpoint slides. I can't take a graphical screenshot since I need to be able to interact with the text in powerpoint.

Thanks!



--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: convert syntax highlighted text to RTF?

Christian Brabandt
Hi reckoner!

On Di, 12 Jan 2010, reckoner wrote:

> is there a way to convert syntax highlighted text to RTF? I have some  
> code files that I need to embed in some powerpoint slides. I can't take  
> a graphical screenshot since I need to be able to interact with the text  
> in powerpoint.

It should be possible to run :TOhtml on your code and copy/paste it into
your document. This should make Windows iclude the formatting properties
from the HTML-Document.

regards,
Christian
--
hundred-and-one symptoms of being an internet addict:
74. Your most erotic dreams are about cybersex

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: convert syntax highlighted text to RTF?

reckoner
Unfortunately, I have office 2003, not 2007. So, it doesn't work that
way in Office 2003.

Any other ideas?


On Jan 12, 9:50 am, Christian Brabandt <[hidden email]> wrote:

> Hi reckoner!
>
> On Di, 12 Jan 2010, reckoner wrote:
>
> > is there a way to convert syntax highlighted text to RTF? I have some
> > code files that I need to embed in some powerpoint slides. I can't take
> > a graphical screenshot since I need to be able to interact with the text
> > in powerpoint.
>
> It should be possible to run :TOhtml on your code and copy/paste it into
> your document. This should make Windows iclude the formatting properties
> from the HTML-Document.
>
> regards,
> Christian
> --
> hundred-and-one symptoms of being an internet addict:
> 74. Your most erotic dreams are about cybersex

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: convert syntax highlighted text to RTF?

Matt Wozniski-2
On Tue, Jan 12, 2010 at 1:40 PM, Reckoner wrote:
> Unfortunately, I have office 2003, not 2007. So, it doesn't work that
> way in Office 2003.
>
> Any other ideas?

Really?  Hm.  I remember office supporting that all the way back from 2000 on...

~Matt

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: convert syntax highlighted text to RTF?

J.A.J. Pater
In reply to this post by reckoner
> Unfortunately, I have office 2003, not 2007. So, it doesn't work that
> way in Office 2003.

If this doesn't work for you, you could try to convert the generated
HTML to rtf with a converter like pandoc (http://johnmacfarlane.net/
pandoc/)
or any other html2rtf script/converter (there are plenty of those -
e.g. google for: html2rtf)

P.S. also have a look at buf2html (http://www.vim.org/scripts/
script.php?script_id=2384) and or vim2html (http://freshmeat.net/
projects/vim2html/)

Hope this helps.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: convert syntax highlighted text to RTF?

Benjamin Fritz


On Jan 13, 4:19 am, Adriaan <[hidden email]> wrote:
> > Unfortunately, I have office 2003, not 2007. So, it doesn't work that
> > way in Office 2003.
>
> If this doesn't work for you, you could try to convert the generated
> HTML to rtf with a converter like pandoc
> (http://johnmacfarlane.net/pandoc/)
> or any other html2rtf script/converter (there are plenty of those -
> e.g. google for: html2rtf)
>

Can you also just embed the html in some fashion? I know you can embed
excel charts, etc., perhaps you can also embed an html snippet in
similar fashion? I'm just guessing here, I have no idea what all the
features of PowerPoint are.

> P.S. also have a look at buf2html
> (http://www.vim.org/scripts/script.php?script_id=2384)
> and or vim2html (http://freshmeat.net/projects/vim2html/)
>

I'm confused as to the differences between these two scripts and the
standard 2html.vim script distributed with Vim. The list of
improvements in the first are somewhat cryptic (and it is not clear
why they were not just submitted as patches to the original) and the
second has no list of differences at all. The first has not been
updated since 2008. There have been a few updates (with feature
additions) to the official script since then, does it have them? The
second has apparently not been updated since 2005, so it could easily
be quite out of date.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: convert syntax highlighted text to RTF?

J.A.J. Pater

> I'm confused as to the differences between these two scripts and the
> standard 2html.vim script distributed with Vim.

To be honest: I don't know exactly either.
But I can remember 2html once didn't work for me and buf2html did.
The second one can be run without having a vim session open (when
I remember correctly). Last time I used it, it worked for me, and
that would be a year ago.

Adriaan

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: convert syntax highlighted text to RTF?

Benjamin Fritz


On Jan 14, 1:15 am, Adriaan <[hidden email]> wrote:
> > I'm confused as to the differences between these two scripts and the
> > standard 2html.vim script distributed with Vim.
>
> To be honest: I don't know exactly either.
> But I can remember 2html once didn't work for me and buf2html did.

Fair enough. In case you didn't realize, 2html has several options
available that make it work much better that the default.
g:html_use_css, for instance, allows it to generate valid markup (why
this is not the default is beyond me). But personal preference will of
course reign supreme :-)

> The second one can be run without having a vim session open (when
> I remember correctly). Last time I used it, it worked for me, and
> that would be a year ago.
>

Ah, so it's not a Vim plugin, but a standalone application? I can
certainly see how that would be useful!

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php