diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/calxxxx-yyyy/calxxxx-yyyy.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/calxxxx-yyyy/calxxxx-yyyy.tex | 126 |
1 files changed, 95 insertions, 31 deletions
diff --git a/Master/texmf-dist/doc/latex/calxxxx-yyyy/calxxxx-yyyy.tex b/Master/texmf-dist/doc/latex/calxxxx-yyyy/calxxxx-yyyy.tex index fff02021fc3..f0248067227 100644 --- a/Master/texmf-dist/doc/latex/calxxxx-yyyy/calxxxx-yyyy.tex +++ b/Master/texmf-dist/doc/latex/calxxxx-yyyy/calxxxx-yyyy.tex @@ -1,17 +1,25 @@ % calxxx-yyyy.tex -% file version: v1.0a -% file date: 2010/09/20 -% documentation date: 2010/09/20 +% file version: v1.0b +% file date: 2010/09/26 +% documentation date: 2010/09/26 % % Copyright (C) 2010 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: Michael Lodahl % -% I updated this, 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). +% 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, either @@ -27,14 +35,18 @@ % % The Current Maintainer of this work is H.-Martin Muench. % -% This work consists of the main source files calxxxx-yyyy.tex and READMExxxx-yyyy.tex +% This work consists of the main source files calxxxx-yyyy.tex and README.tex % and the derived files -% READMExxxx-yyyy.pdf, cal2011-2028_DE.pdf, and cal2011-2028_EN.pdf. +% README.pdf, cal2010-2027_DE.pdf, cal2010-2027_DK.pdf, +% and cal2010-2027_EN.pdf. -\documentclass[12pt,a4paper,german,english]{report} -\usepackage[german,english]{babel} -\selectlanguage{english}% Also possible: german -\usepackage[a4paper,textwidth=\paperwidth,textheight=\paperheight]{geometry}[2010/03/13]% v5.3 +\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} +\selectlanguage{english}% Also possible: 'english', 'german', or 'danish' +\nofiles +\usepackage[a4paper,textwidth=\paperwidth,textheight=\paperheight]{geometry}[2010/07/13]% v5.5 %\paperwidth=597.50787pt %\paperheight=845.04684pt \usepackage{array} @@ -58,7 +70,7 @@ % 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\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} @@ -68,25 +80,41 @@ \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 -\def\BC{~v.~Chr.}\def\AD{}% ` B.C.' after a negative year, nothing after a positive + \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{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\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{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}} -}{% Neither English nor German. Place your translation here! -\typeout{Language \languagename \space not supported. Switching to default: English.} -}} + \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 +\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) @@ -127,6 +155,7 @@ \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 @@ -191,10 +220,31 @@ \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. Place your translation here! -\typeout{Language \languagename \space not supported. Switching to default: English.} -}} + \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{} @@ -220,6 +270,7 @@ \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 @@ -235,7 +286,10 @@ % Print the calendar for the given year \newcommand{\printyear}[1]{% \y=#1% -\message{\the\y }% +\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 @@ -267,8 +321,18 @@ \stepcounter{year} \indent \repeat -\message{^^J}\message{^^J} -\newline -\tiny{\ \copyright \ 1999-12-19 \texttt{slobodan@archimed.filfak.ni.ac.yu}; changes 2010-09-20 by \texttt{Martin.Muench@Uni-Bonn.de}} +\message{^^J}\message{^^J}% +\newline% +\tiny{\indent \copyright \ 1999-12-19 \texttt{slobodan@archimed.filfak.ni.ac.yu};\ % +changes v1.0b 2010-09-26 by \texttt{Martin.Muench@Uni-Bonn.de};\ % +\iflanguage{english}{English by Slobodan Jankovi\'{c}.}{% + \iflanguage{german}{Deutsch von Martin M\"{u}nch.}{% + \iflanguage{danish}{Danish af Michael Lodahl.}{% + (Unknown language/translator).% + } + } + } +} + \ifCmRule\cmscale(8,35)\fi% Print cm rule \end{document}
\ No newline at end of file |