1

I would like to design with LaTeX a calendar that would look like this:

enter image description here

I would like to have some advise about how to draw the frames and how to put some text (or tabular formatted text) in it? I am not a TikZ user but I am ready to learn a little bit of it (if it is the best solution).

As about how to compute the dates, etc. it is not a problem at all since I plan to maybe use Python to generate the LaTeX code.


PS:

Since I might use Python to generate the code, I don't think I would need any already existing library that manages calendar. So, this question is more about how to draw a canvas as in the picture above.


My first attempt

I did

\documentclass[landscape]{article}
\usepackage[table,xcdraw]{xcolor}
\usepackage{amsfonts}
\usepackage{tabularx}
\usepackage{wasysym}

%%%%%%%%%%
% Layout %
%%%%%%%%%%
\def\myHMargin{1cm}
\def\myVMargin{1cm}
\usepackage[hmargin={\myHMargin,\myHMargin},
            vmargin={\myVMargin,\myVMargin}]{geometry}



\def \x
{\small
\begin{tabular}{@{} >{\centering\let\newline\\ \arraybackslash\hspace{1pt}}m{3.5cm} <{\hspace*{1mm}} }
\cellcolor[HTML]{C0C0C0}{}\\[-3mm]
{\cellcolor[HTML]{C0C0C0}{\color[HTML]{000000} \footnotesize $\, \mathbf{{100}}$ \hfill {\footnotesize25 juin}}} \\[1.5mm]
\hfill $\times \hspace{-1pt}\approx\hspace{-1pt}\checked$ \\                                                          
\dotfill $\square$\,$\square$\,$\square$ \\
\dotfill $\square$\,$\square$\,$\square$ \\
\dotfill $\square$\,$\square$\,$\square$ \\
\dotfill $\square$\,$\square$\,$\square$ \\[1mm]
\end{tabular}}

\begin{document}

\setlength{\tabcolsep}{0pt}
\begin{tabular}{|c|c|c|c|c|c|c|}
\hline
lundi & mardi & mercredi & jeudi & vendredi & samedi & dimanche \\
\hline
\\[3mm]
\hline
\x & \x & \x& \x & \x & \x& \x\\
\hline
\x & \x & \x& \x & \x & \x& \x\\
\hline
\x & \x & \x& \x & \x & \x& \x\\
\hline
\end{tabular}


\end{document}

I'm pretty satisfied with the result but there is a still a problem with rule (see picture below).

Feel free to make my coder better.

enter image description here

  • Not very surprising that the col lines are missing since you are calling \\[3mm] after the first column. Try replacing with &&&&&&\\[3mm]. Not sure what else there is left to answer in this question..? – Troy Jul 5 '18 at 13:27
  • Thanks Troy. No, that's the opposite, I want to have a white empty space between the first line and the actual calendar. Can you help? – Colas Jul 5 '18 at 13:37
  • 3
    Oh I misread the question. \multicolumn{1}{c}{}\\[3mm] then? – Troy Jul 5 '18 at 13:47
  • Don't do \def\x!! – cfr Jul 5 '18 at 21:21
  • must...resist...a handwritten...answer – percusse Jul 5 '18 at 21:28

Your Answer

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

Browse other questions tagged or ask your own question.