PlayRaw Calendar 2018 (A Calendar Making Tutorial using FLOSS Software) – Part 1 & 2

Every year I am making printed calendars for several family members. The calendars are individual for every recipient. E.g., my mother gets only images with my family, especially my son, or my son and me, while the in-laws get calendars showing more pictures of my wife and my son etc. Making about 8 to 10 calendars every year is a lot of work, and therefore I always try to improve my workflow. Earlier, I did the whole calendar design in Inkscape, by using Inkscape’s calendar script. However, this is limited for two reasons: The calendar script shows only limited configurability, and, more important, Inkscape does not support for multi-page documents. Therefore, I wanted to try Scribus this time, and I use this journey to document for you what is involved in my calendar making process.

The tutorial comes in several chapters, each of them covering a particular step in my workflow. This makes the approach particularly modular, what allows you to take only the modules you require for your project. In general, I hope this is useful for somebody.

Collecting the assets

For a calendar with monthly pages, you would require at least 13 pictures (this includes a cover page). While my personal calendar shows family pictures, I decided to use the wonderful pictures that are available in the PlayRaw threads here on pixls.us. I hope, using them for this project is legal license-wise, if there are any concerns, please inform me and I will exchange the problematic images.

Before collecting images, it is important to know the orientation of the calendar sheets. While it is possible to find reasonable layouts for portrait oriented pictures in a landscape calendar, I decided to go the easier route and decide for a landscape calendar with landscape oriented pictures. Due to what I found in landscape orientation in the PlayRaw threads, this may become a landscape calendar ;-).

Eventually, I came up with a selection of images, and you can see how the selection looks like in a file manager.

01-file_manager_view

The full list is, in the form “month – title – photographer – editor”:

00 – Problems, problems, problems – McCap – Chris
01 – A Brownie – MLC – HIRAM
02 – Sunset on ferry – silicoid – Thomas_Do
03 – Hawkcraig Pier – Brian_Innes – agriggio
04 – Head in the Clouds – CarVac – agriggio
05 – Roadside Sunset at Newbigging, Angus, Scotland – DavidOliver – yteaot
06 – Dornbusch Lighthouse – Wocket – yteaot
07 – Everglades – patdavid – Daroi_M
08 – Golden Blackberries at Sunset – seume – CarVac
09 – Misty Söderåsen – Morgan_Hardwood – Carmelo_DrRaw
10 – Autumn Island – houz – shreedhar
11 – Oronsay Island, Skye – Brian_Innes – HIRAM
12 – First snow in Canadian Rockies – Andrius – Jacal

Besides the pictures and the orientation decision, it is important to know the exact page size to get ready for starting the design. The print shop I am using is Saal Digital in Germany. Please do not understand this as advertisement, it’s simply the supplier I am satisfied with. Almost.

Unlike many other print shops, the one that I chose provides exact information on page sizes of their products, and, if required, colour profiles of their machines as well. Let’s ignore the latter for this tutorial, but the page sizes are important and what I get is something like shown in the screenshot below.

Besides the page size and bleed in physical measures, make sure to note down the sizes in pixels as well, since this may become necessary to check if both sizes match in the software used for the layout.

The calendar template

In my case, the calendar templates consists of two parts, a Scribus document to hold each individual calendar, and, the actual calendar “strip” with all the dates, some events and the name of the month. While Scribus has a script to design calendar layouts, it shows similar limitations as the one of Inkscape that was already mentioned. Since I wanted an individual, classical, warm and unobtrusive design, I decided to do my own design. Since making a full calendar design manually would be extremely cumbersome, I decided to use a flexible (typo)graphical programming language to automate the job: TeX. If you are not familiar with TeX, we are using only a small portion of TeX’s power here which you might be able to follow without any knowledge of TeX. Since this should not be a TeX introduction, I will only cover the important items for the calendar project.

Particularly, we are using LaTeX for the design, especially LuaLaTeX. The reason is that LuaLaTeX can work natively with OpenType fonts, so we can use the exact same fonts in Scribus and LaTeX.

There are several packages for TeX that allow to do full calendar designs within TeX. However, none of these entirely suited my idea of next year’s calendar, with this one being pretty close. There are two reasons I decided to do the final design in Scribus for: TeX is extremely powerful, but for graphical layouts that require to work close to the page borders and tinker with bleed, it has no standardized concept, and, the package mentioned above only foresees portrait oriented layouts. To change the latter would have meant a lot of work, which eventually brought me to Scribus.

To do a calendar design in TeX, the powerful TikZ library becomes handy, and especially its “calendar” sub library. I decided for a vertical “strip” layout, which can be easily done. But before, there have to be several decisions made. As base font, I decided to go with the beautiful TeX Gyre Pagella. which is an extension of the well-known Palatino font by Hermann Zapf. To have the page size of the LaTeX document perfectly match the calendar strips for easy import in Scribus, I decided to go with the “standalone” document class, which itself brings native TikZ support. Let’s go briefly through the code, which itself is hacked together with the help of several calendar-related entries on tex.sx – thanks to all the people there.

The first line is more or less a workaround to make things work in LuaTeX. The second line loads the standalone class and TikZ.

\RequirePackage{luatex85}
\documentclass[tikz]{standalone}

I wanted a German calendar, which requires

\usepackage{polyglossia}
\setdefaultlanguage[spelling=new, babelshorthands=true]{german}
\usepackage[german]{translator}

Now let’s load the calendar library

\usetikzlibrary{calendar}

and define the main font and some support fonts to mark moon phases and other events:

\usepackage{fontspec}
\defaultfontfeatures{Ligatures={TeX},Scale=1.3}
\setmainfont{TeX Gyre Pagella}
\newfontfamily\tfont{summertimes}
\usepackage{mathabx,wasysym}

The next one is required to ease some programming steps:

\usepackage{etoolbox}

The following code cycles through the moon phases whenever a new moon phase is marked and adds supporting macros to save and restore the last moon phase:

\newcount\mooncounter
\newcount\moonsaver

\def\moonreset{\global\mooncounter=-1\relax}
\moonreset

\def\moon{%
    \global\advance\mooncounter by 1\relax%
    \ifcase\mooncounter \raisebox{.25ex}{$\newmoon$}%
        \or             \raisebox{.25ex}{$\rightmoon$}%
        \or             \raisebox{.25ex}{$\fullmoon$}%
        \or             \raisebox{.25ex}{$\leftmoon$}\global\mooncounter=-1\relax%
    \fi%
}

\def\savemoon{\global\moonsaver=\mooncounter\relax}
\def\restoremoon{\global\mooncounter=\moonsaver\relax}

Now, our calendar strips can be started. I bundle most of the style definitions at the beginning:

\begin{document}

\tikzset{
  hcol/.style=black!50,
  bgstyle/.style={fill=white,opacity=.7,inner sep=0cm,minimum width=3.8cm,minimum height=207mm},
  rightnode/.style={anchor=south east,inner sep=0cm,yshift=1cm,xshift=-1cm},
  leftnode/.style={anchor=south west,inner sep=0cm,yshift=1cm,xshift=1cm},
  everycal/.style={
    scale=.93, transform canvas,
    dates=2018-\n-01 to 2018-\n-last,
    month text={\Huge \%mt},
    day list downward,
  },
}

Next year starts with the moon phase equivalent to counter value 1:

\mooncounter=1

To create all months in a batch I use a foreach loop:

\foreach \n in {1,...,12}{

I want to do a left and right variant of the strip in one run, therefore we require the current moon phase a second time later, therefore it is useful to store it:

  \savemoon

A single month looks like the following, starting with some style definitions:

  \begin{tikzpicture}
    \node[bgstyle] (a) {};
    \node [leftnode] at (a.south west) {\tikz\calendar [
      everycal,
      month label right vertical,
      every month/.append style={anchor=east,rotate=180,yshift=-1em,}
      ]
      if (weekend) [hcol]
      if (
          equals = 2018-6-21,
          equals = 2018-12-21,
         ) [day text = \sun\,\%d-]
      if (equals = 2018-3-25) [day text = \tfont f\normalfont\,\%d-]
      if (equals = 2018-10-28) [day text = \tfont b\normalfont\,\%d-]
      if (
          equals = 2018-1-2,
          equals = 2018-1-8,
          equals = 2018-1-17,
          equals = 2018-1-24,
          equals = 2018-1-31,
          equals = 2018-2-7,
          equals = 2018-2-15,
          equals = 2018-2-23,
          equals = 2018-3-17,
          equals = 2018-3-2,
          equals = 2018-3-24,
          equals = 2018-3-31,
          equals = 2018-3-9,
          equals = 2018-4-16,
          equals = 2018-4-22,
          equals = 2018-4-30,
          equals = 2018-4-8,
          equals = 2018-5-15,
          equals = 2018-5-22,
          equals = 2018-5-29,
          equals = 2018-5-8,
          equals = 2018-6-13,
          equals = 2018-6-20,
          equals = 2018-6-28,
          equals = 2018-6-6,
          equals = 2018-7-13,
          equals = 2018-7-19,
          equals = 2018-7-27,
          equals = 2018-7-6,
          equals = 2018-8-11,
          equals = 2018-8-18,
          equals = 2018-8-26,
          equals = 2018-8-4,
          equals = 2018-9-17,
          equals = 2018-9-25,
          equals = 2018-9-3,
          equals = 2018-9-9,
          equals = 2018-10-16,
          equals = 2018-10-2,
          equals = 2018-10-24,
          equals = 2018-10-31,
          equals = 2018-10-9,
          equals = 2018-11-15,
          equals = 2018-11-23,
          equals = 2018-11-30,
          equals = 2018-11-7,
          equals = 2018-12-15,
          equals = 2018-12-22,
          equals = 2018-12-29,
          equals = 2018-12-7,
         ) [day text = \moon\,\%d-];};
  \end{tikzpicture}

Then the last starting moon phase is restored and the other side is printed:

  \restoremoon

  \begin{tikzpicture}
    \node[bgstyle] (a) {};
    \node [rightnode] at (a.south east) {\tikz\calendar [
      everycal,
      month label left vertical,
      every month/.append style={yshift=1em,},
      ]
      if (weekend) [hcol]
      if (
          equals = 2018-6-21,
          equals = 2018-12-21,
         ) [day text = \sun\,\%d-]
      if (equals = 2018-3-25) [day text = \tfont f\normalfont\,\%d-]
      if (equals = 2018-10-28) [day text = \tfont b\normalfont\,\%d-]
      if (
          equals = 2018-1-2,
          equals = 2018-1-8,
          equals = 2018-1-17,
          equals = 2018-1-24,
          equals = 2018-1-31,
          equals = 2018-2-7,
          equals = 2018-2-15,
          equals = 2018-2-23,
          equals = 2018-3-17,
          equals = 2018-3-2,
          equals = 2018-3-24,
          equals = 2018-3-31,
          equals = 2018-3-9,
          equals = 2018-4-16,
          equals = 2018-4-22,
          equals = 2018-4-30,
          equals = 2018-4-8,
          equals = 2018-5-15,
          equals = 2018-5-22,
          equals = 2018-5-29,
          equals = 2018-5-8,
          equals = 2018-6-13,
          equals = 2018-6-20,
          equals = 2018-6-28,
          equals = 2018-6-6,
          equals = 2018-7-13,
          equals = 2018-7-19,
          equals = 2018-7-27,
          equals = 2018-7-6,
          equals = 2018-8-11,
          equals = 2018-8-18,
          equals = 2018-8-26,
          equals = 2018-8-4,
          equals = 2018-9-17,
          equals = 2018-9-25,
          equals = 2018-9-3,
          equals = 2018-9-9,
          equals = 2018-10-16,
          equals = 2018-10-2,
          equals = 2018-10-24,
          equals = 2018-10-31,
          equals = 2018-10-9,
          equals = 2018-11-15,
          equals = 2018-11-23,
          equals = 2018-11-30,
          equals = 2018-11-7,
          equals = 2018-12-15,
          equals = 2018-12-22,
          equals = 2018-12-29,
          equals = 2018-12-7,
         ) [day text = \moon\,\%d-];};
  \end{tikzpicture}

}

\end{document}

Of course, this could be automated even further, but for my purpose it is the optimum effort-wise.

The output when run through LuaLaTeX looks like below. What you cannot see is that the dates are printed on a semi-opaque rectangle, which will become important at a later stage.

03-strip

In the LaTeX code, I defined a new font called “summertimes” that is used to print little symbols at the dates where the standard time is shifted to summer time and vice versa. Since I did not find suitable symbols, I decided to design them by myself and make a font file out of it that can be used with TeX (as seen above) and with Scribus as well.

Marking the daylight saving time shifts

to be continued …

15 Likes

Not only is this legal, it’s also a great honour!

2 Likes

This is awesome and a great example of why we like CC0 for licencing!

1 Like

Glad that you feel like that. Unfortunately, the chance to become famous by being published in the first PlayRaw calendar ever is very limited, the current circulation is 1.

Knowing that the pictures in the PlayRaw threads are usually CC licensed, I did not check every picture’s exact license terms, and especially I did not check the compatibility of the licenses. An “-sa” type CC license the derived creation has to be licensed under the same terms, which makes things complicated (Not that I dislike this GPL like term, it is just and simply more complicated. As in ZFS on Linux.). What I also may have done is violating single license terms such as listing the original authors within the creation, but I had only 13 pages to fill and I put the list here already. Anyway, with the tutorial project I think I am safe so far :-).

Actually, in general PlayRaws are CC-BY-SA.

this is a great idea, thanks for sharing! I’m already waiting for the next parts…

2 Likes

Thanks, @agriggio! The next part will take some time. It involves a screencast and during the production I found out that I am mumbling very strong when speaking English. While this is good to know (I was not aware, despite speaking English at work every day for more than 8 years), it delays the release since I have to do all the spoken parts often enough to be understandable.

1 Like

Hm, one year later and in preparation of the 2019 calendars, I must admit that I totally failed finishing this tutorial, and, even worse, I did never provide the actual calendar. I am still planning to finish this stuff, when life’s a bit more calm again. However, please find last year’s calendar here:

PlayRaw_Calendar_2018.pdf (26.2 MB)

1 Like

Perhaps just dump as a first step all your files to github.

1 Like

@chris Was curious when you would start talking about your next project. Have fun! :slight_smile:

It’s out now :smile:.