You are currently browsing the tag archive for the ‘rowstyle’ tag.
E questo è il momento di divertirsi un po’. Ma come realizzare un calendario, preferibilmente annuale e su un unico foglio?
Prima idea, che ho ritrovato tra dei miei vecchi progetti: mettere il tutto in una tabella e inserire i giorni a mano. Lungo e noioso, ma sicuro e facile.
% %% in preamble: % \usepackage{array} % to define row style: \setlength{\extrarowheight}{3pt} \newcolumntype{£}{>{\global\let\currentrowstyle\relax}} \newcolumntype{^}{>{\currentrowstyle}} \newcommand{\rowstyle}[1]{\gdef\currentrowstyle{#1}#1} % %% in document: % \footnotesize \color[gray]{.3} \begin{minipage}[t]{\textwidth} \begin{tabular*}{.4cm}[t]{l} \\ lun \\ mar \\ mer \\ gio \\ ven \\ sab \\ dom \end{tabular*}% \hspace{.7cm} \begin{tabular*}{1.6cm}[t]{@{\extracolsep{0pt}}£c@{\extracolsep{3pt}}^c@{\extracolsep{3pt}}^c@{\extracolsep{3pt}}^c@{\extracolsep{3pt}}^c@{\extracolsep{0pt}}} \multicolumn{5}{c}{\bfseries \itshape gennaio} \\ &4 &11 &18 &25 \\ &5 &12 &19 &26 \\ &6 &13 &20 &27 \\ 1 &7 &14 &21 &28 \\ 2 &8 &15 &22 &29 \\ 3 &9 &16 &23 &30 \\ \rowstyle{\bfseries} 4 &10 &17 &24 &31 \end{tabular*}% \hspace{.7cm} \begin{tabular*}{1.6cm}[t]{@{\extracolsep{0pt}}£c@{\extracolsep{3pt}}^c@{\extracolsep{3pt}}^c@{\extracolsep{3pt}}^c@{\extracolsep{3pt}}^c@{\extracolsep{0pt}}} \multicolumn{5}{c}{\bfseries \itshape febbraio}\\ %... the same until June \end{minipage} \vspace{.5cm} \begin{minipage}[t]{\textwidth} \begin{tabular*}{.4cm}[t]{l} \\ lun \\ mar \\ mer \\ gio \\ ven \\ sab \\ dom \end{tabular*}% \hspace{.7cm} \begin{tabular*}{1.6cm}[t]{@{\extracolsep{0pt}}£c@{\extracolsep{3pt}}^c@{\extracolsep{3pt}}^c@{\extracolsep{3pt}}^c@{\extracolsep{3pt}}^c@{\extracolsep{0pt}}} \multicolumn{5}{c}{\bfseries \itshape luglio} \\ &4 &11 &18 &25 \\ &5 &12 &19 &26 \\ &6 &13 &20 &27 \\ 1 &7 &14 &21 &28 \\ 2 &8 &15 &22 & 29 \\ 3 &9 &16 &23 & 30 \\ \rowstyle{\bfseries} 4 &10 &17 &24 &31 \end{tabular*}% \hspace{.7cm} \begin{tabular*}{1.6cm}[t]{@{\extracolsep{0pt}}£c@{\extracolsep{3pt}}^c@{\extracolsep{3pt}}^c@{\extracolsep{3pt}}^c@{\extracolsep{3pt}}^c@{\extracolsep{0pt}}} \multicolumn{5}{c}{\bfseries \itshape agosto}\\ %... the same until December \end{minipage} \vspace{.7cm} \begin{minipage}[t]{3cm} \begin{flushleft} \Huge \bfseries \itshape 2008 \end{flushleft} \end{minipage}
Il risultato è riportato in figura (le date sono puramente dimostrative, frutto di un meticoloso copia-incolla 🙂 ).
Non è tutta farina del mio sacco: il modo di definire le righe è preso pari pari dalle UK-FAQ (vedere qui).
Per velocizzare la scrittura delle tabelle contenenti i mesi, si può anche definire direttamente un nuovo ambiente:
%% in preamble: % % to define a style for each tabular containing a month \newenvironment{monthtab}[1]{\begin{tabular*}{1.6cm}[t]{@{\extracolsep{0pt}}£c@{\extracolsep{3pt}}^c@{\extracolsep{3pt}}^c@{\extracolsep{3pt}}^c@{\extracolsep{3pt}}^c@{\extracolsep{0pt}}}\multicolumn{5}{c}{\bfseries \itshape #1}\\}{\end{tabular*}} %% in document: % %... \begin{monthtab}{gennaio} % ... \end{monthtab}