Wednesday, June 22, 2011

Creating open-office slides from a LaTex presentation

While my preferred method of creating slides is, naturally, using (excuse me, "utilizing") LaTex, there are times when it is required, for reasons of organizational consistency to use Open Office and a pre-defined template to create slides. Typically, the slides are for a paper for which I have already spent hours creating dependency graphics. In the past, slide-creation time has then required yet more hours (okay, "hours" is an exaggeration, but I stand by the sentiment it expresses) of dependency-graphic creation.

This is one reason why I was so excited to finally master the creation of pdf images, which I now intend to use in my slides! We'll see how it works!

My requirements are:

1) I must be able to seamlessly animate the progress of the dependency graph. In other words, from one slide to the next, the graphics must be placed identically so that it seems that, instead of changing slides, I have simple added a new word or arc to the initial slide as an animation would do.

2) The graphs must visually cohere with my template.

3) Creating them must not be labor-intensive.

I think that's all. For now.

Implementation of visual coherence:

First, the easy part. The font style is bitstream vera sans, which has been implemented as a package called bera:


This activates the vera fonts, but now, you need to tell it to use sans serif instead of serif:


Next I need to color my fonts 80\% gray:


\color{gray!80} this is the text!

and resize it to 24pt:

this is the text!

So far so good.

The font carries over into the psmatrix environment, and I can use the coloration with it (though it can't span an ampersand, so I have to color each word separately).

The arcs are colored by a command, unearthed from deep within the xcolor manual (
  • \psset{linecolor=green!50}
  • \psset{linecolor=[rgb]{0.5,1,0.5}}
  • \psframebox[linecolor={[rgb]{0.5,1,0.5}}]{foo}
You should recognize that \psset{} command from my earlier tutorial on dependency graphs.

Finally, as I mentioned, the coloring does not cross ampersand boundaries, but fortunately all the arc labels are actually considered to be within the "group" comprising the last box of the matrix row, so the arc labels, if left alone, will be the color of the last word in the utterance.

I have now fully formatted my graphic like the slide I am hoping to match!

Implementation of animation:

I have done a lot of pseudo-animation in both open office and powerpoint, and the way I typically add things is:

  1. create my finished graphic using text and arcs. (It's important that my "graphics" are never real graphics, merely lines of text adorned by arcs.)
  2. make the parts that should appear last match the background color, effectively making them invisible

This has two advantages:
  1.  I create the finished "graph"-ic, copy it, change the copy so it looks like the step before the final graphic, copy this, etc, which is basically the least labor-intensive way of creating these graphics
  2. If the graphic is centered, just erasing the parts that shouldn't have appeared yet will make it so that the visible graphics will not be placed correctly. Having the exact same content, just colored differently, ensures a perfect placement.
So I was happy to discover that in the psmatrix environment, you can change the default arc color halfway through! This takes care of my ability to animate my graphs stepwise!

So now, I have a neatly animated set of pdf graphics representing the stepwise creation of a dependency graph, which I created in text mode. (Have I mentioned how much I prefer using text to a gui? :D This proves the age-old adage: you can take the woman away from the Commodore 64, but you can't take the Commodore 64 out of the woman!)

No comments:

Post a Comment