% DIN-A4 doublesided year calendar
% Author: Robert Krause
% License : Creative Commons attribution license
% Submitted to TeXample.net on July
\documentclass[landscape,a4paper, ngerman, 10pt]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage{tikz} % Use the calendar.sty style %\usepackage{translator} % German Month and Day names
\usepackage{fancyhdr} % header and footer
\usepackage{fix-cm} % Large year in header \usepackage[landscape, headheight = 2cm, margin=.5cm,
top = .2cm, nofoot]{geometry}
\usetikzlibrary{calc}
\usetikzlibrary{calendar}
%%%<
\usepackage{verbatim}
\usepackage[tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}%
%%%>
\begin{comment}
:Title: A calender for doublesided DIN-A4
Tags: Calendar library;Calendars
:Author: Robert Krause An example how the calendar package can be used to provide
an doublesided calendar for the whole year.
\end{comment} \renewcommand*\familydefault{\sfdefault} % User defined
\def\year{}
% Names of Holidays are inserted by employing this macro
\def\termin##{
\node [anchor=north west, text width= .4cm] at
($(cal-#.north west)+(3em, 0em)$) {\tiny{#}};
} %Header
\renewcommand{\headrulewidth}{.0pt}
\setlength{\headheight}{10ex}
\chead{
\fontsize{}{}\selectfont\textbf{\year}
\Large\textbf{Calendar}\hfill
}
%Footer
\cfoot{\footnotesize\texttt{http://www.cnblogs.com/wangshixi12/}} \begin{document}
\pagestyle{fancy}
\begin{center}
\begin{tikzpicture}[every day/.style={anchor = north}]
\calendar[
dates=\year-- to \year--,
name=cal,
day yshift = 3em,
day code=
{
\node[name=\pgfcalendarsuggestedname,every day,shape=rectangle,
minimum height= .53cm, text width = .4cm, draw = black]{\tikzdaytext};
\draw (-.8cm, -.1ex) node[anchor = west]{\footnotesize%
\pgfcalendarweekdayshortname{\pgfcalendarcurrentweekday}};
},
execute before day scope=
{
\ifdate{day of month=}
{
% Shift right
\pgftransformxshift{.8cm}
% Print month name
\draw (,)node [shape=rectangle, minimum height= .53cm,
text width = .4cm, fill = white, text= black, draw = black, text centered]
{\textbf{\pgfcalendarmonthname{\pgfcalendarcurrentmonth}}};
}{}
\ifdate{workday}
{
% normal days are white
\tikzset{every day/.style={fill=white}}
% Vacation (Germany, Baden-Wuerrtemberg) gray background
\ifdate{between=-- and --}{%
\tikzset{every day/.style={fill=white}}}{}
\ifdate{between=-- and --}{%
\tikzset{every day/.style={fill=white}}}{}
\ifdate{between=-- and --}{%
\tikzset{every day/.style={fill=white}}}{}
\ifdate{between=-- and --}{%
\tikzset{every day/.style={fill=white}}}{}
\ifdate{between=-- and --}{%
\tikzset{every day/.style={fill=white}}}{}
\ifdate{between=-- and --}{%
\tikzset{every day/.style={fill=white}}}{}
}{}
% Saturdays and half holidays (Christma's and New year's eve)
\ifdate{Saturday}{\tikzset{every day/.style={fill=white}}}{}
\ifdate{equals=-}{\tikzset{every day/.style={fill=white}}}{}
\ifdate{equals=-}{\tikzset{every day/.style={fill=white}}}{}
% Sundays and full holidays
\ifdate{Sunday}{\tikzset{every day/.style={fill=white}}}{}
\ifdate{equals=-}{\tikzset{every day/.style={fill=white}}}{}
\ifdate{equals=-}{\tikzset{every day/.style={fill=white}}}{}
\ifdate{equals=-}{\tikzset{every day/.style={fill=white}}}{}
\ifdate{equals=-}{\tikzset{every day/.style={fill=white}}}{}
\ifdate{equals=-}{\tikzset{every day/.style={fill=white}}}{}
\ifdate{equals=-}{\tikzset{every day/.style={fill=white}}}{}
\ifdate{equals=-}{\tikzset{every day/.style={fill=white}}}{}
% Christian holidays
\ifdate{equals=--}{\tikzset{every day/.style={fill=white}}}{}
\ifdate{equals=--}{\tikzset{every day/.style={fill=white}}}{}
\ifdate{equals=--}{\tikzset{every day/.style={fill=white}}}{}
\ifdate{equals=--}{\tikzset{every day/.style={fill=white}}}{}
\ifdate{equals=--}{\tikzset{every day/.style={fill=white}}}{}
},
execute at begin day scope=
{
% each day is shifted down according to the day of month
\pgftransformyshift{-.*\pgfcalendarcurrentday cm}
}
];
\end{tikzpicture}
% Repeat the whole thing for the second page
\pagebreak
\begin{tikzpicture}[every day/.style={anchor = north}]
\calendar[dates=\year-- to \year--,
name=cal,
day yshift = 3em,
day code=
{
\node[name=\pgfcalendarsuggestedname,every day,shape=rectangle,
minimum height= .53cm, text width = .4cm, draw = black]{\tikzdaytext};
\draw (-.8cm, -.1ex) node[anchor = west]
{
\footnotesize\pgfcalendarweekdayshortname{\pgfcalendarcurrentweekday}
};
},
execute before day scope=
{
\ifdate{day of month=} {
% Shift right
\pgftransformxshift{.8cm}
% Print month name
\draw (,)node [shape=rectangle, minimum height= .53cm,
text width = .4cm, fill = white, text= black, draw = black, text centered]
{
\textbf{\pgfcalendarmonthname{\pgfcalendarcurrentmonth}}
};
}{}
\ifdate{workday}
{
\tikzset{every day/.style={fill=white}}
% Vacation (Germany Baden-Wuerrtemberg)
\ifdate{between=-- and --}{%
\tikzset{every day/.style={fill=white}}}{}
\ifdate{between=-- and --}{%
\tikzset{every day/.style={fill=white}}}{}
\ifdate{between=-- and --}{%
\tikzset{every day/.style={fill=white}}}{}
\ifdate{between=-- and --}{%
\tikzset{every day/.style={fill=white}}}{}
\ifdate{between=-- and --}{%
\tikzset{every day/.style={fill=white}}}{}
\ifdate{between=-- and --}{%
\tikzset{every day/.style={fill=white}}}{}
}{}
% Sundays and full holidays
\ifdate{Sunday}{\tikzset{every day/.style={fill=white}}}{}
\ifdate{equals=-}{\tikzset{every day/.style={fill=white}}}{}
\ifdate{equals=-}{\tikzset{every day/.style={fill=white}}}{}
\ifdate{equals=-}{\tikzset{every day/.style={fill=white}}}{}
\ifdate{equals=-}{\tikzset{every day/.style={fill=white}}}{}
\ifdate{equals=-}{\tikzset{every day/.style={fill=white}}}{}
\ifdate{equals=-}{\tikzset{every day/.style={fill=white}}}{}
\ifdate{equals=-}{\tikzset{every day/.style={fill=white}}}{}
},
execute at begin day scope=
{
% Each day is shifted down according to the day of month
\pgftransformyshift{-.*\pgfcalendarcurrentday cm}
}
]; \end{tikzpicture}
\end{center}
\end{document}

DIN-A4 doublesided year calendar的更多相关文章

  1. Java 时间类-Calendar、Date、LocalDate/LocalTime

    1.Date 类 java.util.Date是一个"万能接口",它包含日期.时间,还有毫秒数,如果你只想用java.util.Date存储日期,或者只存储时间,那么,只有你知道哪 ...

  2. Js: Extensible Calendar Examples

    http://ext.ensible.comhttps://github.com/bmoeskau/Extensiblehttps://github.com/TeamupCom/extensibleh ...

  3. Calendar类

    Calendar类 注意:根据日历规则,如果想要这个月减去5天,那么则为: add(Calendar.Day,-5) 成员方法: public int get(int field):返回给定日历段的值 ...

  4. This month Calendar

    package fourth;import java.text.DateFormatSymbols;import java.util.*;public class CalendarTest { pub ...

  5. calendar的一些操作

    一.通过分析日期函数,根据日期进行一系列操作,例如:我们需要知道2个时间段中所有的日期等等. 由于Calendar 类是一个抽象类,因此我们不能通过new来获取该对象的实例.我们可以通过其类方法 ge ...

  6. java-String Date Calendar之间的转换

    1.Calendar 转化 String Calendar calendat = Calendar.getInstance(); SimpleDateFormat sdf = new SimpleDa ...

  7. jQuery Ion.Calendar 日期/日历

    在线实例 实例演示 默认 实例演示 每周第一天 实例演示 输入框插件 实例演示 HTML data 属性 实例演示 回调函数1 实例演示 回调函数2 使用方法 <div id="cal ...

  8. [java] 可视化日历的实现(基于Calendar类 )

    写在前面 博文安排顺序如下 1.写在前面 2.源码 3.思路 4.相关知识 该小程序是对Date类及其相关类的复习 要求如下图:实现可视化日历 实现思路 1.先从键盘输入指定格式的字符串(str)2. ...

  9. WPF 点击Calendar后,需要点击两次按钮

    主面板上有一个Calendar控件,点击选择了日期后,如果点击确认按钮,需要点击两次.这个问题的解决方法如下:     private void calendar1_PreviewMouseUp(ob ...

随机推荐

  1. docker问题

    Docker报错 WARNING: IPv4 forwarding is disabled. Networking will not work. 解决办法: # vim /usr/lib/sysctl ...

  2. cmd 命令相关

    计算相关进程数: tasklist|find /i "cmd.exe" 安装git的可以 tasklist|find /i "cmd.exe"  | wc -l

  3. GEOquery

    1)介绍 来自NCBI的Gene Expression Omnibus(GEO)作为各种高通量实验数据的公共存储库. 这些数据包括基于单通道和双通道微阵列的实验,测量mRNA,基因组DNA和蛋白质丰度 ...

  4. all any some

    SQLServer中有三个关键字可以修改比较运算符:All.Any和Some,其中Some和Any等价. 他们作用于比较运算符和子查询之间,作用类似Exists.not exists.in.not i ...

  5. pip & Jinja2

    [pip&Jinja2] 2.7.9 以及上版本的 python 安装程序会自动安装 pip. 升级:pip install --upgrade pip. 使用pip安装Jinja2:sudo ...

  6. 安装Android模拟器

    说明:可以直接通过Android SDK目录下的SDK Manager.exe进行安装,我这里写的是通过下载各种文件进行安装的方法,没有通过SDK Manager.exe进行下载安装 一.下载以下内容 ...

  7. C#aspx页面前台使用<%=%>无法取到后台的值

    检查是不是有拼接问题,正常public和protected修饰的字段或属性均可使用<%=%>.另外,加载(Page_Load)时有没有给它们赋初始值? 答 1)前台页面只能调用本后置代码的 ...

  8. Plants vs. Zombies(二分好题+思维)

    Plants vs. Zombies http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5819 BaoBao and DreamG ...

  9. 浅谈python中的“ ==” 与“ is”

    在python中,== 与 is 之间既有区别,又有联系,本文将通过实际代码的演示,力争能够帮助读到这篇文章的朋友以最短的时间理清二者的关系,并深刻理解它们在内存中的实现机制.扯淡的话不多说,下面马上 ...

  10. 如何转换pdf文档为word文档--先标记下,本周把这个问题知识掌握

    http://developer.51cto.com/art/201803/567539.htm