Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Org Beamerposter

Introduction

img/poster-sc-snap.pngimg/poster-d-snap.png
Systemcrafter styledDonder style

This is a fork of an original beamer poster setup implementing a new easily customizable style as shown in the image above, plus the (very close-to) original style shown next to it. Below you will find two sections. First, under Legacy, the original README. Then under Marc’s add-ons some detail on the changes and extensions I made for my convenience, and that I hope may be useful for you, too.

In a nutshell:

  • use a Makefile to automate the different steps
  • provide easy customization of the style(s) using yaml and mustache files
  • add (and focus on) a “Systemcrafter” style for the poster (only in portrait mode for now)
  • some helper script and some graphics for modifying the style

Legacy

Beamer Poster Setup File

The beamer poster setup in this repository encapsulates most boilerplate required to get a nice Org -> Poster export. It includes not only the necessary LaTeX headers and Org Mode options, but eventually will also include a set of useful macros to help defining things such as authors and affiliations. To get it working, and to be able to correctly use the template provided, add the following to your init (or evaluate it before export):

(add-to-list 'org-latex-classes
             '("landscape_poster_a1"
               "\\documentclass[t]{beamer}
           \\usepackage[orientation=landscape,size=a1,scale=1.25]{beamerposter}
           \\usepackage[absolute,overlay]{textpos}
[NO-DEFAULT-PACKAGES]
[PACKAGES]
[EXTRA]"
     ("\\section{%s}" . "\\section*{%s}")
     ("\\subsection{%s}" . "\\subsection*{%s}")
     ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))

(add-to-list 'org-latex-classes
             '("portrait_poster_a0"
               "\\documentclass[t]{beamer}
           \\usepackage[orientation=portrait,size=a0,scale=1.2,debug]{beamerposter}
           \\usepackage[absolute,overlay]{textpos}
[NO-DEFAULT-PACKAGES]
[PACKAGES]
[EXTRA]"
     ("\\section{%s}" . "\\section*{%s}")
     ("\\subsection{%s}" . "\\subsection*{%s}")
     ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))

The defined class landscape_poster_a1 is meant to be compatible with both PdfLaTeX or XeLaTeX. The template locally redefines org-latex-pdf-process to ensure that the compilation works as expected.

Beamer Fundamental Concepts

Before jumping to Org functionality, however, users should be aware of Beamer’s most important concepts: blocks and columns:

Blocks

Beamer has the concept of block, a set of text that is logically together but apart from the rest of the text that may be in a slide (in our case, the poster is a slide). There are many types of blocks.

The concept of blocks is important because it allows us to change the display of, e.g., figures, math and references.

Columns

In a Beamer frame, you might need to present 2 or more groups of content (which may as well be blocks) beside each other. The columns environment of Beamer can be used to achieve this by subdividing the frame into columns.The columns also have widths. By default, these widths are the proportion of the page width to use so I have specified 40% for the left column and 60% for the right one.

Using Org Mode with Beamer

To tell Org Mode that an org file consists of source code for a beamer presentation (org poster), we have to set a startup command somewhere (usually at the beginning) of our file:

#+STARTUP: beamer

Press C-c C-c on top of the STARTUP line to activate beamer Org mode the first time you write the line down. This will have the effect of changing a couple of keybindings, e.g., C-c C-b, which usually runs the command org-backward-heading-same-level, will run org-beamer-select-environment.

Needless to say, Org Mode offers multiple features to aid the construction of beamer presentations. These features include not only Beamer specific keybindings but also special column views to display the structure and elements of the presentation (or poster) without getting lost in details, and a specific latex export command for beamer presentations. Besides the full documentation here, a short documentation can be found here. Read on for an even shorter overview of the fundamentals.

Beamer specific markup for Org Mode

Org mode will understand that a heading is of a given block type by reading the BEAMER_env property of a heading. Instead of manually typing the environment type, simply press C-c C-b to open a menu with further shortcuts.

Here’s a list of some of the available environments:

(mapcar 'car org-beamer-environments-default)

Setting the environment block with org-beamer-select-environment will not only add or update the correct the heading’s BEAMER_env property, but also add a tag named B_environment that is helpful for the overview display (described further down). If a block environment accepts environment specific arguments, they can be defined manually by setting the property BEAMER_envargs.

The same interface introduced for defining blocks also enables the definition of columns. Use the option | (vertical slash) to define a column, i.e., C-c C-b |. Setting the column with org-beamer-select-environment will not only add or update the correct the heading’s BEAMER_col property, but also add a tag named BMCOL.

Columns also have widths, which are given as a proportion of the total frame size. For example, a column width of 0.4 means that a given column will ocupy 40% of the frame.

Note that Org Mode will not keep track of the sum of your column sizes. If your columns add to a value greater than 1, then the export will probably break.*

Specific poster structure

Taken from the documentation here:

Org transforms heading levels into Beamer’s sectioning elements, frames and blocks. Org overrides headlines to frames conversion for the current tree of an Org file if it encounters the BEAMER_ENV property set to frame or fullframe. In Beamer terminology, a fullframe is a frame without its title.

Because a poster should only have a single frame, we define the poster as a single top level heading with property BEAMER_env set to fullframe. We then define the number of columns we want to have as 2nd level headings. Finally, each row block is defined as a 3rd level heading. Deeper levels can be used to structure each row element, as in, e.g., dividing subcolumns or subrows for text and figure.

Column view for block customisation

Org Mode’s column view is not a beamer specific feature, but it can be tuned for beamer with the following line of code:

#+COLUMNS: %40ITEM %10BEAMER_env(Env) %9BEAMER_envargs(Env Args) %4BEAMER_col(Col) %10BEAMER_extra(Extra)

This incantation defines the format for viewing org property information in column mode. This mode allows you to easily adjust the values of the properties for any headline in your document. To see column view press C-c C-x C-c. To quit, place the cursor on top of any heading and press q.

Marc’s add-ons

Directory reconfiguration

I tried to logically subdivide into directories as follows:

  • script: helper scripts
  • img: images and logos
  • config: configuration-related files
  • styles: style-related settings and templates
  • org-src: the contents for the poster in org-mode syntax
  • tex: directory where the .tex file is created and the .pdf generation takes places, also contains all intermediate files. You also need to position any bibliographic references in a Publications.bib file in that subdirectory

Overall process

  1. Generate your style via make style
  2. Generate the style sidebar (if used) via make logo
  3. Edit your org-src/template.org file
    1. see about Emacs usage/shortcuts in the Legacy section
  4. From within Emacs, generate the .tex file via C-e l b
  5. Generate the .pdf files via make gen
  6. Admire your beautiful poster with make v
  7. Cleanup intermediate files with make clean
  8. Start over with make distclean

Configurable styles

I tried to generate the original template by extracting the variables I thought I’d likely want to change and putting them into a yaml config file. For the original style this has become styles/donder-config.yml. These values are filled in the corresponding mustache template styles/donder-beamertheme.mustache. Such settings are defined in config/env via the MYSTYLE value. Right now the donder and the systemcrafter style are provided.

This was the first step to implement the Systemcrafter’s inspired style defined by the couple styles/systemcrafter-config.yml and styles/systemcrafter-beamertheme.mustache. You can easily play with the .yml file to change colors for instance.

To generate the style (based on your configuration settings), execute the Makefile target make style.

logo_tiler.py for the sidebar logo

The original repo had a colored bar on the left side, coherent with the original “Donder” style. I wanted to replace that by an image-based side-bar without changing too much the structure of the template and delving into beamer config. To achieve this, several images of different sizes are needed for the side-bar. They are generated from a vertically seamlessly tiled base image with this script.

In its present state this is an ultra-simple script and the base filename is hardcoded as img/circuit1t.png (the t is so I recall this image should be vertically tile-able). The script generates four image files tiled_xxx.png, where xxx is a number representing the height of the image.

Run the script using the make logo Makefile target.

Known issues

The tex runs formally end with an error, despite the .pdf file being properly generated. This seems more like a PDFLatex/Latexmk/Lualatex incompatibility and I haven’t yet been able to sort it out.

Known issues

Issues with the commands yq and mustache have been reported. Those are used when doing make style.

yq

The yq I use is from https://github.com/mikefarah/yq/. In my case it is version v4.45.4. For some reason, under Debian, there is a different yq command, which may cause the issue. Below more detail.

This discrepancy with the yq tool arises because there are multiple, unrelated command-line utilities named yq in the open source ecosystem. For what I know, the most widely used yq today is Mike Farah’s yq (GitHub - mikefarah/yq: yq is a portable command-line YAML, JSON, XML, CSV, TOML and properties processor), a Go-based YAML/JSON processor with jq-like syntax. However, Debian and some other Linux distributions have historically packaged a different tool under the same name, often a Python-based wrapper around jq, or even other variants.

Anyway, in the poster pipeline, I wanted to use a human readable format that can be easily edited, so I chose YAML. But further down the pipeline I need json format (of the same data), and I use the above yq to convert the YAML into Json. But you could use any tool that does that. One alternative would be Python’s PyYAML library for example. Could be as simple as:

python3 -c 'import sys, yaml, json; json.dump(yaml.safe_load(sys.stdin), sys.stdout)' < input.yaml > output.json

mustache

I use mustache version 4.2.0. Some older (very old) versions do seem to have issues with the syntax <% #colors %>, which is a deviation from the standard {{ }} mustache syntax because Latex already uses the curly braces and mustache get confused, so the first line of the mustache file contains {{=<% %>=}}, which tells it to replace the default {{ and }} by <% and %>.

The issue is that a variety of mustache implementations are available. If you are using the ruby implementation, it is quite old (around version 1.1.1), and does not support the syntax that changes the delimiter change from {{ to <% and }} to %>.

Try to use another mustache implementation that is more recent. On ubuntu, you can do sudo apt-get install node-mustache and then get /usr/lib/nodejs/mustache/bin/mustache --version with version 2.3.2, which works fine for me.

Support me

https://ko-fi.com/img/githubbutton_sm.svg

About

A template for Org Mode beamerposter export.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages