Sunday, July 8, 2018

Golang Present tool - creating a slide with image and no text

Hello, everyone.  It's been a while.

I've been playing around with golang's present tool.  It's a great tool, overall, but there are some annoyances that come with it that don't come with more consumer oriented presentation tools.

One thing that had me pulling out my hair is that I couldn't figure out how to create a slide without a title at the top of it.  I know that you can use .background to create an image that goes behind the text, but sometimes I just want to put an image with no text at all.

I decided to plead to the void, and ask twitter for advice.  Lucky for me, someone responded!

This is the magic that you need to do in order to get a slide with just an image.

Create a new slide with the * symbol, like you usually do.  Put one space after it, and go to a new line. On the new line, do the usual .image path/to/your/image.file _ 800 that you usually do to insert an image into a slide.

Here's the text for an image with some title text:

* That Example
.image images/that.svg _ 800



Here's the same image on a slide without any text at all:
* 
.image images/that.svg _ 800


Hopefully this helps you out and keeps you from experiencing some of the stress that I experienced trying to get this to work. I'm putting this post out here in the hopes that it shows up if someone tries to use Google to find the solution, like I did initially before begging the internet for help.

Thanks again to Dave Cheney for sharing this information with me on Twitter.