summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tikz-kalender
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-12-19 22:11:39 +0000
committerKarl Berry <karl@freefriends.org>2018-12-19 22:11:39 +0000
commitfe1e22301d68e505cb457af831374d4db248cb09 (patch)
treeac72d3dd03155f5bea32ef32612b795b8e93f40c /Master/texmf-dist/tex/latex/tikz-kalender
parent0b54068ac56eda8a66df58c6d3bf60a708d9e655 (diff)
tikz-kalender (19dec18)
git-svn-id: svn://tug.org/texlive/trunk@49456 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tikz-kalender')
-rw-r--r--Master/texmf-dist/tex/latex/tikz-kalender/tikz-kalender.cls59
1 files changed, 31 insertions, 28 deletions
diff --git a/Master/texmf-dist/tex/latex/tikz-kalender/tikz-kalender.cls b/Master/texmf-dist/tex/latex/tikz-kalender/tikz-kalender.cls
index eb9859de086..5acb2f367f0 100644
--- a/Master/texmf-dist/tex/latex/tikz-kalender/tikz-kalender.cls
+++ b/Master/texmf-dist/tex/latex/tikz-kalender/tikz-kalender.cls
@@ -7,7 +7,7 @@
\setcounter{errorcontextlines}{100}
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-\ProvidesClass{tikz-kalender}[2017/05/17 v0.4b Calendar class (RN)]
+\ProvidesClass{tikz-kalender}[2018/12/18 v0.4d Calendar class (RN)]
\DeclareOption*{\OptionNotUsed}
\ProcessOptions\relax
@@ -137,7 +137,6 @@
\fi
\RequirePackage{babel,translator,tikz}
\input{tikz-kalender-translation.clo}
- %\usetikzlibrary{calc}
\usetikzlibrary{calendar}
}
@@ -206,7 +205,7 @@
}
\newcommand*\RN@formatEvent[2]{%
\RN@eventFont
- \def\RN@tempa{\strut\hfill#2}%
+ \def\RN@tempa{\strut#2}%
\settowidth\@tempdima{\mbox{\RN@tempa}}%
\ifdim\@tempdima>#1 %
\@tempdimb=\dimexpr\f@size pt %
@@ -214,7 +213,7 @@
\def\RN@tempa{\fontsize{\@tempdimb}{1.1\@tempdimb}\selectfont#2}%
\fi
\makebox[-50\RN@xunit][r]{\raisebox{0.55\totalheight}[\totalheight]{%
- \parbox[c]{#1}{\RaggedLeft\nointerlineskip\RN@tempa}}}%
+ \parbox[c]{#1}{\raggedleft\hskip\z@\RN@tempa}}}% \nointerlineskip
}
\newcommand*\RN@setFont[3][]{%
@@ -239,14 +238,9 @@
\pgfcalendar{}{#1}{#2}{%
\edef\RN@tempa{\pgfcalendarcurrentyear-\pgfcalendarcurrentmonth-%
\pgfcalendarcurrentday}%
- \@ifundefined{event@\RN@tempa}{%
- \let\RN@event@ii=\RN@event@ii@orig% activate again
- % period name as event entry for event-less days
- \event{\RN@tempa}{\RN@period@name}%
- \edef\RN@tempb{\noexpand\expandafter\noexpand\gdef\noexpand%
- \csname event@\RN@tempa\noexpand\endcsname{\RN@period@name}}%
- \RN@tempb
- }{}%
+ \let\RN@event@ii=\RN@event@ii@orig% activate temporarily
+ % period name as event entry for event-less days
+ \event{\RN@tempa}{\RN@period@name}%
}%
\fi
\endgroup
@@ -263,20 +257,25 @@
\def\RN@event@ii#1#2[#3]{%
\begingroup
\pgfkeys{/RN/event/.cd, #3}%
+ \@tempdima=\RN@eventwidthL
+ \ifRN@showweeknumbers
+ \pgfcalendarifdate{#1}{Monday}{\@tempdima=\RN@eventwidthS}{}%
+ \fi
\@ifundefined{event@#1}{%
- \@tempdima=\RN@eventwidthL
- \ifRN@showweeknumbers
- \pgfcalendarifdate{#1}{Monday}{\@tempdima=\RN@eventwidthS}{}%
- \fi
+ \expandafter\protected@xdef\csname event@#1\endcsname{#2}%
\protected@edef\@tempa{\noexpand\@ifundefined{pgf@sh@ns@cal-#1}{}{%
- \noexpand\node[anchor=south west,inner sep=0pt] at (cal-#1.south east){%
- \noexpand\RN@formatEvent{\the\@tempdima}{#2}};}%
+ \noexpand\node[anchor=south west,inner sep=0pt] at (cal-#1.south east){%
+ \noexpand\RN@formatEvent{\the\@tempdima}{%
+ \noexpand\csname event@#1\endcsname}};%
+ }
}%
- \expandafter\gdef\csname event@#1\endcsname{#2}%
\pgfcalendarifdate{#1}{at most=06-last}% first half-year?
- {\expandafter\g@addto@macro\expandafter\RN@events@I\expandafter{\@tempa}}%
- {\expandafter\g@addto@macro\expandafter\RN@events@II\expandafter{\@tempa}}%
- }{}%
+ {\expandafter\g@addto@macro\expandafter\RN@events@I\expandafter{\@tempa}}%
+ {\expandafter\g@addto@macro\expandafter\RN@events@II\expandafter{\@tempa}}%
+ }{%
+ \expandafter\protected@xdef\csname event@#1\endcsname{%
+ #2, \csname event@#1\endcsname}%
+ }
\if@tempswa
\edef\@tempa{%
\noexpand\ifdate{equals=#1}{\noexpand\tikzset{%
@@ -284,8 +283,9 @@
}%
\expandafter\g@addto@macro\expandafter\RN@backgrounds\expandafter{\@tempa}%
\fi
- \endgroup
+ \endgroup
}
+
\let\RN@event@ii@orig=\RN@event@ii
\newcommand\RN@makeKalender[2]{%
@@ -314,12 +314,14 @@
}{}%
\ifdate{workday}{\tikzset{every day/.style=%
{fill=\RN@workdayColor}}}{}%
- \RN@periods
+ %\RN@periods
\ifdate{Saturday}{\tikzset{every day/.style=%
{fill=\RN@saturdayColor}}}{}%
\ifdate{Sunday}{\tikzset{every day/.style=%
{fill=\RN@sundayColor}}}{}%
\RN@backgrounds
+ \RN@periods
+ %\RN@backgrounds
},%
execute at begin day scope={%
\pgftransformyshift{-\pgfcalendarcurrentday\RN@dayheight}%
@@ -339,16 +341,17 @@
}
\newcommand*\makeKalender{%
- \setcounter{weeknumber}{0}%
- \begingroup
+ \pgfcalendarifdate{\RN@year-01-01}{Tuesday,Wednesday,Thursday}{%
+ \setcounter{weeknumber}{1}}{\setcounter{weeknumber}{0}}%
+ \begingroup%
\let\year=\RN@year
- \def\RN@period@i##1##2[##3]{}% 1st loop: only the events
+ \def\RN@event@ii##1##2[##3]{}% 1st loop: only the periods
\def\do##1{\InputIfFileExists{##1.events}{}{}}%
\expandafter\docsvlist\expandafter{\RN@events@files}%
\endgroup
\begingroup
\let\year=\RN@year
- \def\RN@event@ii##1##2[##3]{}% 2nd loop: only the periods
+ \def\RN@period@i##1##2[##3]{}% 2nd loop: only the events
\def\do##1{\InputIfFileExists{##1.events}{}{}}%
\expandafter\docsvlist\expandafter{\RN@events@files}%
\endgroup