%%	This is file 'termccal-de-doc.tex', Version 2017-08-03
%%	Copyright 2017 Sebastian Friedl <sfr682k@t-online.de>
%% 
%%	This work may be distributed and/or modified under the conditions of the LaTeX Project
%%	Public License, either version 1.3c of this license or (at your option) any later version.
%%	The latest version of this license is available at
%%		http://www.latex-project.org/lppl.txt
%%	and version 1.3c or later is part of all distributions of LaTeX version 2008-05-04 or later
%%
%%	This work has the LPPL maintenace status 'maintained'.
%%	The current maintainer of this work is Sebastian Friedl.
%%
%%	This work consists of the files termcal-de.sty and termcal-de-doc.tex
%%
%%	-------------------------------------------------------------------------------------------
%%
%%	The termcal-de package provides a German localization to the termcal package written by
%%	Bill Mitchell, which is intended to print a term calendar for use in planning a class.
%%
%%	-------------------------------------------------------------------------------------------
%%
%%	Please report bugs and other problems as well as suggestions for improvements
%%	to my email address (sfr682k@t-online.de).
%%
%%	-------------------------------------------------------------------------------------------

% !TeX spellcheck=en_US

% !TeX document-id = {681db40e-7a84-4428-b4f4-84e230e3ba79}
% !TeX program=lualatex
% !TeX TXS-program:compile=txs:///lualatex/[--shell-escape]


\documentclass[11pt]{ltxdoc}

\usepackage[utopia]{mathdesign}
\usepackage[no-math]{fontspec}
\usepackage{polyglossia}
\setdefaultlanguage{english}

\usepackage{csquotes}
\usepackage{hyperref}
\usepackage{minted}
\usepackage[english]{selnolig}

\parindent 0pt

\setmainfont[Numbers=OldStyle]{erewhon}
\setsansfont[Numbers=OldStyle,Scale=MatchLowercase]{Source Sans Pro}
\setmonofont[Scale=MatchLowercase]{OCR A Extended}

\usepackage[left=4.50cm,right=2.75cm,top=3.25cm,bottom=2.75cm,nohead]{geometry}

\hyphenation{}

\title{The \texttt{termcal-de} package \\ {\large\url{https://github.com/SFr682k/termcal-de}}}
\author{Sebastian Friedl \\ \href{mailto:sfr682k@t-online.de}{\ttfamily sfr682k@t-online.de}}
\date{2017/08/03}

\hypersetup{pdftitle={The termcal-de package},pdfauthor={Sebastian Friedl}}

\begin{document}
	\maketitle
	\thispagestyle{empty}
	
	\begin{center} \itshape
		Dedicated to everybody using this package.
	\end{center}
	
	\medskip
	\begin{abstract}
		\hspace{-1.5em}%
		The \texttt{termcal-de} package provides a German localization to the \texttt{termcal} package written by Bill Mitchell, which is intended to print a term calendar for use in planning a class.
	\end{abstract}
	
	
	\tableofcontents
	
	\clearpage
	
	
	\subsection*{Dependencies and other requirements}
	\addcontentsline{toc}{subsection}{Dependencies and other requirements}
	The \texttt{termcal-de} package requires \LaTeXe\ and the following packages:
	
	\medskip
	\DescribeMacro{termcal}
	The main \texttt{termcal} package
	
	\medskip
	\DescribeMacro{iftex}
	Detects the \LaTeX\ engine used to compile the current document
	
	
	\subsection*{License}
	\begin{small}
		\addcontentsline{toc}{subsection}{License}
		\textcopyright\ 2017 Sebastian Friedl
		
		\smallskip
		This work may be distributed and/or modified under the conditions of the \LaTeX\ Project Public License, either version 1.3c of this license or (at your option) any later version.
		
		\smallskip
		The latest version of this license is available at \url{http://www.latex-project.org/lppl.txt} and version 1.3c or later is part of all distributions of \LaTeX\ version 2008-05-04 or later.
		
		\smallskip
		This work has the LPPL maintenace status \enquote*{maintained}. The current maintainer of this work is Sebastian Friedl. \\
		This work consists of the following files:
		\begin{itemize} \itemsep 0pt
			\item \texttt{termcal-de.sty} and
			\item \texttt{termcal-de-doc.tex}
		\end{itemize}
	\end{small}



	\clearpage
	
	
	% DOCUMENTATION PART ----------------------------------------------------------------------
	
	\section{Using the package}
	Load the package with \mintinline{LaTeX}{\usepackage{termcal-de}}\footnote{To do so, the package has to be installed in a way \LaTeX\ is able to find it}. Now, \texttt{termcal-de} looks for \texttt{termcal} and loads it when necessary.
	
	\medskip
	\texttt{termcal-de} only adds a German localization to the \texttt{termcal} package. Please read the \href{http://mirrors.ctan.org/macros/latex/contrib/termcal/termcal.pdf}{\texttt{termcal} documentation} first, because the macros stay almost identical. The differences to plain \texttt{termcal} are listed in section \ref{differences}.
	
	
	\section{Differences to plain \texttt{termcal}} \label{differences}
	\texttt{termcal-de} does not only change the way the style is printed to the output, it also changes the date parameter's format expected by the standard \texttt{termcal} commands. \\
	In following, affected commands are listed:
	
	\begin{itemize}
		\item \mintinline{LaTeX}{\begin{calendar}{<starting date>}{<nr of weeks>}}
		\item \mintinline{LaTeX}{\options{<date>}{<option list>}}
		\item \mintinline{LaTeX}{\caltext{<date>}{<text>}}
	\end{itemize}
	
	Plain \texttt{termcal} expects \texttt{<starting date>} and \texttt{<date>} being given in \texttt{m/d/y} format (e.~g.~\texttt{4/16/17} for April 16, 2017). Due to redefinition in \texttt{termcal-de}, both arguments, \texttt{<starting~date>} and \texttt{<date>} have to be given in the \texttt{T.M.YYYY} format (for April~16, 2017: \texttt{16.4.2017}). \\
	See table \ref{dateformatcomp} for some examples.
	
	\begin{table}[h] \centering \small \renewcommand{\arraystretch}{1.25}
		\begin{tabular}{cc}
			\textbf{plain \texttt{termcal}} & \textbf{with \texttt{termcal-de} package} \\\hline
			\mintinline{LaTeX}{\begin{calendar}{3/16/11}{4}} & \mintinline{LaTeX}{\begin{calendar}{16.3.2011}{4}} \\
			\mintinline{LaTeX}{\options{12/21/12}{\noclass}} & \mintinline{LaTeX}{\options{21.12.2012}{\noclass}} \\
			\mintinline{LaTeX}{\caltext{2/17/18}{Exam}} & \mintinline{LaTeX}{\caltext{17.2.2018}{Exam}} \\
			\hspace{.45\textwidth} & \hspace{.45\textwidth}
		\end{tabular}
		\vspace{-1.5em}
		
		\caption{\small Comparison between plain \texttt{termcal} and \texttt{termcal} extended with  \texttt{termcal-de}}
		\label{dateformatcomp}
	\end{table}
	
	
	\section{Additional information}
	\subsection{Using short month names}
	By default, \texttt{termcal-de} prints long month names (e.~g.~\enquote{Januar}) when a new month starts. Passing the \texttt{shortmonth} option to the \mintinline{LaTeX}{\usepackage{termcal-de}} command switches to printing short month names (e.~g.~\enquote{Jan} for \enquote{Januar}).
	
	\subsection{Printing the current date}
	Inside a cell you can print the current date with the \mintinline{LaTeX}{\currentdate} command. It produces something like \enquote{9.~Februar~2000}.
\end{document}