summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/calxxxx-yyyy
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/calxxxx-yyyy
Initial commit
Diffstat (limited to 'macros/latex/contrib/calxxxx-yyyy')
-rw-r--r--macros/latex/contrib/calxxxx-yyyy/README126
-rw-r--r--macros/latex/contrib/calxxxx-yyyy/cal2019-2036_DE.pdfbin0 -> 109885 bytes
-rw-r--r--macros/latex/contrib/calxxxx-yyyy/cal2019-2036_DK.pdfbin0 -> 109934 bytes
-rw-r--r--macros/latex/contrib/calxxxx-yyyy/cal2019-2036_EN.pdfbin0 -> 108307 bytes
-rw-r--r--macros/latex/contrib/calxxxx-yyyy/calxxxx-yyyy-doc.pdfbin0 -> 107702 bytes
-rw-r--r--macros/latex/contrib/calxxxx-yyyy/calxxxx-yyyy-doc.tex71
-rw-r--r--macros/latex/contrib/calxxxx-yyyy/calxxxx-yyyy.tex356
7 files changed, 553 insertions, 0 deletions
diff --git a/macros/latex/contrib/calxxxx-yyyy/README b/macros/latex/contrib/calxxxx-yyyy/README
new file mode 100644
index 0000000000..caeb2102dc
--- /dev/null
+++ b/macros/latex/contrib/calxxxx-yyyy/README
@@ -0,0 +1,126 @@
+README for calxxxx-yyyy, 2019/01/01, v20.19a
+
+
+TABLE OF CONTENTS
+=================
+
+1 Introduction
+2 Download
+3 Installation
+4 Additional Packages
+5 Author/Maintainer
+6 Bug Reports
+7 Known Problems
+
+
+1 INTRODUCTION
+==============
+
+To print a calendar for some given years, use the \textsf{calxxxx-yyyy.tex}
+file. LaTeXe it, type in the year to start with (for example 2019), the
+year to end with (for example 2036), and the calendars for those years are
+produced.
+
+It is possible to print the calendars in different languages.
+Currently English (with week running from Sunday to Saturday),
+and Danish and German (with week running from Monday to Sunday) are supported,
+but other languages can be added. (When you did a translation, please send
+an e-mail with it to Martin DOT Muench AT Uni-Bonn DOT de,
+so that it might be included in calxxxx-yyyy.tex, thanks!)
+
+Note: The code of this "package" is based on calxxxx.tex,
+which is © 1999 Slobodan Jankovi\'{c} (Thanks!).
+
+This material is published under the LPPL 1.3c: 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. This version of this license is in
+http://www.latex-project.org/lppl/lppl-1-3c.txt
+and the latest version of this license is in
+http://www.latex-project.org/lppl.txt
+and version 1.3c or later is part of all distributions of LaTeX version
+2005/12/01 or later.
+
+
+2 DOWNLOAD
+==========
+
+'calxxxx-yyyy' is available on CTAN:
+https://www.ctan.org/pkg/calxxxx-yyyy
+
+Also a ZIP file is provided that contains the files:
+the manual (calxxxx-yyyy-doc.tex, calxxxx-yyyy-doc.pdf),
+the compiled examples (cal2019-2036_DE.pdf, cal2019-2036_DK.pdf, and
+cal2019-2036_EN.pdf), calxxxx-yyyy.tex,
+and this README:
+http://mirrors.ctan.org/macros/latex/contrib/calxxxx-yyyy.zip
+
+
+3 INSTALLATION
+==============
+
+a) Download the calxxxx-yyyy files from CTAN.
+ If necessary, unpack them.
+b) Install the file `calxxxx-yyyy.tex' in your TDS tree:
+ cp calxxxx-yyyy.tex TDS:tex/latex/calxxxx-yyyy/
+ Replace `TDS:' by the prefix of your TDS tree
+ (texmf directory).
+c) Create the documentation, if necessary, e.g.
+ pdflatex calxxxx-yyyy-doc.tex
+d) Update the databases if necessary, e.g. for teTeX:
+ mktexlsr .../texmf
+e) Copy the documentation files to
+ "TDS:doc/latex/calxxxx-yyyy/":
+ README, calxxxx-yyyy-doc.tex, calxxxx-yyyy-doc.pdf
+ (and e.g. cal2019-2036_DE.pdf, cal2019-2036_DK.pdf,
+ and cal2019-2036_EN.pdf).
+
+
+4 ADDITIONAL PACKAGES
+=====================
+
+calxxxx-yyyy itself loads these other packages:
+babel, geometry, and arry,
+which again load other packages
+(see the result of the \listfiles command in the log-file
+ of the example).
+
+
+5 AUTHOR/MAINTAINER
+=====================
+
+ H.-Martin Münch
+
+
+6 BUG REPORTS
+==============
+
+A bug report should contain:
+* Comprehensive problem description. This includes error or
+ warning messages.
+* \errorcontextlines=\maxdimen can be added in the
+ TeX code to get more information in TeX error messages.
+* Minimal test file that shows the problem, but does not
+ contain any unnecessary packages and code.
+* Used drivers/programs.
+* Version information about used packages and programs.
+* If you are using LaTeX, then add "\listfiles". Then
+ a list of version information is printed at the end
+ of the LaTeX run.
+* Please no other files than the minimal test file.
+ The other files .log, .dvi, .ps, .pdf are seldom
+ necessary, so send them only on request.
+* Please .zip or .tar.gz your file(s) before sending them!
+
+Bug address
+-----------
+Bug reports can be send to the maintainer:
+ H.-Martin Münch
+ <Martin [dot] Muench [at] Uni-Bonn [dot] de>
+
+
+7 KNOWN PROBLEMS
+=================
+
+* If you request too many years (more than about 141) at once,
+ (La)TeX will run out of memory (unless you increase that). \ No newline at end of file
diff --git a/macros/latex/contrib/calxxxx-yyyy/cal2019-2036_DE.pdf b/macros/latex/contrib/calxxxx-yyyy/cal2019-2036_DE.pdf
new file mode 100644
index 0000000000..8644488173
--- /dev/null
+++ b/macros/latex/contrib/calxxxx-yyyy/cal2019-2036_DE.pdf
Binary files differ
diff --git a/macros/latex/contrib/calxxxx-yyyy/cal2019-2036_DK.pdf b/macros/latex/contrib/calxxxx-yyyy/cal2019-2036_DK.pdf
new file mode 100644
index 0000000000..b94d0d14e8
--- /dev/null
+++ b/macros/latex/contrib/calxxxx-yyyy/cal2019-2036_DK.pdf
Binary files differ
diff --git a/macros/latex/contrib/calxxxx-yyyy/cal2019-2036_EN.pdf b/macros/latex/contrib/calxxxx-yyyy/cal2019-2036_EN.pdf
new file mode 100644
index 0000000000..22aebfc8b5
--- /dev/null
+++ b/macros/latex/contrib/calxxxx-yyyy/cal2019-2036_EN.pdf
Binary files differ
diff --git a/macros/latex/contrib/calxxxx-yyyy/calxxxx-yyyy-doc.pdf b/macros/latex/contrib/calxxxx-yyyy/calxxxx-yyyy-doc.pdf
new file mode 100644
index 0000000000..ec28f487e8
--- /dev/null
+++ b/macros/latex/contrib/calxxxx-yyyy/calxxxx-yyyy-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/calxxxx-yyyy/calxxxx-yyyy-doc.tex b/macros/latex/contrib/calxxxx-yyyy/calxxxx-yyyy-doc.tex
new file mode 100644
index 0000000000..32a7c48afa
--- /dev/null
+++ b/macros/latex/contrib/calxxxx-yyyy/calxxxx-yyyy-doc.tex
@@ -0,0 +1,71 @@
+\documentclass{article}
+\usepackage[%
+ extension=pdf,%
+ plainpages=false,%
+ pdfpagelabels=true,%
+ hyperindex=false,%
+ pdflang={en},%
+ pdftitle={README for calxxxx-yyyy.tex},%
+ pdfauthor={H.-Martin Muench},%
+ pdfsubject={README for calxxxx-yyyy.tex},%
+ pdfkeywords={LaTeX, calxxxx-yyyy, H.-Martin Muench},%
+ pdfview=Fit,%
+ pdfstartview=Fit,%
+ pdfpagelayout=SinglePage,%
+ bookmarksopen=true%
+]{hyperref}[2012/11/06]% v6.83m
+\begin{document}
+\section*{\texttt{ReadMe} for cal$xxxx-yyyy$.tex file}
+Version: v20.19a\newline
+Date: 2019/01/01\newline
+\copyright{} 2010 - 2019 H.-Martin M\"{u}nch (Martin dot Muench at Uni-Bonn dot de)\newline
+
+\noindent This file explains the use of the \textsf{calxxxx-yyyy.tex} file,
+available at\newline
+\url{https://www.ctan.org/pkg/calxxxx-yyyy}.\newline
+\noindent For information about possible modifications and the mathematical background
+for the calculation of the calendar please see the README file of the original
+\textsf{calxxxx.tex} file. \textsf{calxxxx-yyyy.tex} is for \LaTeXe, and uses
+the \textsf{array.sty}, \textsf{babel.sty}, and \textsf{geometry.sty} packages.
+
+\hspace*{-1.98471pt}To print a calendar for some given years,
+use the \textsf{calxxxx-yyyy.tex} file. \LaTeXe{} it, type in the year to start with
+(for example 2019), the year to end with (for example 2036), and the calendars
+for those years are produced.
+
+It is possible to print the calendars in different languages. Currently
+English (with week running from Sunday to Saturday),
+and Danish and German (with week running from Monday to Sunday) are supported,
+but other languages can be added. (When you did a translation, please send
+an e-mail with it to {\nolinebreak Martin.Muench@Uni-Bonn.de,}
+so that it might be included in \textsf{calxxxx-yyyy.tex}, thanks!)\newline
+Everything else is as described in the README for \textsf{calxxxx.tex}.\newline
+The \textsf{calxxxx.tex} file is \copyright{} 1999 Slobodan Jankovi\'{c}.\newline
+\textsf{calxxxx-yyyy.tex} is published under the LPPL~1.3c: 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. This version of this license is in
+
+\url{https://www.latex-project.org/lppl/lppl-1-3c.txt}\newline
+and the latest version of this license is in
+
+\url{https://www.latex-project.org/lppl.txt}\newline
+and version 1.3c or later is part of all distributions of \LaTeX{} version
+2005/12/01 or later.
+
+The authors disclaim all warranties as to this software, whether expressed or
+implied, including without limitation any implied warranties of
+merchantability or fitness for a particular purpose.
+
+Thanks to \textsc{Michael Lodahl} for translation to Danish and
+to \textsc{Koloskov Gleb} for reporting a bug.
+
+\noindent Possible alternatives:
+\begin{description}
+\item[--] \url{https://www.ctan.org/pkg/calxxxx}
+\item[--] \url{https://www.ctan.org/pkg/kalender}
+\end{description}
+
+\noindent A list of my (H.-Martin M\"{u}nch) packages can be found at\newline
+\url{https://www.ctan.org/author/muench-hm}.
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/calxxxx-yyyy/calxxxx-yyyy.tex b/macros/latex/contrib/calxxxx-yyyy/calxxxx-yyyy.tex
new file mode 100644
index 0000000000..4458db57bf
--- /dev/null
+++ b/macros/latex/contrib/calxxxx-yyyy/calxxxx-yyyy.tex
@@ -0,0 +1,356 @@
+% calxxx-yyyy.tex
+% version: v20.19a
+% date: 2019/01/01
+%
+% Copyright (C) 2010 - 2019 H.-Martin M\"{u}nch (Martin dot Muench at Uni-Bonn dot de)
+% Portions of code copyrighted by Slobodan Jankovi\'{c}.
+% This file was invented in 1999 by Slobodan Jankovi\'{c}.
+% I was not able to reach him at slobodan@archimed.filfak.ni.ac.yu
+% (not surprisingly with a .yu address).
+% Thanks to the translators (see below) and the reporter of a bug: Koloskov Gleb.
+% Languages/Translations:
+% - English: Slobodan Jankovi\'{c}
+% - German (Deutsch): Martin M\"{u}nch
+% - Danish (Dansk): Michael Lodahl
+%
+% I updated Jankovi\'{c}'s file, so that it is possible to print the calendars
+% for different years and to use different languages (and therefore also use weeks
+% running from Monday to Sunday instead of Sunday to Saturday).
+%
+% Hint: Gernerally \newcommand would be better than \def, but because this is
+% no style file and the original code used \def, I did not want to change it.
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License (LPPL),
+% either version 1.3c of this license or (at your option) any later version.
+% This version of this license is in
+% http://www.latex-project.org/lppl/lppl-1-3c.txt
+% and the latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% The Current Maintainer of this work is H.-Martin Muench.
+%
+% This work consists of the main source files
+% calxxxx-yyyy.tex, README, and calxxxx-yyyy-doc.tex,
+% and the derived files
+% calxxxx-yyyy-doc.pdf, cal2019-2036_DE.pdf, cal2019-2036_DK.pdf,
+% and cal2019-2036_EN.pdf.
+%
+% In memoriam
+% Claudia Simone Barth + 1996/01/30
+% Tommy Muench + 2014/01/02
+% Hans-Klaus Muench + 2014/08/24
+%
+\documentclass[12pt,a4paper,danish,german,english]{report}
+% In the options you need to place the desired language at the last position.
+% Sorry for the inconvenience.
+\usepackage{babel}[2016/02/24]% v3.9q
+\selectlanguage{english}% Also possible: 'english', 'german', or 'danish'
+\usepackage[a4paper,textwidth=\paperwidth,textheight=\paperheight]{geometry}[2010/09/12]% v5.6
+\usepackage{array}[2014/10/28]% v2.4c
+\listfiles
+\thispagestyle{empty}
+
+% Counters, logical, and lengths
+% year, month, day of the week:
+\newcount\y
+\y=0\relax
+\newcount\m
+\m=0\relax
+\newcount\x
+\x=0\relax
+% temporary counters:
+\newcount\p
+\p=0\relax
+\newcount\q
+\q=0\relax
+\newif\ifleap % if leap year
+\newif\ifJulian % if Julian calendar
+\newif\ifZeroExist% if 0th year exist
+\newif\ifCmRule % cm rule at right
+\newlength{\Wd} % the widest name of days
+\setlength{\Wd}{0pt}
+\newlength{\Wdx} % temporary dim
+\setlength{\Wdx}{0pt}
+
+%========== Start of Safe Modifications =============
+% The following definitions are safe to change
+
+% Fonts for Year, Months and Days
+\def\yearfont{\normalsize\bfseries}
+\def\monthfont{\scriptsize\scshape}
+\def\dayfont{\tiny}
+
+% Language Dependent Definitions (B.C., A.D., months, and days)
+% Default language: English
+\def\BC{\ B.\,C.}\def\AD{}% 'B.C.' after a negative year, nothing after a positive
+
+\def\Jan{January} \def\Feb{February}\def\Mar{March} \def\Apr{April}
+\def\May{May} \def\Jun{June} \def\Jul{July} \def\Aug{August}
+\def\Sep{September}\def\Oct{October} \def\Nov{November}\def\Dec{December}
+
+\def\Sun{\textbf{S}} \def\Mon{\textbf{M}} \def\Tue{\textbf{T}} \def\Wen{\textbf{W}}
+\def\Thr{\textbf{T}} \def\Fri{\textbf{F}} \def\Sat{\textbf{S}}
+
+\iflanguage{english}{% That is already the default language. Nothing to be done.
+\typeout{Language \languagename ^^J}
+}{\iflanguage{german}{% Deutsch
+ \typeout{Language \languagename ^^J}
+ \def\BC{~v.~Chr.}\def\AD{}% 'B.C.' after a negative year, nothing after a positive
+
+ \def\Jan{Januar} \def\Feb{Februar}\def\Mar{M\"{a}rz}\def\Apr{April}
+ \def\May{Mai} \def\Jun{Juni} \def\Jul{Juli} \def\Aug{August}
+ \def\Sep{September}\def\Oct{Oktober}\def\Nov{November}\def\Dec{Dezember}
+
+ \def\Mon{\textbf{Mo}} \def\Tue{\textbf{Di}} \def\Wen{\textbf{Mi}}
+ \def\Thr{\textbf{Do}} \def\Fri{\textbf{Fr}} \def\Sat{\textbf{Sa}} \def\Sun{\textbf{So}}
+ }{\iflanguage{danish}{% Danish
+ \typeout{Language \languagename ^^J}
+ \def\BC{~f.~Kr.}\def\AD{}% 'B.C.' after a negative year, nothing after a positive
+
+ \def\Jan{Januar} \def\Feb{Februar}\def\Mar{Marts} \def\Apr{April}
+ \def\May{Maj} \def\Jun{Juni} \def\Jul{Juli} \def\Aug{August}
+ \def\Sep{September}\def\Oct{Oktober}\def\Nov{November}\def\Dec{December}
+
+ \def\Mon{\textbf{Ma}} \def\Tue{\textbf{Ti}} \def\Wen{\textbf{On}}
+ \def\Thr{\textbf{To}} \def\Fri{\textbf{Fr}} \def\Sat{\textbf{L{\o}}} \def\Sun{\textbf{S{\o}}}
+ }{% Not English, Danish or German. Place your translation here!
+ % Further down there is another place in the code which needs the "translation"
+ % for further languages, search for "Place your translation here!".
+ \typeout{Language \languagename \space not supported. Keeping the default: English.}
+ }
+ }
+ }
+
+% Margins and Spaces
+\setlength{\topmargin}{-1in}\setlength{\oddsidemargin}{-1in}% no margins
+\def\sm{\hspace{2pt}}% space between months
+
+% Select Gregorian/Julian calendar and zero/nonzero (default are both false)
+\Julianfalse % don't use Julian, use Gregorian calendar
+\ZeroExistfalse% zero year doesn't exist (before 1st is -1st year)
+%\Juliantrue % use Julian, don't use Gregorian calendar
+%\ZeroExisttrue% zero year exists (before 1st is 0th year)
+
+% Do you wish a cm rule? (default is false)
+\CmRulefalse% don't print the cm rule
+%\CmRuletrue% print the cm rule
+
+%========== End of Safe Modifications =============
+% It is not recommended to change anything below this line!
+
+% Set \x=the day of the week (0=Sunday, 1=Monday,...)
+\def\dayofweek#1{\m=#1 \x=\y% x:=y;
+\ifnum \x>0\else% if x<=0 then
+ \ifZeroExist \else \advance\x by 1 \fi% begin if not ZeroExist x:=y+1;
+ \q=\x \divide\q by 2800 \advance\q by -1% q:=x; q:=(q div 2800-1)*2800;
+ \multiply\q by 2800 \advance\x by -\q% x:=x-q
+\fi% end;
+\p=\x% p:=x;
+\q=\m \multiply \q by 3% q=m*31;
+\advance \x by \q \advance \x by 4% x:=x+q+4;
+\ifnum \m<3 \advance \p by -1 \else% if m<3 then p:=p-1 else
+ \q=\m \multiply\q by 4 \advance\q by 23% begin q:=(4*m+23) div 10;
+ \divide\q by 10 \advance\x by -\q% x:=x-q
+\fi% end;
+\q=\p \divide\q by 4 \advance\x by \q% q:=p div 4; x:=x+q;
+\ifJulian \else% if not Julian then
+ \divide\p by 100 \advance\p by 1% begin p:=p div 100+1;
+ \multiply\p by 3 \divide\p by 4% p:=p*3 div 4;
+ \advance\x by -\p% x:=x-p
+\fi% end;
+\p=\x \divide\p by 7 \multiply\p by 7% p:=(x div 7)*7;
+\advance \x by -\p}% x:=x-p;
+
+%Is \y a leap year?
+\def\setleap{\leapfalse \x=\y% leap:=false; x:=y;
+\ifnum \x<0% if x<0 then
+ \ifZeroExist \else \advance\x by 1 \fi% begin if not ZeroExist else x:=x+1
+\fi% end;
+\p=\x \divide\p by 4 \multiply\p by 4% p:=(x div 4)*4;
+\message{}%
+\ifnum \x=\p% if x=p then
+ \q=\x \divide\q by 100 \multiply\q by 100% begin q:=(x div 100)*100;
+ \ifnum \x=\q% if x=q then
+ \q=\x \divide\q by 400 \multiply\q by 400% begin q:=(x div 400)*400;
+ \ifnum \x=\q \leaptrue \fi% if x=q then leap:=true
+ \else \leaptrue% end else leap:=true
+\fi\fi}% end end
+
+% Defines all kind of rows
+\def\rows{%
+\def\rone{&1&8&15&22&29&}%rows for a month with 31 days
+\def\rtwo{&2&9&16&23&30&}\def\btwo{&&2&9&16&23&30}%
+\def\rthree{&3&10&17&24&31&}\def\bthree{&&3&10&17&24&31}%
+\def\rfour{&4&11&18&25&&}\def\bfour{&&4&11&18&25&}%
+\def\rfive{&5&12&19&26&&}\def\bfive{&&5&12&19&26&}%
+\def\rsix{&6&13&20&27&&}\def\bsix{&&6&13&20&27&}%
+\def\rseven{&7&14&21&28&&}\def\bseven{&&7&14&21&28&}%
+\ifnum\m=2% if February ...
+ \ifleap\else\def\rone{&1&8&15&22&&}\fi%if it isn't a leap year
+ \def\rtwo{&2&9&16&23&&}\def\btwo{&&2&9&16&23&}%
+ \def\rthree{&3&10&17&24&&}\def\bthree{&&3&10&17&24&}%
+\else% if other month with <=30 days ...
+ \ifnum\m=1\else\ifnum\m=3\else\ifnum\m=5\else\ifnum\m=7\else\ifnum\m=8\else
+ \ifnum\m=10\else\ifnum\m=12\else
+ \def\rthree{&3&10&17&24&&}\def\bthree{&&3&10&17&24&}%
+\fi\fi\fi\fi\fi\fi\fi\fi}
+
+% Calendar of a month
+
+\def\Month#1{% #1=month
+\setleap\dayofweek{#1}\rows% set leap, set \x=day of the week, and define all rows
+\setlength{\tabcolsep}{0pt}
+\begin{tabular*}{7em}{|>{\centering}p{\Wd}|@{\extracolsep{\fill}}rrrrrr|}
+\multicolumn{7}{l}{\sm\monthfont%print name of a month \m
+ \ifcase\m \or\Jan\or\Feb\or\Mar\or\Apr\or\May\or\Jun\or\Jul\or\Aug\or\Sep\or\Oct\or\Nov\or\Dec \fi}\\
+\hline
+\ifcase\x
+ \Sun\rone\\ \Mon\rtwo\\ \Tue\rthree\\ \Wen\rfour\\ \Thr\rfive\\ \Fri\rsix\\ \Sat\rseven\\ \or%if Sunday
+ \Sun\bseven\\ \Mon\rone\\ \Tue\rtwo\\ \Wen\rthree\\ \Thr\rfour\\ \Fri\rfive\\ \Sat\rsix\\ \or%if Monday
+ \Sun\bsix\\ \Mon\bseven\\ \Tue\rone\\ \Wen\rtwo\\ \Thr\rthree\\ \Fri\rfour\\ \Sat\rfive\\ \or%if Tuesday
+ \Sun\bfive\\ \Mon\bsix\\ \Tue\bseven\\ \Wen\rone\\ \Thr\rtwo\\ \Fri\rthree\\ \Sat\rfour\\ \or%if Wednesday
+ \Sun\bfour\\ \Mon\bfive\\ \Tue\bsix\\ \Wen\bseven\\ \Thr\rone\\ \Fri\rtwo\\ \Sat\rthree\\ \or%if Thursday
+ \Sun\bthree\\ \Mon\bfour\\ \Tue\bfive\\ \Wen\bsix\\ \Thr\bseven\\ \Fri\rone\\ \Sat\rtwo\\ \or%if Friday
+ \Sun\btwo\\ \Mon\bthree\\ \Tue\bfour\\ \Wen\bfive\\ \Thr\bsix\\ \Fri\bseven\\ \Sat\rone\\ \fi%if Saturday
+\hline
+\end{tabular*}}
+
+\iflanguage{english}{% English. Nothing to be done, default language.
+}{\iflanguage{german}{% Deutsch
+\def\Month#1{% #1=month
+\setleap\dayofweek{#1}\rows% set leap, set \x=day of the week, and define all rows
+\setlength{\tabcolsep}{0pt}
+\begin{tabular*}{7em}{|>{\centering}p{\Wd}|@{\extracolsep{\fill}}rrrrrr|}
+\multicolumn{7}{l}{\sm\monthfont%print name of a month \m
+ \ifcase\m \or\Jan\or\Feb\or\Mar\or\Apr\or\May\or\Jun\or\Jul\or\Aug\or\Sep\or\Oct\or\Nov\or\Dec \fi}\\
+\hline
+\ifcase\x
+ \Mon\btwo\\ \Tue\bthree\\ \Wen\bfour\\ \Thr\bfive\\ \Fri\bsix\\ \Sat\bseven\\ \Sun\rone\\ \or%
+ \Mon\rone\\ \Tue\rtwo\\ \Wen\rthree\\ \Thr\rfour\\ \Fri\rfive\\ \Sat\rsix\\ \Sun\rseven\\ \or%
+ \Mon\bseven\\ \Tue\rone\\ \Wen\rtwo\\ \Thr\rthree\\ \Fri\rfour\\ \Sat\rfive\\ \Sun\rsix\\ \or%
+ \Mon\bsix\\ \Tue\bseven\\ \Wen\rone\\ \Thr\rtwo\\ \Fri\rthree\\ \Sat\rfour\\ \Sun\rfive\\ \or%
+ \Mon\bfive\\ \Tue\bsix\\ \Wen\bseven\\ \Thr\rone\\ \Fri\rtwo\\ \Sat\rthree\\ \Sun\rfour\\ \or%
+ \Mon\bfour\\ \Tue\bfive\\ \Wen\bsix\\ \Thr\bseven\\ \Fri\rone\\ \Sat\rtwo\\ \Sun\rthree\\ \or%
+ \Mon\bthree\\ \Tue\bfour\\ \Wen\bfive\\ \Thr\bsix\\ \Fri\bseven\\ \Sat\rone\\ \Sun\rtwo\\ \fi%
+ \hline
+ \end{tabular*}}%
+ }{\iflanguage{danish}{% Danish
+ \renewcommand{\Month}[1]{% #1=month
+ \setleap\dayofweek{#1}\rows% set leap, set \x=day of the week, and define all rows
+ \setlength{\tabcolsep}{0pt}
+ \begin{tabular*}{7em}{|>{\centering}p{\Wd}|@{\extracolsep{\fill}}rrrrrr|}
+ \multicolumn{7}{l}{\sm\monthfont%print name of a month \m
+ \ifcase\m \or\Jan\or\Feb\or\Mar\or\Apr\or\May\or\Jun\or\Jul\or\Aug\or\Sep\or\Oct\or\Nov\or\Dec \fi}\\
+ \hline
+ \ifcase\x
+ \Mon\btwo\\ \Tue\bthree\\ \Wen\bfour\\ \Thr\bfive\\ \Fri\bsix\\ \Sat\bseven\\ \Sun\rone\\ \or%
+ \Mon\rone\\ \Tue\rtwo\\ \Wen\rthree\\ \Thr\rfour\\ \Fri\rfive\\ \Sat\rsix\\ \Sun\rseven\\ \or%
+ \Mon\bseven\\ \Tue\rone\\ \Wen\rtwo\\ \Thr\rthree\\ \Fri\rfour\\ \Sat\rfive\\ \Sun\rsix\\ \or%
+ \Mon\bsix\\ \Tue\bseven\\ \Wen\rone\\ \Thr\rtwo\\ \Fri\rthree\\ \Sat\rfour\\ \Sun\rfive\\ \or%
+ \Mon\bfive\\ \Tue\bsix\\ \Wen\bseven\\ \Thr\rone\\ \Fri\rtwo\\ \Sat\rthree\\ \Sun\rfour\\ \or%
+ \Mon\bfour\\ \Tue\bfive\\ \Wen\bsix\\ \Thr\bseven\\ \Fri\rone\\ \Sat\rtwo\\ \Sun\rthree\\ \or%
+ \Mon\bthree\\ \Tue\bfour\\ \Wen\bfive\\ \Thr\bsix\\ \Fri\bseven\\ \Sat\rone\\ \Sun\rtwo\\ \fi%
+ \hline
+ \end{tabular*}}%
+ }{% Neither English nor German nor Danish. Place your translation here!
+ \typeout{Language \languagename \space not supported. Keeping the default: English.}
+ }
+ }
+ }
+
+% Enter the years. Well, could be sensitive to language, too...
+\def\enteryear{\typeout{}
+\typeout{Enter the year (negative for B.C., 0th year does\ifZeroExist \else \space not\fi \space exist),}
+\typeout{with which to start the calendar!}\typeout{}
+\typeout{For the current year, \number\year , just press the ENTER key!}
+\loop
+ \typein[\Year]{}
+ \ifx \Year\empty \gdef\Year{\year} \fi
+ \y=\Year%
+ \leapfalse \ifnum \y=0 \ifZeroExist \else \leaptrue \fi\fi
+\ifleap \typeout{}\typeout{0th year doesn't exist! Maybe you want the year -1.} \repeat
+\typeout{}%
+\typeout{Enter the year (negative for B.C., 0th year does\ifZeroExist \else \space not\fi \space exist),}%
+\typeout{with which to end the calendar!}\typeout{}%
+\typeout{For the current year, \number\year , just press the ENTER key!}%
+\typeout{(More than 141 years will probably exceed TeX's memory.)}%
+\loop
+ \typein[\YearZ]{}
+ \ifx \YearZ\empty \gdef\YearZ{\year} \fi
+ \leapfalse \ifnum \y=0 \ifZeroExist \else \leaptrue \fi\fi
+ \ifnum\YearZ<\Year \typeout{}\typeout{Error: (Start-)Year must be before (End-)YearZ!} \gdef\YearZ{\Year} \fi
+ \ifleap \typeout{}\typeout{0th year doesn't exist! Maybe you want the year -1.} \repeat
+\typeout{}%
+\typeout{\ifJulian Julian \else Gregorian \fi Calendar for the years \number\y -\number\YearZ. }%
+\typeout{(Leap years are starred * .)}%
+\typeout{}}
+
+% Set \Wd to the widest name of the days
+\def\SetWidth{%
+\settowidth{\Wd} {\dayfont\Sun}% Wd:=width(Sun);
+\settowidth{\Wdx}{\dayfont\Mon}\ifdim\Wd<\Wdx \Wd=\Wdx \fi% if Wd<width(Mon) then Wd:=width(Mon);
+\settowidth{\Wdx}{\dayfont\Tue}\ifdim\Wd<\Wdx \Wd=\Wdx \fi% etc.
+\settowidth{\Wdx}{\dayfont\Wen}\ifdim\Wd<\Wdx \Wd=\Wdx \fi
+\settowidth{\Wdx}{\dayfont\Thr}\ifdim\Wd<\Wdx \Wd=\Wdx \fi
+\settowidth{\Wdx}{\dayfont\Fri}\ifdim\Wd<\Wdx \Wd=\Wdx \fi
+\settowidth{\Wdx}{\dayfont\Sat}\ifdim\Wd<\Wdx \Wd=\Wdx \fi}
+
+% Print the calendar for the given year
+\newcommand{\printyear}[1]{%
+\y=#1%
+\setleap%
+\ifleap\message{\the\y* ^^J}%
+\else\message{\the\y\space}%
+\fi%
+\begin{minipage}{.3\paperwidth}\dayfont% set font for the days
+{\sm \yearfont
+ \ifnum\y>0 \number\y\AD \else \ifZeroExist \the\y \else \p=-\y \number\p\BC\fi\fi
+ \ifJulian \ (Julian)\fi}\\[.5ex]% print year
+\SetWidth
+\Month{1}\sm\Month{2}\sm\Month{3}\\% print all months
+\Month{4}\sm\Month{5}\sm\Month{6}\\
+\Month{7}\sm\Month{8}\sm\Month{9}\\
+\Month{10}\sm\Month{11}\sm\Month{12}\par
+\end{minipage}}
+
+% Print cm scale at right
+\def\cmscale(#1,#2){\setlength{\unitlength}{1mm}
+\begin{picture}(0,0)(#1,#2)\scriptsize
+ \newcounter{cms}\put(-.3,71){cm}
+ \multiput(2,70)(0,-1){70}{\line(1,0){1}} \multiput(1,65)(0,-10){7}{\line(1,0){2}}
+ \multiput(0,70)(0,-10){8}{\line(1,0){3}}
+ \multiput(1,60.5)(0,-10){7}{\makebox(0,0)[b]{\addtocounter{cms}{1}\arabic{cms}}}
+\end{picture}}
+
+\newcounter{year}
+
+\begin{document}
+\noindent \enteryear
+\setcounter{year}{\y}
+\loop
+\printyear{\value{year}}
+ \ifnum \value{year}<\YearZ
+ \stepcounter{year}
+ \indent
+\repeat
+\message{^^J}\message{^^J}%
+\newline%
+\tiny{\indent Original calxxxx.\TeX{} \copyright{} 1999/12/19 Slobodan Jankovi\'{c}; %
+these calendars produced with calxxxx-yyyy 2019/01/01 v20.19a by \texttt{Martin.Muench@Uni-Bonn.de};%
+\newline\indent%
+\iflanguage{english}{English by Slobodan Jankovi\'{c}.}{%
+ \iflanguage{german}{Deutsch von H.-Martin M\"{u}nch.}{%
+ \iflanguage{danish}{Dansk af Michael Lodahl.}{%
+ (Unknown language/translator.)%
+ }
+ }
+ }
+}
+
+\ifCmRule\cmscale(8,35)\fi% Print cm rule
+\end{document} \ No newline at end of file