% 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. Hibernate 中 联合主键映射 组合关系映射 大对象映射(或者说文本大对象,二进制数据大对象)

    Clob:文本大对象,最长4G Blob:二进制数据大对象,最长4G util: public class HibUtil { private static SessionFactory sessio ...

  2. mesos无执行器启动docker

    生成taskInfo task = mesos_pb2.TaskInfo() task_id = name task.task_id.value = task_id task.slave_id.val ...

  3. Mybatis中传入时间值

    <if test="search_content2 != null and search_content2 != ''"> AND add_time <![CDA ...

  4. 表单input中disabled提交后得不到值的解决办

    input 按钮的disabled属性,如果设置了,form表单提交后,后台接收不到input的value input的字段当为diabled时时无法获取数值得,所以最近不要用这个,我们可以用read ...

  5. Python locals() 函数

    Python locals() 函数  Python 内置函数 描述 locals() 函数会以字典类型返回当前位置的全部局部变量. 对于函数, 方法, lambda 函式, 类, 以及实现了 __c ...

  6. oracle的dmp数据文件的导出和导入以及创建用户

    关于dmp文件我们用的还是比较多的,dmp文件它是作为oracle导入和导出表使用的文件格式,今天就将dmp文件导出和导入进行学习. dmp文件导出 dmp文件导出用的比较多的一般是三种,他们分别是: ...

  7. UVa 1595 Symmetry(set)

    We call a figure made of points is left-right symmetric as it is possible to fold the sheet of paper ...

  8. 二叉树的层次遍历 · Binary Tree Level Order Traversal

    [抄题]: 给出一棵二叉树,返回其节点值的层次遍历(逐层从左往右访问) [思维问题]: [一句话思路]: 用queue存每一层 [输入量]:空: 正常情况:特大:特小:程序里处理到的特殊情况:异常情况 ...

  9. redis中multi和pipeline区别以及效率(推荐使用pipeline)

    手册得知 pipeline 只是把多个redis指令一起发出去,redis并没有保证这些指定的执行是原子的:multi相当于一个redis的transaction的,保证整个操作的原子性,避免由于中途 ...

  10. Linux中chown、chmod、chgrp

    1.chgrp (转变文件所属用户组) chgrp(转变文件所属用户组)change group chgrp 用户组 文件名 ###便是这个格了.若是整个目次下的都改,则加-R参数用于递归. 如:ch ...