no need to explicitly set the monthname again

This commit is contained in:
Sebastian Hugentobler 2014-12-12 10:33:03 +01:00
parent 5e3fec5b46
commit 5d71db889e
2 changed files with 38 additions and 25 deletions

View File

@ -5,7 +5,6 @@
%\usepackage{fontspec}
\usepackage[unicode]{hyperref}
\usepackage[margin=5mm,a4paper,portrait]{geometry}
%\input{calendardata}
\usepackage{calpage}
\pagestyle{empty}
@ -15,21 +14,27 @@
\renewcommand\familydefault{\ttdefault}
\def\pgfcalendarmonthname#1{
\translate{\ifcase#1\or Januar\or Februar\or März\or April\or
Mai\or Juni\or Juli\or August\or September\or Oktober\or
November\or Dezember\fi}
}
\begin{document}
\input{title}
\calpage{images/january}{2015-01-01}{2015-01-last}{Januar}
\calpage{images/february}{2015-02-01}{2015-02-last}{Februar}
\calpage{images/march}{2015-03-01}{2015-03-last}{März}
\calpage{images/april}{2015-04-01}{2015-04-last}{April}
\calpage{images/may}{2015-05-01}{2015-05-last}{Mai}
\calpage{images/june}{2015-06-01}{2015-06-last}{Juni}
\calpage{images/july}{2015-07-01}{2015-07-last}{Juli}
\calpage{images/august}{2015-08-01}{2015-08-last}{August}
%\calpage{September}{Burgdorf}{portrait}{2015-09-01}{2015-09-last}
%\calpage{Oktober}{Burgdorf}{portrait}{2015-10-01}{2015-10-last}
%\calpage{November}{Burgdorf}{portrait}{2015-11-01}{2015-11-last}
%\calpage{Dezember}{Burgdorf}{portrait}{2015-12-01}{2015-12-last}
\calpage{images/january}{2015-01-01}{2015-01-last}
\calpage{images/february}{2015-02-01}{2015-02-last}
\calpage{images/march}{2015-03-01}{2015-03-last}
\calpage{images/april}{2015-04-01}{2015-04-last}
\calpage{images/may}{2015-05-01}{2015-05-last}
\calpage{images/june}{2015-06-01}{2015-06-last}
\calpage{images/july}{2015-07-01}{2015-07-last}
\calpage{images/august}{2015-08-01}{2015-08-last}
%\calpage{images/september}{2015-09-01}{2015-09-last}
%\calpage{images/october}{2015-10-01}{2015-10-last}
%\calpage{images/november}{2015-11-01}{2015-11-last}
%\calpage{images/december}{2015-12-01}{2015-12-last}
\end{document}

View File

@ -37,12 +37,6 @@
%% End
%% Adapted from pgf source
\def\pgfcalendarmonthname#1{
\translate{\ifcase#1\or Januar\or Februar\or März\or April\or
Mai\or Juni\or Juli\or August\or September\or Oktober\or
November\or Dezember\fi}
}
\tikzstyle{month label above centered}=[
execute before day scope={
\ifdate{day of month=1}{
@ -60,6 +54,24 @@
}{}},
every month/.append style={anchor=base}
]
\tikzstyle{month label below centered}=[
execute before day scope={
\ifdate{day of month=1}{
{
\pgfmathsetlength{\pgf@xa}{\tikz@lib@cal@xshift}
\pgf@xb=\tikz@lib@cal@width\pgf@xa
\advance\pgf@xb by-\pgf@xa
\pgf@xb=.49\pgf@xb
\pgftransformxshift{\pgf@xb}
\pgftransformxshift{-\cellwidth/2}
\pgfmathsetlength{\pgf@y}{\tikz@lib@cal@yshift}
\pgftransformyshift{-19.2em}
\huge\tikzmonthcode
}
}{}},
every month/.append style={anchor=base}
]
%% End
\ExplSyntaxOn
@ -445,7 +457,7 @@
\ExplSyntaxOff
\newcommand{\calpage}[4]{
\newcommand{\calpage}[3]{
\offinterlineskip
\centering
\vbox{
@ -461,7 +473,7 @@
\begin{tikzpicture}[thick]
\calendar[dates=#2 to #3,
week list,
%month label below centered,
month label below centered,
month text=\textsc{\%mt},
day headings={font=\footnotesize},
day letter headings]
@ -483,10 +495,6 @@
\end{tikzpicture}
\end{center}
\end{minipage}
\begin{minipage}[b][0.130\textheight][t]{\textwidth}
\center\huge {#4}
\end{minipage}
}
}