DIN-A4 doublesided year calendar
% 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的更多相关文章
- Java 时间类-Calendar、Date、LocalDate/LocalTime
1.Date 类 java.util.Date是一个"万能接口",它包含日期.时间,还有毫秒数,如果你只想用java.util.Date存储日期,或者只存储时间,那么,只有你知道哪 ...
- Js: Extensible Calendar Examples
http://ext.ensible.comhttps://github.com/bmoeskau/Extensiblehttps://github.com/TeamupCom/extensibleh ...
- Calendar类
Calendar类 注意:根据日历规则,如果想要这个月减去5天,那么则为: add(Calendar.Day,-5) 成员方法: public int get(int field):返回给定日历段的值 ...
- This month Calendar
package fourth;import java.text.DateFormatSymbols;import java.util.*;public class CalendarTest { pub ...
- calendar的一些操作
一.通过分析日期函数,根据日期进行一系列操作,例如:我们需要知道2个时间段中所有的日期等等. 由于Calendar 类是一个抽象类,因此我们不能通过new来获取该对象的实例.我们可以通过其类方法 ge ...
- java-String Date Calendar之间的转换
1.Calendar 转化 String Calendar calendat = Calendar.getInstance(); SimpleDateFormat sdf = new SimpleDa ...
- jQuery Ion.Calendar 日期/日历
在线实例 实例演示 默认 实例演示 每周第一天 实例演示 输入框插件 实例演示 HTML data 属性 实例演示 回调函数1 实例演示 回调函数2 使用方法 <div id="cal ...
- [java] 可视化日历的实现(基于Calendar类 )
写在前面 博文安排顺序如下 1.写在前面 2.源码 3.思路 4.相关知识 该小程序是对Date类及其相关类的复习 要求如下图:实现可视化日历 实现思路 1.先从键盘输入指定格式的字符串(str)2. ...
- WPF 点击Calendar后,需要点击两次按钮
主面板上有一个Calendar控件,点击选择了日期后,如果点击确认按钮,需要点击两次.这个问题的解决方法如下: private void calendar1_PreviewMouseUp(ob ...
随机推荐
- 最短路径-Dijkstra算法(转载)
注意:以下代码 只是描述思路,没有测试过!! Dijkstra算法 1.定义概览 Dijkstra(迪杰斯特拉)算法是典型的单源最短路径算法,用于计算一个节点到其他所有节点的最短路径.主要特点是以起始 ...
- moco操作
1.启动 单个文件启动:将jar包跟启动的文件放在一个文件夹下 命令:java -jar moco-runner-<version>-standalone.jar http -p 12 ...
- vs2013和vs2010的配置
win10下vs2013和vs2010的相关配置 ------made by siwuxie095 主要是推荐一些vs2013和vs2010的好用的插件和配色方案,下面主要是以vs2013示例 1.首 ...
- phpStudy3——往数据库中添加数据
前言: 前边介绍了查询数据库的方法,这里介绍下往数据库中添加数据的方法. 项目需求: 用户在前端页面输入的用户名和手机号码,点击提交后后端判断手机号码是否已经存在.如果不存在,那么插入数据库到数据库, ...
- 10-string类的length()返回值一起的问题
c++ string类length()(size())函数返回值–无符号数 首先,先来发现问题 string s = ""; for(int i = 0; i < s.len ...
- Spring框架的AOP技术(注解方式)
1. 步骤一:创建JavaWEB项目,引入具体的开发的jar包 * 先引入Spring框架开发的基本开发包 * 再引入Spring框架的AOP的开发包 * spring的传统AOP的开发的包 * sp ...
- Halcon小函数的封装和代码导出
一.Halcon小函数的封装和修改 1.名词解释: 算子:指Halcon中最基础.最底层的函数(即你看不到它的代码实现),一个算子只有一句话,例如threshold算子. 小函数:由多个算子组合成的函 ...
- js如何切割字符串
<script language="javascript"> str="2,2,3,5,6,6"; //这是一字符串 var strs= new A ...
- jquery节点获取
jQuery.parent(expr) 找父亲节点,可以传入expr进行过滤,比如$("span").parent()或者$("span").parent(& ...
- VMware workstation 设定开机引导等待时间
找到虚拟机磁盘文件所在的目录,编辑里面的扩展名为vmx文件,记事本即可操作,在末尾加入如下一行: bios.bootDelay = "20000" 这里的数字是毫秒,上面例子中的数 ...