% % % % Here are some tweaks for localized labels: % http://tex.stackexchange.com/questions/13958/custom-calendar-using-tikz % \documentclass[12pt,a4paper]{article} \usepackage[utf8x]{inputenc} \usepackage[ukrainian]{babel} \usepackage[top=15mm,bottom=15mm,left=10mm,right=10mm]{geometry} \usepackage{tikz} \usetikzlibrary{calendar} % \usepackage{translator} \usepackage{pscyr} \usepackage{eso-pic} \def\Year{2013} \def\nextYear{2014} \def\xdayshift{1.6em} \def\xsmalldayshiftdelta{.2em} \def\ydayshift{1.2em} \begin{document} \thispagestyle{empty} \makeatletter \def\markbirthday#1{\node [birthday] {#1}} \def\markchurchholiday#1{\node [churchholiday] {#1}} \tikzset{% birthday/.style={ color=black!0, % hide the number draw=red, inner sep=.2em, rounded corners=.25em, yshift=.5mm, }} \tikzset{% churchholiday/.style={ color=red, draw=red!30, inner sep=.2em, rounded corners=.25em, fill=yellow!30, }} \tikzstyle{week list vert}=[ execute before day scope= {\ifdate{day of month=1}{ \pgftransformyshift{-\ydayshift*\pgfcalendarcurrentweekday}}{}}, execute after day scope= {\ifdate{Sunday}{ \ifnum\pgfcalendarifdateday<3\pgftransformxshift{\xdayshift-\xsmalldayshiftdelta} \else\pgftransformxshift{\xdayshift}\fi \pgftransformyshift{\ydayshift*6}} % not Sunday, shift down: {\pgftransformyshift{-\ydayshift}} }, if={(Sunday)[red]}, if={(Saturday)[black!50]} ] % some Ukrainian state holidays: \tikzstyle{statehols}=[ if={(equals=01-07) [red]}, if={(equals=01-08) [red]}, if={(equals=03-08) [red]} ] % some Church holidays (fixed dates): \tikzstyle{churchholsconst}=[ if={(equals=01-07) [churchholiday]}, if={(equals=01-19) [churchholiday]}, if={(equals=02-15) [churchholiday]}, if={(equals=04-07) [churchholiday]}, if={(equals=08-19) [churchholiday]}, if={(equals=08-28) [churchholiday]}, if={(equals=09-14) [churchholiday]}, if={(equals=12-04) [churchholiday]} ] % some Church holidays (movable dates): \tikzstyle{churchholsthis}=[ % some for 2011: %if={(equals=04-17) {\markchurchholiday\pgfcalendarifdateday;}}, %if={(equals=04-24) {\markchurchholiday\pgfcalendarifdateday;}}, ] % some Church holidays (movable dates), next year: \tikzstyle{churchholsnext}=[ ] % some birthdays: \tikzstyle{birthdays}=[ if={(equals=01-02) {\markbirthday\pgfcalendarifdateday;}}, if={(equals=12-26) {\markbirthday\pgfcalendarifdateday;}} % etc-etc... ] \tikzset{draw week/.style={ execute before day scope={\ifdate{day of month=1}{\drawweek}{}}}} \tikzset{draw week right/.style={ execute before day scope={\ifdate{end of month}{\drawweekright}{}}}} \tikzset{mycalendar/.style={ every day/.style={anchor=mid}, % statehols, % birthdays, % churchholsconst, month label above left, month text=\textcolor{red}{\textit{\textbf{\%mt}}}, % day text={\%d=}, week list vert }} \newcommand{\drawweek}{ \pgftransformyshift{\pgfcalendarcurrentweekday * \ydayshift} \foreach \d in {0,1,2,3,4,5,6}{ \node at (-15mm,-\ydayshift*\d-1mm) [anchor=base] { \textit{\pgfcalendarweekdayshortname{\d}}}; } \pgftransformyshift{-\pgfcalendarcurrentweekday * \ydayshift} } \newcommand{\drawweekright}{ \pgftransformyshift{\pgfcalendarcurrentweekday * \ydayshift} \foreach \d in {0,1,2,3,4,5,6}{ \node at (15mm,-\ydayshift*\d-1mm) [anchor=base] { \textit{\pgfcalendarweekdayshortname{\d}}}; } \pgftransformyshift{-\pgfcalendarcurrentweekday * \ydayshift} } \makeatother {\centering {\Huge\textcolor{blue}{\textbf{\textit{\Year}}}} \vskip1em \begin{tikzpicture} [every calendar/.style={ mycalendar, % birthdays, % statehols, % churchholsconst }] \matrix[column sep={4.5cm,between origins}, row sep=1em] { \calendar (mycal) [dates=\Year-01-01 to \Year-01-last,draw week]; & \calendar (mycal) [dates=\Year-02-01 to \Year-02-last]; & \calendar (mycal) [dates=\Year-03-01 to \Year-03-last]; \\ % ,draw week right]; \\ \calendar (mycal) [dates=\Year-04-01 to \Year-04-last,draw week]; & \calendar (mycal) [dates=\Year-05-01 to \Year-05-last]; & \calendar (mycal) [dates=\Year-06-01 to \Year-06-last]; \\ % ,draw week right]; \\ \calendar (mycal) [dates=\Year-07-01 to \Year-07-last,draw week]; & \calendar (mycal) [dates=\Year-08-01 to \Year-08-last]; & \calendar (mycal) [dates=\Year-09-01 to \Year-09-last]; \\ % ,draw week right]; \\ \calendar (mycal) [dates=\Year-10-01 to \Year-10-last,draw week]; & \calendar (mycal) [dates=\Year-11-01 to \Year-11-last]; & \calendar (mycal) [dates=\Year-12-01 to \Year-12-last]; \\ % ,draw week right]; \\ }; \end{tikzpicture} \vskip1cm {\LARGE \textcolor{blue}{\textbf{\textit{\nextYear}}}} \bigskip {\small \begin{tikzpicture}[every calendar/.style={ mycalendar, % birthdays, % statehols, % churchholsconst, % churchholsnext }] \matrix[column sep={3.7cm,between origins}, row sep=1em] { \calendar (mycal) [dates=\nextYear-01-01 to \nextYear-01-last,draw week]; & \calendar (mycal) [dates=\nextYear-02-01 to \nextYear-02-last]; & \calendar (mycal) [dates=\nextYear-03-01 to \nextYear-03-last]; \\ % ,draw week right]; \\ }; \end{tikzpicture} } % end of \small } % end of \centerling % pictures (snowmen, Claus, pine tree, other): \AddToShipoutPicture{% \AtPageLowerLeft{% \put(\LenToUnit{20mm},\LenToUnit{265mm}){% \includegraphics[height=2cm]{byreal/clnd2011-pine.pdf}} \put(\LenToUnit{70mm},\LenToUnit{265mm}){% \includegraphics[height=2cm]{byreal/clnd2011-claus.pdf}} \put(\LenToUnit{145mm},\LenToUnit{265mm}){% \includegraphics[height=2cm]{byreal/clnd2011-snowmen.pdf}} } } \end{document}