Code samples in OOo Presenter

Code samples in OOo Presenter

am 21.03.2010 23:25:30 von Larry Garfield

Hi all.

I have a busy conference season coming up, and will be giving a number of
presentations that involve code, specifically PHP. I am going to want to put
code onto slides in OpenOffice (3.1 specifically, using Kubuntu 9.10), but to
date I've never figured out a good way to do that. Anyone know of a good way
to do syntax-highlighted code in OOo?

Things I've tried in the past:

1) Just throw code onto the slide, no highlighting. This works, but is ugly
and harder to read or demonstrate what I am doing. It's my usual fallback.

2) Screen-shot from a web page that uses syntax highlighting, such as PHP's
built-in highlighting. Very difficult to prepare since the sizing is usually
all off. Ugly. Very difficult to edit and change because the screen caps have
to be regenerated. And PHP's default coloring for highlighting frequently
clashes with the slides and looks godawful on a projector. (I once ended up
with blue text on a black slide. That was a major fail.)

3) Jump out of the slides into an IDE. Works, but totally breaks the flow of
the presentation. The IDE usually also has text that's way too small, and I
have to reconfigure it into a "presentation mode", often on the fly. It also
makes discrete snippets harder to show, since there's still the entire rest of
the IDE there.

I don't like any of these options. :-) I don't know what the alternative is,
though. Ideally I'd love to have a custom text region or format or something
that is "take this and highlight it properly", but I don't know if such a
plugin exists.

I could be talked into using KPresenter / KOffice instead if that would be
easier, but as I am on Linux I have no access to KeyNote or PowerPoint.

Any suggestions?

--Larry Garfield

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Code samples in OOo Presenter

am 21.03.2010 23:41:55 von Ashley Sheridan

--=-J41lYKZqEfFmNnaKRY9a
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Sun, 2010-03-21 at 17:25 -0500, Larry Garfield wrote:

> Hi all.
>
> I have a busy conference season coming up, and will be giving a number of
> presentations that involve code, specifically PHP. I am going to want to put
> code onto slides in OpenOffice (3.1 specifically, using Kubuntu 9.10), but to
> date I've never figured out a good way to do that. Anyone know of a good way
> to do syntax-highlighted code in OOo?
>
> Things I've tried in the past:
>
> 1) Just throw code onto the slide, no highlighting. This works, but is ugly
> and harder to read or demonstrate what I am doing. It's my usual fallback.
>
> 2) Screen-shot from a web page that uses syntax highlighting, such as PHP's
> built-in highlighting. Very difficult to prepare since the sizing is usually
> all off. Ugly. Very difficult to edit and change because the screen caps have
> to be regenerated. And PHP's default coloring for highlighting frequently
> clashes with the slides and looks godawful on a projector. (I once ended up
> with blue text on a black slide. That was a major fail.)
>
> 3) Jump out of the slides into an IDE. Works, but totally breaks the flow of
> the presentation. The IDE usually also has text that's way too small, and I
> have to reconfigure it into a "presentation mode", often on the fly. It also
> makes discrete snippets harder to show, since there's still the entire rest of
> the IDE there.
>
> I don't like any of these options. :-) I don't know what the alternative is,
> though. Ideally I'd love to have a custom text region or format or something
> that is "take this and highlight it properly", but I don't know if such a
> plugin exists.
>
> I could be talked into using KPresenter / KOffice instead if that would be
> easier, but as I am on Linux I have no access to KeyNote or PowerPoint.
>
> Any suggestions?
>
> --Larry Garfield
>


Could you use highlight_string() on the code example in a web page then
copy that from the browser and paste that into your presentation? It
should then preserve the formatting used on the browser display, and let
you easily modify the font size.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--=-J41lYKZqEfFmNnaKRY9a--

Re: Code samples in OOo Presenter

am 22.03.2010 01:14:56 von Larry Garfield

On Sunday 21 March 2010 05:41:55 pm Ashley Sheridan wrote:

> > I don't like any of these options. :-) I don't know what the alternative
> > is, though. Ideally I'd love to have a custom text region or format or
> > something that is "take this and highlight it properly", but I don't know
> > if such a plugin exists.
> >
> > I could be talked into using KPresenter / KOffice instead if that would
> > be easier, but as I am on Linux I have no access to KeyNote or
> > PowerPoint.
> >
> > Any suggestions?
> >
> > --Larry Garfield
>
> Could you use highlight_string() on the code example in a web page then
> copy that from the browser and paste that into your presentation? It
> should then preserve the formatting used on the browser display, and let
> you easily modify the font size.
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk

I will have to see if OOo preserves formatting when I do that. However, that
still leaves the problem of highlight_string()'s colors being rather poor for
on-screen. Are those easily configurable? That would at least give me a
decent result, kinda, even if it's not as clean as doing it all within the
presentation program.

--Larry Garfield

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Code samples in OOo Presenter

am 22.03.2010 03:32:00 von Paul M Foster

On Sun, Mar 21, 2010 at 07:14:56PM -0500, Larry Garfield wrote:

> On Sunday 21 March 2010 05:41:55 pm Ashley Sheridan wrote:
>
> > > I don't like any of these options. :-) I don't know what the alternative
> > > is, though. Ideally I'd love to have a custom text region or format or
> > > something that is "take this and highlight it properly", but I don't know
> > > if such a plugin exists.
> > >
> > > I could be talked into using KPresenter / KOffice instead if that would
> > > be easier, but as I am on Linux I have no access to KeyNote or
> > > PowerPoint.
> > >
> > > Any suggestions?
> > >
> > > --Larry Garfield
> >
> > Could you use highlight_string() on the code example in a web page then
> > copy that from the browser and paste that into your presentation? It
> > should then preserve the formatting used on the browser display, and let
> > you easily modify the font size.
> >
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
>
> I will have to see if OOo preserves formatting when I do that. However, that
> still leaves the problem of highlight_string()'s colors being rather poor for
> on-screen. Are those easily configurable? That would at least give me a
> decent result, kinda, even if it's not as clean as doing it all within the
> presentation program.

I think Ash's idea is brilliant, though I probably would show the code
from within the browser, rather than importing it. Also check the
user-supplied code under both the highlight_string() and
highlight_file() function at php.net:

http://us2.php.net/manual/en/function.highlight-string.php
http://us2.php.net/manual/en/function.highlight-file.php

There is also code there to provide line numbers, which would be very
useful for presentations. There are some hints about how you might
change the colors.

Paul

--
Paul M. Foster

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Code samples in OOo Presenter

am 22.03.2010 18:53:47 von Shawn McKenzie

Larry Garfield wrote:
> Hi all.
>
> I have a busy conference season coming up, and will be giving a number of
> presentations that involve code, specifically PHP. I am going to want to put
> code onto slides in OpenOffice (3.1 specifically, using Kubuntu 9.10), but to
> date I've never figured out a good way to do that. Anyone know of a good way
> to do syntax-highlighted code in OOo?
>
> Things I've tried in the past:
>
> 1) Just throw code onto the slide, no highlighting. This works, but is ugly
> and harder to read or demonstrate what I am doing. It's my usual fallback.
>
> 2) Screen-shot from a web page that uses syntax highlighting, such as PHP's
> built-in highlighting. Very difficult to prepare since the sizing is usually
> all off. Ugly. Very difficult to edit and change because the screen caps have
> to be regenerated. And PHP's default coloring for highlighting frequently
> clashes with the slides and looks godawful on a projector. (I once ended up
> with blue text on a black slide. That was a major fail.)
>
> 3) Jump out of the slides into an IDE. Works, but totally breaks the flow of
> the presentation. The IDE usually also has text that's way too small, and I
> have to reconfigure it into a "presentation mode", often on the fly. It also
> makes discrete snippets harder to show, since there's still the entire rest of
> the IDE there.
>
> I don't like any of these options. :-) I don't know what the alternative is,
> though. Ideally I'd love to have a custom text region or format or something
> that is "take this and highlight it properly", but I don't know if such a
> plugin exists.
>
> I could be talked into using KPresenter / KOffice instead if that would be
> easier, but as I am on Linux I have no access to KeyNote or PowerPoint.
>
> Any suggestions?
>
> --Larry Garfield

Quick idea. I use geshi, or you can use highlight string. You can host
the code on a local webserver and include it in a floating frame in
impress. This will give a live view, or you can generate an HTML file
and have that as the source of your floating frame.

--
Thanks!
-Shawn
http://www.spidean.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php