Producing a calendar
Self-made calendars can be a great gift. Also, for work and education, it would be great to have our own customized calendar.
In this recipe, we will print a calendar of a whole year, with all months arranged in a tabular layout. You can adjust it to print just one month below an image, for example.
How to do it...
We will use the mighty TikZ bundle again, since it provides a calendar library:
Set up
document
class and page dimensions. Furthermore, change toempty
pagestyle to not have page numbering:\documentclass{article} \usepackage[margin = 2.5cm, a4paper]{geometry} \pagestyle{empty}
Load TikZ and its libraries
calendar
andpositioning
:\usepackage{tikz} \usetikzlibrary{calendar,positioning}
To save the typing effort and for an easier change of year, define a macro for the year and one to call the TikZ
\calendar
command:\newcommand{\calyear}{2016} \newcommand{\mon}[1]{\calendar[dates = \calyear-#1-01 to \calyear-#1-last] if (Sunday) [red];}
Now write the document containing...