Making a Calendar for TUG

Well, this is not exactly what you want, but I was thinking about asking for calendars a few weeks ago in order to make it a Community Wiki, but finally I didn't. However, I post here my solution (which is far far away from being optimal, I encourage all of you to make it better —but, of course, without changing the appearance–). I repeat, may be it's not what you want.

The file is this:

\documentclass[border=4.9mm, multi={tikzpicture}]{standalone}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[T1]{fontenc}

% MCAL -------------------------------
\usepackage{mcal}
% MCAL -------------------------------

\begin{document}\estilodetexto% To set up \sffamily, \bfseries…
\thisyear{2013}% The year the calendar is about.
\colordelosfestivos{red}% The color of holidays.
\remaincolor{white}% The color under the top rectangle (where the title and the previous and next calendar are)
\resubcolor{white}% The color under the names of the week
\mooncounter=2% To set the first moon of the year (0,1,2,3)
\enero[7,14,21,28]{7}% The months …
\febrero[7,14,21,28]{1,2,3,7,9,25}
\marzo[7,14,21,28]{1,2,3,7,9,25}
\abril[7,14,21,28]{1,2,3,7,9,25}
\mayo[7,14,21,28]{1,2,3,7,9,25}
\junio[7,14,21,28]{1,2,3,7,9,25}
\julio[7,14,21,28]{1,2,3,7,9,25}
\agosto[7,14,21,28]{1,2,3,7,9,25}
\septiembre[7,14,21,28]{1,2,3,7,9,25}
\octubre[7,14,21,28]{1,2,3,7,9,25}
\noviembre[7,14,21,28]{1,2,3,7,9,25}
\diciembre[4,12,19,27]{6,8,25,31}
\end{document}

It uses a custom mcal.sty which I include later. The usage is easy, each month (now it's in spanish, but you get an idea) takes a mandatory argument, the days of the month which are holidays, separated by commas, and a optional argument, the days of the month with the moon phase.

enter image description here

You can see how it fully looks here.

Apart from that, the mcal.sty has this content:

\RequirePackage{tikz}
\usetikzlibrary{calc,calendar}
\RequirePackage{xcolor}

\def\estilodetexto{\sffamily\bfseries\LARGE}

\pgfmathtruncatemacro{\Year}{2013}%
\pgfmathtruncatemacro{\monthcounter}{12}% Diciembre
\pgfmathtruncatemacro{\oldYear}{\Year-1}%
\pgfmathtruncatemacro{\newYear}{\Year+1}%
\def\colorfestivos{red}
\def\maincolor{white}
\def\subcolor{white}

\def\remaincolor#1{%
\let\maincolor\relax%
\def\maincolor{#1}%
}

\def\resubcolor#1{%
\let\subcolor\relax%
\def\subcolor{#1}%
}

\def\colordelosfestivos#1{%
\let\colorfestivos\relax%
\def\colorfestivos{#1}%
}

\def\thisyear#1{%
\let\Year\relax%
\pgfmathtruncatemacro{\Year}{#1}%
}

\RequirePackage{etoolbox}
\RequirePackage{mathabx}

\newcommand*{\listadefestivos}[1]{%
    \def\festivos{}%
    \foreach \f in {#1} {%
        \xappto\festivos{if (day of month = \f) [\colorfestivos]}}%
}

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

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

\newcommand*{\listadelunas}[1]{%
    \def\lunas{}%
    \foreach \l in {#1} {%
        \xappto\lunas{if (day of month = \l) [day text=\noexpand\moon\%d-]}
    }%
}

\makeatletter%
\tikzoption{day headings}{\tikzstyle{day heading}=[#1]}
\tikzstyle{day heading}=[]
\tikzstyle{day letter headings}=[
    execute before day scope={ \ifdate{day of month=1}{%
        \pgfmathsetlength{\pgf@ya}{\tikz@lib@cal@yshift}%
        \pgfmathsetlength\pgf@xa{\tikz@lib@cal@xshift}%
        \pgftransformyshift{-\pgf@ya}
        \foreach \d/\l in {0/L,1/M,2/X,3/J,4/V,5/S,6/D}{
            \pgf@xa=\d\pgf@xa%
            \pgftransformxshift{\pgf@xa}%
            \pgftransformyshift{\pgf@ya}%
            \node[every day,day heading]{\estilodetexto\Large\l};%
            } 
        }{}%
    }%
]
\makeatother

\pagestyle{empty}

\def\Month{%
\ifnum\monthcounter=1%
    Enero\else
    \ifnum\monthcounter=2% 
        Febrero\else
        \ifnum\monthcounter=3% 
            Marzo\else
            \ifnum\monthcounter=4% 
                Abril\else
                \ifnum\monthcounter=5% 
                    Mayo\else
                    \ifnum\monthcounter=6% 
                        Junio\else
                        \ifnum\monthcounter=7% 
                            Julio\else
                            \ifnum\monthcounter=8% 
                                Agosto\else
                                \ifnum\monthcounter=9% 
                                    Septiembre\else
                                    \ifnum\monthcounter=10% 
                                        Octubre\else
                                        \ifnum\monthcounter=11% 
                                            Noviembre\else
                                            \ifnum\monthcounter=12% 
                                                Diciembre%
                                            \fi%
                                        \fi%
                                    \fi%
                                \fi%
                            \fi%
                        \fi%
                    \fi%
                \fi%
            \fi%
        \fi%
    \fi%
\fi%
}

\def\findemes{\ifnum\monthcounter=12%
    \pgfmathtruncatemacro{\monthcounter}{1} \else%
        \pgfmathtruncatemacro{\monthcounter}{\monthcounter+1}%
\fi%
}

\def\nuevapagina{\findemes%
%\newpage%
}

\newcommand\mes[2][]{
\begin{tikzpicture}%
% Cuadrícula
        \draw[fill opacity=1,fill=\maincolor] (0,20) rectangle (28,16);%
        \draw[fill opacity=1,fill=\subcolor] (0,15) rectangle (28,16);%
        \draw[xstep=4cm, ystep=2.5cm] (0,0) grid (28,15);%
        \draw[xstep=4cm, ystep=1cm] (0,15) grid (28,16);%
        \draw (0,20) rectangle (28,16);%
        \foreach \dia/\posicion in {Lunes/2,Martes/6,Miércoles/10,Jueves/14,Viernes/18,Sábado/22,Domingo/26}{%
        \node (\dia) at (\posicion,15.5) {\dia};%
        }%
% Calendario mes anterior       
        \node (titulocalanterior) at (2.75,19.5) {\Month};%
        \calendar (calanterior) [dates=\Year-12-01 to \Year-12-last,%
            day xshift=1em,%
            day yshift = 1em-1ex,%
            day text=\normalsize \%d-,%
            week list,%
            day letter headings] at (1.2,18.7);%

        \findemes%
% CALENDARIO PRINCIPAL
        \listadelunas{#1}%
        \listadefestivos{#2}%
        \calendar[dates=\Year-\monthcounter-1 to \Year-\monthcounter-last,%
            week list,%
            day xshift = 4cm,%
            day yshift = 2.5cm,%
            if = {(Sunday) [\colorfestivos]},%
            ] at (4,14.3) \festivos \lunas;%

        \node[scale=2] (Mtitle) at (14,18) {\Huge \Month{} de \Year};%

        \findemes%
% Calendario mes siguiente
        \node (titulocalsiguiente) at (25.05,19.5) {\Month};%
        \calendar (calsiguiente) [dates=\Year-\monthcounter-1 to \Year-\monthcounter-last,%
            day xshift=1em,%
            day yshift = 1em-1ex,%
            day text=\normalsize \%d-,%
            week list,%
            day letter headings] at (23.5,18.7);%
\end{tikzpicture}
\nuevapagina
}

\newcommand\enero[2][]{
\begin{tikzpicture}%
% Cuadrícula
        \draw[fill opacity=1,fill=\maincolor] (0,20) rectangle (28,16);%
        \draw[fill opacity=1,fill=\subcolor] (0,15) rectangle (28,16);%
        \draw[xstep=4cm, ystep=2.5cm] (0,0) grid (28,15);%
        \draw[xstep=4cm, ystep=1cm] (0,15) grid (28,16);%
        \draw (0,20) rectangle (28,16);%
        \foreach \dia/\posicion in {Lunes/2,Martes/6,Miércoles/10,Jueves/14,Viernes/18,Sábado/22,Domingo/26}{%
        \node (\dia) at (\posicion,15.5) {\dia};%
        }%
% Calendario mes anterior       
        \node (titulocalanterior) at (2.75,19.5) {\Month};%
        \calendar (calanterior) [dates=\oldYear-12-01 to \oldYear-12-last,%
            day xshift=1em,%
            day yshift = 1em-1ex,%
            day text=\normalsize \%d-,%
            week list,%
            day letter headings] at (1.2,18.7);%

        \findemes%
% CALENDARIO PRINCIPAL
        \listadelunas{#1}%
        \listadefestivos{#2}%
        \calendar[dates=\Year-\monthcounter-1 to \Year-\monthcounter-last,%
            week list,%
            day xshift = 4cm,%
            day yshift = 2.5cm,%
            if = {(Sunday) [\colorfestivos]},%
            ] at (4,14.3) \festivos \lunas;%

        \node[scale=2] (Mtitle) at (14,18) {\Huge \Month{} de \Year};%

        \findemes%
% Calendario mes siguiente
        \node (titulocalsiguiente) at (25.05,19.5) {\Month};%
        \calendar (calsiguiente) [dates=\Year-\monthcounter-1 to \Year-\monthcounter-last,%
            day xshift=1em,%
            day yshift = 1em-1ex,%
            day text=\normalsize \%d-,%
            week list,%
            day letter headings] at (23.5,18.7);%
\end{tikzpicture}
\nuevapagina
}

\let\febrero\mes%
\let\marzo\mes%
\let\abril\mes%
\let\mayo\mes%
\let\junio\mes%
\let\julio\mes%
\let\agosto\mes%
\let\septiembre\mes%
\let\octubre\mes%
\let\noviembre\mes%

\newcommand\diciembre[2][]{
\begin{tikzpicture}%
% Cuadrícula
        \draw[fill opacity=1,fill=\maincolor] (0,20) rectangle (28,16);%
        \draw[fill opacity=1,fill=\subcolor] (0,15) rectangle (28,16);%
        \draw[xstep=4cm, ystep=2.5cm] (0,0) grid (28,15);%
        \draw[xstep=4cm, ystep=1cm] (0,15) grid (28,16);%
        \draw (0,20) rectangle (28,16);%
        \foreach \dia/\posicion in {Lunes/2,Martes/6,Miércoles/10,Jueves/14,Viernes/18,Sábado/22,Domingo/26}{%
        \node (\dia) at (\posicion,15.5) {\dia};%
        }%
% Calendario mes anterior       
        \node (titulocalanterior) at (2.75,19.5) {\Month};%
        \calendar (calanterior) [dates=\Year-12-01 to \Year-12-last,%
            day xshift=1em,%
            day yshift = 1em-1ex,%
            day text=\normalsize \%d-,%
            week list,%
            day letter headings] at (1.2,18.7);%

        \findemes%
% CALENDARIO PRINCIPAL
        \listadelunas{#1}%
        \listadefestivos{#2}%
        \calendar[dates=\Year-\monthcounter-1 to \Year-\monthcounter-last,%
            week list,%
            day xshift = 4cm,%
            day yshift = 2.5cm,%
            if = {(Sunday) [\colorfestivos]},%
            ] at (4,14.3) \festivos \lunas;%

        \node[scale=2] (Mtitle) at (14,18) {\Huge \Month{} de \Year};%

        \findemes%
% Calendario mes siguiente
        \node (titulocalsiguiente) at (25.05,19.5) {\Month};%
        \calendar (calsiguiente) [dates=\newYear-\monthcounter-1 to \newYear-\monthcounter-last,%
            day xshift=1em,%
            day yshift = 1em-1ex,%
            day text=\normalsize \%d-,%
            week list,%
            day letter headings] at (23.5,18.7);%
\end{tikzpicture}
\nuevapagina
}

As you can see, it is very basic and uses tikz's calendar library.

EDIT: It's in spanish (+ a bit of english, it was done fast and without thinking so much, you will se a lot of randomness inside :P). I will try to translate it into english in the future.


I wrote one for 2012... but i was lacking material for 2013 since i was writing my thesis in the past months. http://www.disk0s1.de/posts/latex/texianischer-kalender/

I basically used the following macro:

\newcommand{\mymo}[3]{%
    \begin{minipage}{\textwidth}%
        \centering%
        \noindent\Huge\pgfcalendarmonthname{\value{tgmymo}}\normalsize\stepcounter{tgmymo}\\[1cm]%
        #3
    \end{minipage}\vfill\begin{minipage}{\textwidth}\centering
    %
    \begin{tikzpicture} \pgfcalendar{cal}{#1}{#2}{%
        \ifdate{workday}%
        {\tikzset{filling/.style={fill=black!05}}}%
        {\tikzset{filling/.style={fill=orange!20}}}
        %%
        \def\normal{\node (\pgfcalendarsuggestedname) at (\pgfcalendarcurrentweekday*2.5,0) [filling,  rectangle,rounded corners, text width=.1\textwidth,text height=.8cm ,align=right] {\\$\pgfcalendarcurrentday$};}%
        %%
        \ifdate{equals=2013-01-10}{\node (\pgfcalendarsuggestedname) at (\pgfcalendarcurrentweekday*2.5,0) [filling,  rectangle,rounded corners, text width=.1\textwidth ,text height=.8cm ,align=right,] {{\small D.  E. Knuth}\\$\pgfcalendarcurrentday$};}{\normal}%
        \ifdate{equals=2013-02-07}{\node (\pgfcalendarsuggestedname) at (\pgfcalendarcurrentweekday*2.5,0) [filling,  rectangle,rounded corners, text width=.1\textwidth ,text height=.8cm ,align=right,] {{\small L. Lamport}\\$\pgfcalendarcurrentday$};}{}%
        \ifdate{equals=2013-05-05}{\node (\pgfcalendarsuggestedname) at (\pgfcalendarcurrentweekday*2.5,0) [filling,  rectangle,rounded corners, text width=.1\textwidth ,text height=.8cm ,align=right,] {{\small Julia}\\$\pgfcalendarcurrentday$};}{}%
        %
        \ifdate{equals=2013-08-01}{\node (\pgfcalendarsuggestedname) at (\pgfcalendarcurrentweekday*2.5,0) [filling,  rectangle,rounded corners, text width=.1\textwidth ,text height=.8cm ,align=right,] {{\small Tobias}\\$\pgfcalendarcurrentday$};}{}%
        %
        \ifdate{Sunday}{\pgftransformyshift{-4.2em}}{}%
        };
        \end{tikzpicture}\end{minipage}\clearpage}

This sets the page with the calender, the content (picture etc.) shall be invoked as argument #3. Like this: \mymo{2013-01-01}{2013-01-last}{\input{jan.tex}}.

enter image description here

It was printed on 100g/m^2 DIN A4 paper with a high res laser printer and shipped to some of my friends.