Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to make a smaller distance between month label and day headings.

\documentclass{article}
\usepackage[top=3cm, bottom=3cm, left=2cm, right=1cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[serbian]{babel}
\usepackage{tikz}
\usetikzlibrary{calendar}
\usepackage{pdflscape}
\clearpage
\thispagestyle{empty}
\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/Ponedeljak,1/Utorak,2/Sreda,3/Četvrtak,4/Petak,5/Subota,6/Nedelja} {
        \pgf@xa=\d\pgf@xa%
        \pgftransformxshift{\pgf@xa}%
        \pgftransformyshift{\pgf@ya}%
        \node[every day,day heading]{\small\l};%
      } 
    }{}%
  }%
]

\makeatother%

\begin{document}
\begin{landscape}
\begin{center}
\begin{tikzpicture}[scale=6,font=\fontsize{25}{12}\selectfont\bfseries]
\calendar (mycal) [dates=2013-05-01 to 2013-05-31,week list,month label above centered,month text=\textcolor{black}{Maj} \%y-, day yshift = 0.4cm,
         day letter headings];
\draw[black, line width=2pt] (mycal-2013-05-08) circle (5pt) +(-5pt,-5pt) rectangle +(5pt,5pt) ;
\draw[black, line width=2pt] (mycal-2013-05-10) circle (5pt);
\draw[black, line width=2pt] (mycal-2013-05-12) circle (5pt);
\draw[black, line width=2pt] (mycal-2013-05-15) circle (5pt);
\draw[black, line width=2pt] (mycal-2013-05-17) circle (5pt);
\draw[black, line width=2pt] (mycal-2013-05-19) circle (5pt);
\draw[black, line width=2pt] (mycal-2013-05-22) circle (5pt);
\draw[black, line width=2pt] (mycal-2013-05-24) circle (5pt);

\end{tikzpicture}
\end{center}
\hfill \Large legenda \\

*Napomena\hfill \begin{tikzpicture}
\draw[black, line width=1pt] circle (6pt);
\end{tikzpicture}~~~termini

Termine je moguće iskoristiti do 8. juna.\hfill \begin{tikzpicture}
\draw[black, line width=1pt] circle (6pt)+(-6pt,-6pt) rectangle +(6pt,6pt);
\end{tikzpicture}~~~početak/kraj termina
\end{landscape}
\end{document}
share|improve this question

1 Answer 1

up vote 4 down vote accepted

If you add every month/.append style={yshift=-2cm} key to the \calendar options as the last one, you get

enter image description here

\calendar (mycal) [dates=2013-05-01 to 2013-05-31,
                   week list,
                   month label above centered,
                   month text=\textcolor{black}{Maj} \%y-, 
                  day yshift = 0.4cm,
                  day letter headings,
                  every month/.append style={yshift=-2cm}];
share|improve this answer
    
Thanks, i didn't knew where to put 'yshift'. –  user28597 May 12 '13 at 9:25
    
@user28597 Welcome to the club :) My pleasure. –  percusse May 12 '13 at 9:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.