Compare commits

..

No commits in common. "d3e3fd02c7be3eacde3540b867e74ac9ba098da0" and "46777623b4e38d5560f941ded311ced5e849ae9b" have entirely different histories.

25 changed files with 60 additions and 106 deletions

3
.gitignore vendored
View File

@ -1,5 +1,4 @@
.DS_Store .DS_Store
*~ *~
*.swp *.swp
build out/
.tmp

View File

@ -1,31 +0,0 @@
BUILD_DIR=build
TMP_DIR=.tmp
SRC_DIR=src
CALENDAR_DIR=calendars
CALENDAR_YEARS=$(wildcard ${CALENDAR_DIR}/*)
CALENDARS=$(patsubst %,${BUILD_DIR}/calendar-%.pdf,$(notdir ${CALENDAR_YEARS}))
.PHONY: directories calendars all
.DEFAULT_GOAL := all
directories: ${BUILD_DIR} ${TMP_DIR}
${BUILD_DIR}:
mkdir -p ${BUILD_DIR}
${TMP_DIR}:
mkdir -p ${TMP_DIR}
${BUILD_DIR}/calendar-%.pdf: directories ${CALENDAR_DIR}/%/images/* ${SRC_DIR}/*.tex ${SRC_DIR}/*.sty
cd ${SRC_DIR} && lualatex --jobname="calendar-$*" --output-directory="../${TMP_DIR}" "\def\calyear{$*} \def\caltitle{"$(file < ${CALENDAR_DIR}/$*/title)"} \input{calendar.tex}"
cp "${TMP_DIR}/calendar-$*.pdf" "${BUILD_DIR}/calendar-$*.pdf"
calendars: directories ${CALENDARS}
all: calendars
clean:
rm -rf ${BUILD_DIR}
rm -rf ${TMP_DIR}
%: ${BUILD_DIR}/calendar-%.pdf ;

View File

@ -1,33 +1,17 @@
# Calendar Generator # Calendar 2015
A calendar generator, built in LaTeX. The main work is done by the `calpage` A calendar for the year 2015, built in LaTeX. The main work is done by the `calpage` command which is based on the [birthday calendar example](www.texample.net/tikz/examples/birthday-calendar/) by Hakon Malmedal.
command which is based on the [birthday calendar example](www.texample.net/tikz/examples/birthday-calendar/) Of course the command is usaable for years to come, not only 2015 ;)
by Hakon Malmedal.
The images are licensed as [cc-by 4.0](ihttp://creativecommons.org/licenses/by/4.0/) The images are licensed as [cc-by 4.0](ihttp://creativecommons.org/licenses/by/4.0/) as is the command.
as is calpage.sty.
# Prerequisites # Prerequisites
- [LuaTeX](http://www.luatex.org/) - [LuaTeX](http://www.luatex.org/)
- make - some kind of shell if you want to use the build script (which does nothing fancy, it is mainly a memory hook)
# Usage # Usage
Generate the following folder structure: `calendars/{year}/images`. ```
./build
```
It is assumed that the images are named after the months of the year (in English) You'll find the generated pdf in a folder called *out*
and that there is one image called `title`.
Make a file `calendars/{year}/title` and write the calendar title into.
To build all run `make`.
To build only a specific year run for example `make 2015`.
# Configuration
Months and weekdays are in german, if you want to change that take a look at the
`pgfcalendarmonthname` definition in `calendar.tex` and the `day letter headings`
in `calpage.sty`. For holiday definitions, take a look at the end of `calpage.sty`.
I will make that easier to configure in a future version.
You'll find the generated pdfs in the `build` folder.
![a screenshot of december](screenshot.png)

5
build Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
mkdir -p ./out
lualatex --output-directory=out calendar.tex

41
calendar.tex Normal file
View File

@ -0,0 +1,41 @@
% !Mode:: "TeX:UTF-8"
\documentclass[fontsize=15pt]{scrartcl}
\usepackage{lmodern}
%\usepackage{fontspec}
\usepackage[unicode]{hyperref}
\usepackage[margin=5mm,a4paper,portrait]{geometry}
\PassOptionsToPackage{cmyk}{xcolor}
\usepackage[cmyk]{xcolor}
\usepackage{calpage}
\pagestyle{empty}
\definecolor{backcolour}{cmyk}{0.012, 0.012, 0.000, 0.020}
\pagecolor{backcolour}
\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}
\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}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 MiB

View File

@ -1 +0,0 @@
Traumlicht

View File

@ -1,7 +1,7 @@
% Based on the birthday calendar example by Hakon Malmedal % Based on the birthday calendar example by Hakon Malmedal
% http://www.texample.net/tikz/examples/birthday-calendar/ % http://www.texample.net/tikz/examples/birthday-calendar/
% %
% 2014 by Sebastian Hugentobler <shugentobler@vanwa.ch> % 2014 by Sebastian Hugentobler <shugentobler@nulda.ch>
\NeedsTeXFormat{LaTeX2e}[2011/06/27] \NeedsTeXFormat{LaTeX2e}[2011/06/27]
\ProvidesPackage{calpage}[2014/12/10 Calendar Page Package] \ProvidesPackage{calpage}[2014/12/10 Calendar Page Package]

View File

Before

Width:  |  Height:  |  Size: 2.8 MiB

After

Width:  |  Height:  |  Size: 2.8 MiB

View File

Before

Width:  |  Height:  |  Size: 5.2 MiB

After

Width:  |  Height:  |  Size: 5.2 MiB

View File

Before

Width:  |  Height:  |  Size: 652 KiB

After

Width:  |  Height:  |  Size: 652 KiB

View File

Before

Width:  |  Height:  |  Size: 636 KiB

After

Width:  |  Height:  |  Size: 636 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

Before

Width:  |  Height:  |  Size: 868 KiB

After

Width:  |  Height:  |  Size: 868 KiB

View File

Before

Width:  |  Height:  |  Size: 5.9 MiB

After

Width:  |  Height:  |  Size: 5.9 MiB

View File

Before

Width:  |  Height:  |  Size: 2.7 MiB

After

Width:  |  Height:  |  Size: 2.7 MiB

View File

Before

Width:  |  Height:  |  Size: 4.4 MiB

After

Width:  |  Height:  |  Size: 4.4 MiB

BIN
images/november.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 KiB

BIN
images/september.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 KiB

View File

Before

Width:  |  Height:  |  Size: 813 KiB

After

Width:  |  Height:  |  Size: 813 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 718 KiB

View File

@ -1,43 +0,0 @@
% !Mode:: "TeX:UTF-8"
\documentclass[fontsize=15pt]{scrartcl}
\usepackage{lmodern}
%\usepackage{fontspec}
\usepackage[unicode]{hyperref}
\usepackage[margin=5mm,a4paper,portrait]{geometry}
\PassOptionsToPackage{cmyk}{xcolor}
\usepackage[cmyk]{xcolor}
\usepackage{luatex85}
\def\pgfsysdriver{pgfsys-pdftex.def}
\usepackage{calpage}
\pagestyle{empty}
\definecolor{backcolour}{cmyk}{0.012, 0.012, 0.000, 0.020}
\pagecolor{backcolour}
\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{../calendars/\calyear/images/january}{\calyear-01-01}{\calyear-01-last}
\calpage{../calendars/\calyear/images/february}{\calyear-02-01}{\calyear-02-last}
\calpage{../calendars/\calyear/images/march}{\calyear-03-01}{\calyear-03-last}
\calpage{../calendars/\calyear/images/april}{\calyear-04-01}{\calyear-04-last}
\calpage{../calendars/\calyear/images/may}{\calyear-05-01}{\calyear-05-last}
\calpage{../calendars/\calyear/images/june}{\calyear-06-01}{\calyear-06-last}
\calpage{../calendars/\calyear/images/july}{\calyear-07-01}{\calyear-07-last}
\calpage{../calendars/\calyear/images/august}{\calyear-08-01}{\calyear-08-last}
\calpage{../calendars/\calyear/images/september}{\calyear-09-01}{\calyear-09-last}
\calpage{../calendars/\calyear/images/october}{\calyear-10-01}{\calyear-10-last}
\calpage{../calendars/\calyear/images/november}{\calyear-11-01}{\calyear-11-last}
\calpage{../calendars/\calyear/images/december}{\calyear-12-01}{\calyear-12-last}
\end{document}

View File

@ -1,15 +1,15 @@
\begin{titlepage} \begin{titlepage}
\begin{center} \begin{center}
\boxincludegraphics{width=\textwidth,height=1.1\textwidth}{../calendars/\calyear/images/title.jpg} \boxincludegraphics{width=\textwidth,height=1.1\textwidth}{images/title.jpg}
\vspace{4mm} \vspace{4mm}
\rule{\linewidth}{0.5mm} \\[0.4cm] \rule{\linewidth}{0.5mm} \\[0.4cm]
{ \Huge \bfseries \calyear}\\ { \Huge \bfseries 2015}\\
\vspace{4mm} \vspace{4mm}
\rule{\linewidth}{0.5mm} \\[1.5cm] \rule{\linewidth}{0.5mm} \\[1.5cm]
\vspace{2mm} \vspace{2mm}
{ \large \caltitle } { \large Traumlicht }
\end{center} \end{center}
\end{titlepage} \end{titlepage}