yml2tex 1.2 released

Published 5th January 2009

yml2tex is a simple Python script which generates LaTeX code for LaTeX Beamer presentations out of YAML files.

If you prefer creating presentations with the LaTeX Beamer class but have a hard time remembering LaTeX syntax (like me) then this project is for you.

presentation

See the project page at Google Code for more information about yml2tex or the CHANGELOG file in the Git repository for a full list of changes. The most important ones are:

Better Syntax

Previous versions required dashes before each section, subsection or frame due to the fact that PyYAML maps keys to Python dictionaries (correct according to the YAML spec) which don't have an element order—the presentation would be a mess as everything would be mixed up. However, if you put a dash before each line the key is mapped as a Python list and therefore has an order.

Version 1.2 now comes with a custom Composer for PyYAML which eliminates the need for dashes by mapping keys to tuples with two elements (pairs) instead of dictionaries.

So, instead of writing:

- Introduction:
  - Features:
    - General:
      - Easy & fast to generate simple presentations
      - Adds a nice default style to the document
      - Generates a TOC out of sections/subsections
      - Separates content from presentation

You can now write:

Introduction:
  Features:
    General:
      - Easy & fast to generate simple presentations
      - Adds a nice default style to the document
      - Generates a TOC out of sections/subsections
      - Separates content from presentation

Metadata

It is now possible to specify metadata in the YAML file itself:

metas:
  outline: 0
  highlight_style: borland

Introduction:
  Why?:
    Why?:
      - Creating Presentations in PowerPoint/Keynote etc. takes too long:
        - No automatic TOC generation
        - No Code Highlighting
        - Applications not for free
        - Proprietary formats

You can, for example, disable the automatically generated outline or choose another Pygments highlighting style for your code. Take a look at the README file for a list of all supported values.

Auto-Escaping

Special characters in LaTeX are another thing I personally can't remember. I always get an error during the compile, have to open up the TeX file and escape the character which caused the error just to find that I forgot to escape another character later on.

Version 1.2 now fixes this by auto-escaping LaTeX special characters (&, %, #, _, { and }) in section, subsection, frame titles and item text.