2

I believe that this fits within the site parameters. For several years I have produced a calendar for TUG. The latest is for 2018 and can be obtained from [ctan]{https://tug.org/calendar.html} where there are both a4 and letterpaper sized calendars. The calendars consist of two pages per month, one with an illustration and the other with the days noting special holidays with space for listing personal appointments. This year I was asked to provide LaTeX sources so that the calenders could be revised to include Japanese and Scandinavian holidays.

My code consists of three files, a master for A4 paper, another master for letterpaper, and the third (which each of the masters use) for the calendar pictures and months data. In the past I have just edited the last of these for the following year.

Here, I hope, are 2 MWEs for an example A4 calendar.

% calmwe18pa4.tex   Calendar for 2018 (a4paper, mwe)
\documentclass[12pt,a4paper]{memoir}
\usepackage{graphicx}
  \DeclareGraphicsRule{*}{mps}{*}{}
\usepackage{palatino}
\usepackage{pdfpages}
\usepackage{comment}

\setlrmarginsandblock{0.5in}{*}{1.0}
\setulmarginsandblock{1.0in}{*}{1.0}
\setheadfoot{1pt}{1pt}
\checkandfixthelayout

% various lengths for adjusting the layout
\newlength{\cw} \setlength{\cw}{0.115\textwidth}
\newlength{\ch} \setlength{\ch}{0.145\textheight}

\newcommand*{\cntr}[1]{\multicolumn{1}{c}{\large #1}}

\newcommand*{\txt}[1]{{\footnotesize #1}}

% macros for various image sizes

\newcommand*{\Pic}[1]{%
  \clearpage
  {\centering
  \includegraphics[height=0.88\textheight,keepaspectratio]{#1}
  \par}}

\newcommand*{\PicW}[1]{%
  \clearpage  
  {\centering
  \includegraphics[width=\textwidth,keepaspectratio]{#1}
  \par}}

\newcommand*{\Picw}[1]{%
  \clearpage
  {\centering
  \includegraphics[width=0.2\textwidth,keepaspectratio]{#1}
  \par}}

\newcommand*{\pic}[1]{%
  \includegraphics[height=0.2\textheight,keepaspectratio]{#1}}

\newcommand*{\picw}[1]{%
  \includegraphics[height=0.15\textheight,keepaspectratio]{#1}}

\pagestyle{empty}

\begin{document}
  \input{calmwe18pics}
\end{document}

And this is the second MWE.

% calmwe18pics.tex   Calendar pics for mwe 2018
\newcommand*{\info}[2]{%
  \vspace{\onelineskip}%
  {
  #1\ (Original size #2)  \par}}

%%% COVER PAGE

\newcommand*{\covpic}[1]{%
  \includegraphics[height=0.35\textheight,keepaspectratio]{#1}}
\renewcommand*{\covpic}[1]{%
  \includegraphics[width=0.35\textwidth,keepaspectratio]{#1}}

\mbox{} \\
%\covpic{1225-bible-eng} \hfill \covpic{1450-hours-fr}
\covpic{example-image} \hfill \covpic{example-image}
\vfill
\begin{center} \bfseries
{\LARGE Manuscripts 1225 --- 1800 \\[0.8in]}
\HUGE 2018
\end{center}
\vfill
%\covpic{1586-diary-eng} \hfill \covpic{19c-delail-indian}
\covpic{example-image} \hfill \covpic{example-image}
\mbox{}

\newcommand*{\sep}{\hfill / \hfill}

\clearpage

%%% JANUARY illustration and calendar

%\Pic{1225-bible-eng}
%\Pic{example-image}
\clearpage
{\centering
  \includegraphics[height=0.88\textheight,width=\textwidth]{example-image}
  \par}

\info{Leaf from an English theologian's bible with two column Latin text in a protogothic hand, 
on vellum, 1225, 
providing an index to Biblical subjects. Versals in red and blue.}{207 by       255mm}

\clearpage

{\HUGE JANUARY \hfill 2018}

\vspace{2\onelineskip}

\begin{tabular}{|p{\cw}|p{\cw}|p{\cw}|p{\cw}|p{\cw}||p{\cw}|p{\cw}|}%    hline
\cntr{Mon} & \cntr{Tue} & \cntr{Wed} & \cntr{Thu} & \cntr{Fri} & \cntr{Sat} & \cntr{Sun} \\ \hline
1 \txt{New Year's Day} & 2 & 3 & 4 & 5 & 6 & 7 \\[\ch] \hline
8  & 9 & 10 & 11 & 12 & 13 & 14 \\[\ch] \hline
15 \txt{MLK Day (USA)} & 16 & 17 & 18 & 19 & 20 & 21  \\[\ch] \hline
22 & 23 & 24 & 25 & 26 & 27 & 28 \\[\ch] \hline
29 & 30 & 31 &  &  &  &  \\[\ch]
\hline
\end{tabular}

\clearpage

%%% FEBRUARY illustration and calendar

%\Pic{1250-bible-fr}
\clearpage
{\centering
  \includegraphics[height=0.88\textheight,width=\textwidth]{example-image}
  \par}


\info{Leaf from a French Bible 1250. Latin text in two columns of 49 lines each in a tiny
bookhand (equivalent to about 5.5pt in modern terms)  on vellum. 
Black Early Gothic script with some red and blue rubrication.
There is some even smaller handwritten text (commentary/notes?) in brown     ink.}{100 by 148mm}

{\HUGE FEBRUARY \hfill 2018}

\vspace{2\onelineskip}

\begin{tabular}{|p{\cw}|p{\cw}|p{\cw}|p{\cw}|p{\cw}||p{\cw}|p{\cw}|}%  \hline
\cntr{Mon} & \cntr{Tue} & \cntr{Wed} & \cntr{Thu} & \cntr{Fri} &   \cntr{Sat} & \cntr{Sun} \\ \hline
   &  &  &  1  & 2 & 3 & 4 \\[\ch] \hline
5  &  6 & 7 & 8 & 9 & 10 & 11 \\[\ch] \hline
12 &  13 & 14 & 15 & 16 & 17 & 18 \\[\ch] \hline
19 \txt{Presidents' Day (USA)} & 20 & 21 & 22 & 23 & 24 & 25 \\[\ch]    \hline
26 & 27 & 28 &  &  &  &  \\[\ch] \hline
%29 & & & & & & \\[\ch]
\hline
\end{tabular}

\clearpage

%%%% etc etc etc

\clearpage

\renewcommand*{\pic}[1]{%
  \includegraphics[width=0.2\textwidth,height=0.2\textheight]{#1}}
\newcommand*{\picex}{%
  \pic{example-image}}
\begin{center}
\begin{comment}
\begin{tabular}{cccc}
\picex & \pic{1250-bible-fr} & \pic{1260-homily-italy} & \pic{1445-hours-fr} \\
\pic{1450-hours-fr} & \pic{14c-hours-fr} & \pic{1472-psalter-fr} & \pic{1520-hours-fl} \\
\picw{1586-diary-eng} & \pic{1690-delail-arabic} & \pic{17c-koran-indian} & \pic{19c-delail-indian} % \picw{1800-gita-kashmir}
\end{tabular}
\end{comment}
\begin{tabular}{cccc}
\picex & \picex & \picex & \picex \\
\picex & \picex & \picex & \picex \\
\picex & \picex & \picex & \picex \\
\end{tabular}
\end{center}

%\mbox{}
\vfill
%\begin{adjustwidth}{2in}{2in}
\setlength{\parindent}{2em}
\flushleftright

The original leaves are from the Herries collection. They were scanned and then 
magnified or shrunk to fit the available space. Peter Wilson's \LaTeX\ memoir class was 
used to typeset the calendar. 

\vfill
\begin{center}
The Herries Press, Kenilworth, 2017 \\[0.5\onelineskip]
%\includegraphics[scale=0.6]{anvil.15}
\includegraphics[scale=0.15]{example-image}
\end{center}

\endinput

I have looked on CTAN to see if there are any classes/packages that might provide for something similar but as far as I could see they were concerned with just laying out the dates with no opportunity to add anything to them.

I will not be changing the way that I work but am wondering if anyone thinks it would be worthwhile creating a class/package, and if so would anyone be willing to try it and submit a successful result to CTAN for general use?

Peter W.

  • 1
    doesn't just selecting it in emacs and then middle clicking (or whatever passes for paste in the operating system clipboard work? – David Carlisle Sep 21 '17 at 19:31
  • 1
    @JohnKormylo -- for me, on some unknown-by-me linux system using x-windows on a windows platform, i mouse-over the text in an emacs window, then position the cursor in the tex.sx browser window and type ctrl-v . (ctrl-c and ctrl-v aren't at all helpful in emacs; they do something unwanted.) – barbara beeton Sep 21 '17 at 20:58
  • 1
    @MichaelPalmer I wouldn't call those simple. less would be more here. – cfr Sep 22 '17 at 1:26
  • 1
    Thank you for all the suggestions. I finally went with gedit and then had to add the 4 initial spaces for each pasted line. – Peter Wilson Sep 22 '17 at 18:32
  • 3
    For future reference: In emacs, if you select the entire buffer (C-xh) (make sure the file ends with a newline), you can then insert a rectangle 4 spaces wide with C-xrt (you are then prompted for the text, enter 4 spaces and hit return). The 4 spaces will then be prepended to every line in the file. – dedded Sep 22 '17 at 19:12
2

Answering only the first of the two questions:

There are some approaches out there, maybe not on CTAN, but searching google for “latex calendar github” reveals some of these. See for example https://github.com/profound-labs/wallcalendar, which I took as a basis for my own design (which involves LaTeX only for the dates, scribus for the rest). This is a bit more “fancy” than yours, but you said you wouldn't switch anyway …

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.